Merge branch 'Yidadaa:main' into main

This commit is contained in:
Hk-Gosuto 2023-10-12 09:01:34 +08:00 committed by GitHub
commit e95242adde
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 3 deletions

View File

@ -393,11 +393,13 @@ export function MaskPage() {
const [searchText, setSearchText] = useState("");
const masks = searchText.length > 0 ? searchMasks : allMasks;
// simple search, will refactor later
// refactored already, now it accurate
const onSearch = (text: string) => {
setSearchText(text);
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);
} else {
setSearchMasks(allMasks);

View File

@ -101,7 +101,7 @@ export const useSyncStore = createPersistStore(
mergeAppState(localState, remoteState);
setLocalAppState(localState);
} 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));