Skip to content

Commit

Permalink
en-lang-restore
Browse files Browse the repository at this point in the history
  • Loading branch information
li-peifeng committed Jan 26, 2025
1 parent 01a6a72 commit 1b2a418
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 19 deletions.
2 changes: 1 addition & 1 deletion src/pages/home/previews/download.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ export const Download = (props: { openWith?: boolean }) => {
<Image
maxWidth="156px"
src={qrUrl()}
alt="下载链接二维码"
alt="QR-Code_链接二维码"
objectFit="cover"
/>
</PopoverBody>
Expand Down
30 changes: 15 additions & 15 deletions src/pages/home/previews/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,75 +32,75 @@ export type PreviewComponent = Pick<Preview, "name" | "component">

const previews: Preview[] = [
{
name: "HTML 渲染",
name: "HTML_网页",
exts: ["html"],
component: lazy(() => import("./html")),
},
{
name: "在线阿里视频",
name: "AliVideo_阿里视频",
type: ObjType.VIDEO,
provider: /^Aliyundrive(Open)?$/,
component: lazy(() => import("./aliyun_video")),
},
{
name: "Markdown 在线预览",
name: "Markdown_文档",
type: ObjType.TEXT,
component: lazy(() => import("./markdown")),
},
{
name: "Markdown 自动换行",
name: "Markdown-Wrap_自动换行",
type: ObjType.TEXT,
component: lazy(() => import("./markdown_with_word_wrap")),
},
{
name: "打开 URL",
name: "URL_网址",
exts: ["url"],
component: lazy(() => import("./url")),
},
{
name: "TXT 在线预览",
name: "TXT_文档",
type: ObjType.TEXT,
exts: ["url"],
component: lazy(() => import("./text-editor")),
},
{
name: "在线图片预览",
name: "Image_相片",
type: ObjType.IMAGE,
component: lazy(() => import("./image")),
},
{
name: "在线视频播放",
name: "Video_视频",
type: ObjType.VIDEO,
component: lazy(() => import("./video")),
},
{
name: "在线播放音乐",
name: "Audio_音频",
type: ObjType.AUDIO,
component: lazy(() => import("./audio")),
},
{
name: "IPA 文件",
name: "IPA_iOS",
exts: ["ipa", "tipa"],
component: lazy(() => import("./ipa")),
},
{
name: "PLIST 文件",
name: "PLIST",
exts: ["plist"],
component: lazy(() => import("./plist")),
},
{
name: "在线办公文档",
name: "Office_办公文档",
exts: ["doc", "docx", "ppt", "pptx", "xls", "xlsx", "pdf"],
provider: /^Aliyundrive(Share)?$/,
component: lazy(() => import("./aliyun_office")),
},
{
name: "播放终端录屏",
name: "Cast_录屏",
exts: ["cast"],
component: lazy(() => import("./asciinema")),
},
{
name: "压缩文件预览",
name: "Archive_压缩文档",
exts: () => {
const index = UserPermissions.findIndex(
(item) => item === "read_archives",
Expand Down Expand Up @@ -142,7 +142,7 @@ export const getPreviews = (
})
// download page
res.push({
name: "下载保存文件",
name: "Download_下载保存",
component: lazy(() => import("./download")),
})
return res
Expand Down
3 changes: 2 additions & 1 deletion src/pages/home/toolbar/LocalSettings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import { For, Match, onCleanup, Switch } from "solid-js"
import { useT } from "~/hooks"
import { initialLocalSettings, local, LocalSetting, setLocal } from "~/store"
import { bus } from "~/utils"
import { SwitchColorMode } from "~/components"
import { SwitchLanguageWhite, SwitchColorMode } from "~/components"
import { Icon } from "@hope-ui/solid"
import { notificationService } from "@hope-ui/solid"
import { VsActivateBreakpoints as Auto } from "solid-icons/vs"
Expand Down Expand Up @@ -139,6 +139,7 @@ export const LocalSettings = () => {
}, 2500)
}}
/>
<SwitchLanguageWhite />
</HStack>
</Center>
</DrawerBody>
Expand Down
3 changes: 3 additions & 0 deletions src/pages/login/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import {
Icon,
} from "@hope-ui/solid"
import { createMemo, createSignal, Show } from "solid-js"
import { SwitchColorMode, SwitchLanguageWhite } from "~/components"
import { useFetch, useT, useTitle, useRouter } from "~/hooks"
import {
changeToken,
Expand Down Expand Up @@ -307,6 +308,8 @@ const Login = () => {
color="$neutral10"
w="$full"
>
<SwitchLanguageWhite />
<SwitchColorMode />
<SSOLogin />
<Show when={AuthnSignEnabled}>
<Icon
Expand Down
10 changes: 8 additions & 2 deletions src/pages/manage/index.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { Box, Center, Flex, HStack, useColorModeValue } from "@hope-ui/solid"
import { FullLoading } from "~/components"
import { SwitchColorMode, SwitchLanguageWhite } from "~/components"
import { useT, useTitle } from "~/hooks"
import { Header } from "./Header"
import { SideMenu } from "./SideMenu"
import { side_menu_items } from "./sidemenu_items"
import { Route, Routes } from "@solidjs/router"
import { For, Suspense } from "solid-js"
import { For } from "solid-js"
import { routes } from "./routes"

const Manage = () => {
Expand All @@ -30,6 +30,12 @@ const Manage = () => {
overflowY="auto"
>
<SideMenu items={side_menu_items} />
<Center>
<HStack spacing="$4" p="$2" color="$neutral11">
<SwitchLanguageWhite />
<SwitchColorMode />
</HStack>
</Center>
</Box>
<Box
w={{
Expand Down

0 comments on commit 1b2a418

Please sign in to comment.