feat(desktop): unify canary with stable app name/icon, add channel tag in About (#12881)

- Use same app name (LobeHub) and icon as stable for canary builds
- Add build channel tag in Settings > About for non-stable channels (Canary, Nightly, Beta)
- Add getBuildChannel IPC to expose build-time channel for display

Made-with: Cursor
This commit is contained in:
Innei
2026-03-10 16:41:56 +08:00
committed by GitHub
parent 5e468cd850
commit c087134953
8 changed files with 37 additions and 6 deletions

View File

@@ -90,8 +90,8 @@ const protocolScheme = getProtocolScheme();
// Determine icon file based on version type
const getIconFileName = () => {
if (isStable) return 'Icon';
// nightly, canary share pre-release icon
if (isStable || isCanary) return 'Icon';
// nightly uses pre-release icon
return 'Icon-nightly';
};

View File

@@ -49,6 +49,16 @@ export default class UpdaterCtr extends ControllerModule {
return this.app.storeManager.get('updateChannel') ?? 'stable';
}
/**
* Get the build-time channel (stable, nightly, canary, beta).
* Used for display in About page to distinguish pre-release builds.
*/
@IpcMethod()
async getBuildChannel(): Promise<string> {
const { BUILD_CHANNEL } = await import('@/modules/updater/configs');
return BUILD_CHANNEL;
}
@IpcMethod()
async setUpdateChannel(channel: UpdateChannel): Promise<void> {
const validChannels = new Set(['stable', 'nightly', 'canary']);

View File

@@ -6,6 +6,8 @@ import { getDesktopEnv } from '@/env';
// Build-time default channel, can be overridden at runtime via store
const rawChannel = getDesktopEnv().UPDATE_CHANNEL || 'stable';
const VALID_CHANNELS = new Set<UpdateChannel>(['stable', 'nightly', 'canary']);
/** Raw build channel for display (stable, nightly, canary, beta) */
export const BUILD_CHANNEL: string = rawChannel;
export const UPDATE_CHANNEL: UpdateChannel = VALID_CHANNELS.has(rawChannel as UpdateChannel)
? (rawChannel as UpdateChannel)
: rawChannel === 'beta'