Skip to content

Commit

Permalink
fix: 移除联网功能
Browse files Browse the repository at this point in the history
  • Loading branch information
Shua-github committed Dec 29, 2024
1 parent d293798 commit 262ae70
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 73 deletions.
25 changes: 1 addition & 24 deletions src/App.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,28 +10,11 @@ import Switch from "@mui/material/Switch";
import Snackbar from '@mui/material/Snackbar';
import Picker from "./components/Picker";
import Info from "./components/Info";
import getConfiguration from "./utils/config";
import log from "./utils/log";
import { preloadFont } from "./utils/preload";

const { ClipboardItem } = window;

function App() {
const [config, setConfig] = useState(null);

const [rand, setRand] = useState(0);
useEffect(() => {
try {
const data = async () => {
const res = await getConfiguration();
setConfig(res);
};
data();
} catch (error) {
console.log(error);
}
}, [rand]);

useEffect(() => {
let controller;
try {
Expand Down Expand Up @@ -177,8 +160,7 @@ function App() {
link.style.display = "none";
document.body.appendChild(link);
link.click();
document.body.removeChild(link);
await log(characters[character].id, characters[character].name, "download");
document.body.removeChild(link);;
setRand(rand + 1);
};

Expand Down Expand Up @@ -207,16 +189,11 @@ function App() {
}),
]);
setOpenCopySnackbar(true);
await log(characters[character].id, characters[character].name, "copy");
setRand(rand + 1);
};

return (
<div className="App">
<Info open={infoOpen} handleClose={handleClose} config={config} />
<div className="counter">
您创建的贴纸总数:{config?.total || "暂无数据"}
</div>
<div className="container">
<div className="vertical">
<div className="canvas">
Expand Down
3 changes: 0 additions & 3 deletions src/config.json

This file was deleted.

17 changes: 0 additions & 17 deletions src/utils/config.js

This file was deleted.

29 changes: 0 additions & 29 deletions src/utils/log.js

This file was deleted.

0 comments on commit 262ae70

Please sign in to comment.