feat: update source files, Dockerfile, vite config and service worker
This commit is contained in:
@@ -25,7 +25,7 @@ export const CCCabinetsPanel: React.FC = () => {
|
||||
return createTheme({ palette: { mode, divider: 'var(--color-divider)' } });
|
||||
}, [tldrawPreferences?.colorScheme, prefersDarkMode]);
|
||||
|
||||
const API_BASE: string = (import.meta as unknown as { env?: { VITE_API_BASE?: string } })?.env?.VITE_API_BASE || (location.port.startsWith('517') ? 'http://127.0.0.1:8080' : '/api');
|
||||
const API_BASE: string = import.meta.env.VITE_API_BASE || (location.port.startsWith('517') ? 'http://127.0.0.1:8080' : '/api');
|
||||
|
||||
type RequestInitLite = { method?: string; body?: string | FormData | Blob | null; headers?: Record<string, string> } | undefined;
|
||||
const apiFetch = async (url: string, init?: RequestInitLite) => {
|
||||
@@ -75,7 +75,7 @@ export const CCCabinetsPanel: React.FC = () => {
|
||||
<ThemeProvider theme={theme}>
|
||||
<Box sx={{ p: 1, height: '100%', display: 'flex', flexDirection: 'column', gap: 1 }}>
|
||||
<Toolbar>
|
||||
<Button size="small" variant="outlined" startIcon={<AddIcon/>} onClick={() => { setNewName(''); setCreateOpen(true); }}>New Cabinet</Button>
|
||||
<Button size="small" variant="outlined" startIcon={<AddIcon />} onClick={() => { setNewName(''); setCreateOpen(true); }}>New Cabinet</Button>
|
||||
</Toolbar>
|
||||
<Grid container spacing={1} sx={{ overflow: 'auto' }}>
|
||||
{cabinets.map(c => (
|
||||
|
||||
Reference in New Issue
Block a user