Browse Source

Add insufficient filament warning

Matteo Parenti 3 months ago
parent
commit
12e758e68e

+ 5 - 0
backend/app/api/routes/settings.py

@@ -87,6 +87,7 @@ async def get_settings(
                 "spoolman_enabled",
                 "spoolman_enabled",
                 "spoolman_disable_weight_sync",
                 "spoolman_disable_weight_sync",
                 "spoolman_report_partial_usage",
                 "spoolman_report_partial_usage",
+                "disable_filament_warnings",
                 "check_updates",
                 "check_updates",
                 "check_printer_firmware",
                 "check_printer_firmware",
                 "virtual_printer_enabled",
                 "virtual_printer_enabled",
@@ -237,6 +238,7 @@ async def get_spoolman_settings(
     spoolman_sync_mode = await get_setting(db, "spoolman_sync_mode") or "auto"
     spoolman_sync_mode = await get_setting(db, "spoolman_sync_mode") or "auto"
     spoolman_disable_weight_sync = await get_setting(db, "spoolman_disable_weight_sync") or "false"
     spoolman_disable_weight_sync = await get_setting(db, "spoolman_disable_weight_sync") or "false"
     spoolman_report_partial_usage = await get_setting(db, "spoolman_report_partial_usage") or "true"
     spoolman_report_partial_usage = await get_setting(db, "spoolman_report_partial_usage") or "true"
+    disable_filament_warnings = await get_setting(db, "disable_filament_warnings") or "false"
 
 
     return {
     return {
         "spoolman_enabled": spoolman_enabled,
         "spoolman_enabled": spoolman_enabled,
@@ -244,6 +246,7 @@ async def get_spoolman_settings(
         "spoolman_sync_mode": spoolman_sync_mode,
         "spoolman_sync_mode": spoolman_sync_mode,
         "spoolman_disable_weight_sync": spoolman_disable_weight_sync,
         "spoolman_disable_weight_sync": spoolman_disable_weight_sync,
         "spoolman_report_partial_usage": spoolman_report_partial_usage,
         "spoolman_report_partial_usage": spoolman_report_partial_usage,
+        "disable_filament_warnings": disable_filament_warnings,
     }
     }
 
 
 
 
@@ -264,6 +267,8 @@ async def update_spoolman_settings(
         await set_setting(db, "spoolman_disable_weight_sync", settings["spoolman_disable_weight_sync"])
         await set_setting(db, "spoolman_disable_weight_sync", settings["spoolman_disable_weight_sync"])
     if "spoolman_report_partial_usage" in settings:
     if "spoolman_report_partial_usage" in settings:
         await set_setting(db, "spoolman_report_partial_usage", settings["spoolman_report_partial_usage"])
         await set_setting(db, "spoolman_report_partial_usage", settings["spoolman_report_partial_usage"])
+    if "disable_filament_warnings" in settings:
+        await set_setting(db, "disable_filament_warnings", settings["disable_filament_warnings"])
 
 
     await db.commit()
     await db.commit()
     db.expire_all()
     db.expire_all()

+ 5 - 0
backend/app/schemas/settings.py

@@ -31,6 +31,10 @@ class AppSettings(BaseModel):
         default=True,
         default=True,
         description="Report Partial Usage for Failed Prints. When a print fails or is cancelled, report the estimated filament used up to that point based on layer progress.",
         description="Report Partial Usage for Failed Prints. When a print fails or is cancelled, report the estimated filament used up to that point based on layer progress.",
     )
     )
+    disable_filament_warnings: bool = Field(
+        default=False,
+        description="Disable insufficient filament warnings when printing or queueing prints",
+    )
 
 
     # Updates
     # Updates
     check_updates: bool = Field(default=True, description="Automatically check for updates on startup")
     check_updates: bool = Field(default=True, description="Automatically check for updates on startup")
@@ -158,6 +162,7 @@ class AppSettingsUpdate(BaseModel):
     spoolman_sync_mode: str | None = None
     spoolman_sync_mode: str | None = None
     spoolman_disable_weight_sync: bool | None = None
     spoolman_disable_weight_sync: bool | None = None
     spoolman_report_partial_usage: bool | None = None
     spoolman_report_partial_usage: bool | None = None
+    disable_filament_warnings: bool | None = None
     check_updates: bool | None = None
     check_updates: bool | None = None
     check_printer_firmware: bool | None = None
     check_printer_firmware: bool | None = None
     notification_language: str | None = None
     notification_language: str | None = None

+ 5 - 3
frontend/src/api/client.ts

@@ -748,6 +748,8 @@ export interface AppSettings {
   // Date/time format settings
   // Date/time format settings
   date_format: 'system' | 'us' | 'eu' | 'iso';
   date_format: 'system' | 'us' | 'eu' | 'iso';
   time_format: 'system' | '12h' | '24h';
   time_format: 'system' | '12h' | '24h';
+  // Filament tracking
+  disable_filament_warnings: boolean;  // Disable insufficient filament warnings when printing/queueing
   // Default printer
   // Default printer
   default_printer_id: number | null;
   default_printer_id: number | null;
   // Dark mode theme settings
   // Dark mode theme settings
@@ -3360,9 +3362,9 @@ export const api = {
       body: JSON.stringify({ tray_uuid: trayUuid }),
       body: JSON.stringify({ tray_uuid: trayUuid }),
     }),
     }),
   getSpoolmanSettings: () =>
   getSpoolmanSettings: () =>
