Merge branch 'main' b0c6f6d 20230616 into pro
This commit is contained in:
+2
-16
@@ -3,7 +3,7 @@ export {};
|
||||
// import { persist } from "zustand/middleware";
|
||||
// import { FETCH_COMMIT_URL, StoreKey } from "../constant";
|
||||
// import { api } from "../client/api";
|
||||
// import { showToast } from "../components/ui-lib";
|
||||
// import { getClientConfig } from "../config/client";
|
||||
|
||||
// export interface UpdateStore {
|
||||
// lastUpdate: number;
|
||||
@@ -18,20 +18,6 @@ export {};
|
||||
// updateUsage: (force?: boolean) => Promise<void>;
|
||||
// }
|
||||
|
||||
// function queryMeta(key: string, defaultValue?: string): string {
|
||||
// let ret: string;
|
||||
// if (document) {
|
||||
// const meta = document.head.querySelector(
|
||||
// `meta[name='${key}']`,
|
||||
// ) as HTMLMetaElement;
|
||||
// ret = meta?.content ?? "";
|
||||
// } else {
|
||||
// ret = defaultValue ?? "";
|
||||
// }
|
||||
|
||||
// return ret;
|
||||
// }
|
||||
|
||||
// const ONE_MINUTE = 60 * 1000;
|
||||
|
||||
// export const useUpdateStore = create<UpdateStore>()(
|
||||
@@ -45,7 +31,7 @@ export {};
|
||||
// version: "unknown",
|
||||
|
||||
// async getLatestVersion(force = false) {
|
||||
// set(() => ({ version: queryMeta("version") ?? "unknown" }));
|
||||
// set(() => ({ version: getClientConfig()?.commitId ?? "unknown" }));
|
||||
|
||||
// const overTenMins = Date.now() - get().lastUpdate > 10 * ONE_MINUTE;
|
||||
// if (!force && !overTenMins) return;
|
||||
|
||||
Reference in New Issue
Block a user