Преглед изворни кода

Revert: Individual file card buttons should always be visible

Co-authored-by: cadtoolbox <12723486+cadtoolbox@users.noreply.github.com>
copilot-swe-agent[bot] пре 3 месеци
родитељ
комит
b9b5302bae
3 измењених фајлова са 4 додато и 6 уклоњено
  1. 3 5
      frontend/src/pages/FileManagerPage.tsx
  2. 0 0
      static/assets/index-BfIGXFHd.js
  3. 1 1
      static/index.html

+ 3 - 5
frontend/src/pages/FileManagerPage.tsx

@@ -902,7 +902,6 @@ interface FileCardProps {
   file: LibraryFileListItem;
   isSelected: boolean;
   isMobile: boolean;
-  showPrintScheduleButtons: boolean;
   onSelect: (id: number) => void;
   onDelete: (id: number) => void;
   onDownload: (id: number) => void;
@@ -917,7 +916,7 @@ interface FileCardProps {
   t: TFunction;
 }
 
-function FileCard({ file, isSelected, isMobile, showPrintScheduleButtons, onSelect, onDelete, onDownload, onAddToQueue, onPrint, onRename, onGenerateThumbnail, thumbnailVersion, hasPermission, canModify, authEnabled, t }: FileCardProps) {
+function FileCard({ file, isSelected, isMobile, onSelect, onDelete, onDownload, onAddToQueue, onPrint, onRename, onGenerateThumbnail, thumbnailVersion, hasPermission, canModify, authEnabled, t }: FileCardProps) {
   const [showActions, setShowActions] = useState(false);
 
   return (
@@ -996,7 +995,7 @@ function FileCard({ file, isSelected, isMobile, showPrintScheduleButtons, onSele
           <>
             <div className="fixed inset-0 z-10" onClick={() => setShowActions(false)} />
             <div className="absolute right-0 bottom-8 z-20 bg-bambu-dark-secondary border border-bambu-dark-tertiary rounded-lg shadow-xl py-1 min-w-[140px]">
-              {showPrintScheduleButtons && onPrint && isSlicedFilename(file.filename) && (
+              {onPrint && isSlicedFilename(file.filename) && (
                 <button
                   className={`w-full px-3 py-1.5 text-left text-sm flex items-center gap-2 ${
                     hasPermission('printers:control') ? 'text-bambu-green hover:bg-bambu-dark' : 'text-bambu-gray cursor-not-allowed'
@@ -1009,7 +1008,7 @@ function FileCard({ file, isSelected, isMobile, showPrintScheduleButtons, onSele
                   {t('common.print')}
                 </button>
               )}
-              {showPrintScheduleButtons && onAddToQueue && isSlicedFilename(file.filename) && (
+              {onAddToQueue && isSlicedFilename(file.filename) && (
                 <button
                   className={`w-full px-3 py-1.5 text-left text-sm flex items-center gap-2 ${
                     hasPermission('queue:create') ? 'text-white hover:bg-bambu-dark' : 'text-bambu-gray cursor-not-allowed'
@@ -1985,7 +1984,6 @@ export function FileManagerPage() {
                     file={file}
                     isSelected={selectedFiles.includes(file.id)}
                     isMobile={isMobile}
-                    showPrintScheduleButtons={selectedFiles.includes(file.id) && selectedFiles.length === 1}
                     t={t}
                     onSelect={handleFileSelect}
                     onDelete={(id) => setDeleteConfirm({ type: 'file', id })}

Разлика између датотеке није приказан због своје велике величине
+ 0 - 0
static/assets/index-BfIGXFHd.js


+ 1 - 1
static/index.html

@@ -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-DVZX8_s6.js"></script>
+    <script type="module" crossorigin src="/assets/index-BfIGXFHd.js"></script>
     <link rel="stylesheet" crossorigin href="/assets/index-B7d6gcUW.css">
   </head>
   <body>

Неке датотеке нису приказане због велике количине промена