diff --git a/src/App.tsx b/src/App.tsx index 3771fb9..92579b9 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -1,5 +1,5 @@ -import { Route, Routes } from "@solidjs/router"; -import { NotificationsProvider, HopeProvider, Box } from "@hope-ui/solid"; +import { Link, Route, Routes } from "@solidjs/router"; +import { NotificationsProvider, HopeProvider, Box, Heading, Anchor, Button } from "@hope-ui/solid"; import { useStore } from "@nanostores/solid"; import { $files } from "./stores/media"; import { ErrorBoundary, Match, onMount, Switch } from "solid-js"; @@ -14,6 +14,36 @@ import { ViewPort } from "./components/ViewPort"; const { ipcRenderer } = window.require("electron"); +function ErrorScreen(props: { err: Error }) { + return ( + + Какая-то ошибка + + + Какая-то рантайм ошибка, скорее всего потому, что разработчик сделал что-то хуево.
+ Если возникает часто и хочется фикса, можно создать ишью{" "} + + гитхабе + {" "} + программы. +
+ + + + Отладочная инфа + + + {props.err?.name} + {props.err?.cause as never} + {props.err?.message} + {props.err?.stack} + +
+ ); +} + function Routing() { return ( @@ -38,7 +68,7 @@ export function App() { - {err.toString()}}> + }> diff --git a/src/components/FilePreview.tsx b/src/components/FilePreview.tsx index 127b1b1..45f8552 100644 --- a/src/components/FilePreview.tsx +++ b/src/components/FilePreview.tsx @@ -116,25 +116,13 @@ export function FilePreview(props: FilePreviewProps) { - {isImage() && ( - preview image setIsLoading(false)} - onError={() => setIsLoadingFailed(true)} - /> - )} - - {isImage() || ( -