@trops/dash-core 0.1.259 → 0.1.260
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/electron/index.js +50 -39
- package/dist/electron/index.js.map +1 -1
- package/dist/index.esm.js +7 -2
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +7 -2
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/electron/index.js
CHANGED
|
@@ -33290,51 +33290,62 @@ async function processDashboardConfig(
|
|
|
33290
33290
|
const existingThemes = themeResult.themes || {};
|
|
33291
33291
|
const themeKey = bundledTheme.key;
|
|
33292
33292
|
|
|
33293
|
-
if (
|
|
33294
|
-
|
|
33295
|
-
|
|
33296
|
-
|
|
33297
|
-
|
|
33298
|
-
|
|
33299
|
-
|
|
33300
|
-
|
|
33301
|
-
|
|
33302
|
-
|
|
33303
|
-
|
|
33304
|
-
|
|
33305
|
-
appId,
|
|
33306
|
-
themeKey,
|
|
33307
|
-
themeData,
|
|
33308
|
-
);
|
|
33309
|
-
themeInstalled = themeKey;
|
|
33310
|
-
console.log(
|
|
33311
|
-
`[DashboardConfigController] Installed bundled theme: ${themeKey}`,
|
|
33312
|
-
);
|
|
33313
|
-
} else if (
|
|
33314
|
-
!bundledTheme.data &&
|
|
33315
|
-
bundledTheme.registryPackage &&
|
|
33316
|
-
themeKey &&
|
|
33317
|
-
!existingThemes[themeKey]
|
|
33318
|
-
) {
|
|
33319
|
-
// Fallback: try to install from registry by package name
|
|
33320
|
-
try {
|
|
33321
|
-
const {
|
|
33322
|
-
installThemeFromRegistry,
|
|
33323
|
-
} = themeRegistryController$1;
|
|
33324
|
-
await installThemeFromRegistry(
|
|
33293
|
+
if (themeKey) {
|
|
33294
|
+
if (bundledTheme.data && !existingThemes[themeKey]) {
|
|
33295
|
+
// Theme is new — install it
|
|
33296
|
+
const themeData = { ...bundledTheme.data };
|
|
33297
|
+
if (bundledTheme.registryPackage) {
|
|
33298
|
+
themeData._registryMeta = {
|
|
33299
|
+
source: "dashboard-import",
|
|
33300
|
+
packageName: bundledTheme.registryPackage,
|
|
33301
|
+
installedAt: new Date().toISOString(),
|
|
33302
|
+
};
|
|
33303
|
+
}
|
|
33304
|
+
const saveResult = themeController$3.saveThemeForApplication(
|
|
33325
33305
|
win,
|
|
33326
33306
|
appId,
|
|
33327
|
-
|
|
33307
|
+
themeKey,
|
|
33308
|
+
themeData,
|
|
33328
33309
|
);
|
|
33329
|
-
|
|
33310
|
+
if (saveResult.error) {
|
|
33311
|
+
console.warn(
|
|
33312
|
+
`[DashboardConfigController] Theme save failed: ${saveResult.message}`,
|
|
33313
|
+
);
|
|
33314
|
+
} else {
|
|
33315
|
+
console.log(
|
|
33316
|
+
`[DashboardConfigController] Installed bundled theme: ${themeKey}`,
|
|
33317
|
+
);
|
|
33318
|
+
}
|
|
33319
|
+
} else if (
|
|
33320
|
+
!bundledTheme.data &&
|
|
33321
|
+
bundledTheme.registryPackage &&
|
|
33322
|
+
!existingThemes[themeKey]
|
|
33323
|
+
) {
|
|
33324
|
+
// Fallback: try to install from registry by package name
|
|
33325
|
+
try {
|
|
33326
|
+
const {
|
|
33327
|
+
installThemeFromRegistry,
|
|
33328
|
+
} = themeRegistryController$1;
|
|
33329
|
+
await installThemeFromRegistry(
|
|
33330
|
+
win,
|
|
33331
|
+
appId,
|
|
33332
|
+
bundledTheme.registryPackage,
|
|
33333
|
+
);
|
|
33334
|
+
console.log(
|
|
33335
|
+
`[DashboardConfigController] Installed theme from registry: ${bundledTheme.registryPackage}`,
|
|
33336
|
+
);
|
|
33337
|
+
} catch (registryErr) {
|
|
33338
|
+
console.warn(
|
|
33339
|
+
`[DashboardConfigController] Could not install theme from registry: ${registryErr.message}`,
|
|
33340
|
+
);
|
|
33341
|
+
}
|
|
33342
|
+
} else if (existingThemes[themeKey]) {
|
|
33330
33343
|
console.log(
|
|
33331
|
-
`[DashboardConfigController]
|
|
33332
|
-
);
|
|
33333
|
-
} catch (registryErr) {
|
|
33334
|
-
console.warn(
|
|
33335
|
-
`[DashboardConfigController] Could not install theme from registry: ${registryErr.message}`,
|
|
33344
|
+
`[DashboardConfigController] Theme already exists: ${themeKey}`,
|
|
33336
33345
|
);
|
|
33337
33346
|
}
|
|
33347
|
+
// Always bind workspace to theme key
|
|
33348
|
+
themeInstalled = themeKey;
|
|
33338
33349
|
}
|
|
33339
33350
|
} catch (themeErr) {
|
|
33340
33351
|
console.warn(
|