Settings: add clear cache option

This commit is contained in:
thislight 2024-12-27 21:56:32 +08:00
parent 2da07a8d01
commit 81b5fe1450
No known key found for this signature in database
GPG key ID: FCFE5192241CCD4E
2 changed files with 15 additions and 1 deletions

View file

@ -1,6 +1,8 @@
import { createCacheBucket } from "~platform/cache";
export const cacheBucket = /* @__PURE__ */ createCacheBucket("mastodon");
export const CACHE_BUCKET_NAME = "mastodon"
export const cacheBucket = /* @__PURE__ */ createCacheBucket(CACHE_BUCKET_NAME);
export function toSmallCamelCase<T>(object: T) :T {
if (!object || typeof object !== "object") {

View file

@ -18,6 +18,7 @@ import {
import {
Animation as AnimationIcon,
Close as CloseIcon,
DeleteForever,
Logout,
Public as PublicIcon,
Refresh as RefreshIcon,
@ -275,6 +276,17 @@ const Settings: Component = () => {
</ListItemButton>
<Divider />
</li>
<li>
<ListSubheader>Storage</ListSubheader>
<ListItemButton disabled>
<ListItemIcon>
<DeleteForever />
</ListItemIcon>
<ListItemText secondary={"The cache is managed by your browser."}>
Clear cache...
</ListItemText>
</ListItemButton>
</li>
<li>
<ListSubheader>{t("This Application")}</ListSubheader>
<ListItemButton component={A} href="./language">