Compare commits
14 Commits
1ffe6a8a52
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
84cbf588e0 | ||
|
|
6d3cb4f4b3 | ||
|
|
b8447640df | ||
|
|
6f155f8238 | ||
|
|
e77b0d7978 | ||
|
|
59d39fbc11 | ||
|
|
18d98a25f9 | ||
|
|
15992bd1a8 | ||
|
|
d05cde8068 | ||
|
|
96aeebeee5 | ||
|
|
a0e791f2eb | ||
|
|
ea27514eac | ||
|
|
76671ed625 | ||
|
|
7519a81c88 |
63
index.html
63
index.html
@@ -1,6 +1,12 @@
|
||||
<!doctype html>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<!--
|
||||
Using LeonPan open source project.
|
||||
Powered by LeonCloud
|
||||
awa
|
||||
-->
|
||||
<link href="https://cdn.jsdelivr.net/npm/misans@4.1.0/lib/Latin/MiSansLatin-Medium.min.css" rel="stylesheet">
|
||||
<meta charset="utf-8" />
|
||||
<link rel="shortcut icon" href="{pwa_small_icon}" sizes="64x64" />
|
||||
<meta
|
||||
@@ -40,43 +46,39 @@
|
||||
transform: scale(0.8);
|
||||
animation: fadeIn 0.6s ease-out 0.3s forwards;
|
||||
}
|
||||
#app-loader .spinner {
|
||||
width: 28px;
|
||||
height: 28px;
|
||||
position: relative;
|
||||
#app-loader .progress-container {
|
||||
width: 200px;
|
||||
height: 4px;
|
||||
background-color: rgba(0, 0, 0, 0.1);
|
||||
border-radius: 2px;
|
||||
overflow: hidden;
|
||||
opacity: 0;
|
||||
transform: scale(0.8);
|
||||
animation: fadeIn 0.6s ease-out 0.3s forwards;
|
||||
}
|
||||
#app-loader .spinner {
|
||||
display: inline-block;
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
}
|
||||
#app-loader .spinner svg {
|
||||
display: block;
|
||||
}
|
||||
#app-loader .spinner .stroke {
|
||||
stroke: var(--defaultThemeColor);
|
||||
stroke-linecap: round;
|
||||
animation: spinDash 1.4s ease-in-out infinite;
|
||||
}
|
||||
#app-loader .spinner .background {
|
||||
stroke: rgba(0, 0, 0, 0.1)
|
||||
#app-loader .progress-bar {
|
||||
height: 100%;
|
||||
background-color: var(--defaultThemeColor);
|
||||
border-radius: 2px;
|
||||
animation: linearProgress 1.5s infinite ease-in-out;
|
||||
}
|
||||
|
||||
@keyframes spinDash {
|
||||
@keyframes linearProgress {
|
||||
0% {
|
||||
stroke-dasharray: 1px, 200px;
|
||||
stroke-dashoffset: 0;
|
||||
transform: translateX(-100%);
|
||||
width: 50%;
|
||||
}
|
||||
50% {
|
||||
stroke-dasharray: 100px, 200px;
|
||||
stroke-dashoffset: -15px;
|
||||
transform: translateX(100%);
|
||||
width: 50%;
|
||||
}
|
||||
51% {
|
||||
transform: translateX(100%);
|
||||
width: 50%;
|
||||
}
|
||||
100% {
|
||||
stroke-dasharray: 1px, 200px;
|
||||
stroke-dashoffset: -126px;
|
||||
transform: translateX(-100%);
|
||||
width: 50%;
|
||||
}
|
||||
}
|
||||
@keyframes fadeIn {
|
||||
@@ -91,11 +93,8 @@
|
||||
<noscript>You need to enable JavaScript to run this app.</noscript>
|
||||
<div id="app-loader">
|
||||
<div class="logo"></div>
|
||||
<div class="spinner">
|
||||
<svg viewBox="22 22 44 44">
|
||||
<circle class="background" cx="44" cy="44" r="20" fill="none" stroke-width="4"></circle>
|
||||
<circle class="stroke" cx="44" cy="44" r="20" fill="none" stroke-width="4"></circle>
|
||||
</svg>
|
||||
<div class="progress-container">
|
||||
<div class="progress-bar"></div>
|
||||
</div>
|
||||
</div>
|
||||
<script async type="module" src="/src/main.tsx"></script>
|
||||
|
||||
@@ -404,6 +404,7 @@
|
||||
"deleteViewSetting": "Delete view setting"
|
||||
},
|
||||
"modals": {
|
||||
"scanQRCodeToAccess": "Scan QR Code to Access",
|
||||
"includePasswordInShareLink": "Include password in share link",
|
||||
"includePasswordInShareLinkDes": "If selected, password will be included in the share link, and no password is required when accessing the share link.",
|
||||
"showFileName": "Show file name",
|
||||
|
||||
@@ -404,6 +404,7 @@
|
||||
"deleteViewSetting": "删除视图设置"
|
||||
},
|
||||
"modals": {
|
||||
"scanQRCodeToAccess": "扫描二维码访问分享链接",
|
||||
"includePasswordInShareLink": "在链接中包含密码",
|
||||
"includePasswordInShareLinkDes": "勾选后,分享链接中会包含密码,通过此链接访问时不需要再输入密码。",
|
||||
"showFileName": "显示文件名",
|
||||
|
||||
45
src/App.tsx
45
src/App.tsx
@@ -24,11 +24,20 @@ export const applyThemeWithOverrides = (themeConfig: ThemeOptions): ThemeOptions
|
||||
...themeConfig.shape,
|
||||
borderRadius: 4,
|
||||
},
|
||||
typography: {
|
||||
...themeConfig.typography,
|
||||
fontFamily:
|
||||
'"MiSans", -apple-system, BlinkMacSystemFont, "ZCOOL QingKe HuangYou", "Inter", "Hiragino Sans GB", "Microsoft YaHei", sans-serif',
|
||||
},
|
||||
components: {
|
||||
MuiCssBaseline: {
|
||||
styleOverrides: {
|
||||
body: {
|
||||
overscrollBehavior: "none",
|
||||
fontFamily: '"MiSans", sans-serif',
|
||||
},
|
||||
html: {
|
||||
fontFamily: '"MiSans", sans-serif',
|
||||
},
|
||||
},
|
||||
},
|
||||
@@ -53,6 +62,35 @@ export const applyThemeWithOverrides = (themeConfig: ThemeOptions): ThemeOptions
|
||||
styleOverrides: {
|
||||
root: {
|
||||
textTransform: "none",
|
||||
borderRadius: 4,
|
||||
border: "1px solid transparent",
|
||||
transition: "all 0.2s ease",
|
||||
minWidth: 48,
|
||||
minHeight: 32,
|
||||
padding: "4px 12px",
|
||||
"&:hover": {
|
||||
backgroundColor: "rgba(0, 0, 0, 0.04)",
|
||||
},
|
||||
"&.Mui-selected": {
|
||||
backgroundColor: "rgba(25, 118, 210, 0.1)",
|
||||
color: "rgb(25, 118, 210)",
|
||||
borderColor: "rgba(25, 118, 210, 0.3)",
|
||||
"&:hover": {
|
||||
backgroundColor: "rgba(25, 118, 210, 0.15)",
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
MuiToggleButtonGroup: {
|
||||
styleOverrides: {
|
||||
grouped: {
|
||||
margin: 2,
|
||||
border: 0,
|
||||
borderRadius: 4,
|
||||
"&.Mui-disabled": {
|
||||
border: 0,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
@@ -64,7 +102,12 @@ export const applyThemeWithOverrides = (themeConfig: ThemeOptions): ThemeOptions
|
||||
},
|
||||
defaultProps: {
|
||||
disableElevation: true,
|
||||
disableRipple: false,
|
||||
disableRipple: true,
|
||||
},
|
||||
},
|
||||
MuiButtonBase: {
|
||||
defaultProps: {
|
||||
disableRipple: true,
|
||||
},
|
||||
},
|
||||
MuiAlert: {
|
||||
|
||||
@@ -72,35 +72,34 @@ const ProDialog = ({ open, onClose }: ProDialogProps) => {
|
||||
>
|
||||
<DialogContent>
|
||||
<Typography variant="body1" color="text.secondary">
|
||||
{t("pro.description")}
|
||||
</Typography>
|
||||
|
||||
<Typography variant="body1" fontWeight={600} sx={{ mt: 2 }}>
|
||||
{t("pro.proInclude")}
|
||||
Cloudreve的sb pro玩意
|
||||
</Typography>
|
||||
|
||||
<List dense>
|
||||
{features.map((feature) => (
|
||||
<ListItem key={feature}>
|
||||
<ListItemIcon
|
||||
sx={{
|
||||
minWidth: "36px",
|
||||
}}
|
||||
>
|
||||
<CheckmarkCircleFilled color="primary" />
|
||||
</ListItemIcon>
|
||||
<ListItemText
|
||||
slotProps={{
|
||||
primary: {
|
||||
sx: {},
|
||||
variant: "body1",
|
||||
},
|
||||
}}
|
||||
>
|
||||
{t(`pro.${feature}`)}
|
||||
</ListItemText>
|
||||
</ListItem>
|
||||
))}
|
||||
<ListItem>
|
||||
<ListItemText
|
||||
slotProps={{
|
||||
primary: {
|
||||
sx: {},
|
||||
variant: "body1",
|
||||
},
|
||||
}}
|
||||
>
|
||||
谁用Pro我骂谁
|
||||
</ListItemText>
|
||||
</ListItem>
|
||||
<ListItem>
|
||||
<ListItemText
|
||||
slotProps={{
|
||||
primary: {
|
||||
sx: {},
|
||||
variant: "body1",
|
||||
},
|
||||
}}
|
||||
>
|
||||
写代码程序猿万岁!
|
||||
</ListItemText>
|
||||
</ListItem>
|
||||
</List>
|
||||
{showPromotion && (
|
||||
<Alert
|
||||
@@ -128,11 +127,8 @@ const ProDialog = ({ open, onClose }: ProDialogProps) => {
|
||||
}}
|
||||
>
|
||||
<Button variant="outlined" color="primary" onClick={onClose}>
|
||||
{t("pro.later")}
|
||||
好的,我现在就写代码
|
||||
</Button>
|
||||
<StyledButton onClick={openMore} variant="contained" color="primary">
|
||||
{t("pro.learnMore")}
|
||||
</StyledButton>
|
||||
</StyledDialogActions>
|
||||
</DraggableDialog>
|
||||
);
|
||||
|
||||
@@ -1,39 +1,27 @@
|
||||
import { Box, CircularProgress, circularProgressClasses, CircularProgressProps } from "@mui/material";
|
||||
import { Box } from "@mui/material";
|
||||
import { forwardRef } from "react";
|
||||
import LinearProgressComponent from "./LinearProgress";
|
||||
|
||||
export interface FacebookCircularProgressProps extends CircularProgressProps {
|
||||
bgColor?: string;
|
||||
export interface FacebookCircularProgressProps {
|
||||
sx?: any;
|
||||
color?: string;
|
||||
size?: number;
|
||||
thickness?: number;
|
||||
fgColor?: string;
|
||||
}
|
||||
|
||||
const FacebookCircularProgress = forwardRef(({ sx, bgColor, fgColor, ...rest }: FacebookCircularProgressProps, ref) => {
|
||||
const FacebookCircularProgress = forwardRef(({ sx, color, fgColor }: FacebookCircularProgressProps, ref) => {
|
||||
return (
|
||||
<Box sx={{ position: "relative", ...sx }} ref={ref}>
|
||||
<CircularProgress
|
||||
variant="determinate"
|
||||
sx={{
|
||||
color: (theme) => bgColor ?? theme.palette.grey[theme.palette.mode === "light" ? 200 : 800],
|
||||
}}
|
||||
size={40}
|
||||
thickness={4}
|
||||
{...rest}
|
||||
value={100}
|
||||
/>
|
||||
<CircularProgress
|
||||
sx={{
|
||||
color: (theme) => fgColor ?? theme.palette.primary.main,
|
||||
position: "absolute",
|
||||
left: 0,
|
||||
[`& .${circularProgressClasses.circle}`]: {
|
||||
strokeLinecap: "round",
|
||||
},
|
||||
}}
|
||||
size={40}
|
||||
thickness={4}
|
||||
{...rest}
|
||||
/>
|
||||
<Box sx={{ display: "flex", justifyContent: "center", alignItems: "center", ...sx }} ref={ref}>
|
||||
<LinearProgressComponent color={color || fgColor} height={8} />
|
||||
</Box>
|
||||
);
|
||||
});
|
||||
|
||||
export default FacebookCircularProgress;
|
||||
|
||||
// === 耻辱榜 ===
|
||||
// csc禁止狗叫
|
||||
// 要不然你的传奇事迹将在这几行注释里留存一辈子
|
||||
// 2025/10/26
|
||||
// === 永久留存 禁止删除 ===
|
||||
|
||||
@@ -8,7 +8,11 @@ function ErrorBoundary() {
|
||||
// Uncaught ReferenceError: path is not defined
|
||||
return (
|
||||
<div style={{ padding: 16 }}>
|
||||
<h1 style={{ color: "#a4a4a4", margin: "5px 0px" }}>:(</h1>
|
||||
<h1 style={{ color: "#a4a4a4", margin: "5px 0px" }}>:) OHH FUCKING YES!!!</h1>
|
||||
<p>LeonPan发生了一些意想不到的错误</p>
|
||||
<p>
|
||||
请反馈到<a href="http://leonmmcoset.jjxmm.win:2000/leonmmcoset/leonpan-assets/issues">LeonGit Issues</a>
|
||||
</p>
|
||||
<h2 style={{ margin: "15px 0px" }}>{t("common:renderError")}</h2>
|
||||
{!!error && (
|
||||
<details>
|
||||
@@ -23,6 +27,8 @@ function ErrorBoundary() {
|
||||
)}
|
||||
</details>
|
||||
)}
|
||||
<hr />
|
||||
<p>前端又要忙活了(</p>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
30
src/component/Common/LinearProgress.tsx
Normal file
30
src/component/Common/LinearProgress.tsx
Normal file
@@ -0,0 +1,30 @@
|
||||
import { Box, LinearProgress, linearProgressClasses } from "@mui/material";
|
||||
import { forwardRef } from "react";
|
||||
|
||||
export interface LinearProgressProps {
|
||||
color?: string;
|
||||
height?: number;
|
||||
}
|
||||
|
||||
const LinearProgressComponent = forwardRef(({ color, height = 8, ...rest }: LinearProgressProps, ref) => {
|
||||
return (
|
||||
<Box sx={{ width: "100%", maxWidth: 200, ...rest }} ref={ref}>
|
||||
<LinearProgress
|
||||
variant="indeterminate"
|
||||
sx={{
|
||||
height: height,
|
||||
borderRadius: height / 2,
|
||||
[`&.${linearProgressClasses.colorPrimary}`]: {
|
||||
backgroundColor: (theme) => theme.palette.grey[theme.palette.mode === "light" ? 200 : 800],
|
||||
},
|
||||
[`& .${linearProgressClasses.bar}`]: {
|
||||
borderRadius: height / 2,
|
||||
backgroundColor: color || ((theme) => theme.palette.primary.main),
|
||||
},
|
||||
}}
|
||||
/>
|
||||
</Box>
|
||||
);
|
||||
});
|
||||
|
||||
export default LinearProgressComponent;
|
||||
@@ -1,4 +1,16 @@
|
||||
import { Box, Checkbox, Collapse, DialogContent, IconButton, Stack, Tooltip, useTheme } from "@mui/material";
|
||||
import {
|
||||
Box,
|
||||
Checkbox,
|
||||
Collapse,
|
||||
DialogContent,
|
||||
IconButton,
|
||||
Paper,
|
||||
Stack,
|
||||
Tooltip,
|
||||
Typography,
|
||||
useTheme,
|
||||
} from "@mui/material";
|
||||
import { QRCodeSVG } from "qrcode.react";
|
||||
import dayjs from "dayjs";
|
||||
import { TFunction } from "i18next";
|
||||
import React, { useCallback, useEffect, useMemo, useState } from "react";
|
||||
@@ -216,6 +228,17 @@ const ShareDialog = () => {
|
||||
},
|
||||
}}
|
||||
/>
|
||||
<Paper
|
||||
sx={{ mt: 2, p: 3, display: "flex", flexDirection: "column", alignItems: "center" }}
|
||||
elevation={1}
|
||||
>
|
||||
<Typography variant="subtitle2" sx={{ mb: 2 }}>
|
||||
{t("application:modals.scanQRCodeToAccess")}
|
||||
</Typography>
|
||||
<Box sx={{ bgcolor: "white", p: 2 }}>
|
||||
<QRCodeSVG value={finalShareLink} size={200} level="M" includeMargin />
|
||||
</Box>
|
||||
</Paper>
|
||||
{shareLinkPassword.password && (
|
||||
<>
|
||||
<Collapse in={!includePassword}>
|
||||
|
||||
@@ -6,7 +6,7 @@ import { useAppDispatch, useAppSelector } from "../../../redux/hooks.ts";
|
||||
import { ConfigLoadState } from "../../../redux/siteConfigSlice.ts";
|
||||
import { openEmptyContextMenu } from "../../../redux/thunks/filemanager.ts";
|
||||
import { loadSiteConfig } from "../../../redux/thunks/site.ts";
|
||||
import CircularProgress from "../../Common/CircularProgress.tsx";
|
||||
import FacebookCircularProgress from "../../Common/CircularProgress.tsx";
|
||||
import "../../Common/FadeTransition.css";
|
||||
import { RadiusFrame } from "../../Frame/RadiusFrame.tsx";
|
||||
import ExplorerError from "./ExplorerError.tsx";
|
||||
@@ -137,7 +137,7 @@ const Explorer = () => {
|
||||
alignItems: "center",
|
||||
}}
|
||||
>
|
||||
<CircularProgress />
|
||||
<FacebookCircularProgress />
|
||||
</Box>
|
||||
)}
|
||||
{index == ExplorerPage.GridView && <GridView />}
|
||||
|
||||
@@ -1,12 +1,11 @@
|
||||
import { Box, Container, Grid, Paper, AppBar, Toolbar, IconButton, Typography, Button } from "@mui/material";
|
||||
import MenuIcon from "@mui/icons-material/Menu";
|
||||
import { Box, Container, Grid, Paper, Typography, Button } from "@mui/material";
|
||||
import { Outlet, useNavigation } from "react-router-dom";
|
||||
import { useAppDispatch, useAppSelector } from "../../redux/hooks.ts";
|
||||
import AutoHeight from "../Common/AutoHeight.tsx";
|
||||
import CircularProgress from "../Common/CircularProgress.tsx";
|
||||
import Logo from "../Common/Logo.tsx";
|
||||
import LanguageSwitcher from "../Common/LanguageSwitcher.tsx";
|
||||
import PoweredBy from "./PoweredBy.tsx";
|
||||
import { useAppDispatch, useAppSelector } from "../../redux/hooks";
|
||||
import AutoHeight from "../Common/AutoHeight";
|
||||
import CircularProgress from "../Common/CircularProgress";
|
||||
import Logo from "../Common/Logo";
|
||||
import LanguageSwitcher from "../Common/LanguageSwitcher";
|
||||
import PoweredBy from "./PoweredBy";
|
||||
|
||||
const Loading = () => {
|
||||
return (
|
||||
@@ -25,7 +24,7 @@ const Loading = () => {
|
||||
|
||||
const HeadlessFrame = () => {
|
||||
const loading = useAppSelector((state) => state.globalState.loading.headlessFrame);
|
||||
const { headless_footer, headless_bottom, sidebar_bottom } = useAppSelector(
|
||||
const { headlessFooter, headlessBottom } = useAppSelector(
|
||||
(state) => state.siteConfig.basic?.config?.custom_html ?? {},
|
||||
);
|
||||
const dispatch = useAppDispatch();
|
||||
@@ -41,35 +40,6 @@ const HeadlessFrame = () => {
|
||||
overflow: "auto",
|
||||
}}
|
||||
>
|
||||
<Box sx={{ flexGrow: 1 }}>
|
||||
<AppBar
|
||||
sx={{
|
||||
backgroundColor: "#f5f5f5",
|
||||
}}
|
||||
>
|
||||
<Toolbar>
|
||||
{/* <IconButton
|
||||
size="large"
|
||||
edge="start"
|
||||
color="inherit"
|
||||
aria-label="menu"
|
||||
sx={{ mr: 2 }}
|
||||
>
|
||||
<MenuIcon />
|
||||
</IconButton> */}
|
||||
{/* <Typography variant="h6" component="div" sx={{ flexGrow: 1 }}>
|
||||
News
|
||||
</Typography> */}
|
||||
<Logo
|
||||
sx={{
|
||||
maxWidth: "40%",
|
||||
maxHeight: "40px",
|
||||
mb: 2,
|
||||
}}
|
||||
/>
|
||||
</Toolbar>
|
||||
</AppBar>
|
||||
</Box>
|
||||
<Container maxWidth={"xs"}>
|
||||
<Grid
|
||||
container
|
||||
@@ -110,9 +80,9 @@ const HeadlessFrame = () => {
|
||||
}}
|
||||
>
|
||||
<Outlet />
|
||||
{headless_bottom && (
|
||||
{headlessBottom && (
|
||||
<Box sx={{ width: "100%" }}>
|
||||
<div dangerouslySetInnerHTML={{ __html: headless_bottom }} />
|
||||
<div dangerouslySetInnerHTML={{ __html: headlessBottom }} />
|
||||
</Box>
|
||||
)}
|
||||
</Box>
|
||||
@@ -122,9 +92,9 @@ const HeadlessFrame = () => {
|
||||
</Paper>
|
||||
</Box>
|
||||
<PoweredBy />
|
||||
{headless_footer && (
|
||||
{headlessFooter && (
|
||||
<Box sx={{ width: "100%", mb: 2 }}>
|
||||
<div dangerouslySetInnerHTML={{ __html: headless_footer }} />
|
||||
<div dangerouslySetInnerHTML={{ __html: headlessFooter }} />
|
||||
</Box>
|
||||
)}
|
||||
</Grid>
|
||||
|
||||
Reference in New Issue
Block a user