mirror of
https://github.com/lobehub/lobehub.git
synced 2026-03-26 13:19:34 +07:00
✨ 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:
@@ -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';
|
||||
};
|
||||
|
||||
|
||||
@@ -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']);
|
||||
|
||||
@@ -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'
|
||||
|
||||
Reference in New Issue
Block a user