-    request<{ spoolman_enabled: string; spoolman_url: string; spoolman_sync_mode: string; spoolman_disable_weight_sync: string; spoolman_report_partial_usage: string; }>('/settings/spoolman'),
-  updateSpoolmanSettings: (data: { spoolman_enabled?: string; spoolman_url?: string; spoolman_sync_mode?: string; spoolman_disable_weight_sync?: string; spoolman_report_partial_usage?: string; }) =>
-    request<{ spoolman_enabled: string; spoolman_url: string; spoolman_sync_mode: string; spoolman_disable_weight_sync: string; spoolman_report_partial_usage: string; }>('/settings/spoolman', {
+    request<{ spoolman_enabled: string; spoolman_url: string; spoolman_sync_mode: string; spoolman_disable_weight_sync: string; spoolman_report_partial_usage: string; disable_filament_warnings: string; }>('/settings/spoolman'),
+  updateSpoolmanSettings: (data: { spoolman_enabled?: string; spoolman_url?: string; spoolman_sync_mode?: string; spoolman_disable_weight_sync?: string; spoolman_report_partial_usage?: string; disable_filament_warnings?: string; }) =>
+    request<{ spoolman_enabled: string; spoolman_url: string; spoolman_sync_mode: string; spoolman_disable_weight_sync: string; spoolman_report_partial_usage: string; disable_filament_warnings: string; }>('/settings/spoolman', {
       method: 'PUT',
       method: 'PUT',
       body: JSON.stringify(data),
       body: JSON.stringify(data),
     }),
     }),

+ 1 - 1
frontend/src/components/ConfirmModal.tsx

