mirror of
https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web.git
synced 2025-05-24 22:50:22 +09:00
Merge remote-tracking branch 'upstream/main'
This commit is contained in:
commit
f76e47931f
@ -269,7 +269,7 @@ function CheckButton() {
|
||||
const syncStore = useSyncStore();
|
||||
|
||||
const couldCheck = useMemo(() => {
|
||||
return syncStore.coundSync();
|
||||
return syncStore.cloudSync();
|
||||
}, [syncStore]);
|
||||
|
||||
const [checkState, setCheckState] = useState<
|
||||
@ -473,7 +473,7 @@ function SyncItems() {
|
||||
const promptStore = usePromptStore();
|
||||
const maskStore = useMaskStore();
|
||||
const couldSync = useMemo(() => {
|
||||
return syncStore.coundSync();
|
||||
return syncStore.cloudSync();
|
||||
}, [syncStore]);
|
||||
|
||||
const [showSyncConfigModal, setShowSyncConfigModal] = useState(false);
|
||||
|
@ -199,6 +199,24 @@ export const DEFAULT_MODELS = [
|
||||
providerType: "openai",
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "gpt-3.5-turbo-0125",
|
||||
available: true,
|
||||
provider: {
|
||||
id: "openai",
|
||||
providerName: "OpenAI",
|
||||
providerType: "openai",
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "gpt-3.5-turbo-0301",
|
||||
available: true,
|
||||
provider: {
|
||||
id: "openai",
|
||||
providerName: "OpenAI",
|
||||
providerType: "openai",
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "gpt-3.5-turbo-0613",
|
||||
available: true,
|
||||
|
@ -48,7 +48,7 @@ const DEFAULT_SYNC_STATE = {
|
||||
export const useSyncStore = createPersistStore(
|
||||
DEFAULT_SYNC_STATE,
|
||||
(set, get) => ({
|
||||
coundSync() {
|
||||
cloudSync() {
|
||||
const config = get()[get().provider];
|
||||
return Object.values(config).every((c) => c.toString().length > 0);
|
||||
},
|
||||
@ -60,8 +60,10 @@ export const useSyncStore = createPersistStore(
|
||||
export() {
|
||||
const state = getLocalAppState();
|
||||
const datePart = isApp
|
||||
? `${new Date().toLocaleDateString().replace(/\//g, '_')} ${new Date().toLocaleTimeString().replace(/:/g, '_')}`
|
||||
: new Date().toLocaleString();
|
||||
? `${new Date().toLocaleDateString().replace(/\//g, "_")} ${new Date()
|
||||
.toLocaleTimeString()
|
||||
.replace(/:/g, "_")}`
|
||||
: new Date().toLocaleString();
|
||||
|
||||
const fileName = `Backup-${datePart}.json`;
|
||||
downloadAs(JSON.stringify(state), fileName);
|
||||
|
Loading…
Reference in New Issue
Block a user