Add reactive tray icon for when update is available (#5567)

This commit is contained in:
Sebastian Malton authored and GitHub committed 2022-06-08 08:37:19 -04:00
1 parent db65a89ee0
commit 17c7b6a1bf
32 files changed
+399 -241

No files matched your search

@@ -3,6 +3,7 @@
* Licensed under MIT License. See LICENSE in root directory for more information.
*/
export type UpdateChannelId = "alpha" | "beta" | "latest";
const latestChannel: UpdateChannel = {
@@ -4,12 +4,21 @@
*/
import { getInjectionToken } from "@ogre-tools/injectable";
import type { IComputedValue } from "mobx";
import type { JsonValue } from "type-fest";
export interface SyncBox<TValue extends JsonValue> {
type AsJson<T> = T extends string | number | boolean | null
? T
: T extends Function
? never
: T extends Array<infer V>
? AsJson<V>[]
: T extends object
? { [K in keyof T]: AsJson<T[K]> }
: never;
export interface SyncBox<TValue> {
id: string;
value: IComputedValue<TValue>;
set: (value: TValue) => void;
value: IComputedValue<AsJson<TValue>>;
set: (value: AsJson<TValue>) => void;
}
export const syncBoxInjectionToken = getInjectionToken<SyncBox<any>>({