Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(desktop): Stop hiding an installed Linux launcher with the URL handler entry #31405

Openandersk(GitHub profile, opens in a new tab)wants to merge 7 commits intomain fromrefs/pull/31405/headopened View on GitHub

Showing 7 changed files with 12 additions and 1 deletion (loading 4).

x
0 of 7 viewed, 7 left
1 addition and 0 deletionsapps/desktop/src/app/DesktopConfig.tsModified
View file
@@ -37,6 +37,7 @@
appDataDirectory: trimmedString("APPDATA"),
xdgConfigHome: trimmedString("XDG_CONFIG_HOME"),
xdgDataHome: trimmedString("XDG_DATA_HOME"),
+ xdgDataDirs: Config.String("XDG_DATA_DIRS").pipe(Config.option),
t3Home: trimmedString("T3CODE_HOME"),
devServerUrl: Config.URL("VITE_DEV_SERVER_URL").pipe(Config.option),
appUserModelIdOverride: trimmedString("T3CODE_DESKTOP_APP_USER_MODEL_ID"),
6 additions and 0 deletionsapps/desktop/src/app/DesktopEarlyElectronStartup.tsModified
View file
@@ -33,6 +33,12 @@
export const resolveLinuxDesktopEntryName = (isDevelopment: boolean): string =>
isDevelopment ? "com.t3tools.T3Code.Development.desktop" : "com.t3tools.T3Code.desktop";
​
+// XDG Base Directory spec: relative entries are invalid, and unset or empty means the default.
+export const resolveXdgDataDirs = (value: string | undefined): ReadonlyArray<string> => {
+ const dirs = (value ?? "").split(":").filter((dir) => dir.startsWith("/"));
+ return dirs.length > 0 ? dirs : ["/usr/local/share", "/usr/share"];
+};
+​
const trimNonEmpty = (value: string | undefined): string | null => {
const trimmed = value?.trim();
return trimmed && trimmed.length > 0 ? trimmed : null;
5 additions and 1 deletionapps/desktop/src/app/DesktopEnvironment.tsModified
View file
@@ -13,7 +13,7 @@