25 lines · 1.1 KB · TypeScript
RawDownload
import type { DesktopAppBranding } from "@t3tools/contracts"; function readInjectedDesktopAppBranding(): DesktopAppBranding | null {  if (typeof window === "undefined") {    return null;  }   return window.desktopBridge?.getAppBranding?.() ?? null;} const injectedDesktopAppBranding = readInjectedDesktopAppBranding();const hostedAppChannel = import.meta.env.VITE_HOSTED_APP_CHANNEL?.trim().toLowerCase(); export const HOSTED_APP_CHANNEL =  hostedAppChannel === "latest" || hostedAppChannel === "nightly" ? hostedAppChannel : null;export const HOSTED_APP_CHANNEL_LABEL =  HOSTED_APP_CHANNEL === "nightly" ? "Nightly" : HOSTED_APP_CHANNEL === "latest" ? "Latest" : null;export const APP_BASE_NAME = injectedDesktopAppBranding?.baseName ?? "T3 Code";export const APP_STAGE_LABEL =  injectedDesktopAppBranding?.stageLabel ??  HOSTED_APP_CHANNEL_LABEL ??  (import.meta.env.DEV ? "Dev" : "Alpha");export const APP_DISPLAY_NAME =  injectedDesktopAppBranding?.displayName ?? `${APP_BASE_NAME} (${APP_STAGE_LABEL})`;export const APP_VERSION = import.meta.env.APP_VERSION || "0.0.0";

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t