chore: rebrand to Sanctum for self-hosted instance
This commit is contained in:
parent
821ff30d40
commit
1eb09a589a
7 changed files with 64 additions and 28 deletions
10
cloud.mithraic.sanctum.desktop
Normal file
10
cloud.mithraic.sanctum.desktop
Normal file
|
|
@ -0,0 +1,10 @@
|
||||||
|
[Desktop Entry]
|
||||||
|
Name=Sanctum
|
||||||
|
Comment=Open source, user-first chat platform
|
||||||
|
Exec=sanctum
|
||||||
|
Terminal=false
|
||||||
|
Type=Application
|
||||||
|
Icon=cloud.mithraic.sanctum
|
||||||
|
Categories=Network;InstantMessaging
|
||||||
|
StartupWMClass=sanctum
|
||||||
|
X-Desktop-File-Install-Version=0.26
|
||||||
29
cloud.mithraic.sanctum.metainfo.xml
Normal file
29
cloud.mithraic.sanctum.metainfo.xml
Normal file
|
|
@ -0,0 +1,29 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<component type="desktop">
|
||||||
|
<id>cloud.mithraic.sanctum</id>
|
||||||
|
<launchable type="desktop-id">cloud.mithraic.sanctum.desktop</launchable>
|
||||||
|
<name>Sanctum</name>
|
||||||
|
<developer id="cloud.mithraic">
|
||||||
|
<name>izzy</name>
|
||||||
|
</developer>
|
||||||
|
<summary>Open source, user-first chat platform</summary>
|
||||||
|
<metadata_license>CC0-1.0</metadata_license>
|
||||||
|
<project_license>AGPL-3.0</project_license>
|
||||||
|
<description>
|
||||||
|
<p>Sanctum is a self-hosted Stoat client with Avia Client mod support.</p>
|
||||||
|
</description>
|
||||||
|
<content_rating type="oars-1.1">
|
||||||
|
<content_attribute id="social-chat">intense</content_attribute>
|
||||||
|
<content_attribute id="social-info">intense</content_attribute>
|
||||||
|
<content_attribute id="social-audio">intense</content_attribute>
|
||||||
|
<content_attribute id="social-contacts">intense</content_attribute>
|
||||||
|
</content_rating>
|
||||||
|
<requires>
|
||||||
|
<display_length compare="ge">940</display_length>
|
||||||
|
<internet>always</internet>
|
||||||
|
</requires>
|
||||||
|
<supports>
|
||||||
|
<control>keyboard</control>
|
||||||
|
<control>pointing</control>
|
||||||
|
</supports>
|
||||||
|
</component>
|
||||||
|
|
@ -7,15 +7,14 @@ import { MakerZIP } from "@electron-forge/maker-zip";
|
||||||
import { FusesPlugin } from "@electron-forge/plugin-fuses";
|
import { FusesPlugin } from "@electron-forge/plugin-fuses";
|
||||||
import { VitePlugin } from "@electron-forge/plugin-vite";
|
import { VitePlugin } from "@electron-forge/plugin-vite";
|
||||||
import { VitePluginBuildConfig } from "@electron-forge/plugin-vite/dist/Config";
|
import { VitePluginBuildConfig } from "@electron-forge/plugin-vite/dist/Config";
|
||||||
import { PublisherGithub } from "@electron-forge/publisher-github";
|
|
||||||
import type { ForgeConfig } from "@electron-forge/shared-types";
|
import type { ForgeConfig } from "@electron-forge/shared-types";
|
||||||
import { FuseV1Options, FuseVersion } from "@electron/fuses";
|
import { FuseV1Options, FuseVersion } from "@electron/fuses";
|
||||||
import * as fs from "fs";
|
import * as fs from "fs";
|
||||||
|
|
||||||
const STRINGS = {
|
const STRINGS = {
|
||||||
author: "Revolt Platforms LTD",
|
author: "izzy",
|
||||||
name: "AviaClient",
|
name: "Sanctum",
|
||||||
execName: "aviaclient-desktop",
|
execName: "sanctum",
|
||||||
description: "Open source user-first chat platform.",
|
description: "Open source user-first chat platform.",
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -45,7 +44,7 @@ if (!process.env.PLATFORM) {
|
||||||
}),
|
}),
|
||||||
new MakerFlatpak({
|
new MakerFlatpak({
|
||||||
options: {
|
options: {
|
||||||
id: "chat.stoat.stoat-desktop",
|
id: "cloud.mithraic.sanctum",
|
||||||
description: STRINGS.description,
|
description: STRINGS.description,
|
||||||
productName: STRINGS.name,
|
productName: STRINGS.name,
|
||||||
productDescription: STRINGS.description,
|
productDescription: STRINGS.description,
|
||||||
|
|
@ -157,14 +156,6 @@ const config: ForgeConfig = {
|
||||||
[FuseV1Options.OnlyLoadAppFromAsar]: true,
|
[FuseV1Options.OnlyLoadAppFromAsar]: true,
|
||||||
}),
|
}),
|
||||||
],
|
],
|
||||||
publishers: [
|
|
||||||
new PublisherGithub({
|
|
||||||
repository: {
|
|
||||||
owner: "AvaLilac",
|
|
||||||
name: "for-desktop",
|
|
||||||
},
|
|
||||||
}),
|
|
||||||
],
|
|
||||||
};
|
};
|
||||||
|
|
||||||
export default config;
|
export default config;
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,10 @@
|
||||||
{
|
{
|
||||||
"name": "stoat-desktop",
|
"name": "sanctum",
|
||||||
"productName": "stoat-desktop",
|
"productName": "Sanctum",
|
||||||
"version": "1.3.0",
|
"version": "1.3.0",
|
||||||
"aviaVersion": "1.6.0",
|
"aviaVersion": "1.6.0",
|
||||||
"main": ".vite/build/main.js",
|
"main": ".vite/build/main.js",
|
||||||
"repository": "stoatchat/desktop",
|
"repository": "https://git.mithraic.cloud/ad3laid3/sanctum",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"start": "electron-forge start",
|
"start": "electron-forge start",
|
||||||
"package": "electron-forge package",
|
"package": "electron-forge package",
|
||||||
|
|
|
||||||
22
src/main.ts
22
src/main.ts
|
|
@ -14,12 +14,18 @@ import { initDiscordRpc } from "./native/discordRpc";
|
||||||
import { initTray } from "./native/tray";
|
import { initTray } from "./native/tray";
|
||||||
import { BUILD_URL, createMainWindow, mainWindow } from "./native/window";
|
import { BUILD_URL, createMainWindow, mainWindow } from "./native/window";
|
||||||
|
|
||||||
|
if (process.platform === "linux") {
|
||||||
|
app.commandLine.appendSwitch("disable-gpu-sandbox");
|
||||||
|
app.commandLine.appendSwitch("no-zygote");
|
||||||
|
app.commandLine.appendSwitch("use-gl", "desktop");
|
||||||
|
}
|
||||||
|
|
||||||
const applyAppName = () => {
|
const applyAppName = () => {
|
||||||
try {
|
try {
|
||||||
app.setName("AviaClient");
|
app.setName("Sanctum");
|
||||||
app.name = "AviaClient";
|
app.name = "Sanctum";
|
||||||
if (process.platform === "win32") {
|
if (process.platform === "win32") {
|
||||||
app.setAppUserModelId("AviaClient");
|
app.setAppUserModelId("cloud.mithraic.sanctum");
|
||||||
}
|
}
|
||||||
} catch {
|
} catch {
|
||||||
/* empty */
|
/* empty */
|
||||||
|
|
@ -87,10 +93,10 @@ if (acquiredLock) {
|
||||||
applyAppName();
|
applyAppName();
|
||||||
createMainWindow();
|
createMainWindow();
|
||||||
if (mainWindow) {
|
if (mainWindow) {
|
||||||
mainWindow.setTitle("AviaClient");
|
mainWindow.setTitle("Sanctum");
|
||||||
mainWindow.on("page-title-updated", (e) => {
|
mainWindow.on("page-title-updated", (e) => {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
mainWindow.setTitle("AviaClient");
|
mainWindow.setTitle("Sanctum");
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
loadInject();
|
loadInject();
|
||||||
|
|
@ -107,7 +113,7 @@ if (acquiredLock) {
|
||||||
setBadgeCount(0);
|
setBadgeCount(0);
|
||||||
|
|
||||||
if (process.platform === "win32") {
|
if (process.platform === "win32") {
|
||||||
app.setAppUserModelId("AviaClient");
|
app.setAppUserModelId("cloud.mithraic.sanctum");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (process.platform === "darwin") {
|
if (process.platform === "darwin") {
|
||||||
|
|
@ -133,10 +139,10 @@ if (acquiredLock) {
|
||||||
if (BrowserWindow.getAllWindows().length === 0) {
|
if (BrowserWindow.getAllWindows().length === 0) {
|
||||||
createMainWindow();
|
createMainWindow();
|
||||||
if (mainWindow) {
|
if (mainWindow) {
|
||||||
mainWindow.setTitle("AviaClient");
|
mainWindow.setTitle("Sanctum");
|
||||||
mainWindow.on("page-title-updated", (e) => {
|
mainWindow.on("page-title-updated", (e) => {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
mainWindow.setTitle("AviaClient");
|
mainWindow.setTitle("Sanctum");
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
loadInject();
|
loadInject();
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,7 @@ export async function initDiscordRpc() {
|
||||||
|
|
||||||
rpc.on("ready", () =>
|
rpc.on("ready", () =>
|
||||||
rpc.setActivity({
|
rpc.setActivity({
|
||||||
details: "Chatting with others on AviaClient",
|
details: "Chatting with others on Sanctum",
|
||||||
state: "stoat.chat",
|
state: "stoat.chat",
|
||||||
largeImageKey: "qr",
|
largeImageKey: "qr",
|
||||||
largeImageText: "Join Stoat!",
|
largeImageText: "Join Stoat!",
|
||||||
|
|
|
||||||
|
|
@ -27,7 +27,7 @@ export function initTray() {
|
||||||
const trayIcon = createTrayIcon();
|
const trayIcon = createTrayIcon();
|
||||||
tray = new Tray(trayIcon);
|
tray = new Tray(trayIcon);
|
||||||
updateTrayMenu();
|
updateTrayMenu();
|
||||||
tray.setToolTip("AviaClient for Desktop");
|
tray.setToolTip("Sanctum for Desktop");
|
||||||
tray.setImage(trayIcon);
|
tray.setImage(trayIcon);
|
||||||
tray.on("click", () => {
|
tray.on("click", () => {
|
||||||
config.sync();
|
config.sync();
|
||||||
|
|
@ -46,7 +46,7 @@ export function initTray() {
|
||||||
export function updateTrayMenu() {
|
export function updateTrayMenu() {
|
||||||
tray.setContextMenu(
|
tray.setContextMenu(
|
||||||
Menu.buildFromTemplate([
|
Menu.buildFromTemplate([
|
||||||
{ label: "AviaClient for Desktop", type: "normal", enabled: false },
|
{ label: "Sanctum for Desktop", type: "normal", enabled: false },
|
||||||
{
|
{
|
||||||
label: "Versions",
|
label: "Versions",
|
||||||
type: "submenu",
|
type: "submenu",
|
||||||
|
|
@ -57,7 +57,7 @@ export function updateTrayMenu() {
|
||||||
enabled: false,
|
enabled: false,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: `AviaClient: ${aviaVersion}`,
|
label: `Sanctum: ${aviaVersion}`,
|
||||||
type: "normal",
|
type: "normal",
|
||||||
enabled: false,
|
enabled: false,
|
||||||
},
|
},
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue