mirror of
https://github.com/maziggy/bambuddy.git
synced 2026-10-18 03:54:17 +02:00
Re-arranged settings
This commit is contained in:
@@ -222,31 +222,31 @@ describe('SettingsPage', () => {
|
||||
});
|
||||
});
|
||||
|
||||
describe('Queue tab', () => {
|
||||
it('can switch to Queue tab', async () => {
|
||||
describe('Workflow tab', () => {
|
||||
it('can switch to Workflow tab', async () => {
|
||||
const user = userEvent.setup();
|
||||
render(<SettingsPage />);
|
||||
|
||||
await waitFor(() => {
|
||||
expect(screen.getByText('Queue')).toBeInTheDocument();
|
||||
expect(screen.getByText('Workflow')).toBeInTheDocument();
|
||||
});
|
||||
|
||||
await user.click(screen.getByText('Queue'));
|
||||
await user.click(screen.getByText('Workflow'));
|
||||
|
||||
await waitFor(() => {
|
||||
expect(screen.getByText('Staggered Start')).toBeInTheDocument();
|
||||
});
|
||||
});
|
||||
|
||||
it('shows stagger settings on Queue tab', async () => {
|
||||
it('shows stagger settings on Workflow tab', async () => {
|
||||
const user = userEvent.setup();
|
||||
render(<SettingsPage />);
|
||||
|
||||
await waitFor(() => {
|
||||
expect(screen.getByText('Queue')).toBeInTheDocument();
|
||||
expect(screen.getByText('Workflow')).toBeInTheDocument();
|
||||
});
|
||||
|
||||
await user.click(screen.getByText('Queue'));
|
||||
await user.click(screen.getByText('Workflow'));
|
||||
|
||||
await waitFor(() => {
|
||||
expect(screen.getByText('Staggered Start')).toBeInTheDocument();
|
||||
@@ -255,15 +255,15 @@ describe('SettingsPage', () => {
|
||||
});
|
||||
});
|
||||
|
||||
it('shows auto-drying settings on Queue tab', async () => {
|
||||
it('shows auto-drying settings on Workflow tab', async () => {
|
||||
const user = userEvent.setup();
|
||||
render(<SettingsPage />);
|
||||
|
||||
await waitFor(() => {
|
||||
expect(screen.getByText('Queue')).toBeInTheDocument();
|
||||
expect(screen.getByText('Workflow')).toBeInTheDocument();
|
||||
});
|
||||
|
||||
await user.click(screen.getByText('Queue'));
|
||||
await user.click(screen.getByText('Workflow'));
|
||||
|
||||
await waitFor(() => {
|
||||
expect(screen.getByText('Queue Auto-Drying')).toBeInTheDocument();
|
||||
|
||||
@@ -1247,7 +1247,7 @@ export default {
|
||||
general: 'Allgemein',
|
||||
smartPlugs: 'Smart Plugs',
|
||||
notifications: 'Benachrichtigungen',
|
||||
queue: 'Queue',
|
||||
queue: 'Workflow',
|
||||
filament: 'Filament',
|
||||
network: 'Netzwerk',
|
||||
apiKeys: 'API-Schlüssel',
|
||||
|
||||
@@ -1247,7 +1247,7 @@ export default {
|
||||
general: 'General',
|
||||
smartPlugs: 'Smart Plugs',
|
||||
notifications: 'Notifications',
|
||||
queue: 'Queue',
|
||||
queue: 'Workflow',
|
||||
filament: 'Filament',
|
||||
network: 'Network',
|
||||
apiKeys: 'API Keys',
|
||||
|
||||
@@ -1247,7 +1247,7 @@ export default {
|
||||
general: 'Général',
|
||||
smartPlugs: 'Prises connectées',
|
||||
notifications: 'Notifications',
|
||||
queue: 'Queue',
|
||||
queue: 'Workflow',
|
||||
filament: 'Filament',
|
||||
network: 'Réseau',
|
||||
apiKeys: 'Clés API',
|
||||
|
||||
@@ -1247,7 +1247,7 @@ export default {
|
||||
general: 'Generale',
|
||||
smartPlugs: 'Prese smart',
|
||||
notifications: 'Notifiche',
|
||||
queue: 'Queue',
|
||||
queue: 'Workflow',
|
||||
filament: 'Filamento',
|
||||
network: 'Rete',
|
||||
apiKeys: 'Chiavi API',
|
||||
|
||||
@@ -1246,7 +1246,7 @@ export default {
|
||||
general: '一般',
|
||||
smartPlugs: 'スマートプラグ',
|
||||
notifications: '通知',
|
||||
queue: 'Queue',
|
||||
queue: 'ワークフロー',
|
||||
filament: 'フィラメント',
|
||||
network: 'ネットワーク',
|
||||
apiKeys: 'APIキー',
|
||||
|
||||
@@ -1247,7 +1247,7 @@ export default {
|
||||
general: 'Geral',
|
||||
smartPlugs: 'Tomadas Inteligentes',
|
||||
notifications: 'Notificações',
|
||||
queue: 'Queue',
|
||||
queue: 'Workflow',
|
||||
filament: 'Filamento',
|
||||
network: 'Rede',
|
||||
apiKeys: 'Chaves API',
|
||||
|
||||
@@ -1247,7 +1247,7 @@ export default {
|
||||
general: '通用',
|
||||
smartPlugs: '智能插座',
|
||||
notifications: '通知',
|
||||
queue: 'Queue',
|
||||
queue: '工作流',
|
||||
filament: '耗材',
|
||||
network: '网络',
|
||||
apiKeys: 'API 密钥',
|
||||
|
||||
@@ -1004,7 +1004,7 @@ export function SettingsPage() {
|
||||
}`}
|
||||
>
|
||||
<ListOrdered className="w-4 h-4" />
|
||||
{t('settings.tabs.queue', 'Queue')}
|
||||
{t('settings.tabs.queue', 'Workflow')}
|
||||
</button>
|
||||
<button
|
||||
onClick={() => handleTabChange('filament')}
|
||||
@@ -3613,6 +3613,32 @@ export function SettingsPage() {
|
||||
</CardContent>
|
||||
</Card>
|
||||
|
||||
{/* Per-Printer Mapping Default */}
|
||||
<Card>
|
||||
<CardHeader>
|
||||
<h2 className="text-lg font-semibold text-white">{t('settings.printModal')}</h2>
|
||||
</CardHeader>
|
||||
<CardContent className="space-y-4">
|
||||
<div className="flex items-center justify-between">
|
||||
<div>
|
||||
<p className="text-white">{t('settings.expandCustomMapping')}</p>
|
||||
<p className="text-sm text-bambu-gray">
|
||||
{t('settings.expandCustomMappingDescription')}
|
||||
</p>
|
||||
</div>
|
||||
<label className="relative inline-flex items-center cursor-pointer">
|
||||
<input
|
||||
type="checkbox"
|
||||
checked={localSettings.per_printer_mapping_expanded ?? false}
|
||||
onChange={(e) => updateSetting('per_printer_mapping_expanded', e.target.checked)}
|
||||
className="sr-only peer"
|
||||
/>
|
||||
<div className="w-11 h-6 bg-bambu-dark-tertiary peer-focus:outline-none rounded-full peer peer-checked:after:translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[2px] after:left-[2px] after:bg-white after:rounded-full after:h-5 after:w-5 after:transition-all peer-checked:bg-bambu-green"></div>
|
||||
</label>
|
||||
</div>
|
||||
</CardContent>
|
||||
</Card>
|
||||
|
||||
<Card>
|
||||
<CardHeader>
|
||||
<h2 className="text-lg font-semibold text-white">{t('settings.amsDisplayThresholds')}</h2>
|
||||
@@ -3744,32 +3770,6 @@ export function SettingsPage() {
|
||||
</p>
|
||||
</div>
|
||||
|
||||
{/* Per-Printer Mapping Default */}
|
||||
<div className="space-y-3 pt-4 border-t border-bambu-dark-tertiary">
|
||||
<div className="flex items-center gap-2 text-white">
|
||||
<Printer className="w-4 h-4 text-bambu-green" />
|
||||
<span className="font-medium">{t('settings.printModal')}</span>
|
||||
</div>
|
||||
<div className="flex items-center justify-between">
|
||||
<div>
|
||||
<label className="block text-sm text-white">
|
||||
{t('settings.expandCustomMapping')}
|
||||
</label>
|
||||
<p className="text-xs text-bambu-gray mt-0.5">
|
||||
{t('settings.expandCustomMappingDescription')}
|
||||
</p>
|
||||
</div>
|
||||
<label className="relative inline-flex items-center cursor-pointer">
|
||||
<input
|
||||
type="checkbox"
|
||||
checked={localSettings.per_printer_mapping_expanded ?? false}
|
||||
onChange={(e) => updateSetting('per_printer_mapping_expanded', e.target.checked)}
|
||||
className="sr-only peer"
|
||||
/>
|
||||
<div className="w-11 h-6 bg-bambu-dark-tertiary peer-focus:outline-none rounded-full peer peer-checked:after:translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[2px] after:left-[2px] after:bg-white after:rounded-full after:h-5 after:w-5 after:transition-all peer-checked:bg-bambu-green"></div>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</CardContent>
|
||||
</Card>
|
||||
</div>
|
||||
|
||||
File diff suppressed because one or more lines are too long
+1
-1
@@ -23,7 +23,7 @@
|
||||
|
||||
<!-- Splash screens for iOS -->
|
||||
<link rel="apple-touch-startup-image" href="/img/android-chrome-512x512.png" />
|
||||
<script type="module" crossorigin src="/assets/index-CVcX3HwW.js"></script>
|
||||
<script type="module" crossorigin src="/assets/index-BmTXGa-5.js"></script>
|
||||
<link rel="stylesheet" crossorigin href="/assets/index-B4zcncds.css">
|
||||
</head>
|
||||
<body>
|
||||
|
||||
Reference in New Issue
Block a user