feat: export old setting

This commit is contained in:
Gabe
2025-09-25 12:53:46 +08:00
parent 393f1a29d5
commit 533a0e2d5b
9 changed files with 79 additions and 25 deletions

View File

@@ -32,6 +32,7 @@ import { sendBgMsg } from "../../libs/msg";
import { kissLog } from "../../libs/log";
import UploadButton from "./UploadButton";
import DownloadButton from "./DownloadButton";
import { getSettingOld } from "../../libs/storage";
function ShortcutItem({ action, label }) {
const { shortcut, setShortcut } = useShortcut(action);
@@ -137,6 +138,13 @@ export default function Settings() {
text={i18n("export")}
fileName={`kiss-setting_${Date.now()}.json`}
/>
<DownloadButton
handleData={async () =>
JSON.stringify(await getSettingOld(), null, 2)
}
text={i18n("export_old")}
fileName={`kiss-setting_v1_${Date.now()}.json`}
/>
</Stack>
<Box>