@@ -79,7 +79,7 @@ export function ConfirmModal({
             </div>
             </div>
             <div className="flex-1">
             <div className="flex-1">
               <h3 className="text-lg font-semibold text-white mb-2">{title}</h3>
               <h3 className="text-lg font-semibold text-white mb-2">{title}</h3>
-              <p className="text-bambu-gray text-sm">{message}</p>
+              <p className="text-bambu-gray text-sm whitespace-pre-line">{message}</p>
             </div>
             </div>
           </div>
           </div>
           <div className="flex gap-3 mt-6">
           <div className="flex gap-3 mt-6">

+ 127 - 4
frontend/src/components/PrintModal/index.tsx

@@ -3,13 +3,14 @@ import { useQuery, useMutation, useQueryClient } from '@tanstack/react-query';
 import { useTranslation } from 'react-i18next';
 import { useTranslation } from 'react-i18next';
 import { X, Printer, Loader2, Calendar, Pencil, AlertCircle, AlertTriangle } from 'lucide-react';
 import { X, Printer, Loader2, Calendar, Pencil, AlertCircle, AlertTriangle } from 'lucide-react';
 import { api } from '../../api/client';
 import { api } from '../../api/client';
-import type { PrintQueueItemCreate, PrintQueueItemUpdate } from '../../api/client';
+import type { PrintQueueItemCreate, PrintQueueItemUpdate, SpoolAssignment } from '../../api/client';
 import { Card, CardContent } from '../Card';
 import { Card, CardContent } from '../Card';
 import { Button } from '../Button';
 import { Button } from '../Button';
+import { ConfirmModal } from '../ConfirmModal';
 import { useToast } from '../../contexts/ToastContext';
 import { useToast } from '../../contexts/ToastContext';
-import { useFilamentMapping } from '../../hooks/useFilamentMapping';
+import { buildLoadedFilaments, useFilamentMapping } from '../../hooks/useFilamentMapping';
 import { useMultiPrinterFilamentMapping, type PerPrinterConfig } from '../../hooks/useMultiPrinterFilamentMapping';
 import { useMultiPrinterFilamentMapping, type PerPrinterConfig } from '../../hooks/useMultiPrinterFilamentMapping';
-import { isPlaceholderDate } from '../../utils/amsHelpers';
+import { getGlobalTrayId, isPlaceholderDate } from '../../utils/amsHelpers';
 import { toDateTimeLocalValue } from '../../utils/date';
 import { toDateTimeLocalValue } from '../../utils/date';
 import { PrinterSelector } from './PrinterSelector';
 import { PrinterSelector } from './PrinterSelector';
 import { PlateSelector } from './PlateSelector';
 import { PlateSelector } from './PlateSelector';
@@ -50,6 +51,13 @@ export function PrintModal({
   // Determine if we're printing a library file
   // Determine if we're printing a library file
   const isLibraryFile = !!libraryFileId && !archiveId;
   const isLibraryFile = !!libraryFileId && !archiveId;
 
 
+  type FilamentWarningItem = {
+    printerName: string;
+    slotLabel: string;
+    requiredGrams: number;
+    remainingGrams: number;
+  };
+
   // Multiple printer selection (used for all modes now)
   // Multiple printer selection (used for all modes now)
   const [selectedPrinters, setSelectedPrinters] = useState<number[]>(() => {
   const [selectedPrinters, setSelectedPrinters] = useState<number[]>(() => {
     // Initialize with the queue item's printer if editing
     // Initialize with the queue item's printer if editing
@@ -155,6 +163,8 @@ export function PrintModal({
   const [isSubmitting, setIsSubmitting] = useState(false);
   const [isSubmitting, setIsSubmitting] = useState(false);
   const [submitProgress, setSubmitProgress] = useState({ current: 0, total: 0 });
   const [submitProgress, setSubmitProgress] = useState({ current: 0, total: 0 });
 
 
+  const [filamentWarningItems, setFilamentWarningItems] = useState<FilamentWarningItem[] | null>(null);
+
   // Track which printers have had the "Expand custom mapping by default" setting applied
   // Track which printers have had the "Expand custom mapping by default" setting applied
   // This ensures the setting only affects initial state, not preventing unchecking
   // This ensures the setting only affects initial state, not preventing unchecking
   const [initialExpandApplied, setInitialExpandApplied] = useState<Set<number>>(new Set());
   const [initialExpandApplied, setInitialExpandApplied] = useState<Set<number>>(new Set());
@@ -175,6 +185,13 @@ export function PrintModal({
     queryFn: api.getPrinters,
     queryFn: api.getPrinters,
   });
   });
 
 
+  const { data: spoolAssignments } = useQuery({
+    queryKey: ['spool-assignments'],
+    queryFn: () => api.getAssignments(),
+    staleTime: 30 * 1000,
+    enabled: isLibraryFile && mode === 'reprint',
+  });
+
   // Fetch archive details to get sliced_for_model
   // Fetch archive details to get sliced_for_model
   const { data: archiveDetails } = useQuery({
   const { data: archiveDetails } = useQuery({
     queryKey: ['archive', archiveId],
     queryKey: ['archive', archiveId],
@@ -329,6 +346,35 @@ export function PrintModal({
   const isMultiPlate = platesData?.is_multi_plate ?? false;
   const isMultiPlate = platesData?.is_multi_plate ?? false;
   const plates = platesData?.plates ?? [];
   const plates = platesData?.plates ?? [];
 
 
+  const spoolAssignmentsByPrinter = useMemo(() => {
+    const map = new Map<number, Map<number, SpoolAssignment>>();
+    if (!spoolAssignments) return map;
+    spoolAssignments.forEach((assignment) => {
+      const globalTrayId = getGlobalTrayId(
+        assignment.ams_id,
+        assignment.tray_id,
+        assignment.ams_id < 0
+      );
+      const printerMap = map.get(assignment.printer_id) ?? new Map();
+      printerMap.set(globalTrayId, assignment);
+      map.set(assignment.printer_id, printerMap);
+    });
+    return map;
+  }, [spoolAssignments]);
+
+  const filamentWarningMessage = useMemo(() => {
+    if (!filamentWarningItems || filamentWarningItems.length === 0) return '';
+    const lines = filamentWarningItems.map((item) =>
+      t('printModal.insufficientFilamentLine', {
+        printer: item.printerName,
+        slot: item.slotLabel,
+        required: Math.round(item.requiredGrams),
+        remaining: Math.round(item.remainingGrams),
+      })
+    );
+    return [t('printModal.insufficientFilamentMessage'), ...lines].join('\n');
+  }, [filamentWarningItems, t]);
+
   // Add to queue mutation (single printer)
   // Add to queue mutation (single printer)
   const addToQueueMutation = useMutation({
   const addToQueueMutation = useMutation({
     mutationFn: (data: PrintQueueItemCreate) => api.addToQueue(data),
     mutationFn: (data: PrintQueueItemCreate) => api.addToQueue(data),
@@ -348,9 +394,71 @@ export function PrintModal({
     },
     },
   });
   });
 
 
-  const handleSubmit = async (e?: React.FormEvent) => {
+  const handleSubmit = async (e?: React.FormEvent, options?: { skipFilamentCheck?: boolean }) => {
     e?.preventDefault();
     e?.preventDefault();
 
 
+    if (
+      !options?.skipFilamentCheck &&
+      !settings?.disable_filament_warnings &&
+      (mode === 'reprint' || mode === 'add-to-queue') &&
+      assignmentMode === 'printer'
+    ) {
+      const warningItems: FilamentWarningItem[] = [];
+      const filamentReqs = effectiveFilamentReqs?.filaments ?? [];
+
+      if (filamentReqs.length > 0 && spoolAssignmentsByPrinter.size > 0) {
+        const getRemainingWeight = (labelWeight: number, weightUsed: number) => {
+          if (!Number.isFinite(labelWeight) || labelWeight <= 0) return null;
+          if (!Number.isFinite(weightUsed) || weightUsed < 0) return null;
+          return Math.max(0, labelWeight - weightUsed);
+        };
+
+        for (const printerId of selectedPrinters) {
+          const printerMapping = selectedPrinters.length > 1
+            ? multiPrinterMapping.getFinalMapping(printerId)
+            : amsMapping;
+          if (!printerMapping) continue;
+
+          const printerStatusForWarning = selectedPrinters.length > 1
+            ? multiPrinterMapping.printerResults.find((result) => result.printerId === printerId)?.status
+            : printerStatus;
+
+          const loadedFilaments = buildLoadedFilaments(printerStatusForWarning);
+          const slotLabelByTray = new Map(loadedFilaments.map((f) => [f.globalTrayId, f.label]));
+          const assignments = spoolAssignmentsByPrinter.get(printerId);
+          const printerName = printers?.find((p) => p.id === printerId)?.name ?? `Printer ${printerId}`;
+
+          if (!assignments) continue;
+
+          filamentReqs.forEach((req) => {
+            if (!req.slot_id || req.slot_id <= 0) return;
+            const globalTrayId = printerMapping[req.slot_id - 1];
+            if (!Number.isFinite(globalTrayId) || globalTrayId < 0) return;
+
+            const assignment = assignments.get(globalTrayId);
+            const spool = assignment?.spool;
+            if (!spool) return;
+
+            const remainingGrams = getRemainingWeight(spool.label_weight, spool.weight_used);
+            if (remainingGrams === null) return;
+            if (remainingGrams >= req.used_grams) return;
+
+            warningItems.push({
+              printerName,
+              slotLabel: slotLabelByTray.get(globalTrayId) ?? `Slot ${req.slot_id}`,
+              requiredGrams: req.used_grams,
+              remainingGrams,
+            });
+          });
+        }
+      }
+
+      if (warningItems.length > 0) {
+        setFilamentWarningItems(warningItems);
+        return;
+      }
+    }
+
     // Validate printer/model selection
     // Validate printer/model selection
     if (assignmentMode === 'printer' && selectedPrinters.length === 0) {
     if (assignmentMode === 'printer' && selectedPrinters.length === 0) {
       showToast('Please select at least one printer', 'error');
       showToast('Please select at least one printer', 'error');
@@ -738,6 +846,21 @@ export function PrintModal({
           </form>
           </form>
         </CardContent>
         </CardContent>
       </Card>
       </Card>
+
+      {filamentWarningItems && filamentWarningItems.length > 0 && (
+        <ConfirmModal
+          title={t('printModal.insufficientFilamentTitle')}
+          message={filamentWarningMessage}
+          confirmText={t('printModal.printAnyway')}
+          cancelText={t('common.cancel')}
+          variant="warning"
+          onConfirm={() => {
+            setFilamentWarningItems(null);
+            void handleSubmit(undefined, { skipFilamentCheck: true });
+          }}
+          onCancel={() => setFilamentWarningItems(null)}
+        />
+      )}
     </div>
     </div>
   );
   );
 }
 }

+ 26 - 2
frontend/src/components/SpoolmanSettings.tsx

@@ -17,6 +17,7 @@ export function SpoolmanSettings() {
   const [localSyncMode, setLocalSyncMode] = useState('auto');
   const [localSyncMode, setLocalSyncMode] = useState('auto');
   const [localDisableWeightSync, setLocalDisableWeightSync] = useState(false);
   const [localDisableWeightSync, setLocalDisableWeightSync] = useState(false);
   const [localReportPartialUsage, setLocalReportPartialUsage] = useState(true);
   const [localReportPartialUsage, setLocalReportPartialUsage] = useState(true);
+  const [localDisableFilamentWarnings, setLocalDisableFilamentWarnings] = useState(false);
   const [selectedPrinterId, setSelectedPrinterId] = useState<number | 'all'>('all');
   const [selectedPrinterId, setSelectedPrinterId] = useState<number | 'all'>('all');
   const [isInitialized, setIsInitialized] = useState(false);
   const [isInitialized, setIsInitialized] = useState(false);
   const [showAllSkipped, setShowAllSkipped] = useState(false);
   const [showAllSkipped, setShowAllSkipped] = useState(false);
@@ -48,6 +49,7 @@ export function SpoolmanSettings() {
       setLocalSyncMode(settings.spoolman_sync_mode || 'auto');
       setLocalSyncMode(settings.spoolman_sync_mode || 'auto');
       setLocalDisableWeightSync(settings.spoolman_disable_weight_sync === 'true');
       setLocalDisableWeightSync(settings.spoolman_disable_weight_sync === 'true');
       setLocalReportPartialUsage(settings.spoolman_report_partial_usage !== 'false');
       setLocalReportPartialUsage(settings.spoolman_report_partial_usage !== 'false');
+      setLocalDisableFilamentWarnings(settings.disable_filament_warnings === 'true');
       setIsInitialized(true);
       setIsInitialized(true);
     }
     }
   }, [settings]);
   }, [settings]);
@@ -62,7 +64,8 @@ export function SpoolmanSettings() {
       (settings.spoolman_url || '') !== localUrl ||
       (settings.spoolman_url || '') !== localUrl ||
       (settings.spoolman_sync_mode || 'auto') !== localSyncMode ||
       (settings.spoolman_sync_mode || 'auto') !== localSyncMode ||
       (settings.spoolman_disable_weight_sync === 'true') !== localDisableWeightSync ||
       (settings.spoolman_disable_weight_sync === 'true') !== localDisableWeightSync ||
-      (settings.spoolman_report_partial_usage !== 'false') !== localReportPartialUsage;
+      (settings.spoolman_report_partial_usage !== 'false') !== localReportPartialUsage ||
+      (settings.disable_filament_warnings === 'true') !== localDisableFilamentWarnings;
 
 
     if (hasChanges) {
     if (hasChanges) {
       const timeoutId = setTimeout(() => {
       const timeoutId = setTimeout(() => {
@@ -71,7 +74,7 @@ export function SpoolmanSettings() {
       return () => clearTimeout(timeoutId);
       return () => clearTimeout(timeoutId);
     }
     }
     // eslint-disable-next-line react-hooks/exhaustive-deps
     // eslint-disable-next-line react-hooks/exhaustive-deps
-  }, [localEnabled, localUrl, localSyncMode, localDisableWeightSync, localReportPartialUsage, isInitialized]);
+  }, [localEnabled, localUrl, localSyncMode, localDisableWeightSync, localReportPartialUsage, localDisableFilamentWarnings, isInitialized]);
 
 
   // Save mutation
   // Save mutation
   const saveMutation = useMutation({
   const saveMutation = useMutation({
@@ -82,10 +85,12 @@ export function SpoolmanSettings() {
         spoolman_sync_mode: localSyncMode,
         spoolman_sync_mode: localSyncMode,
         spoolman_disable_weight_sync: localDisableWeightSync ? 'true' : 'false',
         spoolman_disable_weight_sync: localDisableWeightSync ? 'true' : 'false',
         spoolman_report_partial_usage: localReportPartialUsage ? 'true' : 'false',
         spoolman_report_partial_usage: localReportPartialUsage ? 'true' : 'false',
+        disable_filament_warnings: localDisableFilamentWarnings ? 'true' : 'false',
       }),
       }),
     onSuccess: () => {
     onSuccess: () => {
       queryClient.invalidateQueries({ queryKey: ['spoolman-settings'] });
       queryClient.invalidateQueries({ queryKey: ['spoolman-settings'] });
       queryClient.invalidateQueries({ queryKey: ['spoolman-status'] });
       queryClient.invalidateQueries({ queryKey: ['spoolman-status'] });
+      queryClient.invalidateQueries({ queryKey: ['settings'] });
       showToast(t('settings.toast.settingsSaved'));
       showToast(t('settings.toast.settingsSaved'));
     },
     },
   });
   });
@@ -233,6 +238,25 @@ export function SpoolmanSettings() {
           </button>
           </button>
         </div>
         </div>
 
 
+        {/* Disable Filament Warnings toggle - applies to both modes */}
+        <div className="flex items-center justify-between">
+          <div>
+            <p className="text-white">{t('settings.disableFilamentWarnings')}</p>
+            <p className="text-sm text-bambu-gray">
+              {t('settings.disableFilamentWarningsDesc')}
+            </p>
+          </div>
+          <label className="relative inline-flex items-center cursor-pointer">
+            <input
+              type="checkbox"
+              checked={localDisableFilamentWarnings}
+              onChange={(e) => setLocalDisableFilamentWarnings(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>
+
         {/* Built-in Inventory details */}
         {/* Built-in Inventory details */}
         {!localEnabled && (
         {!localEnabled && (
           <div className="p-3 bg-bambu-green/5 border border-bambu-green/20 rounded-lg">
           <div className="p-3 bg-bambu-green/5 border border-bambu-green/20 rounded-lg">

+ 6 - 0
frontend/src/i18n/locales/de.ts

@@ -1162,6 +1162,8 @@ export default {
     // Filament Tracking Mode
     // Filament Tracking Mode
     filamentTracking: 'Filament-Verfolgung',
     filamentTracking: 'Filament-Verfolgung',
     filamentTrackingDesc: 'Wählen Sie, wie Sie Ihre Filamentspulen verfolgen möchten. Sie können das integrierte Inventar oder einen externen Spoolman-Server verwenden.',
     filamentTrackingDesc: 'Wählen Sie, wie Sie Ihre Filamentspulen verfolgen möchten. Sie können das integrierte Inventar oder einen externen Spoolman-Server verwenden.',
+    disableFilamentWarnings: 'Filament-Warnungen deaktivieren',
+    disableFilamentWarningsDesc: 'Keine Warnungen über unzureichendes Filament beim Drucken oder Einreihen anzeigen',
     trackingModeBuiltIn: 'Integriertes Inventar',
     trackingModeBuiltIn: 'Integriertes Inventar',
     trackingModeBuiltInDesc: 'RFID-Erkennung und Verbrauchserfassung inklusive',
     trackingModeBuiltInDesc: 'RFID-Erkennung und Verbrauchserfassung inklusive',
     trackingModeSpoolmanDesc: 'Externer Filament-Management-Server',
     trackingModeSpoolmanDesc: 'Externer Filament-Management-Server',
@@ -2649,6 +2651,10 @@ export default {
     rightNozzle: 'R',
     rightNozzle: 'R',
     leftNozzleTooltip: 'Linke Düse',
     leftNozzleTooltip: 'Linke Düse',
     rightNozzleTooltip: 'Rechte Düse',
     rightNozzleTooltip: 'Rechte Düse',
+    insufficientFilamentTitle: 'Not enough filament',
+    insufficientFilamentMessage: 'Some assigned spools have less filament remaining than this print needs:',
+    insufficientFilamentLine: '{{printer}} - {{slot}}: needs {{required}}g, remaining {{remaining}}g',
+    printAnyway: 'Print anyway',
   },
   },
 
 
   // Backup
   // Backup

+ 6 - 0
frontend/src/i18n/locales/en.ts

@@ -1162,6 +1162,8 @@ export default {
     // Filament Tracking Mode
     // Filament Tracking Mode
     filamentTracking: 'Filament Tracking',
     filamentTracking: 'Filament Tracking',
     filamentTrackingDesc: 'Choose how to track your filament spools. You can use the built-in inventory or connect an external Spoolman server.',
     filamentTrackingDesc: 'Choose how to track your filament spools. You can use the built-in inventory or connect an external Spoolman server.',
+    disableFilamentWarnings: 'Disable filament warnings',
+    disableFilamentWarningsDesc: 'Don\'t show warnings about insufficient filament when printing or queueing',
     trackingModeBuiltIn: 'Built-in Inventory',
     trackingModeBuiltIn: 'Built-in Inventory',
     trackingModeBuiltInDesc: 'RFID auto-matching and usage tracking included',
     trackingModeBuiltInDesc: 'RFID auto-matching and usage tracking included',
     trackingModeSpoolmanDesc: 'External filament management server',
     trackingModeSpoolmanDesc: 'External filament management server',
@@ -2653,6 +2655,10 @@ export default {
     rightNozzle: 'R',
     rightNozzle: 'R',
     leftNozzleTooltip: 'Left nozzle',
     leftNozzleTooltip: 'Left nozzle',
     rightNozzleTooltip: 'Right nozzle',
     rightNozzleTooltip: 'Right nozzle',
+    insufficientFilamentTitle: 'Not enough filament',
+    insufficientFilamentMessage: 'Some assigned spools have less filament remaining than this print needs:',
+    insufficientFilamentLine: '{{printer}} - {{slot}}: needs {{required}}g, remaining {{remaining}}g',
+    printAnyway: 'Print anyway',
   },
   },
 
 
   // Backup
   // Backup

+ 6 - 0
frontend/src/i18n/locales/fr.ts

@@ -1158,6 +1158,8 @@ export default {
     // Filament Tracking Mode
     // Filament Tracking Mode
     filamentTracking: 'Suivi de Filament',
     filamentTracking: 'Suivi de Filament',
     filamentTrackingDesc: 'Choisissez comment suivre vos bobines. Utilisez l\'inventaire intégré ou connectez un serveur Spoolman.',
     filamentTrackingDesc: 'Choisissez comment suivre vos bobines. Utilisez l\'inventaire intégré ou connectez un serveur Spoolman.',
+    disableFilamentWarnings: 'Désactiver les avertissements de filament',
+    disableFilamentWarningsDesc: 'Ne pas afficher les avertissements de filament insuffisant lors de l\'impression ou de la mise en file d\'attente',
     trackingModeBuiltIn: 'Inventaire Intégré',
     trackingModeBuiltIn: 'Inventaire Intégré',
     trackingModeBuiltInDesc: 'Correspondance RFID et suivi de consommation inclus',
     trackingModeBuiltInDesc: 'Correspondance RFID et suivi de consommation inclus',
     trackingModeSpoolmanDesc: 'Serveur de gestion externe',
     trackingModeSpoolmanDesc: 'Serveur de gestion externe',
@@ -2649,6 +2651,10 @@ export default {
     rightNozzle: 'D',
     rightNozzle: 'D',
     leftNozzleTooltip: 'Buse gauche',
     leftNozzleTooltip: 'Buse gauche',
     rightNozzleTooltip: 'Buse droite',
     rightNozzleTooltip: 'Buse droite',
+    insufficientFilamentTitle: 'Not enough filament',
+    insufficientFilamentMessage: 'Some assigned spools have less filament remaining than this print needs:',
+    insufficientFilamentLine: '{{printer}} - {{slot}}: needs {{required}}g, remaining {{remaining}}g',
+    printAnyway: 'Print anyway',
   },
   },
 
 
   // Backup
   // Backup

+ 15 - 0
frontend/src/i18n/locales/it.ts

@@ -1092,6 +1092,17 @@ export default {
       turnOn: 'Accendi',
       turnOn: 'Accendi',
       turnOff: 'Spegni',
       turnOff: 'Spegni',
     },
     },
+    // Filament Tracking Mode
+    filamentTracking: 'Tracciamento filamento',
+    filamentTrackingDesc: 'Scegli come tracciare le tue bobine di filamento. Puoi utilizzare l\'inventario integrato o collegare un server Spoolman esterno.',
+    disableFilamentWarnings: 'Disabilita avvisi filamento',
+    disableFilamentWarningsDesc: 'Non mostrare avvisi per filamento insufficiente durante la stampa o l\'accodamento',
+    trackingModeBuiltIn: 'Inventario integrato',
+    trackingModeBuiltInDesc: 'Corrispondenza RFID automatica e tracciamento utilizzo inclusi',
+    trackingModeSpoolmanDesc: 'Server di gestione filamenti esterno',
+    builtInFeatureRfid: 'Rileva automaticamente le bobine RFID Bambu Lab nell\'AMS',
+    builtInFeatureUsage: 'Traccia il consumo di filamento per stampa',
+    builtInFeatureCatalog: 'Gestisci bobine, colori e profili K-factor',
     // Spoolman
     // Spoolman
     spoolmanEnabled: 'Abilita integrazione Spoolman',
     spoolmanEnabled: 'Abilita integrazione Spoolman',
     spoolmanUrl: 'URL Spoolman',
     spoolmanUrl: 'URL Spoolman',
@@ -2379,6 +2390,10 @@ export default {
     rightNozzle: 'R',
     rightNozzle: 'R',
     leftNozzleTooltip: 'Ugello sinistro',
     leftNozzleTooltip: 'Ugello sinistro',
     rightNozzleTooltip: 'Ugello destro',
     rightNozzleTooltip: 'Ugello destro',
+    insufficientFilamentTitle: 'Filamento insufficiente',
+    insufficientFilamentMessage: 'Alcune bobine assegnate hanno meno filamento rimanente di quanto necessario per questa stampa:',
+    insufficientFilamentLine: '{{printer}} - {{slot}}: necessita di {{required}}g, rimanenti {{remaining}}g',
+    printAnyway: 'Stampa comunque',
   },
   },
 
 
   // Backup
   // Backup

+ 6 - 0
frontend/src/i18n/locales/ja.ts

@@ -1402,6 +1402,8 @@ export default {
     // フィラメント追跡モード
     // フィラメント追跡モード
     filamentTracking: 'フィラメント追跡',
     filamentTracking: 'フィラメント追跡',
     filamentTrackingDesc: 'フィラメントスプールの追跡方法を選択してください。内蔵インベントリまたは外部Spoolmanサーバーを使用できます。',
     filamentTrackingDesc: 'フィラメントスプールの追跡方法を選択してください。内蔵インベントリまたは外部Spoolmanサーバーを使用できます。',
+    disableFilamentWarnings: 'フィラメント警告を無効化',
+    disableFilamentWarningsDesc: '印刷またはキュー追加時にフィラメント不足の警告を表示しない',
     trackingModeBuiltIn: '内蔵インベントリ',
     trackingModeBuiltIn: '内蔵インベントリ',
     trackingModeBuiltInDesc: 'RFID自動検出と使用量追跡を含む',
     trackingModeBuiltInDesc: 'RFID自動検出と使用量追跡を含む',
     trackingModeSpoolmanDesc: '外部フィラメント管理サーバー',
     trackingModeSpoolmanDesc: '外部フィラメント管理サーバー',
@@ -2569,6 +2571,10 @@ export default {
     rightNozzle: 'R',
     rightNozzle: 'R',
     leftNozzleTooltip: '左ノズル',
     leftNozzleTooltip: '左ノズル',
     rightNozzleTooltip: '右ノズル',
     rightNozzleTooltip: '右ノズル',
+    insufficientFilamentTitle: 'Not enough filament',
+    insufficientFilamentMessage: 'Some assigned spools have less filament remaining than this print needs:',
+    insufficientFilamentLine: '{{printer}} - {{slot}}: needs {{required}}g, remaining {{remaining}}g',
+    printAnyway: 'Print anyway',
   },
   },
   backup: {
   backup: {
     restoreBackup: 'バックアップの復元',
     restoreBackup: 'バックアップの復元',