diff --git a/app/api/common.ts b/app/api/common.ts index a75f2de5c..fcb3d9236 100644 --- a/app/api/common.ts +++ b/app/api/common.ts @@ -112,16 +112,16 @@ export async function requestOpenai(req: NextRequest) { try { const res = await fetch(fetchUrl, fetchOptions); - // Extract the OpenAI-Organization header from the response - const openaiOrganizationHeader = res.headers.get("OpenAI-Organization"); + // Extract the OpenAI-Organization header from the response + const openaiOrganizationHeader = res.headers.get("OpenAI-Organization"); - // Check if serverConfig.openaiOrgId is defined and not an empty string - if (serverConfig.openaiOrgId && serverConfig.openaiOrgId.trim() !== "") { - // If openaiOrganizationHeader is present, log it; otherwise, log that the header is not present - console.log("[Org ID]", openaiOrganizationHeader); - } else { - console.log("[Org ID] is not set up."); - } + // Check if serverConfig.openaiOrgId is defined and not an empty string + if (serverConfig.openaiOrgId && serverConfig.openaiOrgId.trim() !== "") { + // If openaiOrganizationHeader is present, log it; otherwise, log that the header is not present + console.log("[Org ID]", openaiOrganizationHeader); + } else { + console.log("[Org ID] is not set up."); + } // to prevent browser prompt for credentials const newHeaders = new Headers(res.headers); @@ -129,7 +129,6 @@ export async function requestOpenai(req: NextRequest) { // to disable nginx buffering newHeaders.set("X-Accel-Buffering", "no"); - // Conditionally delete the OpenAI-Organization header from the response if [Org ID] is undefined or empty (not setup in ENV) // Also, this is to prevent the header from being sent to the client if (!serverConfig.openaiOrgId || serverConfig.openaiOrgId.trim() === "") { @@ -142,7 +141,6 @@ export async function requestOpenai(req: NextRequest) { // The browser will try to decode the response with brotli and fail newHeaders.delete("content-encoding"); - return new Response(res.body, { status: res.status, statusText: res.statusText, diff --git a/app/client/platforms/google.ts b/app/client/platforms/google.ts index a786f5275..b6eb8d3df 100644 --- a/app/client/platforms/google.ts +++ b/app/client/platforms/google.ts @@ -120,7 +120,9 @@ export class GeminiProApi implements LLMApi { if (!baseUrl) { baseUrl = isApp - ? DEFAULT_API_HOST + "/api/proxy/google/" + Google.ChatPath(modelConfig.model) + ? DEFAULT_API_HOST + + "/api/proxy/google/" + + Google.ChatPath(modelConfig.model) : this.path(Google.ChatPath(modelConfig.model)); } @@ -139,7 +141,7 @@ export class GeminiProApi implements LLMApi { () => controller.abort(), REQUEST_TIMEOUT_MS, ); - + if (shouldStream) { let responseText = ""; let remainText = ""; diff --git a/app/components/auth.tsx b/app/components/auth.tsx index 57118349b..5c8b4fc00 100644 --- a/app/components/auth.tsx +++ b/app/components/auth.tsx @@ -50,33 +50,33 @@ export function AuthPage() { ); }} /> - {!accessStore.hideUserApiKey ? ( - <> -
{Locale.Auth.SubTips}
- { - accessStore.update( - (access) => (access.openaiApiKey = e.currentTarget.value), - ); - }} - /> - { - accessStore.update( - (access) => (access.googleApiKey = e.currentTarget.value), - ); - }} - /> - - ) : null} + {/*{!accessStore.hideUserApiKey ? (*/} + {/* <>*/} + {/*
{Locale.Auth.SubTips}
*/} + {/* {*/} + {/* accessStore.update(*/} + {/* (access) => (access.openaiApiKey = e.currentTarget.value),*/} + {/* );*/} + {/* }}*/} + {/* />*/} + {/* {*/} + {/* accessStore.update(*/} + {/* (access) => (access.googleApiKey = e.currentTarget.value),*/} + {/* );*/} + {/* }}*/} + {/* />*/} + {/* */} + {/*) : null}*/}
- {couldStop && ( - } - /> - )} - {!props.hitBottom && ( - } - /> - )} - {props.hitBottom && ( - } - /> - )} + {/*{couldStop && (*/} + {/* }*/} + {/* />*/} + {/*)}*/} + {/*{!props.hitBottom && (*/} + {/* }*/} + {/* />*/} + {/*)}*/} + {/*{props.hitBottom && (*/} + {/* }*/} + {/* />*/} + {/*)}*/} - {showUploadImage && ( - : } - /> - )} - - {theme === Theme.Auto ? ( - - ) : theme === Theme.Light ? ( - - ) : theme === Theme.Dark ? ( - - ) : null} - - } - /> + {/*{showUploadImage && (*/} + {/* : }*/} + {/* />*/} + {/*)}*/} + {/**/} + {/* {theme === Theme.Auto ? (*/} + {/* */} + {/* ) : theme === Theme.Light ? (*/} + {/* */} + {/* ) : theme === Theme.Dark ? (*/} + {/* */} + {/* ) : null}*/} + {/* */} + {/* }*/} + {/*/>*/} - } - /> + {/*}*/} + {/*/>*/} - { - navigate(Path.Masks); - }} - text={Locale.Chat.InputActions.Masks} - icon={} - /> + {/* {*/} + {/* navigate(Path.Masks);*/} + {/* }}*/} + {/* text={Locale.Chat.InputActions.Masks}*/} + {/* icon={}*/} + {/*/>*/} - } - onClick={() => { - chatStore.updateCurrentSession((session) => { - if (session.clearContextIndex === session.messages.length) { - session.clearContextIndex = undefined; - } else { - session.clearContextIndex = session.messages.length; - session.memoryPrompt = ""; // will clear memory - } - }); - }} - /> + {/*}*/} + {/* onClick={() => {*/} + {/* chatStore.updateCurrentSession((session) => {*/} + {/* if (session.clearContextIndex === session.messages.length) {*/} + {/* session.clearContextIndex = undefined;*/} + {/* } else {*/} + {/* session.clearContextIndex = session.messages.length;*/} + {/* session.memoryPrompt = ""; // will clear memory*/} + {/* }*/} + {/* });*/} + {/* }}*/} + {/*/>*/} setShowModelSelector(true)} @@ -1089,7 +1089,6 @@ function _Chat() { if (payload.url) { accessStore.update((access) => (access.openaiUrl = payload.url!)); } - accessStore.update((access) => (access.useCustomConfig = true)); }); } } catch { @@ -1234,25 +1233,25 @@ function _Chat() {
- {!isMobileScreen && ( -
- } - bordered - onClick={() => setIsEditingMessage(true)} - /> -
- )} -
- } - bordered - title={Locale.Chat.Actions.Export} - onClick={() => { - setShowExport(true); - }} - /> -
+ {/*{!isMobileScreen && (*/} + {/*
*/} + {/* }*/} + {/* bordered*/} + {/* onClick={() => setIsEditingMessage(true)}*/} + {/* />*/} + {/*
*/} + {/*)}*/} + {/*
*/} + {/* }*/} + {/* bordered*/} + {/* title={Locale.Chat.Actions.Export}*/} + {/* onClick={() => {*/} + {/* setShowExport(true);*/} + {/* }}*/} + {/* />*/} + {/*
*/} {showMaxIcon && (
- - {checkingUpdate ? ( - - ) : hasNewVersion ? ( - - {Locale.Settings.Update.GoToUpdate} - - ) : ( - } - text={Locale.Settings.Update.CheckUpdate} - onClick={() => checkUpdate(true)} - /> - )} - + {/**/} + {/* {checkingUpdate ? (*/} + {/* */} + {/* ) : hasNewVersion ? (*/} + {/* */} + {/* {Locale.Settings.Update.GoToUpdate}*/} + {/* */} + {/* ) : (*/} + {/* }*/} + {/* text={Locale.Settings.Update.CheckUpdate}*/} + {/* onClick={() => checkUpdate(true)}*/} + {/* />*/} + {/* )}*/} + {/**/} - - - + {/**/} + {/* {*/} + {/* updateConfig(*/} + {/* (config) =>*/} + {/* (config.submitKey = e.target.value as any as SubmitKey),*/} + {/* );*/} + {/* }}*/} + {/* >*/} + {/* {Object.values(SubmitKey).map((v) => (*/} + {/* */} + {/* ))}*/} + {/* */} + {/**/} - - - + {/**/} + {/* {*/} + {/* updateConfig(*/} + {/* (config) => (config.theme = e.target.value as any as Theme),*/} + {/* );*/} + {/* }}*/} + {/* >*/} + {/* {Object.values(Theme).map((v) => (*/} + {/* */} + {/* ))}*/} + {/* */} + {/**/} - - - + {/**/} + {/* {*/} + {/* changeLang(e.target.value as any);*/} + {/* }}*/} + {/* >*/} + {/* {AllLangs.map((lang) => (*/} + {/* */} + {/* ))}*/} + {/* */} + {/**/} - - - updateConfig( - (config) => - (config.enableAutoGenerateTitle = e.currentTarget.checked), - ) - } - > - + {/**/} + {/* */} + {/* updateConfig(*/} + {/* (config) =>*/} + {/* (config.enableAutoGenerateTitle = e.currentTarget.checked),*/} + {/* )*/} + {/* }*/} + {/* >*/} + {/**/} - - - updateConfig( - (config) => - (config.sendPreviewBubble = e.currentTarget.checked), - ) - } - > - + {/**/} + {/* */} + {/* updateConfig(*/} + {/* (config) =>*/} + {/* (config.sendPreviewBubble = e.currentTarget.checked),*/} + {/* )*/} + {/* }*/} + {/* >*/} + {/**/} - + {/**/} - - - - updateConfig( - (config) => - (config.dontShowMaskSplashScreen = - !e.currentTarget.checked), - ) - } - > - + {/**/} + {/* */} + {/* */} + {/* updateConfig(*/} + {/* (config) =>*/} + {/* (config.dontShowMaskSplashScreen =*/} + {/* !e.currentTarget.checked),*/} + {/* )*/} + {/* }*/} + {/* >*/} + {/* */} - - - updateConfig( - (config) => - (config.hideBuiltinMasks = e.currentTarget.checked), - ) - } - > - - + {/* */} + {/* */} + {/* updateConfig(*/} + {/* (config) =>*/} + {/* (config.hideBuiltinMasks = e.currentTarget.checked),*/} + {/* )*/} + {/* }*/} + {/* >*/} + {/* */} + {/**/} - - - - updateConfig( - (config) => - (config.disablePromptHint = e.currentTarget.checked), - ) - } - > - + {/**/} + {/* */} + {/* */} + {/* updateConfig(*/} + {/* (config) =>*/} + {/* (config.disablePromptHint = e.currentTarget.checked),*/} + {/* )*/} + {/* }*/} + {/* >*/} + {/* */} - - } - text={Locale.Settings.Prompt.Edit} - onClick={() => setShowPromptModal(true)} - /> - - + {/* */} + {/* }*/} + {/* text={Locale.Settings.Prompt.Edit}*/} + {/* onClick={() => setShowPromptModal(true)}*/} + {/* />*/} + {/* */} + {/**/} - - {showAccessCode && ( - - { - accessStore.update( - (access) => (access.accessCode = e.currentTarget.value), - ); - }} - /> - - )} + {/**/} + {/* {showAccessCode && (*/} + {/* */} + {/* {*/} + {/* accessStore.update(*/} + {/* (access) => (access.accessCode = e.currentTarget.value),*/} + {/* );*/} + {/* }}*/} + {/* />*/} + {/* */} + {/* )}*/} - {!accessStore.hideUserApiKey && ( - <> - { - // Conditionally render the following ListItem based on clientConfig.isApp - !clientConfig?.isApp && ( // only show if isApp is false - - - accessStore.update( - (access) => - (access.useCustomConfig = e.currentTarget.checked), - ) - } - > - - ) - } - {accessStore.useCustomConfig && ( - <> - - - + {/* {!accessStore.hideUserApiKey && (*/} + {/* <>*/} + {/* {*/} + {/* // Conditionally render the following ListItem based on clientConfig.isApp*/} + {/* !clientConfig?.isApp && ( // only show if isApp is false*/} + {/* */} + {/* */} + {/* accessStore.update(*/} + {/* (access) =>*/} + {/* (access.useCustomConfig = e.currentTarget.checked),*/} + {/* )*/} + {/* }*/} + {/* >*/} + {/* */} + {/* )*/} + {/* }*/} + {/* {accessStore.useCustomConfig && (*/} + {/* <>*/} + {/* */} + {/* {*/} + {/* accessStore.update(*/} + {/* (access) =>*/} + {/* (access.provider = e.target*/} + {/* .value as ServiceProvider),*/} + {/* );*/} + {/* }}*/} + {/* >*/} + {/* {Object.entries(ServiceProvider).map(([k, v]) => (*/} + {/* */} + {/* ))}*/} + {/* */} + {/* */} - {accessStore.provider === ServiceProvider.OpenAI && ( - <> - - - accessStore.update( - (access) => - (access.openaiUrl = e.currentTarget.value), - ) - } - > - - - { - accessStore.update( - (access) => - (access.openaiApiKey = e.currentTarget.value), - ); - }} - /> - - - )} - {accessStore.provider === ServiceProvider.Azure && ( - <> - - - accessStore.update( - (access) => - (access.azureUrl = e.currentTarget.value), - ) - } - > - - - { - accessStore.update( - (access) => - (access.azureApiKey = e.currentTarget.value), - ); - }} - /> - - - - accessStore.update( - (access) => - (access.azureApiVersion = - e.currentTarget.value), - ) - } - > - - - )} - {accessStore.provider === ServiceProvider.Google && ( - <> - - - accessStore.update( - (access) => - (access.googleUrl = e.currentTarget.value), - ) - } - > - - - { - accessStore.update( - (access) => - (access.googleApiKey = e.currentTarget.value), - ); - }} - /> - - - - accessStore.update( - (access) => - (access.googleApiVersion = - e.currentTarget.value), - ) - } - > - - - )} - {accessStore.provider === ServiceProvider.Anthropic && ( - <> - - - accessStore.update( - (access) => - (access.anthropicUrl = e.currentTarget.value), - ) - } - > - - - { - accessStore.update( - (access) => - (access.anthropicApiKey = - e.currentTarget.value), - ); - }} - /> - - - - accessStore.update( - (access) => - (access.anthropicApiVersion = - e.currentTarget.value), - ) - } - > - - - )} - - )} - - )} + {/* {accessStore.provider === "OpenAI" ? (*/} + {/* <>*/} + {/* */} + {/* */} + {/* accessStore.update(*/} + {/* (access) =>*/} + {/* (access.openaiUrl = e.currentTarget.value),*/} + {/* )*/} + {/* }*/} + {/* >*/} + {/* */} + {/* */} + {/* {*/} + {/* accessStore.update(*/} + {/* (access) =>*/} + {/* (access.openaiApiKey = e.currentTarget.value),*/} + {/* );*/} + {/* }}*/} + {/* />*/} + {/* */} + {/* */} + {/* ) : accessStore.provider === "Azure" ? (*/} + {/* <>*/} + {/* */} + {/* */} + {/* accessStore.update(*/} + {/* (access) =>*/} + {/* (access.azureUrl = e.currentTarget.value),*/} + {/* )*/} + {/* }*/} + {/* >*/} + {/* */} + {/* */} + {/* {*/} + {/* accessStore.update(*/} + {/* (access) =>*/} + {/* (access.azureApiKey = e.currentTarget.value),*/} + {/* );*/} + {/* }}*/} + {/* />*/} + {/* */} + {/* */} + {/* */} + {/* accessStore.update(*/} + {/* (access) =>*/} + {/* (access.azureApiVersion =*/} + {/* e.currentTarget.value),*/} + {/* )*/} + {/* }*/} + {/* >*/} + {/* */} + {/* */} + {/* ) : accessStore.provider === "Google" ? (*/} + {/* <>*/} + {/* */} + {/* */} + {/* accessStore.update(*/} + {/* (access) =>*/} + {/* (access.googleUrl = e.currentTarget.value),*/} + {/* )*/} + {/* }*/} + {/* >*/} + {/* */} + {/* */} + {/* {*/} + {/* accessStore.update(*/} + {/* (access) =>*/} + {/* (access.googleApiKey = e.currentTarget.value),*/} + {/* );*/} + {/* }}*/} + {/* />*/} + {/* */} + {/* */} + {/* */} + {/* accessStore.update(*/} + {/* (access) =>*/} + {/* (access.googleApiVersion =*/} + {/* e.currentTarget.value),*/} + {/* )*/} + {/* }*/} + {/* >*/} + {/* */} + {/* */} + {/* ) : null}*/} + {/* */} + {/* )}*/} + {/* */} + {/* )}*/} - {!shouldHideBalanceQuery && !clientConfig?.isApp ? ( - - {!showUsage || loadingUsage ? ( -
- ) : ( - } - text={Locale.Settings.Usage.Check} - onClick={() => checkUsage(true)} - /> - )} - - ) : null} + {/* {!shouldHideBalanceQuery && !clientConfig?.isApp ? (*/} + {/* */} + {/* {!showUsage || loadingUsage ? (*/} + {/*
*/} + {/* ) : (*/} + {/* }*/} + {/* text={Locale.Settings.Usage.Check}*/} + {/* onClick={() => checkUsage(true)}*/} + {/* />*/} + {/* )}*/} + {/* */} + {/* ) : null}*/} - - - config.update( - (config) => (config.customModels = e.currentTarget.value), - ) - } - > - - + {/* */} + {/* */} + {/* config.update(*/} + {/* (config) => (config.customModels = e.currentTarget.value),*/} + {/* )*/} + {/* }*/} + {/* >*/} + {/* */} + {/**/} - - { - const modelConfig = { ...config.modelConfig }; - updater(modelConfig); - config.update((config) => (config.modelConfig = modelConfig)); - }} - /> - + {/**/} + {/* {*/} + {/* const modelConfig = { ...config.modelConfig };*/} + {/* updater(modelConfig);*/} + {/* config.update((config) => (config.modelConfig = modelConfig));*/} + {/* }}*/} + {/* />*/} + {/**/} {shouldShowPromptModal && ( setShowPromptModal(false)} /> diff --git a/app/components/sidebar.tsx b/app/components/sidebar.tsx index 69b2e71f8..d62d2aa91 100644 --- a/app/components/sidebar.tsx +++ b/app/components/sidebar.tsx @@ -6,6 +6,7 @@ import { IconButton } from "./button"; import SettingsIcon from "../icons/settings.svg"; import GithubIcon from "../icons/github.svg"; import ChatGptIcon from "../icons/chatgpt.svg"; +import DiitIcon from "../icons/diit.svg"; import AddIcon from "../icons/add.svg"; import CloseIcon from "../icons/close.svg"; import DeleteIcon from "../icons/delete.svg"; @@ -155,38 +156,38 @@ export function SideBar(props: { className?: string }) { >
- NextChat -
-
- Build your own AI assistant. + DiitChat
+ {/*
*/} + {/* Build your own AI assistant.*/} + {/*
*/}
- +
-
- } - text={shouldNarrow ? undefined : Locale.Mask.Name} - className={styles["sidebar-bar-button"]} - onClick={() => { - if (config.dontShowMaskSplashScreen !== true) { - navigate(Path.NewChat, { state: { fromHome: true } }); - } else { - navigate(Path.Masks, { state: { fromHome: true } }); - } - }} - shadow - /> - } - text={shouldNarrow ? undefined : Locale.Plugin.Name} - className={styles["sidebar-bar-button"]} - onClick={() => showToast(Locale.WIP)} - shadow - /> -
+ {/*
*/} + {/* }*/} + {/* text={shouldNarrow ? undefined : Locale.Mask.Name}*/} + {/* className={styles["sidebar-bar-button"]}*/} + {/* onClick={() => {*/} + {/* if (config.dontShowMaskSplashScreen !== true) {*/} + {/* navigate(Path.NewChat, { state: { fromHome: true } });*/} + {/* } else {*/} + {/* navigate(Path.Masks, { state: { fromHome: true } });*/} + {/* }*/} + {/* }}*/} + {/* shadow*/} + {/* />*/} + {/* }*/} + {/* text={shouldNarrow ? undefined : Locale.Plugin.Name}*/} + {/* className={styles["sidebar-bar-button"]}*/} + {/* onClick={() => showToast(Locale.WIP)}*/} + {/* shadow*/} + {/* />*/} + {/*
*/}
} shadow />
- + {/**/}
\ No newline at end of file diff --git a/app/layout.tsx b/app/layout.tsx index 5898b21a1..2a4da6302 100644 --- a/app/layout.tsx +++ b/app/layout.tsx @@ -10,7 +10,7 @@ import { GoogleTagManager } from "@next/third-parties/google"; const serverConfig = getServerSideConfig(); export const metadata: Metadata = { - title: "NextChat", + title: "DiitChat", description: "Your personal ChatGPT Chat Bot.", viewport: { width: "device-width", @@ -36,7 +36,10 @@ export default function RootLayout({ - + diff --git a/app/locales/cn.ts b/app/locales/cn.ts index 2ff94e32d..ade8618f6 100644 --- a/app/locales/cn.ts +++ b/app/locales/cn.ts @@ -8,7 +8,7 @@ const cn = { Error: { Unauthorized: isApp ? "检测到无效 API Key,请前往[设置](/#/settings)页检查 API Key 是否配置正确。" - : "访问密码不正确或为空,请前往[登录](/#/auth)页输入正确的访问密码,或者在[设置](/#/settings)页填入你自己的 OpenAI API Key。", + : "访问密码不正确或为空,请前往[登录](/#/auth)页输入正确的访问密码。", }, Auth: { Title: "需要密码", diff --git a/app/locales/index.ts b/app/locales/index.ts index 6e8088a98..d1af83e81 100644 --- a/app/locales/index.ts +++ b/app/locales/index.ts @@ -71,9 +71,9 @@ export const ALL_LANG_OPTIONS: Record = { }; const LANG_KEY = "lang"; -const DEFAULT_LANG = "en"; +const DEFAULT_LANG = "cn"; -const fallbackLang = en; +const fallbackLang = cn; const targetLang = ALL_LANGS[getLang()] as LocaleType; // if target lang missing some fields, it will use fallback lang string @@ -104,19 +104,19 @@ function getLanguage() { } export function getLang(): Lang { - const savedLang = getItem(LANG_KEY); - - if (AllLangs.includes((savedLang ?? "") as Lang)) { - return savedLang as Lang; - } - - const lang = getLanguage(); - - for (const option of AllLangs) { - if (lang.includes(option)) { - return option; - } - } + // const savedLang = getItem(LANG_KEY); + // + // if (AllLangs.includes((savedLang ?? "") as Lang)) { + // return savedLang as Lang; + // } + // + // const lang = getLanguage(); + // + // for (const option of AllLangs) { + // if (lang.includes(option)) { + // return option; + // } + // } return DEFAULT_LANG; } diff --git a/app/masks/index.ts b/app/masks/index.ts index aa4917e3e..c17f925e8 100644 --- a/app/masks/index.ts +++ b/app/masks/index.ts @@ -22,6 +22,8 @@ export const BUILTIN_MASK_STORE = { }, }; -export const BUILTIN_MASKS: BuiltinMask[] = [...CN_MASKS, ...TW_MASKS, ...EN_MASKS].map( - (m) => BUILTIN_MASK_STORE.add(m), -); +export const BUILTIN_MASKS: BuiltinMask[] = [ + ...CN_MASKS, + ...TW_MASKS, + ...EN_MASKS, +].map((m) => BUILTIN_MASK_STORE.add(m)); diff --git a/app/store/config.ts b/app/store/config.ts index 94cfcd8ec..ea07ceb0b 100644 --- a/app/store/config.ts +++ b/app/store/config.ts @@ -33,14 +33,14 @@ export const DEFAULT_CONFIG = { avatar: "1f603", fontSize: 14, theme: Theme.Auto as Theme, - tightBorder: !!config?.isApp, - sendPreviewBubble: true, + tightBorder: !!getClientConfig()?.isApp, + sendPreviewBubble: false, enableAutoGenerateTitle: true, sidebarWidth: DEFAULT_SIDEBAR_WIDTH, disablePromptHint: false, - dontShowMaskSplashScreen: false, // dont show splash screen when create chat + dontShowMaskSplashScreen: true, // dont show splash screen when create chat hideBuiltinMasks: false, // dont add builtin masks customModels: "", diff --git a/app/store/sync.ts b/app/store/sync.ts index d3582e3c9..77f7b9cdd 100644 --- a/app/store/sync.ts +++ b/app/store/sync.ts @@ -100,15 +100,17 @@ export const useSyncStore = createPersistStore( const remoteState = await client.get(config.username); if (!remoteState || remoteState === "") { await client.set(config.username, JSON.stringify(localState)); - console.log("[Sync] Remote state is empty, using local state instead."); - return + console.log( + "[Sync] Remote state is empty, using local state instead.", + ); + return; } else { const parsedRemoteState = JSON.parse( await client.get(config.username), ) as AppState; mergeAppState(localState, parsedRemoteState); setLocalAppState(localState); - } + } } catch (e) { console.log("[Sync] failed to get remote state", e); throw e; diff --git a/package.json b/package.json index 4d06b0b14..33ce40864 100644 --- a/package.json +++ b/package.json @@ -65,5 +65,5 @@ "resolutions": { "lint-staged/yaml": "^2.2.2" }, - "packageManager": "yarn@1.22.19" + "version": "0.0.0" } diff --git a/public/android-chrome-192x192.png b/public/android-chrome-192x192.png index 797a7d86a..700c48286 100644 Binary files a/public/android-chrome-192x192.png and b/public/android-chrome-192x192.png differ diff --git a/public/android-chrome-512x512.png b/public/android-chrome-512x512.png index c0265ef4f..e701ed2fb 100644 Binary files a/public/android-chrome-512x512.png and b/public/android-chrome-512x512.png differ diff --git a/public/apple-touch-icon.png b/public/apple-touch-icon.png index 6461c47c2..387303114 100644 Binary files a/public/apple-touch-icon.png and b/public/apple-touch-icon.png differ diff --git a/public/favicon-16x16.png b/public/favicon-16x16.png index 3f8e0a535..92f53492f 100644 Binary files a/public/favicon-16x16.png and b/public/favicon-16x16.png differ diff --git a/public/favicon-32x32.png b/public/favicon-32x32.png index c464762ea..f1f439e85 100644 Binary files a/public/favicon-32x32.png and b/public/favicon-32x32.png differ diff --git a/public/favicon.ico b/public/favicon.ico index b5e8234cd..a3737b350 100644 Binary files a/public/favicon.ico and b/public/favicon.ico differ diff --git a/public/macos.png b/public/macos.png index 4ca110e37..f1bd0e69f 100644 Binary files a/public/macos.png and b/public/macos.png differ diff --git a/src-tauri/icons/128x128.png b/src-tauri/icons/128x128.png index 445c65313..7fee8db6e 100644 Binary files a/src-tauri/icons/128x128.png and b/src-tauri/icons/128x128.png differ diff --git a/src-tauri/icons/128x128@2x.png b/src-tauri/icons/128x128@2x.png index c1a51d41f..178761b6a 100644 Binary files a/src-tauri/icons/128x128@2x.png and b/src-tauri/icons/128x128@2x.png differ diff --git a/src-tauri/icons/32x32.png b/src-tauri/icons/32x32.png index e06e30c4c..471cdbb65 100644 Binary files a/src-tauri/icons/32x32.png and b/src-tauri/icons/32x32.png differ diff --git a/src-tauri/icons/Square107x107Logo.png b/src-tauri/icons/Square107x107Logo.png index 103276290..241e101ba 100644 Binary files a/src-tauri/icons/Square107x107Logo.png and b/src-tauri/icons/Square107x107Logo.png differ diff --git a/src-tauri/icons/Square142x142Logo.png b/src-tauri/icons/Square142x142Logo.png index fe38d9925..b27ce753d 100644 Binary files a/src-tauri/icons/Square142x142Logo.png and b/src-tauri/icons/Square142x142Logo.png differ diff --git a/src-tauri/icons/Square150x150Logo.png b/src-tauri/icons/Square150x150Logo.png index 78c1e0722..d9d58df2d 100644 Binary files a/src-tauri/icons/Square150x150Logo.png and b/src-tauri/icons/Square150x150Logo.png differ diff --git a/src-tauri/icons/Square284x284Logo.png b/src-tauri/icons/Square284x284Logo.png index a3b0afca3..64dd15d81 100644 Binary files a/src-tauri/icons/Square284x284Logo.png and b/src-tauri/icons/Square284x284Logo.png differ diff --git a/src-tauri/icons/Square30x30Logo.png b/src-tauri/icons/Square30x30Logo.png index 9adabd622..c585069db 100644 Binary files a/src-tauri/icons/Square30x30Logo.png and b/src-tauri/icons/Square30x30Logo.png differ diff --git a/src-tauri/icons/Square310x310Logo.png b/src-tauri/icons/Square310x310Logo.png index 5d5eabec6..70b0b5ddb 100644 Binary files a/src-tauri/icons/Square310x310Logo.png and b/src-tauri/icons/Square310x310Logo.png differ diff --git a/src-tauri/icons/Square44x44Logo.png b/src-tauri/icons/Square44x44Logo.png index 8e3b27816..6657a9617 100644 Binary files a/src-tauri/icons/Square44x44Logo.png and b/src-tauri/icons/Square44x44Logo.png differ diff --git a/src-tauri/icons/Square71x71Logo.png b/src-tauri/icons/Square71x71Logo.png index e8a2d095d..865a99ed8 100644 Binary files a/src-tauri/icons/Square71x71Logo.png and b/src-tauri/icons/Square71x71Logo.png differ diff --git a/src-tauri/icons/Square89x89Logo.png b/src-tauri/icons/Square89x89Logo.png index 77e9a8972..4be716430 100644 Binary files a/src-tauri/icons/Square89x89Logo.png and b/src-tauri/icons/Square89x89Logo.png differ diff --git a/src-tauri/icons/StoreLogo.png b/src-tauri/icons/StoreLogo.png index 0b98f3c57..9791b7adb 100644 Binary files a/src-tauri/icons/StoreLogo.png and b/src-tauri/icons/StoreLogo.png differ diff --git a/src-tauri/icons/icon.icns b/src-tauri/icons/icon.icns index 131a0810a..7432486f7 100644 Binary files a/src-tauri/icons/icon.icns and b/src-tauri/icons/icon.icns differ diff --git a/src-tauri/icons/icon.ico b/src-tauri/icons/icon.ico index 93e6e8af2..59f1568ee 100644 Binary files a/src-tauri/icons/icon.ico and b/src-tauri/icons/icon.ico differ diff --git a/src-tauri/icons/icon.png b/src-tauri/icons/icon.png index c0265ef4f..3ae7ae9bf 100644 Binary files a/src-tauri/icons/icon.png and b/src-tauri/icons/icon.png differ