Merge branch 'master' into add-username-in-sidebar
commit
0718aa68e6
17
CHANGELOG.md
17
CHANGELOG.md
|
@ -2,6 +2,23 @@
|
|||
|
||||
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
||||
|
||||
## [2.30.0](https://github.com/filebrowser/filebrowser/compare/v2.29.0...v2.30.0) (2024-05-19)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* allow multi-select with SHIFT key in singleClick mode ([#3185](https://github.com/filebrowser/filebrowser/issues/3185)) ([2e47a03](https://github.com/filebrowser/filebrowser/commit/2e47a038d63de8f848b070578c1d71f765438a24))
|
||||
* Enhance MIME Type Detection for Additional File Extensions ([#3183](https://github.com/filebrowser/filebrowser/issues/3183)) ([be62f56](https://github.com/filebrowser/filebrowser/commit/be62f56782551e17d6d5dc23bc29cc56ef961a66))
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* add overlay for sidebar on mobile ([#3197](https://github.com/filebrowser/filebrowser/issues/3197)) ([3b48f75](https://github.com/filebrowser/filebrowser/commit/3b48f75301287fe94cbbacff184b4db03f37f7ea))
|
||||
* current folder name in page title ([#3200](https://github.com/filebrowser/filebrowser/issues/3200)) ([e336a25](https://github.com/filebrowser/filebrowser/commit/e336a25ad29ed8b956169d426992860a877ee551))
|
||||
* Fixing the inability to play MKV video files online and enhancing the auxiliary features of the VideoPlayer. ([#3181](https://github.com/filebrowser/filebrowser/issues/3181)) ([782375b](https://github.com/filebrowser/filebrowser/commit/782375b1cb4c4f954468c30ec277ce021c82b40d))
|
||||
* shell window size ([#3198](https://github.com/filebrowser/filebrowser/issues/3198)) ([4c5b612](https://github.com/filebrowser/filebrowser/commit/4c5b612cb2563817f9da50413c7cf9e89b4c4d4a))
|
||||
* The file type icon in the file list is sensitive to the case of the suffix name ([#3187](https://github.com/filebrowser/filebrowser/issues/3187)) ([a9c327c](https://github.com/filebrowser/filebrowser/commit/a9c327cc0687796a3c7bfafd4ddabf4342859e31))
|
||||
|
||||
## [2.29.0](https://github.com/filebrowser/filebrowser/compare/v2.28.0...v2.29.0) (2024-04-30)
|
||||
|
||||
|
||||
|
|
|
@ -3725,12 +3725,12 @@
|
|||
}
|
||||
},
|
||||
"node_modules/braces": {
|
||||
"version": "3.0.2",
|
||||
"resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz",
|
||||
"integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==",
|
||||
"version": "3.0.3",
|
||||
"resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz",
|
||||
"integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"fill-range": "^7.0.1"
|
||||
"fill-range": "^7.1.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=8"
|
||||
|
@ -4822,9 +4822,9 @@
|
|||
}
|
||||
},
|
||||
"node_modules/fill-range": {
|
||||
"version": "7.0.1",
|
||||
"resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz",
|
||||
"integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==",
|
||||
"version": "7.1.1",
|
||||
"resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz",
|
||||
"integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"to-regex-range": "^5.0.1"
|
||||
|
@ -7574,9 +7574,9 @@
|
|||
"dev": true
|
||||
},
|
||||
"node_modules/ws": {
|
||||
"version": "8.16.0",
|
||||
"resolved": "https://registry.npmjs.org/ws/-/ws-8.16.0.tgz",
|
||||
"integrity": "sha512-HS0c//TP7Ina87TfiPUz1rQzMhHrl/SG2guqRcTOIUYD2q8uhUdNHZYJUaQ8aTGPzCh+c6oawMKW35nFl1dxyQ==",
|
||||
"version": "8.17.1",
|
||||
"resolved": "https://registry.npmjs.org/ws/-/ws-8.17.1.tgz",
|
||||
"integrity": "sha512-6XQFvXTkbfUOZOKKILFG1PDK2NDQs4azKQl26T0YS5CxqWLgXajbPZ+h4gZekJyRqFU8pvnbAbbs/3TgRPy+GQ==",
|
||||
"dev": true,
|
||||
"engines": {
|
||||
"node": ">=10.0.0"
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
<template>
|
||||
<div v-show="active" @click="closeHovers" class="overlay"></div>
|
||||
<nav :class="{ active }">
|
||||
<button v-if="user.username" @click="toAccountSettings" class="action">
|
||||
<i class="material-icons">person</i>
|
||||
|
|
|
@ -275,12 +275,10 @@ const open = () => {
|
|||
};
|
||||
|
||||
const getExtension = (fileName: string): string => {
|
||||
const lastDotIndex = fileName.lastIndexOf('.');
|
||||
const lastDotIndex = fileName.lastIndexOf(".");
|
||||
if (lastDotIndex === -1) {
|
||||
return fileName;
|
||||
}
|
||||
return fileName.substring(lastDotIndex );
|
||||
return fileName.substring(lastDotIndex);
|
||||
};
|
||||
|
||||
|
||||
</script>
|
||||
|
|
|
@ -1,8 +1,14 @@
|
|||
<template>
|
||||
<video ref="videoPlayer" class="video-max video-js" controls preload="auto">
|
||||
<source />
|
||||
<track kind="subtitles" v-for="(sub, index) in subtitles" :key="index" :src="sub" :label="subLabel(sub)"
|
||||
:default="index === 0" />
|
||||
<track
|
||||
kind="subtitles"
|
||||
v-for="(sub, index) in subtitles"
|
||||
:key="index"
|
||||
:src="sub"
|
||||
:label="subLabel(sub)"
|
||||
:default="index === 0"
|
||||
/>
|
||||
<p class="vjs-no-js">
|
||||
Sorry, your browser doesn't support embedded videos, but don't worry, you
|
||||
can <a :href="source">download it</a>
|
||||
|
@ -12,7 +18,7 @@
|
|||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { ref, onMounted, onBeforeUnmount, nextTick, } from "vue";
|
||||
import { ref, onMounted, onBeforeUnmount, nextTick } from "vue";
|
||||
import videojs from "video.js";
|
||||
import type Player from "video.js/dist/types/player";
|
||||
import "videojs-mobile-ui";
|
||||
|
@ -23,7 +29,6 @@ import "videojs-mobile-ui/dist/videojs-mobile-ui.css";
|
|||
const videoPlayer = ref<HTMLElement | null>(null);
|
||||
const player = ref<Player | null>(null);
|
||||
|
||||
|
||||
const props = withDefaults(
|
||||
defineProps<{
|
||||
source: string;
|
||||
|
@ -35,14 +40,14 @@ const props = withDefaults(
|
|||
}
|
||||
);
|
||||
|
||||
const source = ref(props.source)
|
||||
const sourceType = ref("")
|
||||
const source = ref(props.source);
|
||||
const sourceType = ref("");
|
||||
|
||||
nextTick(() => {
|
||||
initVideoPlayer()
|
||||
})
|
||||
initVideoPlayer();
|
||||
});
|
||||
|
||||
onMounted(() => { });
|
||||
onMounted(() => {});
|
||||
|
||||
onBeforeUnmount(() => {
|
||||
if (player.value) {
|
||||
|
@ -54,21 +59,22 @@ onBeforeUnmount(() => {
|
|||
const initVideoPlayer = async () => {
|
||||
try {
|
||||
const lang = document.documentElement.lang;
|
||||
const languagePack = await (languageImports[lang] || languageImports.en)?.();
|
||||
videojs.addLanguage('videoPlayerLocal', languagePack.default);
|
||||
sourceType.value = ""
|
||||
const languagePack = await (
|
||||
languageImports[lang] || languageImports.en
|
||||
)?.();
|
||||
videojs.addLanguage("videoPlayerLocal", languagePack.default);
|
||||
sourceType.value = "";
|
||||
|
||||
//
|
||||
sourceType.value = getSourceType(source.value);
|
||||
|
||||
const srcOpt = { sources: { src: props.source, type: sourceType.value } }
|
||||
const srcOpt = { sources: { src: props.source, type: sourceType.value } };
|
||||
//Supporting localized language display.
|
||||
const langOpt = { language: "videoPlayerLocal" }
|
||||
const langOpt = { language: "videoPlayerLocal" };
|
||||
// support for playback at different speeds.
|
||||
const playbackRatesOpt = { playbackRates: [0.5, 1, 1.5, 2, 2.5, 3] }
|
||||
let options = getOptions(props.options, langOpt, srcOpt, playbackRatesOpt)
|
||||
player.value = videojs(videoPlayer.value!, options, () => {
|
||||
});
|
||||
const playbackRatesOpt = { playbackRates: [0.5, 1, 1.5, 2, 2.5, 3] };
|
||||
let options = getOptions(props.options, langOpt, srcOpt, playbackRatesOpt);
|
||||
player.value = videojs(videoPlayer.value!, options, () => {});
|
||||
|
||||
// TODO: need to test on mobile
|
||||
// @ts-ignore
|
||||
|
@ -76,18 +82,16 @@ const initVideoPlayer = async () => {
|
|||
} catch (error) {
|
||||
console.error("Error initializing video player:", error);
|
||||
}
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
const getOptions = (...srcOpt: any[]) => {
|
||||
const options = {
|
||||
controlBar: {
|
||||
skipButtons: {
|
||||
forward: 5,
|
||||
backward: 5
|
||||
}
|
||||
|
||||
},
|
||||
skipButtons: {
|
||||
forward: 5,
|
||||
backward: 5,
|
||||
},
|
||||
},
|
||||
html5: {
|
||||
nativeTextTracks: false,
|
||||
},
|
||||
|
@ -101,7 +105,7 @@ const getOptions = (...srcOpt: any[]) => {
|
|||
};
|
||||
|
||||
return videojs.obj.merge(options, ...srcOpt);
|
||||
}
|
||||
};
|
||||
|
||||
// Attempting to fix the issue of being unable to play .MKV format video files
|
||||
const getSourceType = (source: string) => {
|
||||
|
@ -137,30 +141,29 @@ interface LanguageImports {
|
|||
}
|
||||
|
||||
const languageImports: LanguageImports = {
|
||||
'he': () => import('video.js/dist/lang/he.json'),
|
||||
'hu': () => import('video.js/dist/lang/hu.json'),
|
||||
'ar': () => import('video.js/dist/lang/ar.json'),
|
||||
'de': () => import('video.js/dist/lang/de.json'),
|
||||
'el': () => import('video.js/dist/lang/el.json'),
|
||||
'en': () => import('video.js/dist/lang/en.json'),
|
||||
'es': () => import('video.js/dist/lang/es.json'),
|
||||
'fr': () => import('video.js/dist/lang/fr.json'),
|
||||
'it': () => import('video.js/dist/lang/it.json'),
|
||||
'ja': () => import('video.js/dist/lang/ja.json'),
|
||||
'ko': () => import('video.js/dist/lang/ko.json'),
|
||||
'nl-be': () => import('video.js/dist/lang/nl.json'),
|
||||
'pl': () => import('video.js/dist/lang/pl.json'),
|
||||
'pt-br': () => import('video.js/dist/lang/pt-BR.json'),
|
||||
'pt': () => import('video.js/dist/lang/pt-PT.json'),
|
||||
'ro': () => import('video.js/dist/lang/ro.json'),
|
||||
'ru': () => import('video.js/dist/lang/ru.json'),
|
||||
'sk': () => import('video.js/dist/lang/sk.json'),
|
||||
'tr': () => import('video.js/dist/lang/tr.json'),
|
||||
'uk': () => import('video.js/dist/lang/uk.json'),
|
||||
'zh-cn': () => import('video.js/dist/lang/zh-CN.json'),
|
||||
'zh-tw': () => import('video.js/dist/lang/zh-TW.json'),
|
||||
he: () => import("video.js/dist/lang/he.json"),
|
||||
hu: () => import("video.js/dist/lang/hu.json"),
|
||||
ar: () => import("video.js/dist/lang/ar.json"),
|
||||
de: () => import("video.js/dist/lang/de.json"),
|
||||
el: () => import("video.js/dist/lang/el.json"),
|
||||
en: () => import("video.js/dist/lang/en.json"),
|
||||
es: () => import("video.js/dist/lang/es.json"),
|
||||
fr: () => import("video.js/dist/lang/fr.json"),
|
||||
it: () => import("video.js/dist/lang/it.json"),
|
||||
ja: () => import("video.js/dist/lang/ja.json"),
|
||||
ko: () => import("video.js/dist/lang/ko.json"),
|
||||
"nl-be": () => import("video.js/dist/lang/nl.json"),
|
||||
pl: () => import("video.js/dist/lang/pl.json"),
|
||||
"pt-br": () => import("video.js/dist/lang/pt-BR.json"),
|
||||
pt: () => import("video.js/dist/lang/pt-PT.json"),
|
||||
ro: () => import("video.js/dist/lang/ro.json"),
|
||||
ru: () => import("video.js/dist/lang/ru.json"),
|
||||
sk: () => import("video.js/dist/lang/sk.json"),
|
||||
tr: () => import("video.js/dist/lang/tr.json"),
|
||||
uk: () => import("video.js/dist/lang/uk.json"),
|
||||
"zh-cn": () => import("video.js/dist/lang/zh-CN.json"),
|
||||
"zh-tw": () => import("video.js/dist/lang/zh-TW.json"),
|
||||
};
|
||||
|
||||
</script>
|
||||
<style scoped>
|
||||
.video-max {
|
||||
|
|
|
@ -117,3 +117,11 @@ export default {
|
|||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.upload-info {
|
||||
min-width: 19ch;
|
||||
width: auto;
|
||||
text-align: left;
|
||||
}
|
||||
</style>
|
||||
|
|
|
@ -6,15 +6,22 @@
|
|||
background: var(--surfacePrimary);
|
||||
color: var(--textPrimary);
|
||||
z-index: 9999;
|
||||
background: rgba(127, 127, 127, 0.1);
|
||||
background: var(--dividerSecondary);
|
||||
transition: 0.2s ease background;
|
||||
cursor: ns-resize;
|
||||
touch-action: none;
|
||||
user-select: none;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.shell__divider{
|
||||
background: rgba(127, 127, 127, 0.3);
|
||||
width: 100%;
|
||||
height: 8px;
|
||||
}
|
||||
|
||||
.shell__divider:hover {
|
||||
background: rgba(127, 127, 127, 0.4);
|
||||
background: rgba(127, 127, 127, 0.9);
|
||||
}
|
||||
|
||||
.shell__content {
|
||||
|
@ -34,7 +41,7 @@
|
|||
top: 0px;
|
||||
left: 0px;
|
||||
z-index: 9998;
|
||||
background-color: rgba(0, 0, 0, 0.05);
|
||||
background-color: var(--dividerPrimary);
|
||||
}
|
||||
|
||||
body.rtl .shell-content {
|
||||
|
@ -62,6 +69,8 @@ body.rtl .shell-content {
|
|||
font-size: inherit;
|
||||
}
|
||||
|
||||
|
||||
|
||||
.shell__prompt {
|
||||
width: 1.2rem;
|
||||
}
|
||||
|
@ -75,4 +84,5 @@ body.rtl .shell-content {
|
|||
font-family: inherit;
|
||||
white-space: pre-wrap;
|
||||
width: 100%;
|
||||
color:var(--textSecondary);
|
||||
}
|
||||
|
|
|
@ -31,6 +31,8 @@
|
|||
--hover: rgba(0, 0, 0, 0.1);
|
||||
--borderPrimary: rgba(0, 0, 0, 0.1);
|
||||
--borderSecondary: rgba(0, 0, 0, 0.2);
|
||||
--dividerPrimary: rgba(255, 255, 255, 0.4);
|
||||
--dividerSecondary: rgba(255, 255, 255, 0.9);
|
||||
}
|
||||
|
||||
:root.dark {
|
||||
|
@ -51,4 +53,6 @@
|
|||
--hover: rgba(255, 255, 255, 0.1);
|
||||
--borderPrimary: rgba(255, 255, 255, 0.05);
|
||||
--borderSecondary: rgba(255, 255, 255, 0.15);
|
||||
--dividerPrimary: rgba(30, 30, 30, 0.4);
|
||||
--dividerSecondary:rgba(30, 30, 30, 0.6);
|
||||
}
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
.file-icons [aria-label^="."] {
|
||||
opacity: 0.33;
|
||||
}
|
||||
.file-icons [aria-label$=".bak"] {
|
||||
.file-icons [data-ext=".bak"] {
|
||||
opacity: 0.33;
|
||||
}
|
||||
|
||||
|
@ -47,7 +47,6 @@
|
|||
content: "slideshow";
|
||||
}
|
||||
|
||||
|
||||
/* #0f0 - Spreadsheet/Database */
|
||||
|
||||
.file-icons [data-ext=".csv"] i::before,
|
||||
|
@ -55,7 +54,7 @@
|
|||
.file-icons [data-ext=".odb"] i::before,
|
||||
.file-icons [data-ext=".ods"] i::before,
|
||||
.file-icons [data-ext=".xls"] i::before,
|
||||
.file-icons [data-ext=".xlsx"] i::before {
|
||||
.file-icons [data-ext=".xlsx"] i::before {
|
||||
content: "border_all";
|
||||
}
|
||||
|
||||
|
@ -152,16 +151,16 @@
|
|||
|
||||
/* General */
|
||||
|
||||
.file-icons [data-ext="audio"] i {
|
||||
.file-icons [data-type="audio"] i {
|
||||
color: var(--icon-yellow);
|
||||
}
|
||||
.file-icons [data-ext="image"] i {
|
||||
.file-icons [data-type="image"] i {
|
||||
color: var(--icon-orange);
|
||||
}
|
||||
.file-icons [data-ext="video"] i {
|
||||
.file-icons [data-type="video"] i {
|
||||
color: var(--icon-violet);
|
||||
}
|
||||
.file-icons [data-ext="invalid_link"] i {
|
||||
.file-icons [data-type="invalid_link"] i {
|
||||
color: var(--icon-red);
|
||||
}
|
||||
|
||||
|
@ -172,7 +171,7 @@
|
|||
.file-icons [data-ext=".jar"] i,
|
||||
.file-icons [data-ext=".psd"] i,
|
||||
.file-icons [data-ext=".rb"] i,
|
||||
.file-icons [data-ext="pdf"] i {
|
||||
.file-icons [data-ext=".pdf"] i {
|
||||
color: var(--icon-red);
|
||||
}
|
||||
|
||||
|
@ -204,8 +203,7 @@
|
|||
.file-icons [data-ext=".go"] i,
|
||||
.file-icons [data-ext=".ods"] i,
|
||||
.file-icons [data-ext=".xls"] i,
|
||||
.file-icons [data-ext=".xlsx"] i ,
|
||||
.file-icons [data-ext="xlsx"] i::before{
|
||||
.file-icons [data-ext=".xlsx"] i {
|
||||
color: var(--icon-green);
|
||||
}
|
||||
|
||||
|
|
|
@ -241,6 +241,9 @@ html[dir="rtl"] #listing {
|
|||
|
||||
#listing.list .name {
|
||||
font-weight: normal;
|
||||
word-wrap: break-word;
|
||||
word-break: break-all;
|
||||
white-space: pre-wrap;
|
||||
}
|
||||
|
||||
#listing.list .item.header .name {
|
||||
|
|
|
@ -269,7 +269,7 @@ main .spinner .bounce2 {
|
|||
#previewer .pdf {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
margin-top: 4em;
|
||||
padding-top: 4em;
|
||||
}
|
||||
|
||||
#previewer h2.message {
|
||||
|
|
|
@ -101,6 +101,6 @@ export function logout() {
|
|||
if (noAuth) {
|
||||
window.location.reload();
|
||||
} else {
|
||||
router.push({path: "/login"});
|
||||
router.push({ path: "/login" });
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,9 +1,11 @@
|
|||
// Based on code provided by Amir Fo
|
||||
// Based on code by the following links:
|
||||
// https://stackoverflow.com/a/74528564
|
||||
// https://web.dev/articles/async-clipboard
|
||||
export function copy(text: string) {
|
||||
return new Promise<void>((resolve, reject) => {
|
||||
if (
|
||||
typeof navigator !== "undefined" &&
|
||||
// Clipboard API requires secure context
|
||||
window.isSecureContext &&
|
||||
typeof navigator.clipboard !== "undefined" &&
|
||||
// @ts-ignore
|
||||
navigator.permissions !== "undefined"
|
||||
|
@ -13,10 +15,8 @@ export function copy(text: string) {
|
|||
.query({ name: "clipboard-write" })
|
||||
.then((permission) => {
|
||||
if (permission.state === "granted" || permission.state === "prompt") {
|
||||
const type = "text/plain";
|
||||
const blob = new Blob([text], { type });
|
||||
const data = [new ClipboardItem({ [type]: blob })];
|
||||
navigator.clipboard.write(data).then(resolve).catch(reject);
|
||||
// simple writeText should work for all modern browsers
|
||||
navigator.clipboard.writeText(text).then(resolve).catch(reject);
|
||||
} else {
|
||||
reject(new Error("Permission not granted!"));
|
||||
}
|
||||
|
@ -66,13 +66,13 @@ const styles = {
|
|||
border: "none",
|
||||
outline: "none",
|
||||
boxShadow: "none",
|
||||
background: "transparent"
|
||||
background: "transparent",
|
||||
};
|
||||
|
||||
const createTemporaryTextarea = (text:string) => {
|
||||
const createTemporaryTextarea = (text: string) => {
|
||||
const textarea = document.createElement("textarea");
|
||||
textarea.value = text;
|
||||
textarea.setAttribute("readonly", "");
|
||||
Object.assign(textarea.style, styles);
|
||||
return textarea;
|
||||
};
|
||||
};
|
||||
|
|
|
@ -45,6 +45,8 @@ import { useI18n } from "vue-i18n";
|
|||
import { useRoute } from "vue-router";
|
||||
import FileListing from "@/views/files/FileListing.vue";
|
||||
import { StatusError } from "@/api/utils";
|
||||
import { name } from "../utils/constants";
|
||||
|
||||
const Editor = defineAsyncComponent(() => import("@/views/files/Editor.vue"));
|
||||
const Preview = defineAsyncComponent(() => import("@/views/files/Preview.vue"));
|
||||
|
||||
|
@ -148,7 +150,7 @@ const fetchData = async () => {
|
|||
}
|
||||
|
||||
fileStore.updateRequest(res);
|
||||
document.title = `${res.name} - ${document.title}`;
|
||||
document.title = `${res.name} - ${t("files.files")} - ${name}`;
|
||||
} catch (err) {
|
||||
if (err instanceof Error) {
|
||||
error.value = err;
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
@mousemove="toggleNavigation"
|
||||
@touchstart="toggleNavigation"
|
||||
>
|
||||
<header-bar v-if="showNav">
|
||||
<header-bar v-if="isPdf || showNav">
|
||||
<action icon="close" :label="$t('buttons.close')" @action="close()" />
|
||||
<title>{{ name }}</title>
|
||||
<action
|
||||
|
@ -74,11 +74,7 @@
|
|||
:options="videoOptions"
|
||||
>
|
||||
</VideoPlayer>
|
||||
<object
|
||||
v-else-if="fileStore.req?.extension.toLowerCase() == '.pdf'"
|
||||
class="pdf"
|
||||
:data="raw"
|
||||
></object>
|
||||
<object v-else-if="isPdf" class="pdf" :data="raw"></object>
|
||||
<div v-else-if="fileStore.req?.type == 'blob'" class="info">
|
||||
<div class="title">
|
||||
<i class="material-icons">feedback</i>
|
||||
|
@ -189,6 +185,8 @@ const raw = computed(() => {
|
|||
return downloadUrl.value;
|
||||
});
|
||||
|
||||
const isPdf = computed(() => fileStore.req?.extension.toLowerCase() == ".pdf");
|
||||
|
||||
const isResizeEnabled = computed(() => resizePreview);
|
||||
|
||||
const subtitles = computed(() => {
|
||||
|
|
4
go.mod
4
go.mod
|
@ -25,8 +25,8 @@ require (
|
|||
github.com/tomasen/realip v0.0.0-20180522021738-f0c99a92ddce
|
||||
go.etcd.io/bbolt v1.3.9
|
||||
golang.org/x/crypto v0.21.0
|
||||
golang.org/x/image v0.15.0
|
||||
golang.org/x/text v0.14.0
|
||||
golang.org/x/image v0.18.0
|
||||
golang.org/x/text v0.16.0
|
||||
gopkg.in/natefinch/lumberjack.v2 v2.2.1
|
||||
gopkg.in/yaml.v2 v2.4.0
|
||||
)
|
||||
|
|
12
go.sum
12
go.sum
|
@ -192,8 +192,8 @@ golang.org/x/crypto v0.21.0/go.mod h1:0BP7YvVV9gBbVKyeTG0Gyn+gZm94bibOW5BjDEYAOM
|
|||
golang.org/x/exp v0.0.0-20240325151524-a685a6edb6d8 h1:aAcj0Da7eBAtrTp03QXWvm88pSyOt+UgdZw2BFZ+lEw=
|
||||
golang.org/x/exp v0.0.0-20240325151524-a685a6edb6d8/go.mod h1:CQ1k9gNrJ50XIzaKCRR2hssIjF07kZFEiieALBM/ARQ=
|
||||
golang.org/x/image v0.0.0-20191009234506-e7c1f5e7dbb8/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0=
|
||||
golang.org/x/image v0.15.0 h1:kOELfmgrmJlw4Cdb7g/QGuB3CvDrXbqEIww/pNtNBm8=
|
||||
golang.org/x/image v0.15.0/go.mod h1:HUYqC05R2ZcZ3ejNQsIHQDQiwWM4JBqmm6MKANTp4LE=
|
||||
golang.org/x/image v0.18.0 h1:jGzIakQa/ZXI1I0Fxvaa9W7yP25TqT6cHIHn+6CqvSQ=
|
||||
golang.org/x/image v0.18.0/go.mod h1:4yyo5vMFQjVjUcVk4jEQcU9MGy/rulF5WvUILseCM2E=
|
||||
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
|
||||
golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks=
|
||||
golang.org/x/net v0.0.0-20191105084925-a882066a44e0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
||||
|
@ -205,8 +205,8 @@ golang.org/x/net v0.0.0-20200904194848-62affa334b73/go.mod h1:/O7V0waA8r7cgGh81R
|
|||
golang.org/x/net v0.0.0-20221002022538-bcab6841153b/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk=
|
||||
golang.org/x/net v0.23.0 h1:7EYJ93RZ9vYSZAIb2x3lnuvqO5zneoD6IvWjuhfxjTs=
|
||||
golang.org/x/net v0.23.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg=
|
||||
golang.org/x/sync v0.5.0 h1:60k92dhOjHxJkrqnwsfl8KuaHbn/5dl0lUPUklKo3qE=
|
||||
golang.org/x/sync v0.5.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
|
||||
golang.org/x/sync v0.7.0 h1:YsImfSBoP9QPYL0xyKJPq0gcaJdG3rInoqxTWbfQu9M=
|
||||
golang.org/x/sync v0.7.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
|
||||
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
|
@ -225,8 +225,8 @@ golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuX
|
|||
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
||||
golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk=
|
||||
golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
|
||||
golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ=
|
||||
golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU=
|
||||
golang.org/x/text v0.16.0 h1:a94ExnEXNtEwYLGJSIUxnWoxoRz/ZcCsV63ROupILh4=
|
||||
golang.org/x/text v0.16.0/go.mod h1:GhwF1Be+LQoKShO3cGOHzqOgRrGaYc9AvblQOmPVHnI=
|
||||
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
||||
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||
google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc=
|
||||
|
|
Loading…
Reference in New Issue