diff --git a/cista/auth.py b/cista/auth.py index 7e5f976..b0faa12 100644 --- a/cista/auth.py +++ b/cista/auth.py @@ -1293,9 +1293,7 @@ def _token_belongs_to_user(token, username, sso_user_id): def _is_anonymous_share_token(token: config.Token) -> bool: return ( - sharefs.is_share_token(token) - and not token.username - and not token.sso_user_id + sharefs.is_share_token(token) and not token.username and not token.sso_user_id ) diff --git a/frontend/src/App.vue b/frontend/src/App.vue index 22d58b6..4e60ca2 100644 --- a/frontend/src/App.vue +++ b/frontend/src/App.vue @@ -58,13 +58,13 @@ import Router from '@/router/index' import { computed } from 'vue' import AboutModal from './components/AboutModal.vue' import AccessDeniedModal from './components/AccessDeniedModal.vue' -import ExplorerView from './views/ExplorerView.vue' import SelectionToolbar from './components/SelectionToolbar.vue' -import TextEditorView from './views/TextEditorView.vue' import type SettingsModalVue from './components/SettingsModal.vue' import UserManagementModal from './components/UserManagementModal.vue' import UserTokensModal from './components/UserTokensModal.vue' import type { SortOrder } from './utils/docsort' +import ExplorerView from './views/ExplorerView.vue' +import TextEditorView from './views/TextEditorView.vue' interface Path { path: string @@ -78,7 +78,9 @@ interface Path { const store = useMainStore() const getDocByPath = (fullPath: string) => - getDocuments().find(doc => (doc.loc ? `${doc.loc}/${doc.name}` : doc.name) === fullPath) + getDocuments().find( + doc => (doc.loc ? `${doc.loc}/${doc.name}` : doc.name) === fullPath + ) const path: ComputedRef = computed(() => { const p = decodeURIComponent(Router.currentRoute.value.path).split('//') @@ -90,11 +92,7 @@ const path: ComputedRef = computed(() => { void store.docVersion const doc = fullPath ? getDocByPath(fullPath) : null const isEditorPath = !!(doc && !doc.dir && doc.text) - const canonicalBase = !fullPath - ? '/' - : doc?.dir - ? `/${fullPath}/` - : `/${fullPath}` + const canonicalBase = !fullPath ? '/' : doc?.dir ? `/${fullPath}/` : `/${fullPath}` const canonicalPath = query ? rawPath // keep search URL shape untouched : canonicalBase @@ -128,14 +126,10 @@ const routeViewComponent = computed(() => path.value.isEditorPath ? TextEditorView : ExplorerView ) const routeViewKey = computed(() => { - return path.value.isEditorPath - ? `editor:${path.value.path}` - : 'explorer' + return path.value.isEditorPath ? `editor:${path.value.path}` : 'explorer' }) const routeViewProps = computed(() => - path.value.isEditorPath - ? {} - : { path: path.value.pathList, query: path.value.query } + path.value.isEditorPath ? {} : { path: path.value.pathList, query: path.value.query } ) watch( () => path.value.canonicalPath, diff --git a/frontend/src/components/BreadCrumb.vue b/frontend/src/components/BreadCrumb.vue index c0b27fd..3d461e3 100644 --- a/frontend/src/components/BreadCrumb.vue +++ b/frontend/src/components/BreadCrumb.vue @@ -122,8 +122,7 @@ watchEffect(() => { if (!same) { longest.value = props.path longestLinks.value = currentLinks - } - else if (props.path.length > longcut.length) { + } else if (props.path.length > longcut.length) { longest.value = longcut.concat(props.path.slice(longcut.length)) longestLinks.value.splice(0, currentLinks.length, ...currentLinks) } else { diff --git a/frontend/src/components/DiskSpace.vue b/frontend/src/components/DiskSpace.vue index f34551a..0d19af8 100644 --- a/frontend/src/components/DiskSpace.vue +++ b/frontend/src/components/DiskSpace.vue @@ -104,7 +104,9 @@ const showOtherCategory = computed(() => { return !!s.disk && otherBytes.value / s.disk >= 0.01 }) const freeSliceBytes = computed(() => - showOtherCategory.value ? store.space.free : Math.max(0, store.space.disk - store.space.allocated) + showOtherCategory.value + ? store.space.free + : Math.max(0, store.space.disk - store.space.allocated) ) // Calculate max label length based on angular gap to neighbor labels @@ -295,7 +297,11 @@ const freeLabelPath = computed(() => createArcPath(adjustedLabelAngles.value.free!, 'free', 4) ) const otherLabelPath = computed(() => - createArcPath(adjustedLabelAngles.value.other ?? sectorInfo.value.other.angle, 'other', 5) + createArcPath( + adjustedLabelAngles.value.other ?? sectorInfo.value.other.angle, + 'other', + 5 + ) ) const handleClick = () => (isExpanded.value ? collapse() : expand()) diff --git a/frontend/src/views/TextEditorView.vue b/frontend/src/views/TextEditorView.vue index 4e5a2a1..4bb7112 100644 --- a/frontend/src/views/TextEditorView.vue +++ b/frontend/src/views/TextEditorView.vue @@ -9,6 +9,8 @@