chore: 前端跑一遍 format、lint,尝试在 ci 中加入前端 lint 检查 (#353)

This commit is contained in:
ᴀᴍᴛᴏᴀᴇʀ
2025-06-04 21:37:26 +08:00
committed by GitHub
parent 6226fa7c4d
commit 0e98f484ef
6 changed files with 45 additions and 26 deletions

View File

@@ -12,7 +12,7 @@ export interface AppState {
export const appStateStore = writable<AppState>({
query: '',
currentPage: 0,
videoSource: null,
videoSource: null
});
export const ToQuery = (state: AppState): string => {
@@ -41,36 +41,40 @@ export const setQuery = (query: string) => {
export const setVideoSourceFilter = (filter: { type: string; id: string }) => {
appStateStore.update((state) => ({
...state,
videoSource: filter,
videoSource: filter
}));
};
export const clearVideoSourceFilter = () => {
appStateStore.update((state) => ({
...state,
videoSource: null,
videoSource: null
}));
};
export const setCurrentPage = (page: number) => {
appStateStore.update((state) => ({
...state,
currentPage: page,
currentPage: page
}));
};
export const resetCurrentPage = () => {
appStateStore.update((state) => ({
...state,
currentPage: 0,
currentPage: 0
}));
};
export const setAll = (query: string, currentPage: number, videoSource: { type: string; id: string } | null) => {
export const setAll = (
query: string,
currentPage: number,
videoSource: { type: string; id: string } | null
) => {
appStateStore.set({
query,
currentPage,
videoSource,
videoSource
});
};
@@ -78,6 +82,6 @@ export const clearAll = () => {
appStateStore.set({
query: '',
currentPage: 0,
videoSource: null,
videoSource: null
});
};