diff --git a/applications/uk.ewsgit.files/web/layout/components/StatusBar/StatusBar.tsx b/applications/uk.ewsgit.files/web/layout/components/StatusBar/StatusBar.tsx index 71674f8..87338bb 100644 --- a/applications/uk.ewsgit.files/web/layout/components/StatusBar/StatusBar.tsx +++ b/applications/uk.ewsgit.files/web/layout/components/StatusBar/StatusBar.tsx @@ -1,15 +1,14 @@ +import VIEW_REAL_SIZE_ICON from "@material-symbols/svg-700/outlined/view_real_size.svg"; +import ZOOM_IN_ICON from "@material-symbols/svg-700/outlined/zoom_in.svg"; +import ZOOM_OUT_ICON from "@material-symbols/svg-700/outlined/zoom_out.svg"; +import UKIconButton from "@onlineworkspace/uikit-solid/src/components/iconButton/UKIconButton.jsx"; import UKLinearProgressIndicator from "@onlineworkspace/uikit-solid/src/components/linearProgressIndicator/UKLinearProgressIndicator.tsx"; import UKText from "@onlineworkspace/uikit-solid/src/components/text/UKText.tsx"; -import {type Component, createEffect, createSignal, onCleanup, onMount, useContext} from "solid-js"; +import clsx from "clsx"; +import {type Component, createEffect, createSignal, useContext} from "solid-js"; import {AppContext} from "../../../appContext.ts"; import humanReadableSize from "../../../lib/humanReadableSize.ts"; import styles from "./StatusBar.module.scss"; -import clsx from "clsx"; -import UKButtonGroup from "@onlineworkspace/uikit-solid/src/components/buttonGroup/UKButtonGroup.jsx"; -import UKIconButton from "@onlineworkspace/uikit-solid/src/components/iconButton/UKIconButton.jsx"; -import ZOOM_IN_ICON from "@material-symbols/svg-700/outlined/zoom_in.svg" -import ZOOM_OUT_ICON from "@material-symbols/svg-700/outlined/zoom_out.svg" -import VIEW_REAL_SIZE_ICON from "@material-symbols/svg-700/outlined/view_real_size.svg" const StatusBar: Component = () => { const appContext = useContext(AppContext); @@ -52,7 +51,7 @@ const StatusBar: Component = () => { } if (outputString === "") { - outputString = "Empty directory" + outputString = "Empty directory"; } setDirContents(outputString); @@ -62,24 +61,26 @@ const StatusBar: Component = () => { for (const task of appContext?.tasks() || []) { if (task.current === task.max) { setTimeout(() => { - appContext?.setTasks(tasks => tasks.map(t => { - if (t.id === task.id) { - return { - ...t, - invalid: true + appContext?.setTasks((tasks) => + tasks.map((t) => { + if (t.id === task.id) { + return { + ...t, + invalid: true, + }; } - } - return t - })) + return t; + }), + ); setTimeout(() => { - appContext?.setTasks(tasks => tasks.filter(t => t.id !== task.id)) - }, 250) - }, 1000) + appContext?.setTasks((tasks) => tasks.filter((t) => t.id !== task.id)); + }, 250); + }, 1000); } } - }) + }); return (
@@ -87,16 +88,34 @@ const StatusBar: Component = () => { {dirContents()}
-
+
{appContext!.tasks()[ 0 ]?.message.replaceAll("%c", appContext!.tasks()[ 0 ].current.toString()).replaceAll("%m", appContext!.tasks()[ 0 ].max.toString())}
- appContext?.setUserPreferences("zoomPercentage", appContext.userPreferences.zoomPercentage + 0.2)} /> - appContext?.setUserPreferences("zoomPercentage", 1)} /> - appContext?.setUserPreferences("zoomPercentage", Math.max(appContext.userPreferences.zoomPercentage - 0.2, 0.2))} /> + appContext?.setUserPreferences("zoomPercentage", Math.max(appContext.userPreferences.zoomPercentage - 0.2, 0.2))} + /> + appContext?.setUserPreferences("zoomPercentage", 1)} + /> + appContext?.setUserPreferences("zoomPercentage", appContext.userPreferences.zoomPercentage + 0.2)} + />
); diff --git a/applications/uk.ewsgit.files/web/pages/dir/components/GalleryView/GalleryView.module.scss b/applications/uk.ewsgit.files/web/pages/dir/components/GalleryView/GalleryView.module.scss index b5dfdae..b7aef2e 100644 --- a/applications/uk.ewsgit.files/web/pages/dir/components/GalleryView/GalleryView.module.scss +++ b/applications/uk.ewsgit.files/web/pages/dir/components/GalleryView/GalleryView.module.scss @@ -70,13 +70,29 @@ height: 100%; display: flex; flex-direction: column; - justify-content: center; + justify-content: end; } .galleryPreviewMainImage { max-width: 100%; max-height: 100%; } + + .galleryHeaderBackButton { + position: absolute; + left: 0.5rem; + top: 50%; + transform: translateY(-50%); + z-index: 5; + } + + .galleryHeaderForwardsButton { + position: absolute; + right: 0.5rem; + top: 50%; + transform: translateY(-50%); + z-index: 5; + } } .galleryItemsGrid { diff --git a/applications/uk.ewsgit.files/web/pages/dir/components/GalleryView/GalleryView.tsx b/applications/uk.ewsgit.files/web/pages/dir/components/GalleryView/GalleryView.tsx index 1a07d71..3cc0055 100644 --- a/applications/uk.ewsgit.files/web/pages/dir/components/GalleryView/GalleryView.tsx +++ b/applications/uk.ewsgit.files/web/pages/dir/components/GalleryView/GalleryView.tsx @@ -1,36 +1,38 @@ +import ICON_CHEVRON_LEFT from "@material-symbols/svg-700/outlined/chevron_left.svg"; +import ICON_CHEVRON_RIGHT from "@material-symbols/svg-700/outlined/chevron_right.svg"; import UKCard from "@onlineworkspace/uikit-solid/src/components/card/UKCard.jsx"; import UKIcon from "@onlineworkspace/uikit-solid/src/components/icon/UKIcon.jsx"; +import UKIconButton from "@onlineworkspace/uikit-solid/src/components/iconButton/UKIconButton.jsx"; +import UKText from "@onlineworkspace/uikit-solid/src/components/text/UKText.jsx"; import clsx from "clsx"; import browserPath from "path-browserify"; import {type Component, createEffect, createResource, For, useContext} from "solid-js"; import {AppContext} from "../../../../appContext"; +import filesystemInterface from "../../../../lib/filesystemInterface"; +import trpc from "../../../../lib/trpc"; import iconForItemType from "../../iconForItemType"; import onItemClick from "../../itemClick"; import styles from "./GalleryView.module.scss"; -import trpc from "../../../../lib/trpc"; -import filesystemInterface from "../../../../lib/filesystemInterface"; -import UKText from "@onlineworkspace/uikit-solid/src/components/text/UKText.jsx"; const GalleryView: Component = () => { const appContext = useContext(AppContext); const [ galleryPreviewMainImage, {refetch: refetchGalleryPreviewMainImage} ] = createResource(() => { // @ts-ignore - const parsedPath = filesystemInterface.urlToPath(appContext?.viewState.selectedItems?.[ 0 ] || "") + const parsedPath = filesystemInterface.urlToPath(appContext?.viewState.selectedItems?.[ 0 ] || ""); if (parsedPath.type === "remote") { - return trpc.view.getGalleryItem.query({height: 768, path: parsedPath.path || undefined}) + return trpc.view.getGalleryItem.query({height: 768, path: parsedPath.path || undefined}); } - alert("this view is unsupported on this configuration") - return {image: "/assets/generic_background.svg", dimensions: {width: 0, height: 0}} - } - ) + alert("this view is unsupported on this configuration"); + return {image: "/assets/generic_background.svg", dimensions: {width: 0, height: 0}}; + }); createEffect(() => { appContext?.viewState.selectedItems; refetchGalleryPreviewMainImage(); - }) + }); return (
@@ -39,11 +41,20 @@ const GalleryView: Component = () => {
+ 0} class={styles.galleryHeaderBackButton} /> + 0} class={styles.galleryHeaderForwardsButton} />
- Filename.ext + + Filename.ext +
- +
@@ -75,6 +86,7 @@ const GalleryView: Component = () => { ) : ( {iconForItemType(item.type)} )} + {item.type === "directory" && browserPath.basename(item.path)} ); }} diff --git a/instance/src/systems/users.ts b/instance/src/systems/users.ts index 7438847..6d1a332 100644 --- a/instance/src/systems/users.ts +++ b/instance/src/systems/users.ts @@ -410,6 +410,7 @@ export class WorkspacesUser { "/assets/wallpapers", "/assets/wallpapers/resized", "/mounts", + "/recycle_bin", "/system", "/system/logs", "/system/temp",