mirror of
https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web.git
synced 2025-06-02 02:40:24 +09:00
Merge branch 'Yidadaa:main' into main
This commit is contained in:
commit
e95242adde
@ -393,11 +393,13 @@ export function MaskPage() {
|
|||||||
const [searchText, setSearchText] = useState("");
|
const [searchText, setSearchText] = useState("");
|
||||||
const masks = searchText.length > 0 ? searchMasks : allMasks;
|
const masks = searchText.length > 0 ? searchMasks : allMasks;
|
||||||
|
|
||||||
// simple search, will refactor later
|
// refactored already, now it accurate
|
||||||
const onSearch = (text: string) => {
|
const onSearch = (text: string) => {
|
||||||
setSearchText(text);
|
setSearchText(text);
|
||||||
if (text.length > 0) {
|
if (text.length > 0) {
|
||||||
const result = allMasks.filter((m) => m.name.includes(text));
|
const result = allMasks.filter((m) =>
|
||||||
|
m.name.toLowerCase().includes(text.toLowerCase())
|
||||||
|
);
|
||||||
setSearchMasks(result);
|
setSearchMasks(result);
|
||||||
} else {
|
} else {
|
||||||
setSearchMasks(allMasks);
|
setSearchMasks(allMasks);
|
||||||
|
@ -101,7 +101,7 @@ export const useSyncStore = createPersistStore(
|
|||||||
mergeAppState(localState, remoteState);
|
mergeAppState(localState, remoteState);
|
||||||
setLocalAppState(localState);
|
setLocalAppState(localState);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.log("[Sync] failed to get remoate state", e);
|
console.log("[Sync] failed to get remote state", e);
|
||||||
}
|
}
|
||||||
|
|
||||||
await client.set(config.username, JSON.stringify(localState));
|
await client.set(config.username, JSON.stringify(localState));
|
||||||
|
Loading…
Reference in New Issue
Block a user