Skip to content

Commit

Permalink
document title now reports current path
Browse files Browse the repository at this point in the history
  • Loading branch information
rejetto committed Dec 12, 2024
1 parent 14341b7 commit 4393f6f
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions frontend/src/BrowseFiles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@
import { Link, useNavigate } from 'react-router-dom'
import { createElement as h, Fragment, memo, MouseEvent, useCallback, useEffect, useMemo, useRef, useState,
useId} from 'react'
import { useEventListener, useMediaQuery, useWindowSize } from 'usehooks-ts'
import { useDocumentTitle, useEventListener, useMediaQuery, useWindowSize } from 'usehooks-ts'
import {
domOn, formatBytes, ErrorMsg, hIcon, onlyTruthy, noAriaTitle, prefix, isMac, isCtrlKey, hfsEvent, formatTimestamp
} from './misc'
import { Checkbox, CustomCode, iconBtn, Spinner } from './components'
import { Head } from './Head'
import { DirEntry, state, useSnapState } from './state'
import { alertDialog } from './dialog'
import useFetchList from './useFetchList'
import useFetchList, { usePath } from './useFetchList'
import { useAuthorized } from './login'
import { acceptDropFiles } from './upload'
import { enqueueUpload } from './uploadQueue'
Expand All @@ -24,8 +24,10 @@ const { t, useI18N } = i18n

export const MISSING_PERM = "Missing permission"

const originalTitle = document.title
export function BrowseFiles() {
useFetchList()
useDocumentTitle(originalTitle + ' ' + decodeURIComponent(usePath()).slice(1, -1))
const { error } = useSnapState()
const { props, tile_size=0 } = useSnapState()
const propsDropFiles = useMemo(() => ({
Expand Down

0 comments on commit 4393f6f

Please sign in to comment.