Modernize icons and file previews; add bounded ZIP directory viewer
This commit is contained in:
1 parent
9110c8a9d5
commit
2366035c72
67 files changed
+1657
-658
No files matched your search
+9
-1
@@ -1,7 +1,15 @@
|
||||
# Предпросмотр PDF и DICOM
|
||||
# Предпросмотр файлов
|
||||
|
||||
PDF отображается локальным PDF.js в canvas, без плагинов браузера и внешних CDN. Страницы рисуются по одной; доступны переключение страницы и масштаб. CSP `object-src 'none'` сохраняется. Шрифты и таблицы символов входят в сборку.
|
||||
|
||||
В панели PDF есть кнопка открытия в новой вкладке: там документ отображает сам браузер. Общая кнопка «Открыть файл» удалена.
|
||||
|
||||
Обычные и публичные страницы поддерживают изображения, аудио и видео в форматах браузера, TIFF, текст, Markdown, CSV и EPUB. Текстовые форматы ограничены 5 МиБ, TIFF — 64 МиБ и 16 миллионами пикселей. HTML показывается текстом; Markdown очищается от активного содержимого. Если формат не поддерживается, остаются иконка и скачивание.
|
||||
|
||||
ZIP показывает только дерево имён из центрального каталога, без чтения содержимого записей, распаковки или открытия вложенных архивов. Используются частичные HTTP-запросы; ответ без поддержки Range отклоняется. Лимиты: 4 МиБ центрального каталога, 10 000 записей, 20 000 узлов с учётом папок, 32 уровня вложенности, 1024 байта на имя. Одновременно отображаются до 1000 строк. Проверяются границы записей и ответа сервера; пути с переходом к родителю отклоняются. ZIP64 и составные архивы не поддерживаются. Заявленный распакованный размер не используется для выделения памяти; ZIP-бомбы не распаковываются. Время загрузки ограничено 30 секундами.
|
||||
|
||||
Параметры DICOM подписаны «Контраст (ширина окна)» и «Яркость (уровень окна)». Это медицинское окно отображения интенсивности: его ширина задаёт диапазон, а уровень — центр диапазона; исходные пиксели не изменяются.
|
||||
|
||||
Файлы `.dcm` и `.dicom` открываются локальным DICOM-декодером в отдельном Worker. Поддерживаются 8/16-битные монохромные изображения (MONOCHROME1/2), 8-битный RGB и сжатые данные, поддерживаемые декодером Daikon. Доступны выбор кадра, ширина/уровень окна и сброс настроек. Неподдерживаемый формат сообщает об ошибке; файл остаётся доступен для скачивания.
|
||||
|
||||
Изображение DICOM целиком вписывается в доступную область под панелью инструментов с сохранением пропорций. Большие изображения уменьшаются, небольшие не увеличиваются.
|
||||
|
||||
@@ -33,7 +33,6 @@
|
||||
"lodash-es": "^4.18.1",
|
||||
"marked": "^18.1.1",
|
||||
"marked-katex-extension": "^5.1.13",
|
||||
"material-icons": "^1.13.14",
|
||||
"normalize.css": "^8.0.1",
|
||||
"pdfjs-dist": "^6.4.299",
|
||||
"pinia": "^3.0.4",
|
||||
|
||||
Generated
-8
@@ -60,9 +60,6 @@ importers:
|
||||
marked-katex-extension:
|
||||
specifier: ^5.1.13
|
||||
version: 5.1.13(katex@0.18.10)(marked@18.1.1)
|
||||
material-icons:
|
||||
specifier: ^1.13.14
|
||||
version: 1.13.14
|
||||
normalize.css:
|
||||
specifier: ^8.0.1
|
||||
version: 8.0.1
|
||||
@@ -2174,9 +2171,6 @@ packages:
|
||||
marks-pane@1.0.9:
|
||||
resolution: {integrity: sha512-Ahs4oeG90tbdPWwAJkAAoHg2lRR8lAs9mZXETNPO9hYg3AkjUJBKi1NQ4aaIQZVGrig7c/3NUV1jANl8rFTeMg==}
|
||||
|
||||
material-icons@1.13.14:
|
||||
resolution: {integrity: sha512-kZOfc7xCC0rAT8Q3DQixYAeT+tBqZnxkseQtp2bxBxz7q5pMAC+wmit7vJn1g/l7wRU+HEPq23gER4iPjGs5Cg==}
|
||||
|
||||
meow@13.2.0:
|
||||
resolution: {integrity: sha512-pxQJQzB6djGPXh08dacEloMFopsOqGVRKFPYvPOt9XDZ1HasbgDZA74CJGreSU4G3Ak7EFJGoiH2auq+yXISgA==}
|
||||
engines: {node: '>=18'}
|
||||
@@ -4891,8 +4885,6 @@ snapshots:
|
||||
|
||||
marks-pane@1.0.9: {}
|
||||
|
||||
material-icons@1.13.14: {}
|
||||
|
||||
meow@13.2.0: {}
|
||||
|
||||
min-document@2.19.2:
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
<template>
|
||||
<svg
|
||||
class="app-icon"
|
||||
viewBox="0 0 24 24"
|
||||
fill="none"
|
||||
stroke="currentColor"
|
||||
stroke-width="1.65"
|
||||
stroke-linecap="round"
|
||||
stroke-linejoin="round"
|
||||
aria-hidden="true"
|
||||
>
|
||||
<path :d="iconPath(name || 'file')" />
|
||||
</svg>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { iconPath } from "@/utils/icons";
|
||||
defineProps<{ name?: string | null }>();
|
||||
</script>
|
||||
@@ -6,13 +6,11 @@
|
||||
:aria-label="t('files.home')"
|
||||
:title="t('files.home')"
|
||||
>
|
||||
<i class="material-icons">home</i>
|
||||
<AppIcon name="home" />
|
||||
</component>
|
||||
|
||||
<span v-for="(link, index) in items" :key="index">
|
||||
<span class="chevron"
|
||||
><i class="material-icons">keyboard_arrow_right</i></span
|
||||
>
|
||||
<span class="chevron"><AppIcon name="keyboard_arrow_right" /></span>
|
||||
<component :is="element" :to="link.url">{{ link.name }}</component>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
<template>
|
||||
<div class="notification-content" :class="kind">
|
||||
<i class="material-icons" aria-hidden="true">{{
|
||||
kind === "error" ? "error_outline" : "check_circle"
|
||||
}}</i>
|
||||
<AppIcon
|
||||
:name="kind === 'error' ? 'error_outline' : 'check_circle'"
|
||||
aria-hidden="true"
|
||||
/>
|
||||
<div>
|
||||
<strong>{{ title }}</strong>
|
||||
<p>{{ message }}</p>
|
||||
|
||||
@@ -85,7 +85,7 @@ export default {
|
||||
>
|
||||
<button @click="isOpen = !isOpen" class="dropdown-modal-trigger">
|
||||
<slot></slot>
|
||||
<i class="material-icons">chevron_right</i>
|
||||
<AppIcon name="chevron_right" />
|
||||
</button>
|
||||
|
||||
<teleport to="body">
|
||||
|
||||
@@ -11,9 +11,7 @@
|
||||
:aria-label="name"
|
||||
@click="expanded = !expanded"
|
||||
>
|
||||
<i class="material-icons">{{
|
||||
expanded ? "expand_more" : "chevron_right"
|
||||
}}</i>
|
||||
<AppIcon :name="expanded ? 'expand_more' : 'chevron_right'" />
|
||||
</button>
|
||||
<router-link
|
||||
:to="url"
|
||||
@@ -21,8 +19,9 @@
|
||||
:aria-current="selected ? 'page' : undefined"
|
||||
@click="layout.closeHovers"
|
||||
>
|
||||
<i class="material-icons">{{ expanded ? "folder_open" : "folder" }}</i
|
||||
><span>{{ name }}</span>
|
||||
<AppIcon :name="expanded ? 'folder_open' : 'folder'" /><span>{{
|
||||
name
|
||||
}}</span>
|
||||
</router-link>
|
||||
</div>
|
||||
<ul v-if="expanded">
|
||||
|
||||
@@ -8,10 +8,10 @@
|
||||
:aria-label="closeButtonTitle"
|
||||
:title="closeButtonTitle"
|
||||
>
|
||||
<i v-if="ongoing" class="material-icons">stop_circle</i>
|
||||
<i v-else class="material-icons">arrow_back</i>
|
||||
<AppIcon name="stop_circle" v-if="ongoing" />
|
||||
<AppIcon name="arrow_back" v-else />
|
||||
</button>
|
||||
<i v-else class="material-icons">search</i>
|
||||
<AppIcon name="search" v-else />
|
||||
<input
|
||||
type="text"
|
||||
@keyup.exact="keyup"
|
||||
@@ -22,12 +22,12 @@
|
||||
:aria-label="$t('search.search')"
|
||||
:placeholder="$t('search.search')"
|
||||
/>
|
||||
<i
|
||||
<AppIcon
|
||||
name="autorenew"
|
||||
v-show="ongoing"
|
||||
class="material-icons spin"
|
||||
class="spin"
|
||||
style="display: inline-block"
|
||||
>autorenew
|
||||
</i>
|
||||
/>
|
||||
<span style="margin-top: 5px" v-show="results.length > 0">
|
||||
{{ results.length }}
|
||||
</span>
|
||||
@@ -50,7 +50,7 @@
|
||||
@click="init('type:' + k)"
|
||||
:aria-label="$t('search.' + v.label)"
|
||||
>
|
||||
<i class="material-icons">{{ v.icon }}</i>
|
||||
<AppIcon :name="v.icon" />
|
||||
<p>{{ $t("search." + v.label) }}</p>
|
||||
</div>
|
||||
</div>
|
||||
@@ -60,8 +60,8 @@
|
||||
<ul v-show="results.length > 0">
|
||||
<li v-for="(s, k) in filteredResults" :key="k">
|
||||
<router-link v-on:click="close" :to="s.url">
|
||||
<i v-if="s.dir" class="material-icons">folder</i>
|
||||
<i v-else class="material-icons">insert_drive_file</i>
|
||||
<AppIcon name="folder" v-if="s.dir" />
|
||||
<AppIcon name="insert_drive_file" v-else />
|
||||
<span>./{{ s.path }}</span>
|
||||
</router-link>
|
||||
</li>
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
<div @click="focus" class="shell__content" ref="scrollable">
|
||||
<div v-for="(c, index) in content" :key="index" class="shell__result">
|
||||
<div class="shell__prompt">
|
||||
<i class="material-icons">chevron_right</i>
|
||||
<AppIcon name="chevron_right" />
|
||||
</div>
|
||||
<pre class="shell__text">{{ c.text }}</pre>
|
||||
</div>
|
||||
@@ -23,7 +23,7 @@
|
||||
:class="{ 'shell__result--hidden': !canInput }"
|
||||
>
|
||||
<div class="shell__prompt">
|
||||
<i class="material-icons">chevron_right</i>
|
||||
<AppIcon name="chevron_right" />
|
||||
</div>
|
||||
<pre
|
||||
tabindex="0"
|
||||
|
||||
@@ -17,15 +17,16 @@
|
||||
:title="t('explorer.pinCurrent')"
|
||||
:aria-label="t('explorer.pinCurrent')"
|
||||
>
|
||||
<i class="material-icons">bookmark_add</i>
|
||||
<AppIcon name="bookmark_add" />
|
||||
</button>
|
||||
</div>
|
||||
<router-link
|
||||
class="explorer-link"
|
||||
to="/files/"
|
||||
@click="layout.closeHovers"
|
||||
><i class="material-icons">home</i
|
||||
><span>{{ t("sidebar.myFiles") }}</span></router-link
|
||||
><AppIcon name="home" /><span>{{
|
||||
t("sidebar.myFiles")
|
||||
}}</span></router-link
|
||||
>
|
||||
<div
|
||||
v-for="bookmark in bookmarks"
|
||||
@@ -37,15 +38,16 @@
|
||||
:to="bookmark.url"
|
||||
:title="bookmark.name"
|
||||
@click="layout.closeHovers"
|
||||
><i class="material-icons">star_outline</i
|
||||
><span>{{ bookmark.name }}</span></router-link
|
||||
><AppIcon name="star_outline" /><span>{{
|
||||
bookmark.name
|
||||
}}</span></router-link
|
||||
>
|
||||
<button
|
||||
@click="removeBookmark(bookmark.url)"
|
||||
:aria-label="t('explorer.unpin')"
|
||||
:title="t('explorer.unpin')"
|
||||
>
|
||||
<i class="material-icons">close</i>
|
||||
<AppIcon name="close" />
|
||||
</button>
|
||||
</div>
|
||||
<div class="sidebar-section-title">
|
||||
@@ -56,7 +58,7 @@
|
||||
:title="t('sidebar.newFolder')"
|
||||
:aria-label="t('sidebar.newFolder')"
|
||||
>
|
||||
<i class="material-icons">create_new_folder</i>
|
||||
<AppIcon name="create_new_folder" />
|
||||
</button>
|
||||
<button
|
||||
v-if="file.isFiles && file.req?.isDir && auth.user.perm.create"
|
||||
@@ -64,7 +66,7 @@
|
||||
:title="t('sidebar.newFile')"
|
||||
:aria-label="t('sidebar.newFile')"
|
||||
>
|
||||
<i class="material-icons">note_add</i>
|
||||
<AppIcon name="note_add" />
|
||||
</button>
|
||||
</div>
|
||||
<ul class="folder-tree" :aria-label="t('explorer.folders')">
|
||||
@@ -114,42 +116,45 @@
|
||||
role="menuitem"
|
||||
:href="baseURL + '/auth/account'"
|
||||
@click="navigate"
|
||||
><i class="material-icons">account_circle</i
|
||||
>{{ t("preferences.manage") }}</a
|
||||
><AppIcon name="account_circle" />{{ t("preferences.manage") }}</a
|
||||
>
|
||||
<router-link
|
||||
role="menuitem"
|
||||
to="/settings/profile"
|
||||
@click="navigate"
|
||||
><i class="material-icons">manage_accounts</i
|
||||
>{{ t("settings.profileSettings") }}</router-link
|
||||
><AppIcon name="manage_accounts" />{{
|
||||
t("settings.profileSettings")
|
||||
}}</router-link
|
||||
>
|
||||
<router-link
|
||||
v-if="auth.user.perm.share"
|
||||
role="menuitem"
|
||||
to="/settings/shares"
|
||||
@click="navigate"
|
||||
><i class="material-icons">link</i
|
||||
>{{ t("settings.shareManagement") }}</router-link
|
||||
><AppIcon name="link" />{{
|
||||
t("settings.shareManagement")
|
||||
}}</router-link
|
||||
>
|
||||
<router-link
|
||||
v-if="auth.user.perm.admin"
|
||||
role="menuitem"
|
||||
to="/settings/global"
|
||||
@click="navigate"
|
||||
><i class="material-icons">settings</i
|
||||
>{{ t("settings.globalSettings") }}</router-link
|
||||
><AppIcon name="settings" />{{
|
||||
t("settings.globalSettings")
|
||||
}}</router-link
|
||||
>
|
||||
<router-link
|
||||
v-if="auth.user.perm.admin"
|
||||
role="menuitem"
|
||||
to="/settings/users"
|
||||
@click="navigate"
|
||||
><i class="material-icons">group</i
|
||||
>{{ t("settings.userManagement") }}</router-link
|
||||
><AppIcon name="group" />{{
|
||||
t("settings.userManagement")
|
||||
}}</router-link
|
||||
>
|
||||
<button v-if="canLogout" role="menuitem" @click="logout">
|
||||
<i class="material-icons">logout</i>{{ t("sidebar.logout") }}
|
||||
<AppIcon name="logout" />{{ t("sidebar.logout") }}
|
||||
</button>
|
||||
</div>
|
||||
<button
|
||||
@@ -167,13 +172,13 @@
|
||||
><small>{{
|
||||
auth.user.email || auth.user.profileName || ""
|
||||
}}</small></span
|
||||
><i class="material-icons">more_horiz</i>
|
||||
><AppIcon name="more_horiz" />
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<router-link v-else-if="!hideLoginButton" class="explorer-link" to="/login"
|
||||
><i class="material-icons">login</i>{{ t("sidebar.login") }}</router-link
|
||||
><AppIcon name="login" />{{ t("sidebar.login") }}</router-link
|
||||
>
|
||||
</nav>
|
||||
</template>
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
/>
|
||||
<div class="encoding-list">
|
||||
<div v-if="encodingList.length == 0" class="message">
|
||||
<i class="material-icons">sentiment_dissatisfied</i>
|
||||
<AppIcon name="sentiment_dissatisfied" />
|
||||
<span>{{ $t("files.lonely") }}</span>
|
||||
</div>
|
||||
<button
|
||||
@@ -55,11 +55,11 @@
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="displayError" class="csv-error">
|
||||
<i class="material-icons">error</i>
|
||||
<AppIcon name="error" />
|
||||
<p>{{ displayError }}</p>
|
||||
</div>
|
||||
<div v-else-if="parsed.headers.length === 0" class="csv-empty">
|
||||
<i class="material-icons">description</i>
|
||||
<AppIcon name="description" />
|
||||
<p>{{ $t("files.lonely") }}</p>
|
||||
</div>
|
||||
<div v-else class="csv-table-container" @wheel.stop @touchmove.stop>
|
||||
@@ -81,7 +81,7 @@
|
||||
</table>
|
||||
<div class="csv-footer">
|
||||
<div class="csv-info" v-if="parsed.rows.length > 100">
|
||||
<i class="material-icons">info</i>
|
||||
<AppIcon name="info" />
|
||||
<span>
|
||||
{{ $t("files.showingRows", { count: parsed.rows.length }) }}
|
||||
</span>
|
||||
|
||||
@@ -1,33 +0,0 @@
|
||||
<template>
|
||||
<svg
|
||||
class="dicom-file-icon"
|
||||
viewBox="0 0 48 56"
|
||||
fill="none"
|
||||
aria-hidden="true"
|
||||
>
|
||||
<path
|
||||
d="M8 2h21l13 13v37a2 2 0 0 1-2 2H8a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2Z"
|
||||
fill="currentColor"
|
||||
fill-opacity=".12"
|
||||
stroke="currentColor"
|
||||
stroke-width="2"
|
||||
/>
|
||||
<path
|
||||
d="M28 2v14h14"
|
||||
stroke="currentColor"
|
||||
stroke-width="2"
|
||||
stroke-linejoin="round"
|
||||
/>
|
||||
<text
|
||||
x="24"
|
||||
y="37"
|
||||
text-anchor="middle"
|
||||
fill="currentColor"
|
||||
font-family="system-ui, sans-serif"
|
||||
font-weight="700"
|
||||
font-size="10"
|
||||
>
|
||||
.dcm
|
||||
</text>
|
||||
</svg>
|
||||
</template>
|
||||
@@ -0,0 +1,12 @@
|
||||
<template>
|
||||
<div class="resource-epub">
|
||||
<VueReader
|
||||
:url="source"
|
||||
:epubOptions="{ allowScriptedContent: false, allowPopups: false }"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { VueReader } from "vue-reader";
|
||||
defineProps<{ source: string }>();
|
||||
</script>
|
||||
@@ -10,7 +10,12 @@
|
||||
@mouseup="mouseUp"
|
||||
@wheel="wheelMove"
|
||||
>
|
||||
<img class="image-ex-img image-ex-img-center" ref="imgex" @load="onLoad" />
|
||||
<img
|
||||
class="image-ex-img image-ex-img-center"
|
||||
ref="imgex"
|
||||
@load="onLoad"
|
||||
@error="emit('error')"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
@@ -30,6 +35,7 @@ const props = withDefaults(defineProps<IProps>(), {
|
||||
classList: () => [],
|
||||
zoomStep: () => 0.25,
|
||||
});
|
||||
const emit = defineEmits<{ (event: "error"): void }>();
|
||||
|
||||
const scale = ref<number>(1);
|
||||
const lastX = ref<number | null>(null);
|
||||
|
||||
@@ -0,0 +1,42 @@
|
||||
<template>
|
||||
<AppIcon v-if="directory" name="folder" class="file-icon" />
|
||||
<svg
|
||||
v-else
|
||||
class="app-icon file-icon"
|
||||
viewBox="0 0 24 24"
|
||||
fill="none"
|
||||
stroke="currentColor"
|
||||
stroke-width="1.4"
|
||||
stroke-linecap="round"
|
||||
stroke-linejoin="round"
|
||||
aria-hidden="true"
|
||||
>
|
||||
<path d="M5 2h9l5 5v15H5z M14 2v6h5" />
|
||||
<text
|
||||
v-if="extension"
|
||||
x="12"
|
||||
y="17"
|
||||
text-anchor="middle"
|
||||
fill="currentColor"
|
||||
stroke="none"
|
||||
font-size="3.8"
|
||||
font-weight="650"
|
||||
font-family="system-ui, sans-serif"
|
||||
>
|
||||
{{ extension }}
|
||||
</text>
|
||||
<path v-else d="M8 12h8 M8 16h6" />
|
||||
</svg>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { computed } from "vue";
|
||||
import AppIcon from "../AppIcon.vue";
|
||||
const props = defineProps<{ name: string; directory?: boolean }>();
|
||||
const extension = computed(
|
||||
() =>
|
||||
props.name
|
||||
.match(/\.([^.]+)$/)?.[0]
|
||||
.slice(0, 5)
|
||||
.toLowerCase() || ""
|
||||
);
|
||||
</script>
|
||||
@@ -25,7 +25,7 @@
|
||||
@contextmenu="contextMenu"
|
||||
>
|
||||
<div class="file-symbol">
|
||||
<DicomIcon v-if="isDicom" />
|
||||
<FileIcon v-if="isDicom" :name="name" />
|
||||
<img
|
||||
v-else-if="showThumbnail && thumbnailVisible && !thumbnailFailed"
|
||||
:src="thumbnailUrl"
|
||||
@@ -33,7 +33,7 @@
|
||||
decoding="async"
|
||||
@error="thumbnailFailed = true"
|
||||
/>
|
||||
<i v-else class="material-icons"></i>
|
||||
<FileIcon v-else :name="name" :directory="isDir" />
|
||||
</div>
|
||||
|
||||
<div>
|
||||
@@ -60,7 +60,7 @@ import dayjs from "dayjs";
|
||||
import { files as api } from "@/api";
|
||||
import * as upload from "@/utils/upload";
|
||||
import { computed, inject, ref, watch, onMounted, onBeforeUnmount } from "vue";
|
||||
import DicomIcon from "./DicomIcon.vue";
|
||||
import FileIcon from "./FileIcon.vue";
|
||||
import { useRouter } from "vue-router";
|
||||
|
||||
const touches = ref<number>(0);
|
||||
|
||||
@@ -34,6 +34,13 @@
|
||||
<option :value="1.5">150%</option>
|
||||
<option :value="2">200%</option>
|
||||
</select>
|
||||
<a
|
||||
:href="source"
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
class="pdf-open-native"
|
||||
><AppIcon name="external" />{{ t("documents.openNewTab") }}</a
|
||||
>
|
||||
</div>
|
||||
<p v-if="error" role="alert" class="document-error">{{ error }}</p>
|
||||
<p v-else-if="busy">{{ t("files.loading") }}</p>
|
||||
|
||||
@@ -0,0 +1,209 @@
|
||||
<template>
|
||||
<PdfViewer v-if="kind === 'pdf'" :source="source" />
|
||||
<DicomViewer v-else-if="kind === 'dicom'" :source="source" />
|
||||
<ZipPreview v-else-if="kind === 'zip'" :source="source" :size="size || 0" />
|
||||
<div
|
||||
v-else
|
||||
class="resource-preview"
|
||||
@wheel.stop
|
||||
@touchmove.stop
|
||||
@keydown.stop
|
||||
>
|
||||
<div v-if="failed || !kind" class="preview-unavailable">
|
||||
<FileIcon :name="name" />
|
||||
<p>{{ t("files.noPreview") }}</p>
|
||||
<small v-if="message" role="alert">{{ message }}</small>
|
||||
</div>
|
||||
<img
|
||||
v-else-if="kind === 'image'"
|
||||
:src="source"
|
||||
:alt="name"
|
||||
class="resource-image"
|
||||
@error="failed = true"
|
||||
/>
|
||||
<audio
|
||||
v-else-if="kind === 'audio'"
|
||||
:src="source"
|
||||
controls
|
||||
preload="metadata"
|
||||
@error="failed = true"
|
||||
/>
|
||||
<video
|
||||
v-else-if="kind === 'video'"
|
||||
:src="source"
|
||||
controls
|
||||
preload="metadata"
|
||||
@error="failed = true"
|
||||
/>
|
||||
<EpubPreview v-else-if="kind === 'epub'" :source="source" />
|
||||
<template v-else>
|
||||
<p v-if="busy" role="status">{{ t("files.loading") }}</p>
|
||||
<img
|
||||
v-else-if="kind === 'tiff' && imageURL"
|
||||
:src="imageURL"
|
||||
:alt="name"
|
||||
class="resource-image"
|
||||
/>
|
||||
<CsvViewer v-else-if="kind === 'csv' && buffer" :content="buffer" />
|
||||
<template v-else-if="buffer">
|
||||
<div class="document-tools">
|
||||
<label
|
||||
>{{ t("files.fileEncoding")
|
||||
}}<select v-model="encoding" class="input">
|
||||
<option value="utf-8">UTF-8</option>
|
||||
<option value="windows-1251">Windows-1251</option>
|
||||
<option value="windows-1256">Windows-1256</option>
|
||||
</select></label
|
||||
>
|
||||
</div>
|
||||
<article
|
||||
v-if="kind === 'markdown'"
|
||||
class="md_preview resource-text"
|
||||
v-html="markdown"
|
||||
/>
|
||||
<pre v-else class="resource-text">{{ text }}</pre>
|
||||
</template>
|
||||
</template>
|
||||
</div>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import {
|
||||
computed,
|
||||
defineAsyncComponent,
|
||||
onBeforeUnmount,
|
||||
ref,
|
||||
watch,
|
||||
} from "vue";
|
||||
import { useI18n } from "vue-i18n";
|
||||
import { previewBuffer, previewKind } from "@/utils/preview";
|
||||
import FileIcon from "./FileIcon.vue";
|
||||
const PdfViewer = defineAsyncComponent(() => import("./PdfViewer.vue"));
|
||||
const DicomViewer = defineAsyncComponent(() => import("./DicomViewer.vue"));
|
||||
const CsvViewer = defineAsyncComponent(() => import("./CsvViewer.vue"));
|
||||
const EpubPreview = defineAsyncComponent(() => import("./EpubPreview.vue"));
|
||||
const ZipPreview = defineAsyncComponent(() => import("./ZipPreview.vue"));
|
||||
const props = defineProps<{
|
||||
source: string;
|
||||
name: string;
|
||||
type?: string;
|
||||
size?: number;
|
||||
}>();
|
||||
const { t } = useI18n();
|
||||
const kind = computed(() => previewKind(props.name, props.type));
|
||||
const failed = ref(false),
|
||||
busy = ref(false),
|
||||
message = ref(""),
|
||||
encoding = ref("utf-8");
|
||||
const buffer = ref<ArrayBuffer>(),
|
||||
markdown = ref(""),
|
||||
imageURL = ref("");
|
||||
const text = computed(() =>
|
||||
buffer.value ? new TextDecoder(encoding.value).decode(buffer.value) : ""
|
||||
);
|
||||
let controller: AbortController | undefined;
|
||||
function revoke() {
|
||||
if (imageURL.value) URL.revokeObjectURL(imageURL.value);
|
||||
imageURL.value = "";
|
||||
}
|
||||
watch(
|
||||
[() => props.source, kind],
|
||||
async ([source, format]) => {
|
||||
controller?.abort();
|
||||
revoke();
|
||||
buffer.value = undefined;
|
||||
failed.value = false;
|
||||
message.value = "";
|
||||
busy.value = false;
|
||||
if (!format || !["text", "markdown", "csv", "tiff"].includes(format))
|
||||
return;
|
||||
const request = (controller = new AbortController());
|
||||
busy.value = true;
|
||||
try {
|
||||
const limit = format === "tiff" ? 64 * 1024 * 1024 : 5 * 1024 * 1024;
|
||||
if ((props.size || 0) > limit) throw new Error("PREVIEW_TOO_LARGE");
|
||||
const data = await previewBuffer(source, request.signal, limit);
|
||||
if (request.signal.aborted) return;
|
||||
if (format === "tiff") {
|
||||
const { default: UTIF } = await import("utif");
|
||||
if (request.signal.aborted) return;
|
||||
const pages = UTIF.decode(data),
|
||||
page = pages[0];
|
||||
const width = Number(page?.t256?.[0]),
|
||||
height = Number(page?.t257?.[0]);
|
||||
if (
|
||||
!page ||
|
||||
!Number.isSafeInteger(width) ||
|
||||
!Number.isSafeInteger(height) ||
|
||||
width < 1 ||
|
||||
height < 1 ||
|
||||
width * height > 16_000_000
|
||||
)
|
||||
throw new Error("Unsupported TIFF dimensions");
|
||||
UTIF.decodeImage(data, page);
|
||||
const canvas = document.createElement("canvas");
|
||||
canvas.width = width;
|
||||
canvas.height = height;
|
||||
canvas
|
||||
.getContext("2d")
|
||||
?.putImageData(
|
||||
new ImageData(
|
||||
new Uint8ClampedArray(UTIF.toRGBA8(page)),
|
||||
width,
|
||||
height
|
||||
),
|
||||
0,
|
||||
0
|
||||
);
|
||||
const blob = await new Promise<Blob | null>((resolve) =>
|
||||
canvas.toBlob(resolve)
|
||||
);
|
||||
if (request.signal.aborted) return;
|
||||
if (!blob) throw new Error("TIFF conversion failed");
|
||||
imageURL.value = URL.createObjectURL(blob);
|
||||
} else buffer.value = data;
|
||||
} catch (error) {
|
||||
if (!request.signal.aborted) {
|
||||
failed.value = true;
|
||||
message.value =
|
||||
error instanceof Error && error.message === "PREVIEW_TOO_LARGE"
|
||||
? t("documents.textTooLarge")
|
||||
: String(error);
|
||||
}
|
||||
} finally {
|
||||
if (controller === request) busy.value = false;
|
||||
}
|
||||
},
|
||||
{ immediate: true }
|
||||
);
|
||||
let markdownID = 0;
|
||||
watch([text, kind], async ([value, format]) => {
|
||||
const id = ++markdownID;
|
||||
markdown.value = "";
|
||||
if (format !== "markdown") return;
|
||||
const [{ marked }, { default: DOMPurify }] = await Promise.all([
|
||||
import("marked"),
|
||||
import("dompurify"),
|
||||
]);
|
||||
const rendered = DOMPurify.sanitize(await marked(value), {
|
||||
FORBID_TAGS: [
|
||||
"img",
|
||||
"iframe",
|
||||
"object",
|
||||
"embed",
|
||||
"style",
|
||||
"link",
|
||||
"form",
|
||||
"input",
|
||||
"audio",
|
||||
"video",
|
||||
],
|
||||
FORBID_ATTR: ["style"],
|
||||
});
|
||||
if (id === markdownID) markdown.value = rendered;
|
||||
});
|
||||
onBeforeUnmount(() => {
|
||||
controller?.abort();
|
||||
revoke();
|
||||
markdownID++;
|
||||
});
|
||||
</script>
|
||||
@@ -0,0 +1,101 @@
|
||||
<template>
|
||||
<section class="zip-preview">
|
||||
<p class="zip-preview-note">{{ t("documents.zipTreeOnly") }}</p>
|
||||
<p v-if="busy" role="status">{{ t("files.loading") }}</p>
|
||||
<p v-else-if="error" role="alert">{{ error }}</p>
|
||||
<p v-else-if="!nodes.length">{{ t("documents.zipEmpty") }}</p>
|
||||
<div v-else class="zip-tree">
|
||||
<div
|
||||
v-for="row in rows"
|
||||
:key="row.key"
|
||||
class="zip-tree-row"
|
||||
:style="{ paddingInlineStart: `${12 + row.depth * 16}px` }"
|
||||
>
|
||||
<button
|
||||
v-if="row.node.directory"
|
||||
type="button"
|
||||
:aria-expanded="expanded.has(row.key)"
|
||||
@click="toggle(row.key)"
|
||||
>
|
||||
<AppIcon
|
||||
:name="expanded.has(row.key) ? 'expand_more' : 'chevron_right'"
|
||||
/>
|
||||
<AppIcon :name="expanded.has(row.key) ? 'folder_open' : 'folder'" />
|
||||
<span>{{ row.node.name }}</span>
|
||||
</button>
|
||||
<span v-else class="zip-tree-file"
|
||||
><FileIcon :name="row.node.name" /><span>{{
|
||||
row.node.name
|
||||
}}</span></span
|
||||
>
|
||||
</div>
|
||||
<p v-if="truncated">{{ t("documents.zipVisibleLimit") }}</p>
|
||||
</div>
|
||||
</section>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { computed, onBeforeUnmount, ref, watch } from "vue";
|
||||
import { useI18n } from "vue-i18n";
|
||||
import { zipTree, type ZipNode } from "@/utils/zip-preview";
|
||||
import FileIcon from "./FileIcon.vue";
|
||||
const props = defineProps<{ source: string; size: number }>();
|
||||
const { t } = useI18n();
|
||||
const nodes = ref<ZipNode[]>([]),
|
||||
busy = ref(false),
|
||||
error = ref("");
|
||||
const expanded = ref(new Set<string>());
|
||||
const visible = computed(() => {
|
||||
const rows: { key: string; depth: number; node: ZipNode }[] = [];
|
||||
let truncated = false;
|
||||
function visit(list: ZipNode[], prefix: string, depth: number) {
|
||||
for (const node of list) {
|
||||
if (rows.length >= 1000) {
|
||||
truncated = true;
|
||||
return;
|
||||
}
|
||||
const key = prefix + "/" + node.name;
|
||||
rows.push({ key, depth, node });
|
||||
if (expanded.value.has(key)) visit(node.children, key, depth + 1);
|
||||
}
|
||||
}
|
||||
visit(nodes.value, "", 0);
|
||||
return { rows, truncated };
|
||||
});
|
||||
const rows = computed(() => visible.value.rows),
|
||||
truncated = computed(() => visible.value.truncated);
|
||||
function toggle(key: string) {
|
||||
if (expanded.value.has(key)) expanded.value.delete(key);
|
||||
else expanded.value.add(key);
|
||||
}
|
||||
let controller: AbortController | undefined;
|
||||
watch(
|
||||
[() => props.source, () => props.size],
|
||||
async ([source, size]) => {
|
||||
controller?.abort();
|
||||
const request = (controller = new AbortController());
|
||||
const timeout = setTimeout(() => request.abort(), 30000);
|
||||
nodes.value = [];
|
||||
expanded.value.clear();
|
||||
error.value = "";
|
||||
busy.value = true;
|
||||
try {
|
||||
nodes.value = await zipTree(source, size, request.signal);
|
||||
} catch (failure) {
|
||||
if (controller === request)
|
||||
error.value = t(
|
||||
failure instanceof Error && failure.message === "ZIP_LIMIT"
|
||||
? "documents.zipLimit"
|
||||
: "documents.zipUnavailable"
|
||||
);
|
||||
} finally {
|
||||
clearTimeout(timeout);
|
||||
if (controller === request) busy.value = false;
|
||||
}
|
||||
},
|
||||
{ immediate: true }
|
||||
);
|
||||
onBeforeUnmount(() => {
|
||||
controller?.abort();
|
||||
controller = undefined;
|
||||
});
|
||||
</script>
|
||||
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<button @click="action" :aria-label="label" :title="label" class="action">
|
||||
<i class="material-icons">{{ icon }}</i>
|
||||
<AppIcon :name="icon" />
|
||||
<span>{{ label }}</span>
|
||||
<span v-if="counter && counter > 0" class="counter">{{ counter }}</span>
|
||||
</button>
|
||||
|
||||
@@ -6,8 +6,7 @@
|
||||
class="workspace-brand"
|
||||
:aria-label="name"
|
||||
>
|
||||
<i class="material-icons" aria-hidden="true">folder_open</i
|
||||
><span>{{ name }}</span>
|
||||
<AppIcon name="folder_open" aria-hidden="true" /><span>{{ name }}</span>
|
||||
</router-link>
|
||||
<Action
|
||||
v-if="showMenu"
|
||||
|
||||
@@ -4,12 +4,11 @@
|
||||
<template v-for="(item, index) in path" :key="index">
|
||||
/
|
||||
<span class="path-item">
|
||||
<span
|
||||
<AppIcon
|
||||
name="folder"
|
||||
v-if="isDir === true || index < path.length - 1"
|
||||
class="material-icons"
|
||||
>folder
|
||||
</span>
|
||||
<span v-else class="material-icons">insert_drive_file</span>
|
||||
/>
|
||||
<AppIcon name="insert_drive_file" v-else />
|
||||
{{ item }}
|
||||
</span>
|
||||
</template>
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
v-for="item in items"
|
||||
:data-url="item.url"
|
||||
>
|
||||
{{ item.name }}
|
||||
<AppIcon name="folder" /> {{ item.name }}
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
@@ -98,32 +98,32 @@
|
||||
|
||||
<div class="result-buttons">
|
||||
<button @click="(e) => resolve(e, ['origin'])">
|
||||
<i class="material-icons">done_all</i>
|
||||
<AppIcon name="done_all" />
|
||||
{{ $t("buttons.overrideAll") }}
|
||||
</button>
|
||||
<button
|
||||
v-if="isUploadAction != true"
|
||||
@click="(e) => resolve(e, ['origin', 'dest'])"
|
||||
>
|
||||
<i class="material-icons">folder_copy</i>
|
||||
<AppIcon name="folder_copy" />
|
||||
{{ $t("buttons.renameAll") }}
|
||||
</button>
|
||||
<button @click="(e) => resolve(e, ['dest'])">
|
||||
<i class="material-icons">undo</i>
|
||||
<AppIcon name="undo" />
|
||||
{{ $t("buttons.skipAll") }}
|
||||
</button>
|
||||
<button @click="(e) => resume(e)">
|
||||
<i class="material-icons">replay</i>
|
||||
<AppIcon name="replay" />
|
||||
{{ $t("buttons.resumeTransfer") }}
|
||||
<span class="info-tooltip" @click.stop="() => {}">
|
||||
<i class="material-icons info-icon">info_outline</i>
|
||||
<AppIcon name="info_outline" class="info-icon" />
|
||||
<span class="info-tooltip-text">
|
||||
{{ $t("buttons.resumeTransferTooltip") }}
|
||||
</span>
|
||||
</span>
|
||||
</button>
|
||||
<button @click="personalized = true">
|
||||
<i class="material-icons">checklist</i>
|
||||
<AppIcon name="checklist" />
|
||||
{{ $t("buttons.singleDecision") }}
|
||||
</button>
|
||||
</div>
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
:title="$t('buttons.copyToClipboard')"
|
||||
@click="copyToClipboard(buildLink(link))"
|
||||
>
|
||||
<i class="material-icons">link</i>
|
||||
<AppIcon name="link" />
|
||||
</button>
|
||||
<button
|
||||
class="action"
|
||||
@@ -56,7 +56,7 @@
|
||||
:disabled="!!link.hasPassword"
|
||||
@click="copyToClipboard(buildDownloadLink(link))"
|
||||
>
|
||||
<i class="material-icons">download</i>
|
||||
<AppIcon name="download" />
|
||||
</button>
|
||||
<button
|
||||
class="action share-link-delete"
|
||||
@@ -64,7 +64,7 @@
|
||||
:title="$t('buttons.delete')"
|
||||
@click="deleteLink($event, link)"
|
||||
>
|
||||
<i class="material-icons">delete_outline</i>
|
||||
<AppIcon name="delete_outline" />
|
||||
</button>
|
||||
</div>
|
||||
</td>
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
id="focus-prompt"
|
||||
tabindex="1"
|
||||
>
|
||||
<i class="material-icons">insert_drive_file</i>
|
||||
<AppIcon name="insert_drive_file" />
|
||||
<div class="title">{{ t("buttons.file") }}</div>
|
||||
</div>
|
||||
<div
|
||||
@@ -25,7 +25,7 @@
|
||||
class="action"
|
||||
tabindex="2"
|
||||
>
|
||||
<i class="material-icons">folder</i>
|
||||
<AppIcon name="folder" />
|
||||
<div class="title">{{ t("buttons.folder") }}</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
aria-label="Abort upload"
|
||||
title="Abort upload"
|
||||
>
|
||||
<i class="material-icons">{{ "cancel" }}</i>
|
||||
<AppIcon :name="'cancel'" />
|
||||
</button>
|
||||
<button
|
||||
class="action"
|
||||
@@ -36,9 +36,7 @@
|
||||
aria-label="Toggle file upload list"
|
||||
title="Toggle file upload list"
|
||||
>
|
||||
<i class="material-icons">{{
|
||||
open ? "keyboard_arrow_down" : "keyboard_arrow_up"
|
||||
}}</i>
|
||||
<AppIcon :name="open ? 'keyboard_arrow_down' : 'keyboard_arrow_up'" />
|
||||
</button>
|
||||
</div>
|
||||
|
||||
@@ -51,9 +49,7 @@
|
||||
:data-type="upload.type"
|
||||
:aria-label="upload.name"
|
||||
>
|
||||
<div class="file-name">
|
||||
<i class="material-icons"></i> {{ upload.name }}
|
||||
</div>
|
||||
<div class="file-name"><AppIcon name="file" /> {{ upload.name }}</div>
|
||||
<div class="file-progress">
|
||||
<div
|
||||
v-bind:style="{
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.share__box__icon i {
|
||||
.share__box__icon .app-icon {
|
||||
font-size: 10em;
|
||||
color: #40c4ff;
|
||||
}
|
||||
@@ -50,7 +50,7 @@
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.share__box__element .button i {
|
||||
.share__box__element .button .app-icon {
|
||||
display: block;
|
||||
margin-bottom: 4px;
|
||||
}
|
||||
|
||||
@@ -65,7 +65,7 @@ body.rtl .shell-content {
|
||||
|
||||
.shell__text,
|
||||
.shell__prompt,
|
||||
.shell__prompt i {
|
||||
.shell__prompt .app-icon {
|
||||
font-size: inherit;
|
||||
}
|
||||
|
||||
@@ -73,7 +73,7 @@ body.rtl .shell-content {
|
||||
width: 1.2rem;
|
||||
}
|
||||
|
||||
.shell__prompt i {
|
||||
.shell__prompt .app-icon {
|
||||
color: var(--blue);
|
||||
}
|
||||
|
||||
|
||||
@@ -39,7 +39,7 @@ video {
|
||||
margin: 1em auto 0;
|
||||
}
|
||||
|
||||
i.spin {
|
||||
.app-icon.spin {
|
||||
animation: 1s spin linear infinite;
|
||||
}
|
||||
|
||||
|
||||
@@ -108,7 +108,7 @@ html[dir="rtl"] .dashboard #nav .wrapper {
|
||||
opacity: 0.08;
|
||||
}
|
||||
|
||||
.dashboard #nav i {
|
||||
.dashboard #nav .app-icon {
|
||||
font-size: 1em;
|
||||
vertical-align: middle;
|
||||
}
|
||||
@@ -282,7 +282,7 @@ body.rtl .card .card-action {
|
||||
margin-right: auto;
|
||||
}
|
||||
|
||||
.card#share ul li .action i {
|
||||
.card#share ul li .action .app-icon {
|
||||
font-size: 1em;
|
||||
}
|
||||
|
||||
@@ -369,14 +369,9 @@ body.rtl .card .card-action {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.file-list li:before {
|
||||
content: "folder";
|
||||
color: var(--textPrimary);
|
||||
vertical-align: middle;
|
||||
line-height: 1.4;
|
||||
font-family: "Material Icons";
|
||||
font-size: 1.75em;
|
||||
margin-right: 0.25em;
|
||||
.file-list li > .app-icon {
|
||||
margin-inline-end: 0.4em;
|
||||
color: var(--blue);
|
||||
}
|
||||
|
||||
.file-list li[aria-selected="true"]:before {
|
||||
@@ -434,7 +429,7 @@ body.rtl .card .card-action {
|
||||
color: var(--textPrimary);
|
||||
}
|
||||
|
||||
.collapsible > label i {
|
||||
.collapsible > label .app-icon {
|
||||
transition: 0.2s ease transform;
|
||||
user-select: none;
|
||||
}
|
||||
@@ -451,7 +446,7 @@ body.rtl .card .card-action {
|
||||
max-height: 20em;
|
||||
}
|
||||
|
||||
.collapsible > input:checked ~ label i {
|
||||
.collapsible > input:checked ~ label .app-icon {
|
||||
transform: rotate(180deg);
|
||||
}
|
||||
|
||||
@@ -486,7 +481,7 @@ body.rtl .card .card-action {
|
||||
margin: 0 0.25em 0.5em;
|
||||
}
|
||||
|
||||
.card .card-action.full .action i {
|
||||
.card .card-action.full .action .app-icon {
|
||||
display: block;
|
||||
padding: 0;
|
||||
margin-bottom: 0.25em;
|
||||
|
||||
@@ -51,8 +51,8 @@ nav.workspace-sidebar {
|
||||
opacity: 0.35;
|
||||
cursor: default;
|
||||
}
|
||||
.sidebar-section-title i,
|
||||
.bookmark-row > button i {
|
||||
.sidebar-section-title .app-icon,
|
||||
.bookmark-row > button .app-icon {
|
||||
font-size: 18px;
|
||||
}
|
||||
.explorer-link {
|
||||
@@ -70,7 +70,7 @@ nav.workspace-sidebar {
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
.explorer-link i {
|
||||
.explorer-link .app-icon {
|
||||
font-size: 19px;
|
||||
color: var(--blue);
|
||||
}
|
||||
@@ -118,7 +118,7 @@ nav.workspace-sidebar {
|
||||
padding: 3px 0;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
.folder-expand i {
|
||||
.folder-expand .app-icon {
|
||||
font-size: 18px;
|
||||
}
|
||||
.folder-row a {
|
||||
@@ -135,7 +135,7 @@ nav.workspace-sidebar {
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.folder-row a i {
|
||||
.folder-row a .app-icon {
|
||||
color: var(--blue);
|
||||
font-size: 19px;
|
||||
flex-shrink: 0;
|
||||
@@ -206,7 +206,7 @@ nav.workspace-sidebar {
|
||||
font-size: 10px;
|
||||
color: var(--textPrimary);
|
||||
}
|
||||
.account-button > i {
|
||||
.account-button > .app-icon {
|
||||
font-size: 20px;
|
||||
}
|
||||
.account-menu {
|
||||
@@ -233,7 +233,7 @@ nav.workspace-sidebar {
|
||||
font-size: 12px;
|
||||
line-height: 1.4;
|
||||
}
|
||||
.account-menu i {
|
||||
.account-menu .app-icon {
|
||||
font-size: 19px;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
@@ -247,21 +247,6 @@ nav.workspace-sidebar {
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
.dicom-file-icon {
|
||||
width: 56px;
|
||||
height: 64px;
|
||||
color: var(--blue);
|
||||
margin-inline-end: 6px;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
#listing.list .dicom-file-icon {
|
||||
width: 28px;
|
||||
height: 34px;
|
||||
}
|
||||
#listing.mosaic.gallery .dicom-file-icon {
|
||||
width: 80px;
|
||||
height: 96px;
|
||||
}
|
||||
@media (max-width: 736px) {
|
||||
.workspace-sidebar .sidebar-bottom {
|
||||
padding-bottom: env(safe-area-inset-bottom, 0px);
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
@import "material-icons/iconfont/filled.css";
|
||||
|
||||
@font-face {
|
||||
font-family: "Roboto";
|
||||
font-style: normal;
|
||||
@@ -239,7 +237,3 @@
|
||||
U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F,
|
||||
U+2074, U+20AC, U+2212, U+2215, U+E0FF, U+EFFD, U+F000;
|
||||
}
|
||||
|
||||
.material-icons {
|
||||
font-size: 1.5rem;
|
||||
}
|
||||
@@ -108,13 +108,13 @@ header .menu-button {
|
||||
border-radius: 0 !important;
|
||||
}
|
||||
|
||||
#search.active i,
|
||||
#search.active .app-icon,
|
||||
#search.active input {
|
||||
color: var(--textPrimary);
|
||||
}
|
||||
|
||||
#search #input > .action,
|
||||
#search #input > i {
|
||||
#search #input > .app-icon {
|
||||
margin-right: 0.3em;
|
||||
user-select: none;
|
||||
}
|
||||
@@ -192,11 +192,11 @@ html[dir="rtl"] #search #result ul > * {
|
||||
display: block;
|
||||
}
|
||||
|
||||
#search.active #result i {
|
||||
#search.active #result .app-icon {
|
||||
color: var(--iconTertiary);
|
||||
}
|
||||
|
||||
#search.active #result > p > i {
|
||||
#search.active #result > p > .app-icon {
|
||||
text-align: center;
|
||||
margin: 0 auto;
|
||||
display: table;
|
||||
@@ -208,7 +208,7 @@ html[dir="rtl"] #search #result ul > * {
|
||||
padding: 0.3em 0;
|
||||
}
|
||||
|
||||
#search.active #result ul li a i {
|
||||
#search.active #result ul li a .app-icon {
|
||||
margin-right: 0.3em;
|
||||
}
|
||||
|
||||
@@ -273,7 +273,7 @@ html[dir="rtl"] #search .boxes h3 {
|
||||
margin: 1em 0 0;
|
||||
}
|
||||
|
||||
#search .boxes i {
|
||||
#search .boxes .app-icon {
|
||||
color: #fff !important;
|
||||
font-size: 3.5em;
|
||||
}
|
||||
@@ -1,253 +1,28 @@
|
||||
/* Icons */
|
||||
|
||||
/* General */
|
||||
|
||||
.file-icons [aria-label^="."] {
|
||||
opacity: 0.33;
|
||||
.app-icon {
|
||||
display: inline-block;
|
||||
width: 1em;
|
||||
height: 1em;
|
||||
font-size: 24px;
|
||||
vertical-align: middle;
|
||||
flex-shrink: 0;
|
||||
overflow: visible;
|
||||
}
|
||||
.file-icon {
|
||||
color: var(--blue);
|
||||
}
|
||||
.file-icons [aria-label^="."],
|
||||
.file-icons [data-ext=".bak"] {
|
||||
opacity: 0.33;
|
||||
opacity: 0.55;
|
||||
}
|
||||
|
||||
.file-icons [data-type="audio"] i::before {
|
||||
content: "volume_up";
|
||||
.file-icons [aria-selected="true"] .file-icon {
|
||||
color: inherit;
|
||||
}
|
||||
.file-icons [data-type="blob"] i::before {
|
||||
content: "insert_drive_file";
|
||||
#listing .item .file-icon {
|
||||
font-size: 56px;
|
||||
}
|
||||
.file-icons [data-type="image"] i::before {
|
||||
content: "image";
|
||||
#listing.list .item .file-icon {
|
||||
font-size: 32px;
|
||||
}
|
||||
.file-icons [data-type="pdf"] i::before {
|
||||
content: "description";
|
||||
}
|
||||
.file-icons [data-type="text"] i::before {
|
||||
content: "description";
|
||||
}
|
||||
.file-icons [data-type="video"] i::before {
|
||||
content: "movie";
|
||||
}
|
||||
.file-icons [data-type="invalid_link"] i::before {
|
||||
content: "link_off";
|
||||
}
|
||||
|
||||
/* #f90 - Image */
|
||||
|
||||
.file-icons [data-ext=".ai"] i::before,
|
||||
.file-icons [data-ext=".odg"] i::before,
|
||||
.file-icons [data-ext=".xcf"] i::before {
|
||||
content: "image";
|
||||
}
|
||||
|
||||
/* #f90 - Presentation */
|
||||
|
||||
.file-icons [data-ext=".odp"] i::before,
|
||||
.file-icons [data-ext=".ppt"] i::before,
|
||||
.file-icons [data-ext=".pptx"] i::before {
|
||||
content: "slideshow";
|
||||
}
|
||||
|
||||
/* #0f0 - Spreadsheet/Database */
|
||||
|
||||
.file-icons [data-ext=".csv"] i::before,
|
||||
.file-icons [data-ext=".db"] i::before,
|
||||
.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 {
|
||||
content: "border_all";
|
||||
}
|
||||
|
||||
/* #00f - Document */
|
||||
|
||||
.file-icons [data-ext=".doc"] i::before,
|
||||
.file-icons [data-ext=".docx"] i::before,
|
||||
.file-icons [data-ext=".log"] i::before,
|
||||
.file-icons [data-ext=".odt"] i::before,
|
||||
.file-icons [data-ext=".rtf"] i::before {
|
||||
content: "description";
|
||||
}
|
||||
|
||||
/* #999 - Code */
|
||||
|
||||
.file-icons [data-ext=".c"] i::before,
|
||||
.file-icons [data-ext=".cpp"] i::before,
|
||||
.file-icons [data-ext=".cs"] i::before,
|
||||
.file-icons [data-ext=".css"] i::before,
|
||||
.file-icons [data-ext=".go"] i::before,
|
||||
.file-icons [data-ext=".h"] i::before,
|
||||
.file-icons [data-ext=".html"] i::before,
|
||||
.file-icons [data-ext=".java"] i::before,
|
||||
.file-icons [data-ext=".js"] i::before,
|
||||
.file-icons [data-ext=".json"] i::before,
|
||||
.file-icons [data-ext=".kt"] i::before,
|
||||
.file-icons [data-ext=".php"] i::before,
|
||||
.file-icons [data-ext=".py"] i::before,
|
||||
.file-icons [data-ext=".rb"] i::before,
|
||||
.file-icons [data-ext=".rs"] i::before,
|
||||
.file-icons [data-ext=".vue"] i::before,
|
||||
.file-icons [data-ext=".xml"] i::before,
|
||||
.file-icons [data-ext=".yml"] i::before {
|
||||
content: "code";
|
||||
}
|
||||
|
||||
/* #999 - Executable */
|
||||
|
||||
.file-icons [data-ext=".apk"] i::before,
|
||||
.file-icons [data-ext=".bat"] i::before,
|
||||
.file-icons [data-ext=".exe"] i::before,
|
||||
.file-icons [data-ext=".jar"] i::before,
|
||||
.file-icons [data-ext=".ps1"] i::before,
|
||||
.file-icons [data-ext=".sh"] i::before {
|
||||
content: "web_asset";
|
||||
}
|
||||
|
||||
/* #999 - Installer */
|
||||
|
||||
.file-icons [data-ext=".deb"] i::before,
|
||||
.file-icons [data-ext=".msi"] i::before,
|
||||
.file-icons [data-ext=".pkg"] i::before,
|
||||
.file-icons [data-ext=".rpm"] i::before {
|
||||
content: "archive";
|
||||
}
|
||||
|
||||
/* #999 - Compressed */
|
||||
|
||||
.file-icons [data-ext=".7z"] i::before,
|
||||
.file-icons [data-ext=".bz2"] i::before,
|
||||
.file-icons [data-ext=".cab"] i::before,
|
||||
.file-icons [data-ext=".gz"] i::before,
|
||||
.file-icons [data-ext=".rar"] i::before,
|
||||
.file-icons [data-ext=".tar"] i::before,
|
||||
.file-icons [data-ext=".xz"] i::before,
|
||||
.file-icons [data-ext=".zip"] i::before,
|
||||
.file-icons [data-ext=".zst"] i::before {
|
||||
content: "folder_zip";
|
||||
}
|
||||
|
||||
/* #999 - Disk */
|
||||
|
||||
.file-icons [data-ext=".ccd"] i::before,
|
||||
.file-icons [data-ext=".dmg"] i::before,
|
||||
.file-icons [data-ext=".iso"] i::before,
|
||||
.file-icons [data-ext=".mdf"] i::before,
|
||||
.file-icons [data-ext=".vdi"] i::before,
|
||||
.file-icons [data-ext=".vhd"] i::before,
|
||||
.file-icons [data-ext=".vmdk"] i::before,
|
||||
.file-icons [data-ext=".wim"] i::before {
|
||||
content: "album";
|
||||
}
|
||||
|
||||
/* #999 - Font */
|
||||
|
||||
.file-icons [data-ext=".otf"] i::before,
|
||||
.file-icons [data-ext=".ttf"] i::before,
|
||||
.file-icons [data-ext=".woff"] i::before,
|
||||
.file-icons [data-ext=".woff2"] i::before {
|
||||
content: "font_download";
|
||||
}
|
||||
|
||||
/* Colors */
|
||||
|
||||
/* General */
|
||||
|
||||
.file-icons [data-type="audio"] i {
|
||||
color: var(--icon-yellow);
|
||||
}
|
||||
.file-icons [data-type="image"] i {
|
||||
color: var(--icon-orange);
|
||||
}
|
||||
.file-icons [data-type="video"] i {
|
||||
color: var(--icon-violet);
|
||||
}
|
||||
.file-icons [data-type="invalid_link"] i {
|
||||
color: var(--icon-red);
|
||||
}
|
||||
|
||||
/* #f00 - Adobe/Oracle */
|
||||
|
||||
.file-icons [data-ext=".ai"] i,
|
||||
.file-icons [data-ext=".java"] i,
|
||||
.file-icons [data-ext=".jar"] i,
|
||||
.file-icons [data-ext=".psd"] i,
|
||||
.file-icons [data-ext=".rb"] i,
|
||||
.file-icons [data-ext=".pdf"] i {
|
||||
color: var(--icon-red);
|
||||
}
|
||||
|
||||
/* #f90 - Image/Presentation */
|
||||
|
||||
.file-icons [data-ext=".html"] i,
|
||||
.file-icons [data-ext=".odg"] i,
|
||||
.file-icons [data-ext=".odp"] i,
|
||||
.file-icons [data-ext=".ppt"] i,
|
||||
.file-icons [data-ext=".pptx"] i,
|
||||
.file-icons [data-ext=".vue"] i,
|
||||
.file-icons [data-ext=".xcf"] i {
|
||||
color: var(--icon-orange);
|
||||
}
|
||||
|
||||
/* #ff0 - Various */
|
||||
|
||||
.file-icons [data-ext=".css"] i,
|
||||
.file-icons [data-ext=".js"] i,
|
||||
.file-icons [data-ext=".json"] i,
|
||||
.file-icons [data-ext=".zip"] i {
|
||||
color: var(--icon-yellow);
|
||||
}
|
||||
|
||||
/* #0f0 - Spreadsheet/Google */
|
||||
|
||||
.file-icons [data-ext=".apk"] i,
|
||||
.file-icons [data-ext=".dex"] i,
|
||||
.file-icons [data-ext=".go"] i,
|
||||
.file-icons [data-ext=".ods"] i,
|
||||
.file-icons [data-ext=".xls"] i,
|
||||
.file-icons [data-ext=".xlsx"] i {
|
||||
color: var(--icon-green);
|
||||
}
|
||||
|
||||
/* #00f - Document/Microsoft/Apple/Closed */
|
||||
|
||||
.file-icons [data-ext=".aac"] i,
|
||||
.file-icons [data-ext=".bat"] i,
|
||||
.file-icons [data-ext=".cab"] i,
|
||||
.file-icons [data-ext=".cs"] i,
|
||||
.file-icons [data-ext=".dmg"] i,
|
||||
.file-icons [data-ext=".doc"] i,
|
||||
.file-icons [data-ext=".docx"] i,
|
||||
.file-icons [data-ext=".emf"] i,
|
||||
.file-icons [data-ext=".exe"] i,
|
||||
.file-icons [data-ext=".ico"] i,
|
||||
.file-icons [data-ext=".mp2"] i,
|
||||
.file-icons [data-ext=".mp3"] i,
|
||||
.file-icons [data-ext=".mp4"] i,
|
||||
.file-icons [data-ext=".mpg"] i,
|
||||
.file-icons [data-ext=".msi"] i,
|
||||
.file-icons [data-ext=".odt"] i,
|
||||
.file-icons [data-ext=".ps1"] i,
|
||||
.file-icons [data-ext=".rtf"] i,
|
||||
.file-icons [data-ext=".vob"] i,
|
||||
.file-icons [data-ext=".wim"] i {
|
||||
color: var(--icon-blue);
|
||||
}
|
||||
|
||||
/* #60f - Various */
|
||||
|
||||
.file-icons [data-ext=".iso"] i,
|
||||
.file-icons [data-ext=".php"] i,
|
||||
.file-icons [data-ext=".rar"] i {
|
||||
color: var(--icon-violet);
|
||||
}
|
||||
|
||||
/* Overrides */
|
||||
|
||||
.file-icons [data-dir="true"] i {
|
||||
color: var(--icon-blue);
|
||||
}
|
||||
.file-icons [data-dir="true"] i::before {
|
||||
content: "folder";
|
||||
}
|
||||
.file-icons [aria-selected="true"] i {
|
||||
color: var(--iconSecondary);
|
||||
#listing.mosaic.gallery .item .file-icon {
|
||||
font-size: 96px;
|
||||
}
|
||||
@@ -54,7 +54,7 @@ html[dir="rtl"] #listing {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
#listing .item i {
|
||||
#listing .item .app-icon {
|
||||
font-size: 4em;
|
||||
margin-right: 0.1em;
|
||||
vertical-align: bottom;
|
||||
@@ -78,7 +78,7 @@ html[dir="rtl"] #listing {
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.message i {
|
||||
.message .app-icon {
|
||||
font-size: 2.5em;
|
||||
margin-bottom: 0.2em;
|
||||
display: block;
|
||||
@@ -135,7 +135,7 @@ html[dir="rtl"] #listing {
|
||||
background: linear-gradient(#0000, #0009);
|
||||
}
|
||||
|
||||
#listing.mosaic.gallery .item i {
|
||||
#listing.mosaic.gallery .item .app-icon {
|
||||
width: 100%;
|
||||
margin-right: 0;
|
||||
font-size: 8em;
|
||||
@@ -180,7 +180,7 @@ html[dir="rtl"] #listing {
|
||||
width: 3em;
|
||||
}
|
||||
|
||||
#listing.list .item div:first-of-type i {
|
||||
#listing.list .item div:first-of-type .app-icon {
|
||||
font-size: 2em;
|
||||
}
|
||||
|
||||
@@ -208,7 +208,7 @@ html[dir="rtl"] #listing {
|
||||
background-color: var(--iconTertiary);
|
||||
}
|
||||
|
||||
#listing.list .header i {
|
||||
#listing.list .header .app-icon {
|
||||
font-size: 1.5em;
|
||||
vertical-align: middle;
|
||||
margin-left: 0.2em;
|
||||
@@ -246,13 +246,13 @@ html[dir="rtl"] #listing {
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
#listing.list .header i {
|
||||
#listing.list .header .app-icon {
|
||||
opacity: 0;
|
||||
transition: 0.1s ease all;
|
||||
}
|
||||
|
||||
#listing.list .header p:hover i,
|
||||
#listing.list .header .active i {
|
||||
#listing.list .header p:hover .app-icon,
|
||||
#listing.list .header .active .app-icon {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
@@ -278,6 +278,6 @@ html[dir="rtl"] #listing {
|
||||
}
|
||||
|
||||
#listing #multiple-selection p,
|
||||
#listing #multiple-selection i {
|
||||
#listing #multiple-selection .app-icon {
|
||||
color: var(--iconSecondary);
|
||||
}
|
||||
@@ -24,12 +24,12 @@
|
||||
gap: 12px;
|
||||
min-width: 0;
|
||||
}
|
||||
.notification-content > i {
|
||||
.notification-content > .app-icon {
|
||||
font-size: 22px;
|
||||
color: var(--icon-green);
|
||||
flex-shrink: 0;
|
||||
}
|
||||
.notification-content.error > i {
|
||||
.notification-content.error > .app-icon {
|
||||
color: var(--red);
|
||||
}
|
||||
.notification-content > div {
|
||||
|
||||
@@ -0,0 +1,274 @@
|
||||
.workspace-brand .app-icon {
|
||||
box-sizing: content-box;
|
||||
}
|
||||
.share {
|
||||
display: grid;
|
||||
grid-template-columns: minmax(0, 1fr);
|
||||
gap: 16px;
|
||||
align-items: start;
|
||||
min-width: 0;
|
||||
}
|
||||
.share.share-with-preview,
|
||||
.share.share-directory {
|
||||
grid-template-columns: minmax(240px, 320px) minmax(0, 1fr);
|
||||
}
|
||||
.share > .share__box {
|
||||
margin: 0;
|
||||
min-width: 0;
|
||||
width: 100%;
|
||||
}
|
||||
.share > .share-info {
|
||||
width: 100%;
|
||||
max-width: 680px;
|
||||
justify-self: center;
|
||||
border: 1px solid var(--borderPrimary);
|
||||
border-radius: 12px;
|
||||
}
|
||||
.share-with-preview > .share-info,
|
||||
.share-directory > .share-info {
|
||||
position: sticky;
|
||||
top: 80px;
|
||||
max-height: calc(100vh - 100px);
|
||||
overflow-y: auto;
|
||||
}
|
||||
.share-file-symbol {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
padding: 24px;
|
||||
border-top: 1px solid var(--borderPrimary);
|
||||
}
|
||||
.share-file-symbol .file-icon {
|
||||
font-size: 88px;
|
||||
}
|
||||
.share-file-details {
|
||||
margin: 0;
|
||||
}
|
||||
.share-file-details > div {
|
||||
padding: 15px 18px;
|
||||
border-top: 1px solid var(--borderPrimary);
|
||||
min-width: 0;
|
||||
}
|
||||
.share-file-details dt {
|
||||
margin-bottom: 6px;
|
||||
font-size: 11px;
|
||||
font-weight: 500;
|
||||
color: var(--textPrimary);
|
||||
}
|
||||
.share-file-details dd {
|
||||
margin: 0;
|
||||
font-size: 13px;
|
||||
line-height: 1.5;
|
||||
overflow-wrap: anywhere;
|
||||
word-break: break-word;
|
||||
color: var(--textSecondary);
|
||||
}
|
||||
.share-info .share-download-actions {
|
||||
padding: 18px;
|
||||
border-top: 1px solid var(--borderPrimary);
|
||||
}
|
||||
.share-info .share-download-primary {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: 9px;
|
||||
width: 100%;
|
||||
min-height: 44px;
|
||||
padding: 12px;
|
||||
white-space: normal;
|
||||
text-align: center;
|
||||
}
|
||||
.share-info .share-download-primary .app-icon {
|
||||
font-size: 20px;
|
||||
}
|
||||
.public-document {
|
||||
height: 75vh;
|
||||
min-height: 320px;
|
||||
border: 1px solid var(--borderPrimary);
|
||||
border-radius: 12px;
|
||||
overflow: hidden;
|
||||
}
|
||||
.resource-preview {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: stretch;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
min-height: 0;
|
||||
min-width: 0;
|
||||
overflow: auto;
|
||||
background: var(--background);
|
||||
}
|
||||
.resource-image {
|
||||
display: block;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
object-fit: contain;
|
||||
min-height: 0;
|
||||
}
|
||||
.resource-preview audio {
|
||||
width: 100%;
|
||||
max-width: 520px;
|
||||
margin: auto;
|
||||
}
|
||||
.resource-preview video {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
object-fit: contain;
|
||||
background: #080a10;
|
||||
}
|
||||
.resource-epub {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
min-height: 0;
|
||||
position: relative;
|
||||
}
|
||||
.resource-text {
|
||||
flex: 1;
|
||||
min-height: 0;
|
||||
overflow: auto;
|
||||
margin: 0;
|
||||
padding: 20px;
|
||||
font-size: 13px;
|
||||
line-height: 1.6;
|
||||
text-align: start;
|
||||
}
|
||||
pre.resource-text {
|
||||
white-space: pre;
|
||||
tab-size: 4;
|
||||
}
|
||||
.resource-preview .document-tools {
|
||||
flex-shrink: 0;
|
||||
justify-content: flex-start;
|
||||
}
|
||||
.resource-preview .csv-viewer {
|
||||
height: 100%;
|
||||
min-height: 0;
|
||||
}
|
||||
.preview-unavailable {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: 14px;
|
||||
flex: 1;
|
||||
padding: 24px;
|
||||
min-height: 180px;
|
||||
text-align: center;
|
||||
}
|
||||
.preview-unavailable .file-icon {
|
||||
font-size: 80px;
|
||||
}
|
||||
.preview-unavailable p {
|
||||
margin: 0;
|
||||
font-size: 13px;
|
||||
}
|
||||
.preview-unavailable small {
|
||||
font-size: 11px;
|
||||
overflow-wrap: anywhere;
|
||||
}
|
||||
.pdf-open-native {
|
||||
display: inline-flex;
|
||||
gap: 7px;
|
||||
align-items: center;
|
||||
margin-inline-start: auto;
|
||||
padding: 8px 10px;
|
||||
border: 1px solid var(--borderPrimary);
|
||||
border-radius: 7px;
|
||||
color: var(--blue);
|
||||
font-size: 12px;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.pdf-open-native .app-icon {
|
||||
font-size: 17px;
|
||||
}
|
||||
.pdf-open-native:hover {
|
||||
background: var(--hover);
|
||||
}
|
||||
#previewer .info .file-icon {
|
||||
font-size: 72px;
|
||||
display: block;
|
||||
margin: 0 auto 16px;
|
||||
}
|
||||
@media (max-width: 1000px) {
|
||||
.share.share-with-preview,
|
||||
.share.share-directory {
|
||||
grid-template-columns: minmax(0, 1fr);
|
||||
}
|
||||
.share-with-preview > .share-info,
|
||||
.share-directory > .share-info {
|
||||
position: static;
|
||||
max-height: none;
|
||||
max-width: none;
|
||||
}
|
||||
}
|
||||
@media (max-width: 600px) {
|
||||
.document-tools {
|
||||
gap: 8px;
|
||||
padding: 10px;
|
||||
}
|
||||
.document-tools input {
|
||||
width: 62px;
|
||||
}
|
||||
.document-tools label {
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
.pdf-open-native {
|
||||
margin-inline-start: 0;
|
||||
}
|
||||
.resource-text {
|
||||
padding: 12px;
|
||||
font-size: 12px;
|
||||
}
|
||||
.share-file-details > div {
|
||||
padding: 12px 16px;
|
||||
}
|
||||
}
|
||||
.zip-preview {
|
||||
height: 100%;
|
||||
min-height: 0;
|
||||
overflow: auto;
|
||||
padding: 16px;
|
||||
text-align: start;
|
||||
}
|
||||
.zip-preview-note {
|
||||
font-size: 12px;
|
||||
color: var(--textSecondary);
|
||||
margin: 0 0 12px;
|
||||
}
|
||||
.zip-tree-row {
|
||||
min-height: 32px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
.zip-tree-row button,
|
||||
.zip-tree-file {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
min-width: 0;
|
||||
padding: 5px 0;
|
||||
color: var(--textPrimary);
|
||||
font-size: 13px;
|
||||
text-align: start;
|
||||
}
|
||||
.zip-tree-row button {
|
||||
background: none;
|
||||
border: 0;
|
||||
cursor: pointer;
|
||||
width: 100%;
|
||||
}
|
||||
.zip-tree-row button:hover {
|
||||
color: var(--blue);
|
||||
}
|
||||
.zip-tree-row .app-icon,
|
||||
.zip-tree-row .file-icon {
|
||||
flex-shrink: 0;
|
||||
font-size: 20px;
|
||||
}
|
||||
.zip-tree-file {
|
||||
padding-inline-start: 28px;
|
||||
}
|
||||
.zip-tree-row span span,
|
||||
.zip-tree-row button span {
|
||||
overflow-wrap: anywhere;
|
||||
}
|
||||
@@ -53,7 +53,7 @@
|
||||
background: var(--surfaceSecondary);
|
||||
color: var(--blue);
|
||||
}
|
||||
.settings-tabs i {
|
||||
.settings-tabs .app-icon {
|
||||
font-size: 19px;
|
||||
}
|
||||
.preferences-form {
|
||||
@@ -82,7 +82,7 @@
|
||||
font-size: 16px;
|
||||
font-weight: 600;
|
||||
}
|
||||
.settings-section h2 > i {
|
||||
.settings-section h2 > .app-icon {
|
||||
font-size: 21px;
|
||||
color: var(--blue);
|
||||
}
|
||||
@@ -199,7 +199,7 @@
|
||||
padding: 10px 14px;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
.account-management i {
|
||||
.account-management .app-icon {
|
||||
font-size: 16px;
|
||||
}
|
||||
.account-summary {
|
||||
@@ -281,7 +281,7 @@
|
||||
min-width: 0;
|
||||
font-size: 12px;
|
||||
}
|
||||
.settings-tabs i {
|
||||
.settings-tabs .app-icon {
|
||||
flex-shrink: 0;
|
||||
}
|
||||
}
|
||||
@@ -331,7 +331,7 @@
|
||||
.user-edit:hover {
|
||||
background: var(--hover);
|
||||
}
|
||||
.user-edit i {
|
||||
.user-edit .app-icon {
|
||||
font-size: 19px;
|
||||
}
|
||||
@media (max-width: 480px) {
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
@import "./explorer.css";
|
||||
@import "./settings.css";
|
||||
@import "./notifications.css";
|
||||
@import "./resource-preview.css";
|
||||
|
||||
/* For testing only
|
||||
:focus {
|
||||
@@ -107,7 +108,7 @@ main .spinner .bounce2 {
|
||||
cursor: not-allowed;
|
||||
}
|
||||
|
||||
.action i {
|
||||
.action .app-icon {
|
||||
padding: 0.4em;
|
||||
transition: 0.1s ease-in-out all;
|
||||
border-radius: 50%;
|
||||
@@ -190,7 +191,7 @@ main .spinner .bounce2 {
|
||||
z-index: 19999;
|
||||
}
|
||||
|
||||
#previewer header > .action i {
|
||||
#previewer header > .action .app-icon {
|
||||
color: #fff;
|
||||
text-shadow: 1px 1px 1px #000000;
|
||||
}
|
||||
@@ -201,7 +202,7 @@ main .spinner .bounce2 {
|
||||
}
|
||||
|
||||
@media (min-width: 738px) {
|
||||
#previewer header #dropdown .action i {
|
||||
#previewer header #dropdown .action .app-icon {
|
||||
color: #fff;
|
||||
text-shadow: 1px 1px 1px #000000;
|
||||
}
|
||||
@@ -256,7 +257,7 @@ main .spinner .bounce2 {
|
||||
#previewer .preview .info .title {
|
||||
margin-bottom: 1em;
|
||||
}
|
||||
#previewer .preview .info .title i {
|
||||
#previewer .preview .info .title .app-icon {
|
||||
display: block;
|
||||
margin-bottom: 0.1em;
|
||||
font-size: 4em;
|
||||
@@ -267,7 +268,7 @@ main .spinner .bounce2 {
|
||||
#previewer .preview .info .button:hover {
|
||||
background-color: rgba(255, 255, 255, 0.2);
|
||||
}
|
||||
#previewer .preview .info .button i {
|
||||
#previewer .preview .info .button .app-icon {
|
||||
display: block;
|
||||
margin-bottom: 4px;
|
||||
font-size: 1.3em;
|
||||
@@ -303,7 +304,7 @@ main .spinner .bounce2 {
|
||||
visibility: hidden;
|
||||
}
|
||||
|
||||
#previewer > button > i {
|
||||
#previewer > button > .app-icon {
|
||||
padding: 0.4em;
|
||||
}
|
||||
|
||||
@@ -370,7 +371,7 @@ html[dir="rtl"] .breadcrumbs .chevron {
|
||||
font-size: 0.75rem;
|
||||
}
|
||||
|
||||
#editor-container .breadcrumbs i {
|
||||
#editor-container .breadcrumbs .app-icon {
|
||||
font-size: 1rem;
|
||||
}
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.upload-files .file .file-name i {
|
||||
.upload-files .file .file-name .app-icon {
|
||||
margin-right: 5px;
|
||||
}
|
||||
|
||||
|
||||
@@ -281,7 +281,7 @@
|
||||
color: var(--surfacePrimary);
|
||||
text-decoration: none;
|
||||
}
|
||||
.share__box__element .share-download-primary i {
|
||||
.share__box__element .share-download-primary .app-icon {
|
||||
display: block;
|
||||
margin: 0;
|
||||
font-size: 24px;
|
||||
@@ -359,7 +359,7 @@
|
||||
overflow-wrap: anywhere;
|
||||
word-break: break-word;
|
||||
}
|
||||
.managed-share-meta i {
|
||||
.managed-share-meta .app-icon {
|
||||
font-size: 16px;
|
||||
vertical-align: middle;
|
||||
}
|
||||
@@ -493,7 +493,7 @@ nav .disk-usage {
|
||||
margin-top: 7px;
|
||||
color: var(--textPrimary);
|
||||
}
|
||||
.share-link-details small i {
|
||||
.share-link-details small .app-icon {
|
||||
font-size: 16px;
|
||||
}
|
||||
.share-link-actions {
|
||||
@@ -514,7 +514,7 @@ nav .disk-usage {
|
||||
padding: 0;
|
||||
line-height: 1;
|
||||
}
|
||||
.share-link-actions .action i {
|
||||
.share-link-actions .action .app-icon {
|
||||
position: static;
|
||||
display: block;
|
||||
transform: none;
|
||||
@@ -561,7 +561,7 @@ nav .disk-usage {
|
||||
background: white;
|
||||
border-radius: 10px;
|
||||
}
|
||||
.share__box__icon i {
|
||||
.share__box__icon .app-icon {
|
||||
font-size: 80px;
|
||||
}
|
||||
:root {
|
||||
@@ -635,7 +635,7 @@ header img {
|
||||
font-weight: 650;
|
||||
letter-spacing: -0.4px;
|
||||
}
|
||||
.workspace-brand i {
|
||||
.workspace-brand .app-icon {
|
||||
padding: 7px;
|
||||
border-radius: 9px;
|
||||
background: var(--hover);
|
||||
@@ -686,7 +686,7 @@ nav .action {
|
||||
margin-block: 3px;
|
||||
text-align: start;
|
||||
}
|
||||
nav .action i {
|
||||
nav .action .app-icon {
|
||||
font-size: 21px;
|
||||
margin-inline-end: 10px;
|
||||
}
|
||||
@@ -760,7 +760,7 @@ main #listing.list {
|
||||
box-shadow: none !important;
|
||||
border-color: var(--blue);
|
||||
}
|
||||
#listing.mosaic .item i {
|
||||
#listing.mosaic .item .app-icon {
|
||||
font-size: 42px;
|
||||
}
|
||||
@supports (content-visibility: auto) {
|
||||
@@ -862,7 +862,7 @@ select:focus {
|
||||
background: var(--hover);
|
||||
color: var(--blue);
|
||||
}
|
||||
.sso-symbol i {
|
||||
.sso-symbol .app-icon {
|
||||
font-size: 34px;
|
||||
}
|
||||
.eyebrow {
|
||||
@@ -918,7 +918,7 @@ select:focus {
|
||||
min-width: 0;
|
||||
font-size: 14px;
|
||||
}
|
||||
.workspace-brand i {
|
||||
.workspace-brand .app-icon {
|
||||
display: none;
|
||||
}
|
||||
.workspace-overview {
|
||||
|
||||
@@ -343,15 +343,22 @@
|
||||
},
|
||||
"documents": {
|
||||
"frame": "Frame",
|
||||
"window": "Window width",
|
||||
"level": "Window center",
|
||||
"window": "Contrast (window width)",
|
||||
"level": "Brightness (window level)",
|
||||
"reset": "Reset",
|
||||
"page": "Page",
|
||||
"zoom": "Zoom",
|
||||
"dicomImage": "DICOM image",
|
||||
"pdfPage": "PDF page",
|
||||
"tooLarge": "File too large for preview (64 MiB maximum).",
|
||||
"loadFailed": "Unable to display this file"
|
||||
"loadFailed": "Unable to display this file",
|
||||
"openNewTab": "Open in new tab",
|
||||
"textTooLarge": "This file is too large for preview.",
|
||||
"zipTreeOnly": "Archive contents — files are not extracted",
|
||||
"zipEmpty": "Empty archive",
|
||||
"zipVisibleLimit": "Showing the first 1000 rows. Collapse folders to see other entries.",
|
||||
"zipLimit": "The file list exceeds safe preview limits.",
|
||||
"zipUnavailable": "Unable to read the file list. A standard ZIP and server support for range requests are required."
|
||||
},
|
||||
"fileInfo": {
|
||||
"dicom": "DICOM metadata",
|
||||
|
||||
@@ -340,15 +340,22 @@
|
||||
},
|
||||
"documents": {
|
||||
"frame": "Кадр",
|
||||
"window": "Ширина окна",
|
||||
"level": "Уровень",
|
||||
"window": "Контраст (ширина окна)",
|
||||
"level": "Яркость (уровень окна)",
|
||||
"reset": "Сбросить",
|
||||
"page": "Страница",
|
||||
"zoom": "Масштаб",
|
||||
"dicomImage": "Изображение DICOM",
|
||||
"pdfPage": "Страница PDF",
|
||||
"tooLarge": "Файл слишком большой для предпросмотра (максимум 64 МиБ).",
|
||||
"loadFailed": "Не удалось отобразить файл"
|
||||
"loadFailed": "Не удалось отобразить файл",
|
||||
"openNewTab": "Открыть в новой вкладке",
|
||||
"textTooLarge": "Файл слишком большой для предпросмотра.",
|
||||
"zipTreeOnly": "Содержимое архива — без распаковки файлов",
|
||||
"zipEmpty": "Архив пуст",
|
||||
"zipVisibleLimit": "Показаны первые 1000 строк. Сверните папки, чтобы увидеть остальные.",
|
||||
"zipLimit": "Список файлов превышает безопасные лимиты предпросмотра.",
|
||||
"zipUnavailable": "Не удалось прочитать список файлов. Требуется обычный ZIP и поддержка частичного скачивания сервером."
|
||||
},
|
||||
"fileInfo": {
|
||||
"dicom": "Метаданные DICOM",
|
||||
|
||||
@@ -11,6 +11,7 @@ import router from "@/router";
|
||||
import i18n, { isRtl } from "@/i18n";
|
||||
import App from "@/App.vue";
|
||||
import CustomToast from "@/components/CustomToast.vue";
|
||||
import AppIcon from "@/components/AppIcon.vue";
|
||||
|
||||
import dayjs from "dayjs";
|
||||
import localizedFormat from "dayjs/plugin/localizedFormat";
|
||||
@@ -27,6 +28,7 @@ dayjs.extend(duration);
|
||||
const pinia = createPinia(router);
|
||||
|
||||
const app = createApp(App);
|
||||
app.component("AppIcon", AppIcon);
|
||||
|
||||
app.component(VueNumberInput.name || "vue-number-input", VueNumberInput);
|
||||
app.use(VueLazyload);
|
||||
|
||||
Vendored
+1
-4
@@ -1,10 +1,7 @@
|
||||
type ApiMethod = "GET" | "POST" | "PUT" | "DELETE" | "PATCH";
|
||||
|
||||
type ApiContent =
|
||||
| Blob
|
||||
| File
|
||||
| Pick<ReadableStreamDefaultReader<any>, "read">
|
||||
| "";
|
||||
Blob | File | Pick<ReadableStreamDefaultReader<any>, "read"> | "";
|
||||
|
||||
interface ApiOpts {
|
||||
method?: ApiMethod;
|
||||
|
||||
Vendored
+6
@@ -0,0 +1,6 @@
|
||||
export {};
|
||||
declare module "vue" {
|
||||
export interface GlobalComponents {
|
||||
AppIcon: (typeof import("../components/AppIcon.vue"))["default"];
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
import { afterEach, expect, it, vi } from "vitest";
|
||||
import { previewBuffer, previewKind } from "../preview";
|
||||
afterEach(() => vi.unstubAllGlobals());
|
||||
it("classifies supported previews before server fallback types", () => {
|
||||
for (const [name, kind] of [
|
||||
["a.ZIP", "zip"],
|
||||
["a.dcm", "dicom"],
|
||||
["a.pdf", "pdf"],
|
||||
["a.csv", "csv"],
|
||||
["a.md", "markdown"],
|
||||
["a.tif", "tiff"],
|
||||
["a.mp3", "audio"],
|
||||
["a.mp4", "video"],
|
||||
["a.png", "image"],
|
||||
["a.epub", "epub"],
|
||||
["a.html", "text"],
|
||||
])
|
||||
expect(previewKind(name, "blob")).toBe(kind);
|
||||
expect(previewKind("installer.msi", "blob")).toBeNull();
|
||||
expect(previewKind("folder.zip", "", true)).toBeNull();
|
||||
});
|
||||
it("bounds preview data even without Content-Length", async () => {
|
||||
const cancel = vi.fn();
|
||||
vi.stubGlobal(
|
||||
"fetch",
|
||||
vi.fn(
|
||||
async () =>
|
||||
new Response(
|
||||
new ReadableStream({
|
||||
start(controller) {
|
||||
controller.enqueue(new Uint8Array(11));
|
||||
},
|
||||
cancel,
|
||||
})
|
||||
)
|
||||
)
|
||||
);
|
||||
await expect(
|
||||
previewBuffer("/raw", new AbortController().signal, 10)
|
||||
).rejects.toThrow("PREVIEW_TOO_LARGE");
|
||||
expect(cancel).toHaveBeenCalledOnce();
|
||||
});
|
||||
@@ -0,0 +1,159 @@
|
||||
import { afterEach, describe, expect, it, vi } from "vitest";
|
||||
import { zipDirectory, zipTree } from "../zip-preview";
|
||||
function central(names: string[]) {
|
||||
const records = names.map((name) => {
|
||||
const text = new TextEncoder().encode(name),
|
||||
data = new Uint8Array(46 + text.length),
|
||||
view = new DataView(data.buffer);
|
||||
view.setUint32(0, 0x02014b50, true);
|
||||
view.setUint16(28, text.length, true);
|
||||
// Huge claimed inflated sizes must never cause allocation or extraction.
|
||||
view.setUint32(24, 0xffffffff, true);
|
||||
data.set(text, 46);
|
||||
return data;
|
||||
});
|
||||
const result = new Uint8Array(records.reduce((n, row) => n + row.length, 0));
|
||||
let offset = 0;
|
||||
for (const row of records) {
|
||||
result.set(row, offset);
|
||||
offset += row.length;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
function archive(names: string[]) {
|
||||
const directory = central(names),
|
||||
data = new Uint8Array(100000 + directory.length + 22);
|
||||
data.set(directory, 100000);
|
||||
const end = new DataView(data.buffer, data.length - 22);
|
||||
end.setUint32(0, 0x06054b50, true);
|
||||
end.setUint16(8, names.length, true);
|
||||
end.setUint16(10, names.length, true);
|
||||
end.setUint32(12, directory.length, true);
|
||||
end.setUint32(16, 100000, true);
|
||||
return data;
|
||||
}
|
||||
afterEach(() => vi.unstubAllGlobals());
|
||||
describe("ZIP listing without extraction", () => {
|
||||
it("fetches a larger central directory separately without reading file data", async () => {
|
||||
const names = Array.from(
|
||||
{ length: 2000 },
|
||||
(_, index) => `folder/file-${index}.txt`
|
||||
);
|
||||
const data = archive(names);
|
||||
const fetcher = vi.fn(async (_source: string, options: RequestInit) => {
|
||||
const [, start, end] = /bytes=(\d+)-(\d+)/.exec(
|
||||
(options.headers as Record<string, string>).Range
|
||||
)!;
|
||||
expect(Number(start)).toBeGreaterThanOrEqual(100000);
|
||||
return new Response(data.slice(Number(start), Number(end) + 1), {
|
||||
status: 206,
|
||||
headers: { "Content-Range": `bytes ${start}-${end}/${data.length}` },
|
||||
});
|
||||
});
|
||||
vi.stubGlobal("fetch", fetcher);
|
||||
expect(
|
||||
(await zipTree("/zip", data.length, new AbortController().signal))[0]
|
||||
.children
|
||||
).toHaveLength(2000);
|
||||
expect(fetcher).toHaveBeenCalledTimes(2);
|
||||
});
|
||||
it("builds directories, merges explicit parents and sorts folders first", () => {
|
||||
const rows = zipDirectory(central(["z.txt", "scans/a.dcm", "scans/"]), 3);
|
||||
expect(rows.map((node) => node.name)).toEqual(["scans", "z.txt"]);
|
||||
expect(rows[0].children[0].name).toBe("a.dcm");
|
||||
});
|
||||
it("rejects traversal, conflicting paths, deep trees and truncated records", () => {
|
||||
for (const name of ["../a", "/a", "a/./b", "a\u0000b", "a/".repeat(33)])
|
||||
expect(() => zipDirectory(central([name]), 1)).toThrow();
|
||||
expect(() => zipDirectory(central(["a", "a/b"]), 2)).toThrow();
|
||||
expect(() => zipDirectory(central(["a"]).subarray(0, 45), 1)).toThrow();
|
||||
expect(() => zipDirectory(new Uint8Array(), 10001)).toThrow("ZIP_LIMIT");
|
||||
expect(() => zipDirectory(new Uint8Array(4 * 1024 * 1024 + 1), 0)).toThrow(
|
||||
"ZIP_LIMIT"
|
||||
);
|
||||
});
|
||||
it("reads only the bounded tail and central directory, never local entries", async () => {
|
||||
const data = archive(["a.dcm"]);
|
||||
const fetcher = vi.fn(async (_source: string, options: RequestInit) => {
|
||||
const header = (options.headers as Record<string, string>).Range;
|
||||
const [, start, end] = /bytes=(\d+)-(\d+)/.exec(header)!;
|
||||
expect(Number(start)).toBeGreaterThan(0);
|
||||
return new Response(data.slice(Number(start), Number(end) + 1), {
|
||||
status: 206,
|
||||
headers: { "Content-Range": `bytes ${start}-${end}/${data.length}` },
|
||||
});
|
||||
});
|
||||
vi.stubGlobal("fetch", fetcher);
|
||||
expect(
|
||||
(
|
||||
await zipTree("/raw/a.zip", data.length, new AbortController().signal)
|
||||
)[0].name
|
||||
).toBe("a.dcm");
|
||||
expect(fetcher).toHaveBeenCalledTimes(1);
|
||||
});
|
||||
it("refuses full responses instead of downloading the archive", async () => {
|
||||
const cancel = vi.fn();
|
||||
vi.stubGlobal(
|
||||
"fetch",
|
||||
vi.fn(
|
||||
async () =>
|
||||
new Response(new ReadableStream({ cancel }), { status: 200 })
|
||||
)
|
||||
);
|
||||
await expect(
|
||||
zipTree("/zip", 100000, new AbortController().signal)
|
||||
).rejects.toThrow("ZIP_RANGE");
|
||||
expect(cancel).toHaveBeenCalledOnce();
|
||||
});
|
||||
it("rejects ZIP64 and oversized central directories before a second request", async () => {
|
||||
for (const field of ["zip64", "directory", "entries"]) {
|
||||
const data = archive(["a"]),
|
||||
end = new DataView(data.buffer, data.length - 22);
|
||||
if (field === "zip64") end.setUint32(16, 0xffffffff, true);
|
||||
if (field === "directory") end.setUint32(12, 5 * 1024 * 1024, true);
|
||||
if (field === "entries") {
|
||||
end.setUint16(8, 10001, true);
|
||||
end.setUint16(10, 10001, true);
|
||||
}
|
||||
const fetcher = vi.fn(
|
||||
async () =>
|
||||
new Response(data.slice(data.length - 65557), {
|
||||
status: 206,
|
||||
headers: {
|
||||
"Content-Range": `bytes ${data.length - 65557}-${data.length - 1}/${data.length}`,
|
||||
},
|
||||
})
|
||||
);
|
||||
vi.stubGlobal("fetch", fetcher);
|
||||
await expect(
|
||||
zipTree("/zip", data.length, new AbortController().signal)
|
||||
).rejects.toThrow();
|
||||
expect(fetcher).toHaveBeenCalledOnce();
|
||||
}
|
||||
});
|
||||
it("cancels a range response exceeding its declared size", async () => {
|
||||
const cancel = vi.fn();
|
||||
vi.stubGlobal(
|
||||
"fetch",
|
||||
vi.fn(
|
||||
async () =>
|
||||
new Response(
|
||||
new ReadableStream({
|
||||
start(controller) {
|
||||
controller.enqueue(new Uint8Array(65558));
|
||||
},
|
||||
cancel,
|
||||
}),
|
||||
{
|
||||
status: 206,
|
||||
headers: { "Content-Range": "bytes 34443-99999/100000" },
|
||||
}
|
||||
)
|
||||
)
|
||||
);
|
||||
await expect(
|
||||
zipTree("/zip", 100000, new AbortController().signal)
|
||||
).rejects.toThrow("ZIP_LIMIT");
|
||||
expect(cancel).toHaveBeenCalledOnce();
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,171 @@
|
||||
// Native SVG paths: one stroke weight, rounded ends and no icon font requests.
|
||||
const paths: Record<string, string> = {
|
||||
file: "M6 3h8l4 4v14H6z M14 3v5h4 M9 12h6 M9 16h6",
|
||||
folder: "M3 7V5h7l2 2h9v13H3z",
|
||||
folderOpen: "M3 10V5h7l2 2h9v3 M3 10h19l-3 10H3z",
|
||||
home: "m3 10 9-7 9 7 M5 9v12h5v-7h4v7h5V9",
|
||||
search: "M20 20l-5-5 M17 10a7 7 0 1 1-14 0 7 7 0 0 1 14 0",
|
||||
close: "m6 6 12 12 M6 18 18 6",
|
||||
add: "M12 5v14 M5 12h14",
|
||||
remove: "M5 12h14",
|
||||
right: "m9 5 7 7-7 7",
|
||||
left: "m15 5-7 7 7 7",
|
||||
down: "m5 9 7 7 7-7",
|
||||
up: "m5 15 7-7 7 7",
|
||||
download: "M12 3v12 m-5-5 5 5 5-5 M4 16v5h16v-5",
|
||||
upload: "M12 16V4 m-5 5 5-5 5 5 M4 16v5h16v-5",
|
||||
trash: "M3 6h18 M9 6V3h6v3 M5 6l1 15h12l1-15 M10 10v7 M14 10v7",
|
||||
edit: "m15 4 5 5 M4 20l5-1L21 7l-5-5L4 14z",
|
||||
copy: "M8 8h12v13H8z M4 16H2V2h13v2",
|
||||
paste: "M9 4H5v17h14V4h-4 M9 2h6v5H9z M8 11h8 M8 15h8",
|
||||
cut: "M9 8 20 20 M9 16 20 4 M9 7a3 3 0 1 1-6 0 3 3 0 0 1 6 0 M9 17a3 3 0 1 1-6 0 3 3 0 0 1 6 0",
|
||||
settings:
|
||||
"M12 3v3 M12 18v3 M3 12h3 M18 12h3 M5.5 5.5l2 2 M16.5 16.5l2 2 M5.5 18.5l2-2 M16.5 7.5l2-2 M17 12a5 5 0 1 1-10 0 5 5 0 0 1 10 0",
|
||||
sliders: "M4 7h3 M11 7h9 M4 17h9 M17 17h3 M7 4h4v6H7z M13 14h4v6h-4z",
|
||||
user: "M16 7a4 4 0 1 1-8 0 4 4 0 0 1 8 0 M4 21v-3a8 5 0 0 1 16 0v3",
|
||||
users:
|
||||
"M14 7a4 4 0 1 1-8 0 4 4 0 0 1 8 0 M2 21v-3a8 5 0 0 1 16 0v3 M17 3a4 4 0 0 1 0 8 M20 15a4 4 0 0 1 2 4v2",
|
||||
link: "m9 15 6-6 M8 16l-1 1a4 4 0 0 1-6-6l5-5a4 4 0 0 1 6 0 M16 8l1-1a4 4 0 0 1 6 6l-5 5a4 4 0 0 1-6 0",
|
||||
external: "M14 3h7v7 M21 3 10 14 M10 3H3v18h18v-7",
|
||||
back: "M20 12H4 m6-6-6 6 6 6",
|
||||
more: "M5 12h.01 M12 12h.01 M19 12h.01",
|
||||
moreVertical: "M12 5v.01 M12 12v.01 M12 19v.01",
|
||||
menu: "M3 6h18 M3 12h18 M3 18h18",
|
||||
info: "M12 11v6 M12 7v.01 M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0",
|
||||
warning: "m12 3 10 18H2z M12 9v5 M12 17v.01",
|
||||
check: "m4 12 5 5L20 6",
|
||||
checkCircle: "m8 12 3 3 5-6 M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0",
|
||||
refresh: "M20 8a8 8 0 1 0 0 8 M20 3v5h-5",
|
||||
undo: "m8 4-5 5 5 5 M3 9h11a6 6 0 0 1 0 12",
|
||||
save: "M4 3h13l4 4v14H3V3z M7 3v6h9V3 M7 21v-8h10v8",
|
||||
login: "M13 3h8v18h-8 M3 12h13 m-5-5 5 5-5 5",
|
||||
logout: "M11 3H3v18h8 M9 12h12 m-5-5 5 5-5 5",
|
||||
eye: "M2 12s4-7 10-7 10 7 10 7-4 7-10 7S2 12 2 12 M15 12a3 3 0 1 1-6 0 3 3 0 0 1 6 0",
|
||||
image: "M3 3h18v18H3z m0 14 6-6 5 5 3-3 4 4 M16 7h.01",
|
||||
music:
|
||||
"M10 17V5l10-2v12 M10 17a3 3 0 1 1-6 0 3 3 0 0 1 6 0 M20 15a3 3 0 1 1-6 0 3 3 0 0 1 6 0",
|
||||
video: "M3 5h12v14H3z m12 5 7-4v12l-7-4",
|
||||
table: "M3 4h18v16H3z M3 9h18 M3 14h18 M9 4v16 M15 4v16",
|
||||
code: "m8 6-6 6 6 6 m8-12 6 6-6 6 M14 3l-4 18",
|
||||
archive: "M3 4h18v5H3z M5 9v12h14V9 M10 13h4",
|
||||
disc: "M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0 M15 12a3 3 0 1 1-6 0 3 3 0 0 1 6 0",
|
||||
package: "m3 7 9-4 9 4-9 4z M3 7v10l9 4 9-4V7 M12 11v10 M7 5l10 4",
|
||||
calendar: "M4 5h16v16H4z M8 3v4 M16 3v4 M4 10h16 M8 14h2 M14 14h2",
|
||||
server: "M3 3h18v7H3z M3 14h18v7H3z M7 6.5h.01 M7 17.5h.01",
|
||||
globe:
|
||||
"M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0 M3 12h18 M12 3c5 5 5 13 0 18-5-5-5-13 0-18",
|
||||
bookmark: "M6 3h12v18l-6-4-6 4z",
|
||||
star: "m12 3 3 6 7 1-5 5 1 7-6-3-6 3 1-7-5-5 7-1z",
|
||||
mouse: "M5 10a7 7 0 0 1 14 0v5a7 7 0 0 1-14 0z M12 3v7 M5 10h14",
|
||||
contrast: "M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0 M12 3v18 M16 6v12",
|
||||
lock: "M5 10h14v11H5z M8 10V6a4 4 0 0 1 8 0v4 M12 14v3",
|
||||
shield: "M12 2 3 6v6c0 5 9 10 9 10s9-5 9-10V6z m-5 10 3 3 5-6",
|
||||
palette:
|
||||
"M12 3a9 9 0 1 0 0 18c3 0 1-4 3-4h3c5 0 4-14-6-14 M7 10h.01 M10 6h.01 M15 7h.01 M18 11h.01",
|
||||
share:
|
||||
"M8 12 17 6 M8 12l9 6 M8 12a3 3 0 1 1-6 0 3 3 0 0 1 6 0 M22 5a3 3 0 1 1-6 0 3 3 0 0 1 6 0 M22 19a3 3 0 1 1-6 0 3 3 0 0 1 6 0",
|
||||
};
|
||||
const aliases: Record<string, string> = {
|
||||
cloud_off: "warning",
|
||||
gps_off: "search",
|
||||
edit_note: "edit",
|
||||
view_module: "table",
|
||||
grid_view: "table",
|
||||
view_list: "menu",
|
||||
insert_drive_file: "file",
|
||||
description: "file",
|
||||
note_add: "file",
|
||||
picture_as_pdf: "file",
|
||||
article: "file",
|
||||
font_download: "file",
|
||||
web_asset: "package",
|
||||
folder_open: "folderOpen",
|
||||
folder_copy: "folder",
|
||||
folder_shared: "folder",
|
||||
create_new_folder: "folder",
|
||||
folder_zip: "archive",
|
||||
insert_photo: "image",
|
||||
volume_up: "music",
|
||||
movie: "video",
|
||||
slideshow: "video",
|
||||
border_all: "table",
|
||||
album: "disc",
|
||||
clear: "close",
|
||||
cancel: "close",
|
||||
delete: "trash",
|
||||
delete_outline: "trash",
|
||||
mode_edit: "edit",
|
||||
content_copy: "copy",
|
||||
content_paste: "paste",
|
||||
content_cut: "cut",
|
||||
settings_applications: "settings",
|
||||
manage_accounts: "user",
|
||||
account_circle: "user",
|
||||
person: "user",
|
||||
person_add: "user",
|
||||
group: "users",
|
||||
tune: "sliders",
|
||||
open_in_new: "external",
|
||||
north_east: "external",
|
||||
arrow_back: "back",
|
||||
forward: "right",
|
||||
chevron_right: "right",
|
||||
keyboard_arrow_right: "right",
|
||||
chevron_left: "left",
|
||||
keyboard_arrow_left: "left",
|
||||
expand_more: "down",
|
||||
keyboard_arrow_down: "down",
|
||||
expand_less: "up",
|
||||
keyboard_arrow_up: "up",
|
||||
arrow_upward: "up",
|
||||
arrow_downward: "down",
|
||||
arrow_drop_up: "up",
|
||||
arrow_drop_down: "down",
|
||||
sort: "sliders",
|
||||
file_download: "download",
|
||||
file_upload: "upload",
|
||||
cloud_upload: "upload",
|
||||
exit_to_app: "logout",
|
||||
more_horiz: "more",
|
||||
more_vert: "moreVertical",
|
||||
info_outline: "info",
|
||||
feedback: "info",
|
||||
error_outline: "warning",
|
||||
error: "warning",
|
||||
sentiment_dissatisfied: "info",
|
||||
check_circle: "checkCircle",
|
||||
done: "check",
|
||||
done_all: "check",
|
||||
checklist: "check",
|
||||
select_all: "check",
|
||||
check_box: "check",
|
||||
autorenew: "refresh",
|
||||
replay: "refresh",
|
||||
refresh: "refresh",
|
||||
bookmark_add: "bookmark",
|
||||
star_outline: "star",
|
||||
public: "globe",
|
||||
language: "globe",
|
||||
dns: "server",
|
||||
storage: "server",
|
||||
policy: "shield",
|
||||
security: "shield",
|
||||
help: "info",
|
||||
visibility: "eye",
|
||||
visibility_off: "eye",
|
||||
preview: "eye",
|
||||
photo_size_select_large: "image",
|
||||
hd: "image",
|
||||
zoom_in: "add",
|
||||
zoom_out: "remove",
|
||||
stop_circle: "close",
|
||||
schedule: "calendar",
|
||||
link_off: "link",
|
||||
add_link: "link",
|
||||
};
|
||||
export function iconPath(name = "file"): string {
|
||||
return paths[aliases[name] || name] || paths.file;
|
||||
}
|
||||
export function hasIcon(name: string): boolean {
|
||||
return !!(paths[name] || paths[aliases[name]]);
|
||||
}
|
||||
@@ -0,0 +1,118 @@
|
||||
export type PreviewKind =
|
||||
| "zip"
|
||||
| "pdf"
|
||||
| "dicom"
|
||||
| "image"
|
||||
| "tiff"
|
||||
| "audio"
|
||||
| "video"
|
||||
| "text"
|
||||
| "markdown"
|
||||
| "csv"
|
||||
| "epub";
|
||||
export function previewKind(
|
||||
name: string,
|
||||
type = "",
|
||||
directory = false
|
||||
): PreviewKind | null {
|
||||
if (directory) return null;
|
||||
const ext = name.split(".").pop()?.toLowerCase() || "";
|
||||
if (["dcm", "dicom"].includes(ext)) return "dicom";
|
||||
if (ext === "pdf") return "pdf";
|
||||
if (ext === "zip") return "zip";
|
||||
if (ext === "csv") return "csv";
|
||||
if (["md", "markdown"].includes(ext)) return "markdown";
|
||||
if (ext === "epub") return "epub";
|
||||
if (["tif", "tiff", "dng", "cr2", "nef"].includes(ext)) return "tiff";
|
||||
if (
|
||||
[
|
||||
"png",
|
||||
"jpg",
|
||||
"jpeg",
|
||||
"jfif",
|
||||
"gif",
|
||||
"webp",
|
||||
"avif",
|
||||
"bmp",
|
||||
"ico",
|
||||
"svg",
|
||||
].includes(ext) ||
|
||||
type === "image"
|
||||
)
|
||||
return "image";
|
||||
if (
|
||||
["mp3", "wav", "ogg", "oga", "flac", "m4a", "aac", "opus"].includes(ext) ||
|
||||
type === "audio"
|
||||
)
|
||||
return "audio";
|
||||
if (["mp4", "m4v", "webm", "ogv", "mov"].includes(ext) || type === "video")
|
||||
return "video";
|
||||
if (
|
||||
[
|
||||
"txt",
|
||||
"tsv",
|
||||
"log",
|
||||
"json",
|
||||
"xml",
|
||||
"yaml",
|
||||
"yml",
|
||||
"toml",
|
||||
"ini",
|
||||
"conf",
|
||||
"css",
|
||||
"js",
|
||||
"ts",
|
||||
"jsx",
|
||||
"tsx",
|
||||
"html",
|
||||
"htm",
|
||||
"sh",
|
||||
"bat",
|
||||
"ps1",
|
||||
"py",
|
||||
"go",
|
||||
"rs",
|
||||
"c",
|
||||
"cpp",
|
||||
"h",
|
||||
"java",
|
||||
"sql",
|
||||
].includes(ext) ||
|
||||
["text", "textImmutable"].includes(type)
|
||||
)
|
||||
return "text";
|
||||
return null;
|
||||
}
|
||||
export async function previewBuffer(
|
||||
source: string,
|
||||
signal: AbortSignal,
|
||||
limit = 5 * 1024 * 1024
|
||||
): Promise<ArrayBuffer> {
|
||||
const response = await fetch(source, { credentials: "same-origin", signal });
|
||||
if (!response.ok) throw new Error(`HTTP ${response.status}`);
|
||||
if (Number(response.headers.get("Content-Length")) > limit) {
|
||||
await response.body?.cancel();
|
||||
throw new Error("PREVIEW_TOO_LARGE");
|
||||
}
|
||||
const reader = response.body?.getReader();
|
||||
if (!reader) throw new Error("Empty response");
|
||||
const chunks: Uint8Array[] = [];
|
||||
let length = 0;
|
||||
while (true) {
|
||||
const result = await reader.read();
|
||||
if (result.done) break;
|
||||
length += result.value.length;
|
||||
if (length > limit) {
|
||||
await reader.cancel();
|
||||
throw new Error("PREVIEW_TOO_LARGE");
|
||||
}
|
||||
chunks.push(result.value);
|
||||
}
|
||||
const data = new Uint8Array(length);
|
||||
let offset = 0;
|
||||
for (const chunk of chunks) {
|
||||
data.set(chunk, offset);
|
||||
offset += chunk.length;
|
||||
}
|
||||
return data.buffer;
|
||||
}
|
||||
@@ -0,0 +1,155 @@
|
||||
// List the central directory only. Never read, inflate or follow file entries.
|
||||
const MAX_DIRECTORY = 4 * 1024 * 1024;
|
||||
const MAX_ENTRIES = 10000;
|
||||
const MAX_NODES = 20000;
|
||||
export interface ZipNode {
|
||||
name: string;
|
||||
directory: boolean;
|
||||
children: ZipNode[];
|
||||
}
|
||||
export function zipDirectory(data: Uint8Array, expected: number): ZipNode[] {
|
||||
if (data.length > MAX_DIRECTORY || expected > MAX_ENTRIES)
|
||||
throw new Error("ZIP_LIMIT");
|
||||
const view = new DataView(data.buffer, data.byteOffset, data.byteLength);
|
||||
const root: ZipNode = { name: "", directory: true, children: [] };
|
||||
const nodes = new Map<string, ZipNode>();
|
||||
let offset = 0;
|
||||
for (let index = 0; index < expected; index++) {
|
||||
if (
|
||||
offset + 46 > data.length ||
|
||||
view.getUint32(offset, true) !== 0x02014b50
|
||||
)
|
||||
throw new Error("ZIP_INVALID");
|
||||
const length = view.getUint16(offset + 28, true);
|
||||
const end = offset + 46 + length;
|
||||
const next =
|
||||
end +
|
||||
view.getUint16(offset + 30, true) +
|
||||
view.getUint16(offset + 32, true);
|
||||
if (!length || length > 1024 || next > data.length)
|
||||
throw new Error("ZIP_LIMIT");
|
||||
// Filenames are rendered as text, never used as filesystem paths or URLs.
|
||||
const name = new TextDecoder("utf-8").decode(
|
||||
data.subarray(offset + 46, end)
|
||||
);
|
||||
const parts = name.replace(/\\/g, "/").split("/");
|
||||
const directory = parts[parts.length - 1] === "";
|
||||
if (directory) parts.pop();
|
||||
if (
|
||||
parts.length > 32 ||
|
||||
parts.some(
|
||||
(part) =>
|
||||
!part ||
|
||||
part === "." ||
|
||||
part === ".." ||
|
||||
/[\u0000-\u001f\u007f]/.test(part)
|
||||
)
|
||||
)
|
||||
throw new Error("ZIP_INVALID");
|
||||
let parent = root,
|
||||
key = "";
|
||||
for (let i = 0; i < parts.length; i++) {
|
||||
key += "/" + parts[i];
|
||||
const isDirectory = i < parts.length - 1 || directory;
|
||||
let node = nodes.get(key);
|
||||
if (!node) {
|
||||
if (nodes.size >= MAX_NODES) throw new Error("ZIP_LIMIT");
|
||||
node = { name: parts[i], directory: isDirectory, children: [] };
|
||||
nodes.set(key, node);
|
||||
parent.children.push(node);
|
||||
} else if (node.directory !== isDirectory) throw new Error("ZIP_INVALID");
|
||||
parent = node;
|
||||
}
|
||||
offset = next;
|
||||
}
|
||||
if (offset !== data.length) throw new Error("ZIP_INVALID");
|
||||
function sort(node: ZipNode) {
|
||||
node.children.sort(
|
||||
(a, b) =>
|
||||
Number(b.directory) - Number(a.directory) ||
|
||||
a.name.localeCompare(b.name)
|
||||
);
|
||||
node.children.forEach(sort);
|
||||
}
|
||||
sort(root);
|
||||
return root.children;
|
||||
}
|
||||
async function range(
|
||||
source: string,
|
||||
start: number,
|
||||
end: number,
|
||||
size: number,
|
||||
signal: AbortSignal
|
||||
) {
|
||||
const response = await fetch(source, {
|
||||
credentials: "same-origin",
|
||||
signal,
|
||||
headers: { Range: `bytes=${start}-${end}` },
|
||||
});
|
||||
const expected = end - start + 1;
|
||||
if (
|
||||
response.status !== 206 ||
|
||||
response.headers.get("Content-Range") !== `bytes ${start}-${end}/${size}` ||
|
||||
(response.headers.has("Content-Length") &&
|
||||
Number(response.headers.get("Content-Length")) !== expected)
|
||||
) {
|
||||
await response.body?.cancel();
|
||||
throw new Error("ZIP_RANGE");
|
||||
}
|
||||
const reader = response.body?.getReader();
|
||||
if (!reader) throw new Error("ZIP_INVALID");
|
||||
const bytes = new Uint8Array(expected);
|
||||
let offset = 0;
|
||||
while (true) {
|
||||
const { value, done } = await reader.read();
|
||||
if (done) break;
|
||||
if (offset + value.length > expected) {
|
||||
await reader.cancel();
|
||||
throw new Error("ZIP_LIMIT");
|
||||
}
|
||||
bytes.set(value, offset);
|
||||
offset += value.length;
|
||||
}
|
||||
if (offset !== expected) throw new Error("ZIP_INVALID");
|
||||
return bytes;
|
||||
}
|
||||
export async function zipTree(
|
||||
source: string,
|
||||
size: number,
|
||||
signal: AbortSignal
|
||||
): Promise<ZipNode[]> {
|
||||
if (!Number.isSafeInteger(size) || size < 22) throw new Error("ZIP_INVALID");
|
||||
const start = Math.max(0, size - 65557);
|
||||
const tail = await range(source, start, size - 1, size, signal);
|
||||
const view = new DataView(tail.buffer);
|
||||
for (let at = tail.length - 22; at >= 0; at--) {
|
||||
if (
|
||||
view.getUint32(at, true) !== 0x06054b50 ||
|
||||
at + 22 + view.getUint16(at + 20, true) !== tail.length
|
||||
)
|
||||
continue;
|
||||
const entries = view.getUint16(at + 10, true);
|
||||
const length = view.getUint32(at + 12, true);
|
||||
const offset = view.getUint32(at + 16, true);
|
||||
if (
|
||||
view.getUint16(at + 4, true) ||
|
||||
view.getUint16(at + 6, true) ||
|
||||
view.getUint16(at + 8, true) !== entries ||
|
||||
entries === 65535 ||
|
||||
length === 0xffffffff ||
|
||||
offset === 0xffffffff
|
||||
)
|
||||
throw new Error("ZIP_UNSUPPORTED");
|
||||
if (entries > MAX_ENTRIES || length > MAX_DIRECTORY)
|
||||
throw new Error("ZIP_LIMIT");
|
||||
if (offset + length !== start + at) throw new Error("ZIP_INVALID");
|
||||
if (!entries && !length) return [];
|
||||
if (!length) throw new Error("ZIP_INVALID");
|
||||
const data =
|
||||
offset >= start
|
||||
? tail.subarray(offset - start, offset - start + length)
|
||||
: await range(source, offset, offset + length - 1, size, signal);
|
||||
return zipDirectory(data, entries);
|
||||
}
|
||||
throw new Error("ZIP_INVALID");
|
||||
}
|
||||
@@ -3,7 +3,7 @@
|
||||
<header-bar v-if="showHeader" showMenu showLogo />
|
||||
|
||||
<h2 class="message">
|
||||
<i class="material-icons">{{ info.icon }}</i>
|
||||
<AppIcon :name="info.icon" />
|
||||
<span>{{ t(info.message) }}</span>
|
||||
</h2>
|
||||
</div>
|
||||
|
||||
@@ -67,24 +67,13 @@ const currentView = computed(() => {
|
||||
|
||||
if (fileStore.req.isDir) {
|
||||
return FileListing;
|
||||
} else if (
|
||||
[".dcm", ".dicom", ".pdf"].includes(fileStore.req.extension.toLowerCase())
|
||||
) {
|
||||
return Preview;
|
||||
} else if (fileStore.req.extension.toLowerCase() === ".csv") {
|
||||
// CSV files use Preview for table view, unless ?edit=true
|
||||
if (route.query.edit === "true") {
|
||||
return Editor;
|
||||
}
|
||||
return Preview;
|
||||
} else if (
|
||||
fileStore.req.type === "text" ||
|
||||
fileStore.req.type === "textImmutable"
|
||||
) {
|
||||
return Editor;
|
||||
} else {
|
||||
return Preview;
|
||||
}
|
||||
if (
|
||||
route.query.edit === "true" &&
|
||||
["text", "textImmutable"].includes(fileStore.req.type)
|
||||
)
|
||||
return Editor;
|
||||
return Preview;
|
||||
});
|
||||
|
||||
// Define hooks
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
<template>
|
||||
<main class="sso-welcome">
|
||||
<div class="sso-symbol" aria-hidden="true">
|
||||
<i class="material-icons">folder_open</i>
|
||||
<AppIcon name="folder_open" />
|
||||
</div>
|
||||
<span class="eyebrow">FILE WORKSPACE</span>
|
||||
<h1>{{ name }}</h1>
|
||||
<p>{{ $t("sso.description") }}</p>
|
||||
<button class="button sso-signin" @click="signIn">
|
||||
<i class="material-icons">login</i>{{ $t("sso.signIn") }}
|
||||
<AppIcon name="login" />{{ $t("sso.signIn") }}
|
||||
</button>
|
||||
</main>
|
||||
</template>
|
||||
|
||||
@@ -6,20 +6,16 @@
|
||||
</div>
|
||||
<div class="settings-tabs" :aria-label="t('sidebar.settings')">
|
||||
<router-link to="/settings/profile"
|
||||
><i class="material-icons">tune</i
|
||||
>{{ t("settings.profileSettings") }}</router-link
|
||||
><AppIcon name="tune" />{{ t("settings.profileSettings") }}</router-link
|
||||
>
|
||||
<router-link v-if="authStore.user?.perm.share" to="/settings/shares"
|
||||
><i class="material-icons">link</i
|
||||
>{{ t("settings.shareManagement") }}</router-link
|
||||
><AppIcon name="link" />{{ t("settings.shareManagement") }}</router-link
|
||||
>
|
||||
<router-link v-if="authStore.user?.perm.admin" to="/settings/global"
|
||||
><i class="material-icons">dns</i
|
||||
>{{ t("settings.globalSettings") }}</router-link
|
||||
><AppIcon name="dns" />{{ t("settings.globalSettings") }}</router-link
|
||||
>
|
||||
<router-link v-if="authStore.user?.perm.admin" to="/settings/users"
|
||||
><i class="material-icons">group</i
|
||||
>{{ t("settings.userManagement") }}</router-link
|
||||
><AppIcon name="group" />{{ t("settings.userManagement") }}</router-link
|
||||
>
|
||||
</div>
|
||||
<p v-if="layout.loading" role="status">{{ t("files.loading") }}</p>
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
:data-title="t('buttons.copyDownloadLinkToClipboard')"
|
||||
@click="copyToClipboard(linkSelected())"
|
||||
>
|
||||
<i class="material-icons">content_paste</i>
|
||||
<AppIcon name="content_paste" />
|
||||
</button>
|
||||
<action
|
||||
icon="check_circle"
|
||||
@@ -74,72 +74,58 @@
|
||||
<errors v-else :errorCode="error.status" />
|
||||
</div>
|
||||
<div v-else-if="req !== null">
|
||||
<div class="share">
|
||||
<div
|
||||
class="share__box share__box__info"
|
||||
style="
|
||||
position: -webkit-sticky;
|
||||
position: sticky;
|
||||
top: -20.6em;
|
||||
z-index: 999;
|
||||
"
|
||||
>
|
||||
<div class="share__box__header" style="height: 3em">
|
||||
<div
|
||||
class="share"
|
||||
:class="{
|
||||
'share-with-preview': !!sharedPreview,
|
||||
'share-directory': req.isDir,
|
||||
}"
|
||||
>
|
||||
<section class="share__box share__box__info share-info">
|
||||
<div class="share__box__header">
|
||||
{{
|
||||
req.isDir
|
||||
? t("download.downloadFolder")
|
||||
: t("download.downloadFile")
|
||||
}}
|
||||
</div>
|
||||
<div
|
||||
v-if="!req.isDir"
|
||||
class="share__box__element share__box__center share__box__icon"
|
||||
>
|
||||
<i class="material-icons">{{ icon }}</i>
|
||||
<div v-if="!req.isDir" class="share-file-symbol">
|
||||
<FileIcon :name="req.name" />
|
||||
</div>
|
||||
<div class="share__box__element" style="height: 3em">
|
||||
<strong>{{ $t("prompts.displayName") }}</strong> {{ req.name }}
|
||||
</div>
|
||||
<div v-if="!req.isDir" class="share__box__element" :title="modTime">
|
||||
<strong>{{ $t("prompts.lastModified") }}:</strong> {{ humanTime }}
|
||||
</div>
|
||||
<div class="share__box__element" style="height: 3em">
|
||||
<strong>{{ $t("prompts.size") }}:</strong> {{ humanSize }}
|
||||
</div>
|
||||
<div class="share__box__element share-download-actions">
|
||||
<a :href="link" class="button share-download-primary">
|
||||
<i class="material-icons" aria-hidden="true">file_download</i
|
||||
><span>{{
|
||||
<dl class="share-file-details">
|
||||
<div>
|
||||
<dt>{{ t("prompts.displayName") }}</dt>
|
||||
<dd>{{ req.name }}</dd>
|
||||
</div>
|
||||
<div v-if="!req.isDir">
|
||||
<dt>{{ t("prompts.lastModified") }}</dt>
|
||||
<dd :title="modTime">{{ humanTime }}</dd>
|
||||
</div>
|
||||
<div>
|
||||
<dt>{{ t("prompts.size") }}</dt>
|
||||
<dd>{{ humanSize }}</dd>
|
||||
</div>
|
||||
</dl>
|
||||
<div class="share-download-actions">
|
||||
<a :href="link" class="button share-download-primary"
|
||||
><AppIcon name="download" /><span>{{
|
||||
req.isDir
|
||||
? t("sso.downloadFolderZip")
|
||||
: t("download.downloadFile")
|
||||
}}</span>
|
||||
</a>
|
||||
<a
|
||||
target="_blank"
|
||||
:href="inlineLink"
|
||||
class="button button--flat"
|
||||
v-if="!req.isDir"
|
||||
}}</span></a
|
||||
>
|
||||
<div>
|
||||
<i class="material-icons">open_in_new</i
|
||||
>{{ t("buttons.openFile") }}
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<div
|
||||
v-if="
|
||||
!req.isDir &&
|
||||
['.pdf', '.dcm', '.dicom'].includes(req.extension.toLowerCase())
|
||||
"
|
||||
v-if="sharedPreview"
|
||||
class="share__box share__box__items public-document"
|
||||
>
|
||||
<PdfViewer
|
||||
v-if="req.extension.toLowerCase() === '.pdf'"
|
||||
<ResourcePreview
|
||||
:source="inlineLink"
|
||||
:name="req.name"
|
||||
:type="req.type"
|
||||
:size="req.size"
|
||||
/>
|
||||
<DicomViewer v-else :source="inlineLink" />
|
||||
</div>
|
||||
<div
|
||||
id="shareList"
|
||||
@@ -186,7 +172,7 @@
|
||||
:aria-label="t('buttons.clear')"
|
||||
class="action"
|
||||
>
|
||||
<i class="material-icons">clear</i>
|
||||
<AppIcon name="clear" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -196,7 +182,7 @@
|
||||
class="share__box share__box__items"
|
||||
>
|
||||
<h2 class="message">
|
||||
<i class="material-icons">sentiment_dissatisfied</i>
|
||||
<AppIcon name="sentiment_dissatisfied" />
|
||||
<span>{{ t("files.lonely") }}</span>
|
||||
</h2>
|
||||
</div>
|
||||
@@ -217,29 +203,18 @@ import Action from "@/components/header/Action.vue";
|
||||
import Breadcrumbs from "@/components/Breadcrumbs.vue";
|
||||
import Errors from "@/views/Errors.vue";
|
||||
import Item from "@/components/files/ListingItem.vue";
|
||||
import FileIcon from "@/components/files/FileIcon.vue";
|
||||
import ResourcePreview from "@/components/files/ResourcePreview.vue";
|
||||
import { previewKind } from "@/utils/preview";
|
||||
import { useFileStore } from "@/stores/file";
|
||||
import { useLayoutStore } from "@/stores/layout";
|
||||
import {
|
||||
computed,
|
||||
defineAsyncComponent,
|
||||
inject,
|
||||
onMounted,
|
||||
onBeforeUnmount,
|
||||
ref,
|
||||
watch,
|
||||
} from "vue";
|
||||
import { computed, inject, onMounted, onBeforeUnmount, ref, watch } from "vue";
|
||||
import { useRoute } from "vue-router";
|
||||
import { useI18n } from "vue-i18n";
|
||||
import { StatusError } from "@/api/utils";
|
||||
import { copy } from "@/utils/clipboard";
|
||||
|
||||
const error = ref<StatusError | null>(null);
|
||||
const PdfViewer = defineAsyncComponent(
|
||||
() => import("@/components/files/PdfViewer.vue")
|
||||
);
|
||||
const DicomViewer = defineAsyncComponent(
|
||||
() => import("@/components/files/DicomViewer.vue")
|
||||
);
|
||||
const showLimit = ref<number>(100);
|
||||
const password = ref<string>("");
|
||||
const attemptedPasswordLogin = ref<boolean>(false);
|
||||
@@ -264,18 +239,13 @@ watch(route, () => {
|
||||
});
|
||||
|
||||
const req = computed(() => fileStore.req);
|
||||
const sharedPreview = computed(
|
||||
() =>
|
||||
req.value && previewKind(req.value.name, req.value.type, req.value.isDir)
|
||||
);
|
||||
|
||||
// Define computes
|
||||
|
||||
const icon = computed(() => {
|
||||
if (req.value === null) return "insert_drive_file";
|
||||
if (req.value.isDir) return "folder";
|
||||
if (req.value.type === "image") return "insert_photo";
|
||||
if (req.value.type === "audio") return "volume_up";
|
||||
if (req.value.type === "video") return "movie";
|
||||
return "insert_drive_file";
|
||||
});
|
||||
|
||||
const link = computed(() => (req.value ? api.getDownloadURL(req.value) : ""));
|
||||
const inlineLink = computed(() =>
|
||||
req.value ? api.getDownloadURL(req.value, true) : ""
|
||||
|
||||
@@ -49,19 +49,19 @@
|
||||
:disabled="isSelectionEmpty"
|
||||
@click="executeEditorCommand('copy')"
|
||||
>
|
||||
<span><i class="material-icons">content_copy</i></span>
|
||||
<span><AppIcon name="content_copy" /></span>
|
||||
</button>
|
||||
<button
|
||||
:disabled="isSelectionEmpty"
|
||||
@click="executeEditorCommand('cut')"
|
||||
>
|
||||
<span><i class="material-icons">content_cut</i></span>
|
||||
<span><AppIcon name="content_cut" /></span>
|
||||
</button>
|
||||
<button @click="executeEditorCommand('paste')">
|
||||
<span><i class="material-icons">content_paste</i></span>
|
||||
<span><AppIcon name="content_paste" /></span>
|
||||
</button>
|
||||
<button @click="executeEditorCommand('openCommandPalette')">
|
||||
<span><i class="material-icons">more_vert</i></span>
|
||||
<span><AppIcon name="more_vert" /></span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -140,7 +140,7 @@
|
||||
"
|
||||
>
|
||||
<h2 class="message">
|
||||
<i class="material-icons">sentiment_dissatisfied</i>
|
||||
<AppIcon name="sentiment_dissatisfied" />
|
||||
<span>{{ t("files.lonely") }}</span>
|
||||
</h2>
|
||||
<input
|
||||
@@ -181,7 +181,7 @@
|
||||
:aria-label="t('files.sortByName')"
|
||||
>
|
||||
<span>{{ t("files.name") }}</span>
|
||||
<i class="material-icons">{{ nameIcon }}</i>
|
||||
<AppIcon :name="nameIcon" />
|
||||
</p>
|
||||
|
||||
<p
|
||||
@@ -194,7 +194,7 @@
|
||||
:aria-label="t('files.sortBySize')"
|
||||
>
|
||||
<span>{{ t("files.size") }}</span>
|
||||
<i class="material-icons">{{ sizeIcon }}</i>
|
||||
<AppIcon :name="sizeIcon" />
|
||||
</p>
|
||||
<p
|
||||
:class="{ active: modifiedSorted }"
|
||||
@@ -206,7 +206,7 @@
|
||||
:aria-label="t('files.sortByLastModified')"
|
||||
>
|
||||
<span>{{ t("files.lastModified") }}</span>
|
||||
<i class="material-icons">{{ modifiedIcon }}</i>
|
||||
<AppIcon :name="modifiedIcon" />
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
@@ -331,7 +331,7 @@
|
||||
:aria-label="t('buttons.clear')"
|
||||
class="action"
|
||||
>
|
||||
<i class="material-icons">clear</i>
|
||||
<AppIcon name="clear" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -6,7 +6,9 @@
|
||||
@mousemove="toggleNavigation"
|
||||
@touchstart="toggleNavigation"
|
||||
>
|
||||
<header-bar v-if="isPdf || isDicom || isEpub || isCsv || showNav">
|
||||
<header-bar
|
||||
v-if="isPdf || isDicom || isEpub || isCsv || isGenericPreview || showNav"
|
||||
>
|
||||
<action icon="close" :label="$t('buttons.close')" @action="close()" />
|
||||
<title>{{ name }}</title>
|
||||
<action
|
||||
@@ -26,7 +28,11 @@
|
||||
/>
|
||||
<action
|
||||
:disabled="layoutStore.loading"
|
||||
v-if="isCsv && authStore.user?.perm.modify"
|
||||
v-if="
|
||||
(isCsv || isTextPreview) &&
|
||||
['text', 'textImmutable'].includes(fileStore.req?.type || '') &&
|
||||
authStore.user?.perm.modify
|
||||
"
|
||||
icon="edit_note"
|
||||
:label="t('buttons.editAsText')"
|
||||
@action="editAsText"
|
||||
@@ -46,16 +52,6 @@
|
||||
:label="$t('buttons.download')"
|
||||
@action="download"
|
||||
/>
|
||||
<action
|
||||
:disabled="layoutStore.loading"
|
||||
v-if="
|
||||
['image', 'audio', 'video'].includes(fileStore.req?.type || '') &&
|
||||
authStore.user?.perm.download
|
||||
"
|
||||
icon="open_in_new"
|
||||
:label="t('buttons.openDirect')"
|
||||
@action="openDirect"
|
||||
/>
|
||||
<action
|
||||
:disabled="layoutStore.loading"
|
||||
icon="info"
|
||||
@@ -73,8 +69,13 @@
|
||||
</div>
|
||||
</div>
|
||||
<template v-else>
|
||||
<div class="preview" :class="{ 'document-preview': isDicom || isPdf }">
|
||||
<div v-if="isEpub" class="epub-reader">
|
||||
<div
|
||||
class="preview"
|
||||
:class="{ 'document-preview': isDicom || isPdf || isGenericPreview }"
|
||||
>
|
||||
<PdfViewer v-if="isPdf" :source="previewUrl" />
|
||||
<DicomViewer v-else-if="isDicom" :source="previewUrl" />
|
||||
<div v-else-if="isEpub" class="epub-reader">
|
||||
<vue-reader
|
||||
:location="location"
|
||||
:url="previewUrl"
|
||||
@@ -83,7 +84,8 @@
|
||||
requestCredentials: true,
|
||||
}"
|
||||
:epubOptions="{
|
||||
allowPopups: true,
|
||||
allowPopups: false,
|
||||
allowScriptedContent: false,
|
||||
}"
|
||||
@update:location="locationChange"
|
||||
/>
|
||||
@@ -92,21 +94,29 @@
|
||||
@click="changeSize(Math.max(100, size - 10))"
|
||||
class="reader-button"
|
||||
>
|
||||
<i class="material-icons">remove</i>
|
||||
<AppIcon name="remove" />
|
||||
</button>
|
||||
<button
|
||||
@click="changeSize(Math.min(150, size + 10))"
|
||||
class="reader-button"
|
||||
>
|
||||
<i class="material-icons">add</i>
|
||||
<AppIcon name="add" />
|
||||
</button>
|
||||
<span>{{ size }}%</span>
|
||||
</div>
|
||||
</div>
|
||||
<ResourcePreview
|
||||
v-else-if="isGenericPreview"
|
||||
:source="previewUrl"
|
||||
:name="fileStore.req!.name"
|
||||
:type="fileStore.req!.type"
|
||||
:size="fileStore.req!.size"
|
||||
/>
|
||||
<CsvViewer v-else-if="isCsv" :content="csvContent" :error="csvError" />
|
||||
<ExtendedImage
|
||||
v-else-if="fileStore.req?.type == 'image'"
|
||||
v-else-if="fileStore.req?.type == 'image' && !imageFailed"
|
||||
:src="previewUrl"
|
||||
@error="imageFailed = true"
|
||||
/>
|
||||
<audio
|
||||
v-else-if="fileStore.req?.type == 'audio'"
|
||||
@@ -124,29 +134,18 @@
|
||||
:options="videoOptions"
|
||||
>
|
||||
</VideoPlayer>
|
||||
<PdfViewer v-else-if="isPdf" :source="previewUrl" />
|
||||
<DicomViewer v-else-if="isDicom" :source="previewUrl" />
|
||||
<div v-else-if="fileStore.req?.type == 'blob'" class="info">
|
||||
<div
|
||||
v-else-if="fileStore.req?.type == 'blob' || imageFailed"
|
||||
class="info"
|
||||
>
|
||||
<div class="title">
|
||||
<i class="material-icons">feedback</i>
|
||||
<FileIcon :name="fileStore.req?.name || ''" />
|
||||
{{ $t("files.noPreview") }}
|
||||
</div>
|
||||
<div>
|
||||
<a target="_blank" :href="downloadUrl" class="button button--flat">
|
||||
<div>
|
||||
<i class="material-icons">file_download</i
|
||||
>{{ $t("buttons.download") }}
|
||||
</div>
|
||||
</a>
|
||||
<a
|
||||
target="_blank"
|
||||
:href="previewUrl"
|
||||
class="button button--flat"
|
||||
v-if="!fileStore.req?.isDir"
|
||||
>
|
||||
<div>
|
||||
<i class="material-icons">open_in_new</i
|
||||
>{{ $t("buttons.openFile") }}
|
||||
<AppIcon name="file_download" />{{ $t("buttons.download") }}
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
@@ -162,7 +161,7 @@
|
||||
:aria-label="$t('buttons.previous')"
|
||||
:title="$t('buttons.previous')"
|
||||
>
|
||||
<i class="material-icons">chevron_left</i>
|
||||
<AppIcon name="chevron_left" />
|
||||
</button>
|
||||
<button
|
||||
@click="next"
|
||||
@@ -172,7 +171,7 @@
|
||||
:aria-label="$t('buttons.next')"
|
||||
:title="$t('buttons.next')"
|
||||
>
|
||||
<i class="material-icons">chevron_right</i>
|
||||
<AppIcon name="chevron_right" />
|
||||
</button>
|
||||
<link rel="prefetch" :href="previousRaw" />
|
||||
<link rel="prefetch" :href="nextRaw" />
|
||||
@@ -195,6 +194,9 @@ import Action from "@/components/header/Action.vue";
|
||||
import ExtendedImage from "@/components/files/ExtendedImage.vue";
|
||||
import VideoPlayer from "@/components/files/VideoPlayer.vue";
|
||||
import CsvViewer from "@/components/files/CsvViewer.vue";
|
||||
import ResourcePreview from "@/components/files/ResourcePreview.vue";
|
||||
import FileIcon from "@/components/files/FileIcon.vue";
|
||||
import { previewKind } from "@/utils/preview";
|
||||
import { VueReader } from "vue-reader";
|
||||
import {
|
||||
computed,
|
||||
@@ -301,10 +303,6 @@ const downloadUrl = computed(() =>
|
||||
fileStore.req ? api.getDownloadURL(fileStore.req, false) : ""
|
||||
);
|
||||
|
||||
const directUrl = computed(() =>
|
||||
fileStore.req ? api.getDownloadURL(fileStore.req, true) : ""
|
||||
);
|
||||
|
||||
const previewUrl = computed(() => {
|
||||
if (!fileStore.req) {
|
||||
return "";
|
||||
@@ -321,6 +319,25 @@ const previewUrl = computed(() => {
|
||||
return api.getDownloadURL(fileStore.req, true);
|
||||
});
|
||||
|
||||
const imageFailed = ref(false);
|
||||
watch(
|
||||
() => fileStore.req?.path,
|
||||
() => (imageFailed.value = false)
|
||||
);
|
||||
const resourceKind = computed(() =>
|
||||
previewKind(fileStore.req?.name || "", fileStore.req?.type)
|
||||
);
|
||||
const isGenericPreview = computed(
|
||||
() =>
|
||||
["text", "markdown", "tiff", "zip"].includes(resourceKind.value || "") ||
|
||||
(resourceKind.value === "csv" && !isCsv.value) ||
|
||||
(resourceKind.value === "image" && fileStore.req?.type !== "image") ||
|
||||
(resourceKind.value === "audio" && fileStore.req?.type !== "audio") ||
|
||||
(resourceKind.value === "video" && fileStore.req?.type !== "video")
|
||||
);
|
||||
const isTextPreview = computed(() =>
|
||||
["text", "markdown"].includes(resourceKind.value || "")
|
||||
);
|
||||
const isPdf = computed(() => fileStore.req?.extension.toLowerCase() == ".pdf");
|
||||
const isDicom = computed(() =>
|
||||
[".dcm", ".dicom"].includes(fileStore.req?.extension.toLowerCase() || "")
|
||||
@@ -513,7 +530,6 @@ const close = () => {
|
||||
};
|
||||
|
||||
const download = () => window.open(downloadUrl.value);
|
||||
const openDirect = () => window.open(directUrl.value);
|
||||
|
||||
const editAsText = () => {
|
||||
router.push({ path: route.path, query: { edit: "true" } });
|
||||
|
||||
@@ -7,9 +7,7 @@
|
||||
>
|
||||
<div class="settings-grid">
|
||||
<section class="card settings-section">
|
||||
<h2>
|
||||
<i class="material-icons">palette</i>{{ t("preferences.appearance") }}
|
||||
</h2>
|
||||
<h2><AppIcon name="palette" />{{ t("preferences.appearance") }}</h2>
|
||||
<label class="settings-field"
|
||||
>{{ t("settings.instanceName")
|
||||
}}<input class="input" type="text" v-model="settings.branding.name"
|
||||
@@ -26,9 +24,7 @@
|
||||
/></label>
|
||||
</section>
|
||||
<section class="card settings-section">
|
||||
<h2>
|
||||
<i class="material-icons">public</i>{{ t("preferences.publicPages") }}
|
||||
</h2>
|
||||
<h2><AppIcon name="public" />{{ t("preferences.publicPages") }}</h2>
|
||||
<label class="settings-toggle"
|
||||
><span>{{ t("settings.hideLoginButton") }}</span
|
||||
><input type="checkbox" v-model="settings.hideLoginButton"
|
||||
@@ -40,8 +36,7 @@
|
||||
</section>
|
||||
<section class="card settings-section">
|
||||
<h2>
|
||||
<i class="material-icons">folder_shared</i
|
||||
>{{ t("preferences.homeFolders") }}
|
||||
<AppIcon name="folder_shared" />{{ t("preferences.homeFolders") }}
|
||||
</h2>
|
||||
<label class="settings-toggle"
|
||||
><span>{{ t("settings.createUserDir") }}</span
|
||||
@@ -56,10 +51,7 @@
|
||||
/></label>
|
||||
</section>
|
||||
<section class="card settings-section">
|
||||
<h2>
|
||||
<i class="material-icons">cloud_upload</i
|
||||
>{{ t("settings.tusUploads") }}
|
||||
</h2>
|
||||
<h2><AppIcon name="cloud_upload" />{{ t("settings.tusUploads") }}</h2>
|
||||
<label class="settings-field"
|
||||
>{{ t("settings.tusUploadsChunkSize")
|
||||
}}<input class="input" type="text" v-model="formattedChunkSize"
|
||||
@@ -75,10 +67,7 @@
|
||||
/></label>
|
||||
</section>
|
||||
<section class="card settings-section settings-wide">
|
||||
<h2>
|
||||
<i class="material-icons">person_add</i
|
||||
>{{ t("settings.userDefaults") }}
|
||||
</h2>
|
||||
<h2><AppIcon name="person_add" />{{ t("settings.userDefaults") }}</h2>
|
||||
<UserForm
|
||||
:isNew="false"
|
||||
:isDefault="true"
|
||||
@@ -86,7 +75,7 @@
|
||||
/>
|
||||
</section>
|
||||
<section class="card settings-section settings-wide">
|
||||
<h2><i class="material-icons">policy</i>{{ t("settings.rules") }}</h2>
|
||||
<h2><AppIcon name="policy" />{{ t("settings.rules") }}</h2>
|
||||
<p class="field-hint">{{ t("settings.globalRules") }}</p>
|
||||
<Rules v-model:rules="settings.rules" />
|
||||
</section>
|
||||
|
||||
@@ -9,15 +9,12 @@
|
||||
</div>
|
||||
</div>
|
||||
<a class="button account-management" :href="baseURL + '/auth/account'"
|
||||
>{{ t("preferences.manage")
|
||||
}}<i class="material-icons">north_east</i></a
|
||||
>
|
||||
>{{ t("preferences.manage") }}<AppIcon name="north_east"
|
||||
/></a>
|
||||
</section>
|
||||
<div class="settings-grid">
|
||||
<section class="card settings-section">
|
||||
<h2>
|
||||
<i class="material-icons">palette</i>{{ t("preferences.appearance") }}
|
||||
</h2>
|
||||
<h2><AppIcon name="palette" />{{ t("preferences.appearance") }}</h2>
|
||||
<label class="settings-field"
|
||||
>{{ t("settings.themes.title")
|
||||
}}<select
|
||||
@@ -39,9 +36,7 @@
|
||||
/></label>
|
||||
</section>
|
||||
<section class="card settings-section">
|
||||
<h2>
|
||||
<i class="material-icons">mouse</i>{{ t("preferences.behavior") }}
|
||||
</h2>
|
||||
<h2><AppIcon name="mouse" />{{ t("preferences.behavior") }}</h2>
|
||||
<label class="settings-toggle"
|
||||
><span>{{ t("settings.singleClick") }}</span
|
||||
><input type="checkbox" v-model="singleClick"
|
||||
@@ -52,9 +47,7 @@
|
||||
/></label>
|
||||
</section>
|
||||
<section class="card settings-section settings-wide">
|
||||
<h2>
|
||||
<i class="material-icons">language</i>{{ t("preferences.regional") }}
|
||||
</h2>
|
||||
<h2><AppIcon name="language" />{{ t("preferences.regional") }}</h2>
|
||||
<label class="settings-field"
|
||||
>{{ t("settings.language")
|
||||
}}<Languages class="input" v-model:locale="locale"
|
||||
|
||||
@@ -64,7 +64,7 @@
|
||||
:aria-label="t('sso.newLink')"
|
||||
:title="t('sso.newLink')"
|
||||
>
|
||||
<i class="material-icons">add_link</i>
|
||||
<AppIcon name="add_link" />
|
||||
</button>
|
||||
<button
|
||||
class="action"
|
||||
@@ -72,7 +72,7 @@
|
||||
:aria-label="t('buttons.copyToClipboard')"
|
||||
:title="t('buttons.copyToClipboard')"
|
||||
>
|
||||
<i class="material-icons">link</i>
|
||||
<AppIcon name="link" />
|
||||
</button>
|
||||
<button
|
||||
class="action share-link-delete"
|
||||
@@ -81,7 +81,7 @@
|
||||
:aria-label="t('buttons.delete')"
|
||||
:title="t('buttons.delete')"
|
||||
>
|
||||
<i class="material-icons">delete_outline</i>
|
||||
<AppIcon name="delete_outline" />
|
||||
</button>
|
||||
</div>
|
||||
</td>
|
||||
@@ -90,7 +90,7 @@
|
||||
</table>
|
||||
</div>
|
||||
<h2 class="message" v-else>
|
||||
<i class="material-icons">sentiment_dissatisfied</i>
|
||||
<AppIcon name="sentiment_dissatisfied" />
|
||||
<span>{{ t("files.lonely") }}</span>
|
||||
</h2>
|
||||
</div>
|
||||
|
||||
@@ -28,8 +28,8 @@
|
||||
:to="'/settings/users/' + user.id"
|
||||
:title="t('buttons.update')"
|
||||
:aria-label="t('buttons.update')"
|
||||
><i class="material-icons">edit</i></router-link
|
||||
>
|
||||
><AppIcon name="edit"
|
||||
/></router-link>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
param([string]$Version = '3.0.0-sso.13')
|
||||
param([string]$Version = '3.0.0-sso.14')
|
||||
$ErrorActionPreference = 'Stop'
|
||||
$repo = (Resolve-Path (Join-Path $PSScriptRoot '..')).Path
|
||||
Push-Location $repo
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#!/bin/sh
|
||||
set -eu
|
||||
cd "$(dirname "$0")/.."
|
||||
VERSION="${VERSION:-3.0.0-sso.13}"
|
||||
VERSION="${VERSION:-3.0.0-sso.14}"
|
||||
COMMIT=$(git rev-parse --short HEAD)
|
||||
(cd frontend && pnpm install --frozen-lockfile && pnpm run build)
|
||||
mkdir -p build/release/linux-amd64
|
||||
|
||||
Reference in new issue
Block a user