fix:
1. audio preview 2. in mobile, filelist header layer is too high
This commit is contained in:
parent
1d70e77f29
commit
a087826d51
@ -19,7 +19,6 @@
|
|||||||
color: var(--textPrimary);
|
color: var(--textPrimary);
|
||||||
border-radius: 0.2em;
|
border-radius: 0.2em;
|
||||||
margin: 5px;
|
margin: 5px;
|
||||||
overflow: hidden;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.share__box__header {
|
.share__box__header {
|
||||||
|
|||||||
@ -16,7 +16,10 @@ export const useAuthStore = defineStore("auth", () => {
|
|||||||
perm: { create: false },
|
perm: { create: false },
|
||||||
});
|
});
|
||||||
|
|
||||||
const shareConfig = ref({ sortBy: "name", asc: false });
|
const shareConfig = useStorage("share-config", {
|
||||||
|
sortBy: "name",
|
||||||
|
asc: false,
|
||||||
|
});
|
||||||
const isLoggedIn = computed(() => registeredUser.value !== null);
|
const isLoggedIn = computed(() => registeredUser.value !== null);
|
||||||
const user = computed({
|
const user = computed({
|
||||||
get: () =>
|
get: () =>
|
||||||
|
|||||||
@ -8,7 +8,11 @@
|
|||||||
|
|
||||||
<breadcrumbs base="/files" />
|
<breadcrumbs base="/files" />
|
||||||
<errors v-if="error" :errorCode="error.status" />
|
<errors v-if="error" :errorCode="error.status" />
|
||||||
<component v-else-if="currentView" :is="currentView"></component>
|
<component
|
||||||
|
v-else-if="currentView"
|
||||||
|
:is="currentView"
|
||||||
|
v-bind="currentViewProps"
|
||||||
|
></component>
|
||||||
<div v-else-if="currentView !== null">
|
<div v-else-if="currentView !== null">
|
||||||
<h2 class="message delayed">
|
<h2 class="message delayed">
|
||||||
<div class="spinner">
|
<div class="spinner">
|
||||||
@ -65,6 +69,25 @@ const clean = (path: string) => {
|
|||||||
|
|
||||||
const error = ref<StatusError | null>(null);
|
const error = ref<StatusError | null>(null);
|
||||||
|
|
||||||
|
const currentViewProps = computed(() => {
|
||||||
|
if (fileStore.req?.type === undefined) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (fileStore.req.isDir) {
|
||||||
|
return {
|
||||||
|
headerStickyTop: "4em",
|
||||||
|
};
|
||||||
|
} else if (
|
||||||
|
fileStore.req.type === "text" ||
|
||||||
|
fileStore.req.type === "textImmutable"
|
||||||
|
) {
|
||||||
|
return {};
|
||||||
|
} else {
|
||||||
|
return {};
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
const currentView = computed(() => {
|
const currentView = computed(() => {
|
||||||
if (fileStore.req?.type === undefined) {
|
if (fileStore.req?.type === undefined) {
|
||||||
return null;
|
return null;
|
||||||
|
|||||||
@ -161,7 +161,7 @@
|
|||||||
</a>
|
</a>
|
||||||
<div
|
<div
|
||||||
v-else-if="
|
v-else-if="
|
||||||
fileStore.multiple &&
|
!fileStore.multiple &&
|
||||||
fileStore.selectedCount === 1 &&
|
fileStore.selectedCount === 1 &&
|
||||||
req.items[fileStore.selected[0]].type === 'audio'
|
req.items[fileStore.selected[0]].type === 'audio'
|
||||||
"
|
"
|
||||||
@ -228,12 +228,15 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
id="shareList"
|
|
||||||
v-if="req.isDir && req.items.length > 0"
|
v-if="req.isDir && req.items.length > 0"
|
||||||
class="share__box share__box__items"
|
class="share__box share__box__items"
|
||||||
style="background-color: transparent"
|
style="background-color: transparent"
|
||||||
>
|
>
|
||||||
<FileListing />
|
<FileListing
|
||||||
|
:header-sticky-top="
|
||||||
|
useMediaQuery('min-width: 916px') ? '19em' : '0'
|
||||||
|
"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
v-else-if="req.isDir && req.items.length === 0"
|
v-else-if="req.isDir && req.items.length === 0"
|
||||||
@ -271,6 +274,7 @@ import { useI18n } from "vue-i18n";
|
|||||||
import { StatusError } from "@/api/utils";
|
import { StatusError } from "@/api/utils";
|
||||||
import { copy } from "@/utils/clipboard";
|
import { copy } from "@/utils/clipboard";
|
||||||
import { storeToRefs } from "pinia";
|
import { storeToRefs } from "pinia";
|
||||||
|
import { useMediaQuery } from "@vueuse/core";
|
||||||
|
|
||||||
const error = ref<StatusError | null>(null);
|
const error = ref<StatusError | null>(null);
|
||||||
const showLimit = ref<number>(100);
|
const showLimit = ref<number>(100);
|
||||||
@ -364,6 +368,7 @@ const play = () => {
|
|||||||
watch(reload, (newValue) => {
|
watch(reload, (newValue) => {
|
||||||
newValue && fetchData();
|
newValue && fetchData();
|
||||||
});
|
});
|
||||||
|
|
||||||
const fetchData = async () => {
|
const fetchData = async () => {
|
||||||
fileStore.reload = false;
|
fileStore.reload = false;
|
||||||
fileStore.selected = [];
|
fileStore.selected = [];
|
||||||
@ -486,16 +491,8 @@ onBeforeUnmount(() => {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
#listing.list {
|
@media (min-width: 916px) {
|
||||||
height: auto;
|
.share__box__items {
|
||||||
}
|
|
||||||
|
|
||||||
#shareList {
|
|
||||||
overflow-y: scroll;
|
|
||||||
}
|
|
||||||
|
|
||||||
@media (min-width: 930px) {
|
|
||||||
#shareList {
|
|
||||||
height: calc(100vh - 9.8em);
|
height: calc(100vh - 9.8em);
|
||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -161,48 +161,56 @@
|
|||||||
class="file-icons"
|
class="file-icons"
|
||||||
:class="authStore.user?.viewMode ?? ''"
|
:class="authStore.user?.viewMode ?? ''"
|
||||||
>
|
>
|
||||||
<div>
|
<div
|
||||||
<div class="item header">
|
class="item header"
|
||||||
<div></div>
|
:style="
|
||||||
<div>
|
headerStickyTop
|
||||||
<p
|
? {
|
||||||
:class="{ active: nameSorted }"
|
position: 'sticky',
|
||||||
class="name"
|
top: headerStickyTop,
|
||||||
role="button"
|
}
|
||||||
tabindex="0"
|
: {}
|
||||||
@click="sort('name')"
|
"
|
||||||
:title="t('files.sortByName')"
|
>
|
||||||
:aria-label="t('files.sortByName')"
|
<div></div>
|
||||||
>
|
<div>
|
||||||
<span>{{ t("files.name") }}</span>
|
<p
|
||||||
<i class="material-icons">{{ nameIcon }}</i>
|
:class="{ active: nameSorted }"
|
||||||
</p>
|
class="name"
|
||||||
|
role="button"
|
||||||
|
tabindex="0"
|
||||||
|
@click="sort('name')"
|
||||||
|
:title="t('files.sortByName')"
|
||||||
|
:aria-label="t('files.sortByName')"
|
||||||
|
>
|
||||||
|
<span>{{ t("files.name") }}</span>
|
||||||
|
<i class="material-icons">{{ nameIcon }}</i>
|
||||||
|
</p>
|
||||||
|
|
||||||
<p
|
<p
|
||||||
:class="{ active: sizeSorted }"
|
:class="{ active: sizeSorted }"
|
||||||
class="size"
|
class="size"
|
||||||
role="button"
|
role="button"
|
||||||
tabindex="0"
|
tabindex="0"
|
||||||
@click="sort('size')"
|
@click="sort('size')"
|
||||||
:title="t('files.sortBySize')"
|
:title="t('files.sortBySize')"
|
||||||
:aria-label="t('files.sortBySize')"
|
:aria-label="t('files.sortBySize')"
|
||||||
>
|
>
|
||||||
<span>{{ t("files.size") }}</span>
|
<span>{{ t("files.size") }}</span>
|
||||||
<i class="material-icons">{{ sizeIcon }}</i>
|
<i class="material-icons">{{ sizeIcon }}</i>
|
||||||
</p>
|
</p>
|
||||||
<p
|
<p
|
||||||
:class="{ active: modifiedSorted }"
|
:class="{ active: modifiedSorted }"
|
||||||
class="modified"
|
class="modified"
|
||||||
role="button"
|
role="button"
|
||||||
tabindex="0"
|
tabindex="0"
|
||||||
@click="sort('modified')"
|
@click="sort('modified')"
|
||||||
:title="t('files.sortByLastModified')"
|
:title="t('files.sortByLastModified')"
|
||||||
:aria-label="t('files.sortByLastModified')"
|
:aria-label="t('files.sortByLastModified')"
|
||||||
>
|
>
|
||||||
<span>{{ t("files.lastModified") }}</span>
|
<span>{{ t("files.lastModified") }}</span>
|
||||||
<i class="material-icons">{{ modifiedIcon }}</i>
|
<i class="material-icons">{{ modifiedIcon }}</i>
|
||||||
</p>
|
</p>
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -305,6 +313,9 @@ import {
|
|||||||
import { useRoute } from "vue-router";
|
import { useRoute } from "vue-router";
|
||||||
import { useI18n } from "vue-i18n";
|
import { useI18n } from "vue-i18n";
|
||||||
import { storeToRefs } from "pinia";
|
import { storeToRefs } from "pinia";
|
||||||
|
const { headerStickyTop } = defineProps<{
|
||||||
|
headerStickyTop?: string;
|
||||||
|
}>();
|
||||||
|
|
||||||
const showLimit = ref<number>(50);
|
const showLimit = ref<number>(50);
|
||||||
const columnWidth = ref<number>(280);
|
const columnWidth = ref<number>(280);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user