|
@@ -1254,7 +1254,6 @@ export function SettingsPage() {
|
|
|
// Check if there are actual changes
|
|
// Check if there are actual changes
|
|
|
const hasChanges =
|
|
const hasChanges =
|
|
|
baseline.auto_archive !== localSettings.auto_archive ||
|
|
baseline.auto_archive !== localSettings.auto_archive ||
|
|
|
- baseline.save_thumbnails !== localSettings.save_thumbnails ||
|
|
|
|
|
baseline.capture_finish_photo !== localSettings.capture_finish_photo ||
|
|
baseline.capture_finish_photo !== localSettings.capture_finish_photo ||
|
|
|
(baseline.finish_photo_restore_plate ?? true) !== (localSettings.finish_photo_restore_plate ?? true) ||
|
|
(baseline.finish_photo_restore_plate ?? true) !== (localSettings.finish_photo_restore_plate ?? true) ||
|
|
|
baseline.default_filament_cost !== localSettings.default_filament_cost ||
|
|
baseline.default_filament_cost !== localSettings.default_filament_cost ||
|
|
@@ -1270,7 +1269,6 @@ export function SettingsPage() {
|
|
|
(baseline.announcements_enabled ?? true) !== (localSettings.announcements_enabled ?? true) ||
|
|
(baseline.announcements_enabled ?? true) !== (localSettings.announcements_enabled ?? true) ||
|
|
|
(baseline.announcements_all_users ?? false) !== (localSettings.announcements_all_users ?? false) ||
|
|
(baseline.announcements_all_users ?? false) !== (localSettings.announcements_all_users ?? false) ||
|
|
|
(baseline.local_login_enabled ?? true) !== (localSettings.local_login_enabled ?? true) ||
|
|
(baseline.local_login_enabled ?? true) !== (localSettings.local_login_enabled ?? true) ||
|
|
|
- baseline.notification_language !== localSettings.notification_language ||
|
|
|
|
|
(baseline.bed_cooled_threshold ?? 35) !== (localSettings.bed_cooled_threshold ?? 35) ||
|
|
(baseline.bed_cooled_threshold ?? 35) !== (localSettings.bed_cooled_threshold ?? 35) ||
|
|
|
baseline.ams_humidity_good !== localSettings.ams_humidity_good ||
|
|
baseline.ams_humidity_good !== localSettings.ams_humidity_good ||
|
|
|
baseline.ams_humidity_fair !== localSettings.ams_humidity_fair ||
|
|
baseline.ams_humidity_fair !== localSettings.ams_humidity_fair ||
|
|
@@ -1376,7 +1374,6 @@ export function SettingsPage() {
|
|
|
// Only send the fields we manage on this page (exclude virtual_printer_* which are managed separately)
|
|
// Only send the fields we manage on this page (exclude virtual_printer_* which are managed separately)
|
|
|
const settingsToSave: AppSettingsUpdate = {
|
|
const settingsToSave: AppSettingsUpdate = {
|
|
|
auto_archive: localSettings.auto_archive,
|
|
auto_archive: localSettings.auto_archive,
|
|
|
- save_thumbnails: localSettings.save_thumbnails,
|
|
|
|
|
capture_finish_photo: localSettings.capture_finish_photo,
|
|
capture_finish_photo: localSettings.capture_finish_photo,
|
|
|
// #2547: `?? true` mirrors the toggle's own default, so an install
|
|
// #2547: `?? true` mirrors the toggle's own default, so an install
|
|
|
// whose settings payload predates this field saves what the user is
|
|
// whose settings payload predates this field saves what the user is
|
|
@@ -1400,7 +1397,6 @@ export function SettingsPage() {
|
|
|
announcements_enabled: localSettings.announcements_enabled ?? true,
|
|
announcements_enabled: localSettings.announcements_enabled ?? true,
|
|
|
announcements_all_users: localSettings.announcements_all_users ?? false,
|
|
announcements_all_users: localSettings.announcements_all_users ?? false,
|
|
|
local_login_enabled: localSettings.local_login_enabled,
|
|
local_login_enabled: localSettings.local_login_enabled,
|
|
|
- notification_language: localSettings.notification_language,
|
|
|
|
|
bed_cooled_threshold: localSettings.bed_cooled_threshold,
|
|
bed_cooled_threshold: localSettings.bed_cooled_threshold,
|
|
|
ams_humidity_good: localSettings.ams_humidity_good,
|
|
ams_humidity_good: localSettings.ams_humidity_good,
|
|
|
ams_humidity_fair: localSettings.ams_humidity_fair,
|
|
ams_humidity_fair: localSettings.ams_humidity_fair,
|
|
@@ -2115,23 +2111,6 @@ export function SettingsPage() {
|
|
|
<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>
|
|
<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>
|
|
</label>
|
|
|
</div>
|
|
</div>
|
|
|
- <div className="flex items-center justify-between">
|
|
|
|
|
- <div>
|
|
|
|
|
- <p className="text-white">{t('settings.saveThumbnails')}</p>
|
|
|
|
|
- <p className="text-sm text-bambu-gray">
|
|
|
|
|
- {t('settings.saveThumbnailsDescription')}
|
|
|
|
|
- </p>
|
|
|
|
|
- </div>
|
|
|
|
|
- <label className="relative inline-flex items-center cursor-pointer">
|
|
|
|
|
- <input
|
|
|
|
|
- type="checkbox"
|
|
|
|
|
- checked={localSettings.save_thumbnails}
|
|
|
|
|
- onChange={(e) => updateSetting('save_thumbnails', 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 className="flex items-center justify-between">
|
|
<div className="flex items-center justify-between">
|
|
|
<div>
|
|
<div>
|
|
|
<p className="text-white">{t('settings.captureFinishPhoto')}</p>
|
|
<p className="text-white">{t('settings.captureFinishPhoto')}</p>
|
|
@@ -4092,29 +4071,6 @@ export function SettingsPage() {
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
- {/* Notification Language Setting */}
|
|
|
|
|
- <Card className="mb-4">
|
|
|
|
|
- <CardContent className="py-3">
|
|
|
|
|
- <div className="flex items-center justify-between">
|
|
|
|
|
- <div>
|
|
|
|
|
- <p className="text-white text-sm font-medium">{t('settings.notificationLanguage')}</p>
|
|
|
|
|
- <p className="text-xs text-bambu-gray">{t('settings.notificationLanguageDescription')}</p>
|
|
|
|
|
- </div>
|
|
|
|
|
- <select
|
|
|
|
|
- value={localSettings.notification_language || 'en'}
|
|
|
|
|
- onChange={(e) => updateSetting('notification_language', e.target.value)}
|
|
|
|
|
- className="px-2 py-1.5 bg-bambu-dark border border-bambu-dark-tertiary rounded text-white text-sm focus:outline-none focus:ring-1 focus:ring-bambu-green"
|
|
|
|
|
- >
|
|
|
|
|
- {availableLanguages.map((lang) => (
|
|
|
|
|
- <option key={lang.code} value={lang.code}>
|
|
|
|
|
- {lang.nativeName}
|
|
|
|
|
- </option>
|
|
|
|
|
- ))}
|
|
|
|
|
- </select>
|
|
|
|
|
- </div>
|
|
|
|
|
- </CardContent>
|
|
|
|
|
- </Card>
|
|
|
|
|
-
|
|
|
|
|
{/* Bed Cooled Threshold Setting */}
|
|
{/* Bed Cooled Threshold Setting */}
|
|
|
<Card className="mb-4">
|
|
<Card className="mb-4">
|
|
|
<CardContent className="py-3">
|
|
<CardContent className="py-3">
|