feat: add single-port reverse proxy deployment support
This commit is contained in:
@@ -38,6 +38,7 @@ export function AppShell({ children }: { children: React.ReactNode }) {
|
||||
const username = useSessionStore((state) => state.username)
|
||||
const clearSession = useSessionStore((state) => state.clearSession)
|
||||
const fullPlayerOpen = usePlayerStore((state) => state.fullPlayerOpen)
|
||||
const currentOrigin = typeof window !== 'undefined' ? window.location.origin : ''
|
||||
const [settingsOpen, setSettingsOpen] = useState(false)
|
||||
const [userMenuOpen, setUserMenuOpen] = useState(false)
|
||||
const [paletteOpen, setPaletteOpen] = useState(false)
|
||||
@@ -87,7 +88,7 @@ export function AppShell({ children }: { children: React.ReactNode }) {
|
||||
<div className="absolute right-0 top-10 z-30 w-64 overflow-hidden rounded-xl border border-[#24314f] bg-[#0d1528] shadow-2xl">
|
||||
<div className="border-b border-[#24314f] px-4 py-3">
|
||||
<div className="text-xl font-semibold text-white">{username ?? 'demo'}</div>
|
||||
<div className="mt-1 text-sm text-slate-400">https://music.daemonlord.ru</div>
|
||||
<div className="mt-1 text-sm text-slate-400">{currentOrigin || 'https://music.example.com'}</div>
|
||||
</div>
|
||||
<button className="flex w-full items-center justify-between px-4 py-3 text-left text-sm text-slate-100 hover:bg-[#18233a]" type="button">
|
||||
Сочетания клавиш
|
||||
|
||||
@@ -79,7 +79,7 @@ export type PlaylistDetail = PlaylistSummary & {
|
||||
tracks: Track[]
|
||||
}
|
||||
|
||||
const API_BASE = import.meta.env.VITE_API_BASE ?? 'http://localhost:4040'
|
||||
const API_BASE = import.meta.env.VITE_API_BASE ?? ''
|
||||
|
||||
async function request<T>(path: string, init?: RequestInit): Promise<T> {
|
||||
const token = useSessionStore.getState().token
|
||||
|
||||
Reference in New Issue
Block a user