mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-10-02 22:48:12 +08:00
Fix frontend HMR so the page doesn't break upon saving TS files and restructure frontend architecture (#3871)
* Clean up component setup/tear-down side effects * Clean up more component setup/tear-down side effects * Remove nonfunctional debouncer * Clean up even more component setup/tear-down side effects * Reuse backend state * Fix HMR for IO Managers and for State Providers * Rename IO Managers -> Managers and State Providers -> Stores * Restructure and partially flatten managers/stores * Code review fixes * Review fixes
This commit is contained in:
@@ -26,11 +26,7 @@ export function browserVersion(): string {
|
||||
export type OperatingSystem = "Windows" | "Mac" | "Linux";
|
||||
|
||||
export function operatingSystem(): OperatingSystem {
|
||||
const osTable: Record<string, OperatingSystem> = {
|
||||
Windows: "Windows",
|
||||
Mac: "Mac",
|
||||
Linux: "Linux",
|
||||
};
|
||||
const osTable: Record<string, OperatingSystem> = { Windows: "Windows", Mac: "Mac", Linux: "Linux" };
|
||||
|
||||
const userAgentOS = Object.keys(osTable).find((key) => window.navigator.userAgent.includes(key));
|
||||
return osTable[userAgentOS || "Windows"];
|
||||
|
||||
Reference in New Issue
Block a user