mirror of
https://github.com/priyanshujain/margin-mail.git
synced 2026-10-02 19:17:05 +00:00
scaffold the app: tauri crate, vite front end, icons, ci
This commit is contained in:
commit
088ec9c6e4
267 files changed
+18617
No files matched your search
@@ -0,0 +1,5 @@
|
||||
function App() {
|
||||
return <div className="app" />;
|
||||
}
|
||||
|
||||
export default App;
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
// Placeholder. The contract lands in F3.
|
||||
import { invoke } from "@tauri-apps/api/core";
|
||||
|
||||
export const isTauri = typeof window !== "undefined" && "__TAURI_INTERNALS__" in window;
|
||||
export const isMacDesktop =
|
||||
isTauri && typeof navigator !== "undefined" && /mac/i.test(navigator.userAgent);
|
||||
|
||||
export function call<T>(command: string, args?: Record<string, unknown>): Promise<T> {
|
||||
return invoke<T>(command, args);
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
import React from "react";
|
||||
import ReactDOM from "react-dom/client";
|
||||
import App from "./App";
|
||||
import { isMacDesktop } from "./ipc";
|
||||
import "./styles/tokens.css";
|
||||
import "./styles/fonts.css";
|
||||
import "./styles/app.css";
|
||||
|
||||
// The header's lane for the traffic lights, which only one platform draws over it. Written here
|
||||
// rather than assumed by the stylesheet, so the first paint is already the right shape.
|
||||
if (isMacDesktop) document.documentElement.setAttribute("data-traffic", "");
|
||||
|
||||
ReactDOM.createRoot(document.getElementById("root") as HTMLElement).render(
|
||||
<React.StrictMode>
|
||||
<App />
|
||||
</React.StrictMode>,
|
||||
);
|
||||
@@ -0,0 +1 @@
|
||||
/* Placeholder. The design system replaces this in F2. */
|
||||
@@ -0,0 +1 @@
|
||||
/* Placeholder. The design system replaces this in F2. */
|
||||
@@ -0,0 +1 @@
|
||||
/* Placeholder. The design system replaces this in F2. */
|
||||
Vendored
+1
@@ -0,0 +1 @@
|
||||
/// <reference types="vite/client" />
|
||||
Reference in new issue
Block a user