mirror of
https://github.com/Sagit-chu/flvx.git
synced 2026-09-28 07:36:38 +08:00
fix: clear frontend lint warnings
This commit is contained in:
@@ -360,11 +360,7 @@ export const useDashboardData = (): DashboardDataState => {
|
||||
if (updateTime > storedTime) {
|
||||
setIsAnnouncementModalOpen(true);
|
||||
}
|
||||
} catch (err) {
|
||||
console.warn(
|
||||
"Failed to read localStorage for announcement state",
|
||||
err,
|
||||
);
|
||||
} catch {
|
||||
setIsAnnouncementModalOpen(true);
|
||||
}
|
||||
} else {
|
||||
@@ -385,8 +381,8 @@ export const useDashboardData = (): DashboardDataState => {
|
||||
"flvx_announcement_seen_time",
|
||||
announcement.update_time.toString(),
|
||||
);
|
||||
} catch (err) {
|
||||
console.warn("Failed to set localStorage for announcement state", err);
|
||||
} catch {
|
||||
// Ignore localStorage write failures and keep the modal dismissed.
|
||||
}
|
||||
}
|
||||
}, [announcement]);
|
||||
|
||||
@@ -2600,7 +2600,7 @@ export default function ForwardPage() {
|
||||
try {
|
||||
document.execCommand("copy");
|
||||
toast.success(`已复制${label}`);
|
||||
} catch (err) {
|
||||
} catch {
|
||||
toast.error("复制失败");
|
||||
}
|
||||
document.body.removeChild(textArea);
|
||||
|
||||
@@ -10,7 +10,6 @@
|
||||
*/
|
||||
|
||||
import { registerTheme } from "./registry";
|
||||
|
||||
// ── Built-in themes ──────────────────────────────────────────────────────────
|
||||
import defaultTheme from "./default";
|
||||
import cyberpunkTheme from "./example-cyberpunk";
|
||||
|
||||
@@ -117,8 +117,6 @@ export function activateTheme(id: string): void {
|
||||
const pkg = installed.get(id);
|
||||
|
||||
if (!pkg) {
|
||||
console.warn(`[FLVX themes] Theme "${id}" is not registered.`);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user