mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-09-26 03:28:58 +03:00
CI / AMD64 Build (push) Canceled after 0s
CI / AMD64 Smoke Test (push) Canceled after 0s
CI / ARM Build (push) Canceled after 0s
CI / Jetson Jetpack 6 (push) Canceled after 0s
CI / AMD64 Extra Build (push) Canceled after 0s
CI / ARM Extra Build (push) Canceled after 0s
CI / Synaptics Build (push) Canceled after 0s
CI / Assemble and push default build (push) Canceled after 0s
fix duplicated styles, move fonts to src/assets/fonts for vite to bundle (nginx already rewrites correctly), and fix fast refresh for PreviewController, auth context/provider, and statusbar context
29 lines
633 B
TypeScript
29 lines
633 B
TypeScript
import { createContext } from "react";
|
|
|
|
export type StatusMessage = {
|
|
id: string;
|
|
text: string;
|
|
color?: string;
|
|
link?: string;
|
|
};
|
|
|
|
export type StatusMessagesState = {
|
|
[key: string]: StatusMessage[];
|
|
};
|
|
|
|
type StatusBarMessagesContextValue = {
|
|
messages: StatusMessagesState;
|
|
addMessage: (
|
|
key: string,
|
|
message: string,
|
|
color?: string,
|
|
messageId?: string,
|
|
link?: string,
|
|
) => string | undefined;
|
|
removeMessage: (key: string, messageId: string) => void;
|
|
clearMessages: (key: string) => void;
|
|
};
|
|
|
|
export const StatusBarMessagesContext =
|
|
createContext<StatusBarMessagesContextValue | null>(null);
|