lushixing hai 2 semanas
pai
achega
4d688a881c

+ 4 - 2
public/pdfJS/web/viewer.css

@@ -2044,6 +2044,8 @@ body {
 }
 
 #toolbarViewerLeft {
+  display: flex;
+  align-items: center;
   padding-inline-start: 1px;
 }
 #toolbarViewerRight {
@@ -2482,8 +2484,8 @@ a:is(.toolbarButton, .secondaryToolbarButton)[href="#"] {
 }
 
 .toolbarField {
-  padding: 4px 7px;
-  margin: 3px 0;
+  padding: 2px 7px;
+  /* margin: 3px 0; */
   border-radius: 2px;
   background-color: var(--field-bg-color);
   background-clip: padding-box;

+ 1 - 1
src/components/MarkdownPreview/index.vue

@@ -234,7 +234,7 @@ async function previewFile(fileUrl: string, file_name: string) {
 
   if (ext === 'pdf') {
     iframeTitle.value = file_name
-    iframeURL.value = `${ location.origin }/pdfJS/web/viewer.html?file=${ fileUrl }`
+    iframeURL.value = `${ location.origin }/pdfJS/web/viewer.html?file=${ encodeURIComponent(fileUrl) }`
     pdfPreview.value = true
   } else if (isOffice) {
     const encoded = encodeURIComponent(fileUrl)

+ 1 - 1
src/views/search.vue

@@ -123,7 +123,7 @@ async function previewFile(fileUrl: string, file_name: string) {
     //   fileLoading.value = false
     // }
     iframeTitle.value = file_name
-    iframeURL.value = `${ location.origin }/pdfJS/web/viewer.html?file=${ fileUrl }`
+    iframeURL.value = `${ location.origin }/pdfJS/web/viewer.html?file=${ encodeURIComponent(fileUrl) }`
     pdfPreview.value = true
   } else if (isOffice) {
     const encoded = encodeURIComponent(fileUrl)