瀏覽代碼

feat: file manager file extensions descriptions

Nicolas Giard 2 年之前
父節點
當前提交
7a4bfa642f
共有 3 個文件被更改,包括 98 次插入45 次删除
  1. 4 4
      ux/quasar.config.js
  2. 2 2
      ux/src/components/FileManager.vue
  3. 92 39
      ux/src/i18n/locales/en.json

+ 4 - 4
ux/quasar.config.js

@@ -102,11 +102,11 @@ module.exports = configure(function (/* ctx */) {
     devServer: {
       // https: true
       open: false, // opens browser window automatically
-      port: 3001,
+      port: 5001,
       proxy: {
-        '/_graphql': 'http://localhost:3000/_graphql',
-        '/_site': 'http://localhost:3000',
-        '/_user': 'http://localhost:3000'
+        '/_graphql': 'http://localhost:5000/_graphql',
+        '/_site': 'http://localhost:5000',
+        '/_user': 'http://localhost:5000'
       }
     },
 

+ 2 - 2
ux/src/components/FileManager.vue

@@ -411,7 +411,7 @@ const files = computed(() => {
       case 'asset': {
         f.icon = fileTypes[f.fileExt]?.icon ?? ''
         f.side = filesize(f.fileSize, { round: 0 })
-        if (fileTypes[f.fileType]) {
+        if (fileTypes[f.fileExt]) {
           f.caption = t(`fileman.${f.fileExt}FileType`)
         } else {
           f.caption = t('fileman.unknownFileType', { type: f.fileExt.toUpperCase() })
@@ -459,7 +459,7 @@ const currentFileDetails = computed(() => {
       case 'asset': {
         items.push({
           label: t('fileman.detailsAssetType'),
-          value: fileTypes[item.fileType] ? t(`fileman.${item.fileType}FileType`) : t('fileman.unknownFileType', { type: item.fileType.toUpperCase() })
+          value: fileTypes[item.fileExt] ? t(`fileman.${item.fileExt}FileType`) : t('fileman.unknownFileType', { type: item.fileExt.toUpperCase() })
         })
         items.push({
           label: t('fileman.detailsAssetSize'),

+ 92 - 39
ux/src/i18n/locales/en.json

@@ -157,8 +157,13 @@
   "admin.extensions.requiresSharp": "Requires Sharp extension",
   "admin.extensions.subtitle": "Install extensions for extra functionality",
   "admin.extensions.title": "Extensions",
+  "admin.flags.advanced.hint": "Set custom configuration flags. Note that all values are public to all users! Do not insert senstive data.",
+  "admin.flags.advanced.label": "Custom Configuration",
   "admin.flags.authDebug.hint": "Log detailed debug info of all login / registration attempts.",
   "admin.flags.authDebug.label": "Auth Debug",
+  "admin.flags.experimental.hint": "Enable unstable / unfinished features. DO NOT enable in a production environment!",
+  "admin.flags.experimental.label": "Experimental Features",
+  "admin.flags.saveSuccess": "Flags have been updated successfully.",
   "admin.flags.sqlLog.hint": "Log all queries made to the database to console.",
   "admin.flags.sqlLog.label": "SQL Query Logging",
   "admin.flags.subtitle": "Low-level system flags for debugging or experimental purposes",
@@ -209,6 +214,11 @@
   "admin.general.ratingsOff": "Off",
   "admin.general.ratingsStars": "Stars",
   "admin.general.ratingsThumbs": "Thumbs",
+  "admin.general.reasonForChange": "Reason for Change",
+  "admin.general.reasonForChangeHint": "Should users be prompted the reason for changes made to a page?",
+  "admin.general.reasonForChangeOff": "Off",
+  "admin.general.reasonForChangeOptional": "Optional",
+  "admin.general.reasonForChangeRequired": "Required",
   "admin.general.saveSuccess": "Site configuration saved successfully.",
   "admin.general.searchAllowFollow": "Allow Search Engines to Follow Links",
   "admin.general.searchAllowFollowHint": "This sets the meta-robots property to follow or nofollow.",
@@ -231,7 +241,15 @@
   "admin.general.subtitle": "Main settings of your wiki",
   "admin.general.title": "General",
   "admin.general.uploadClear": "Clear",
+  "admin.general.uploadConflictBehavior": "Upload Conflict Behavior",
+  "admin.general.uploadConflictBehaviorHint": "How should uploads for a file that already exists be handled?",
+  "admin.general.uploadConflictBehaviorNew": "Append Time to Filename",
+  "admin.general.uploadConflictBehaviorOverwrite": "Overwrite",
+  "admin.general.uploadConflictBehaviorReject": "Reject",
   "admin.general.uploadLogo": "Upload Logo",
+  "admin.general.uploadNormalizeFilename": "Normalize Filenames",
+  "admin.general.uploadNormalizeFilenameHint": "Automatically transform filenames to a standard URL-friendly format.",
+  "admin.general.uploads": "Uploads",
   "admin.general.uploadSizeHint": "An image of {size} pixels is recommended for best results.",
   "admin.general.uploadTypesHint": "{typeList} or {lastType} files only",
   "admin.general.urlHandling": "URL Handling",
@@ -964,6 +982,8 @@
   "admin.utilities.purgeHistory": "Purge History",
   "admin.utilities.purgeHistoryHint": "Delete history (content versioning) older than the selected timeframe.",
   "admin.utilities.purgeHistoryTimeframe": "Delete older than...",
+  "admin.utilities.scanPageProblems": "Scan for Page Problems",
+  "admin.utilities.scanPageProblemsHint": "Scan all pages for invalid, missing or corrupted data.",
   "admin.utilities.subtitle": "Maintenance and miscellaneous tools",
   "admin.utilities.telemetrySubtitle": "Enable/Disable telemetry or reset the client ID",
   "admin.utilities.telemetryTitle": "Telemetry",
@@ -1118,6 +1138,7 @@
   "common.actions.discard": "Discard",
   "common.actions.discardChanges": "Discard Changes",
   "common.actions.download": "Download",
+  "common.actions.duplicate": "Duplicate",
   "common.actions.edit": "Edit",
   "common.actions.exit": "Exit",
   "common.actions.fetch": "Fetch",
@@ -1127,7 +1148,9 @@
   "common.actions.insert": "Insert",
   "common.actions.manage": "Manage",
   "common.actions.move": "Move",
+  "common.actions.moveTo": "Move To",
   "common.actions.new": "New",
+  "common.actions.newFolder": "New Folder",
   "common.actions.ok": "OK",
   "common.actions.optimize": "Optimize",
   "common.actions.page": "Page",
@@ -1473,8 +1496,20 @@
   "editor.unsaved.body": "You have unsaved changes. Are you sure you want to leave the editor and discard any modifications you made since the last save?",
   "editor.unsaved.title": "Discard Unsaved Changes?",
   "editor.unsavedWarning": "You have unsaved edits. Are you sure you want to leave the editor?",
+  "fileman.7zFileType": "7zip Archive",
+  "fileman.aacFileType": "AAC Audio File",
+  "fileman.aifFileType": "AIF Audio File",
+  "fileman.aiFileType": "Adobe Illustrator Document",
+  "fileman.apkFileType": "Android Package",
+  "fileman.aviFileType": "AVI Video File",
+  "fileman.binFileType": "Binary File",
+  "fileman.bz2FileType": "BZIP2 Archive",
+  "fileman.copyURLSuccess": "URL has been copied to the clipboard.",
   "fileman.createFolderInvalidData": "One or more fields are invalid.",
   "fileman.createFolderSuccess": "Folder created successfully.",
+  "fileman.cssFileType": "Cascade Style Sheet",
+  "fileman.csvFileType": "Comma Separated Values Document",
+  "fileman.dataFileType": "Data File",
   "fileman.detailsAssetSize": "File Size",
   "fileman.detailsAssetType": "Type",
   "fileman.detailsPageCreated": "Created",
@@ -1482,25 +1517,81 @@
   "fileman.detailsPageType": "Type",
   "fileman.detailsPageUpdated": "Last Updated",
   "fileman.detailsTitle": "Title",
+  "fileman.dmgFileType": "Apple Disk Image File",
+  "fileman.docxFileType": "Microsoft Word Document",
+  "fileman.epsFileType": "EPS Image",
+  "fileman.exeFileType": "Windows Executable",
+  "fileman.flacFileType": "FLAC Audio File",
   "fileman.folderChildrenCount": "Empty folder | 1 child | {count} children",
   "fileman.folderCreate": "New Folder",
   "fileman.folderFileName": "Path Name",
   "fileman.folderFileNameHint": "URL friendly version of the folder name. Must consist of lowercase alphanumerical or hypen characters only.",
   "fileman.folderFileNameInvalid": "Invalid Characters in Folder Path Name. Lowercase alphanumerical and hyphen characters only.",
   "fileman.folderFileNameMissing": "Missing Folder Path Name",
+  "fileman.folderRename": "Rename Folder",
   "fileman.folderTitle": "Title",
   "fileman.folderTitleInvalidChars": "Invalid Characters in Folder Name",
   "fileman.folderTitleMissing": "Missing Folder Title",
+  "fileman.gifFileType": "Animated GIF Image",
+  "fileman.gzFileType": "GZipped Archive",
+  "fileman.heicFileType": "HEIC Image",
+  "fileman.icoFileType": "Icon File",
+  "fileman.icsFileType": "ICS Calendar Event",
+  "fileman.isoFileType": "Optical Disk Image File",
+  "fileman.jpegFileType": "JPEG Image",
+  "fileman.jpgFileType": "JPEG Image",
+  "fileman.jsonFileType": "JSON Document",
+  "fileman.m4aFileType": "M4A Audio File",
   "fileman.markdownPageType": "Markdown Page",
+  "fileman.midFileType": "MIDI Audio File",
+  "fileman.movFileType": "QuickTime Video File",
+  "fileman.mp3FileType": "MP3 Audio File",
+  "fileman.mp4FileType": "MP4 Video File",
+  "fileman.mpegFileType": "MPEG Video File",
+  "fileman.mpgFileType": "MPEG Video File",
+  "fileman.oggFileType": "OGG Audio File",
+  "fileman.otfFileType": "OpenType Font File",
   "fileman.pdfFileType": "PDF Document",
+  "fileman.pngFileType": "PNG Image",
+  "fileman.pptxFileType": "Microsoft Powerpoint Presentation",
+  "fileman.psdFileType": "Adobe Photoshop Document",
+  "fileman.rarFileType": "RAR Archive",
+  "fileman.renameFolderInvalidData": "One or more fields are invalid.",
+  "fileman.renameFolderSuccess": "Folder renamed successfully.",
+  "fileman.svgFileType": "Scalable Vector Graphic",
+  "fileman.tarFileType": "TAR Archive",
+  "fileman.tgzFileType": "Gzipped TAR Archive",
+  "fileman.tifFileType": "TIFF Image",
   "fileman.title": "File Manager",
+  "fileman.ttfFileType": "TrueType Font File",
+  "fileman.txtFileType": "Text Document",
   "fileman.unknownFileType": "{type} file",
   "fileman.uploadSuccess": "File(s) uploaded successfully.",
   "fileman.viewOptions": "View Options",
+  "fileman.wavFileType": "WAV Audio File",
+  "fileman.wmaFileType": "WMA Audio File",
+  "fileman.wmvFileType": "WMV Video File",
+  "fileman.woff2FileType": "Web Open Font File",
+  "fileman.woffFileType": "Web Open Font File",
+  "fileman.xlstFileType": "Microsoft Excel Document",
+  "fileman.xmlFileType": "XML Document",
+  "fileman.xzFileType": "XZ Archive",
+  "fileman.zipFileType": "ZIP Archive",
+  "folderDeleteDialog.confirm": "Are you sure you want to delete folder {name} and all its content?",
+  "folderDeleteDialog.deleteSuccess": "Folder has been deleted successfully.",
+  "folderDeleteDialog.folderId": "Folder ID {id}",
+  "folderDeleteDialog.title": "Confirm Delete Folder",
   "history.restore.confirmButton": "Restore",
   "history.restore.confirmText": "Are you sure you want to restore this page content as it was on {date}? This version will be copied on top of the current history. As such, newer versions will still be preserved.",
   "history.restore.confirmTitle": "Restore page version?",
   "history.restore.success": "Page version restored succesfully!",
+  "pageDeleteDialog.confirm": "Are you sure you want to delete the page {name}?",
+  "pageDeleteDialog.deleteSuccess": "Page deleted successfully.",
+  "pageDeleteDialog.pageId": "Page ID {id}",
+  "pageDeleteDialog.title": "Confirm Page Deletion",
+  "pageSaveDialog.displayModePath": "Browse Using Paths",
+  "pageSaveDialog.displayModeTitle": "Browse Using Titles",
+  "pageSaveDialog.title": "Save As...",
   "profile.activity": "Activity",
   "profile.appearance": "Site Appearance",
   "profile.appearanceDark": "Dark",
@@ -1584,43 +1675,5 @@
   "welcome.admin": "Administration Area",
   "welcome.createHome": "Create the homepage",
   "welcome.subtitle": "Let's get started...",
-  "welcome.title": "Welcome to Wiki.js!",
-  "admin.utilities.scanPageProblems": "Scan for Page Problems",
-  "admin.utilities.scanPageProblemsHint": "Scan all pages for invalid, missing or corrupted data.",
-  "pageSaveDialog.title": "Save As...",
-  "admin.general.reasonForChange": "Reason for Change",
-  "admin.general.reasonForChangeHint": "Should users be prompted the reason for changes made to a page?",
-  "admin.general.reasonForChangeRequired": "Required",
-  "admin.general.reasonForChangeOptional": "Optional",
-  "admin.general.reasonForChangeOff": "Off",
-  "pageDeleteDialog.title": "Confirm Page Deletion",
-  "pageDeleteDialog.confirm": "Are you sure you want to delete the page {name}?",
-  "pageDeleteDialog.pageId": "Page ID {id}",
-  "pageDeleteDialog.deleteSuccess": "Page deleted successfully.",
-  "common.actions.newFolder": "New Folder",
-  "common.actions.duplicate": "Duplicate",
-  "common.actions.moveTo": "Move To",
-  "pageSaveDialog.displayModeTitle": "Browse Using Titles",
-  "pageSaveDialog.displayModePath": "Browse Using Paths",
-  "folderDeleteDialog.title": "Confirm Delete Folder",
-  "folderDeleteDialog.confirm": "Are you sure you want to delete folder {name} and all its content?",
-  "folderDeleteDialog.folderId": "Folder ID {id}",
-  "folderDeleteDialog.deleteSuccess": "Folder has been deleted successfully.",
-  "admin.flags.experimental.label": "Experimental Features",
-  "admin.flags.experimental.hint": "Enable unstable / unfinished features. DO NOT enable in a production environment!",
-  "admin.flags.advanced.label": "Custom Configuration",
-  "admin.flags.advanced.hint": "Set custom configuration flags. Note that all values are public to all users! Do not insert senstive data.",
-  "admin.flags.saveSuccess": "Flags have been updated successfully.",
-  "fileman.copyURLSuccess": "URL has been copied to the clipboard.",
-  "fileman.folderRename": "Rename Folder",
-  "fileman.renameFolderInvalidData": "One or more fields are invalid.",
-  "fileman.renameFolderSuccess": "Folder renamed successfully.",
-  "admin.general.uploads": "Uploads",
-  "admin.general.uploadConflictBehavior": "Upload Conflict Behavior",
-  "admin.general.uploadConflictBehaviorHint": "How should uploads for a file that already exists be handled?",
-  "admin.general.uploadConflictBehaviorOverwrite": "Overwrite",
-  "admin.general.uploadConflictBehaviorReject": "Reject",
-  "admin.general.uploadConflictBehaviorNew": "Append Time to Filename",
-  "admin.general.uploadNormalizeFilename": "Normalize Filenames",
-  "admin.general.uploadNormalizeFilenameHint": "Automatically transform filenames to a standard URL-friendly format."
+  "welcome.title": "Welcome to Wiki.js!"
 }