diff --git a/packages/core/models/index.ts b/packages/core/models/index.ts
new file mode 100644
index 0000000..5ccfc6e
--- /dev/null
+++ b/packages/core/models/index.ts
@@ -0,0 +1 @@
+export * from "./userInfo.model";
diff --git a/packages/core/models/userInfo.model.ts b/packages/core/models/userInfo.model.ts
new file mode 100644
index 0000000..33652b1
--- /dev/null
+++ b/packages/core/models/userInfo.model.ts
@@ -0,0 +1,12 @@
+export class UserInfo {
+ constructor(
+ public id: string,
+ public email: string,
+ public verifiedEmail: boolean,
+ public name: string,
+ public given_name: string,
+ public family_name: string,
+ public picture: string,
+ public locale: string
+ ) {}
+}
diff --git a/packages/desktop/electron/electron.js b/packages/desktop/electron/electron.js
index 52e4caa..cf5cf14 100644
--- a/packages/desktop/electron/electron.js
+++ b/packages/desktop/electron/electron.js
@@ -25,7 +25,8 @@ const myApiOauth = new ElectronGoogleOAuth2(
function createWindow() {
// Create the browser window.
win = new BrowserWindow({
- width: 800,
+ title: "Nirvana",
+ width: 600,
height: 800,
webPreferences: {
nodeIntegration: false, // is default value after Electron v5
@@ -44,7 +45,7 @@ function createWindow() {
);
// Open the DevTools.
if (isDev) {
- win.webContents.openDevTools({ mode: "attach" });
+ win.webContents.openDevTools({ mode: "detach" });
}
// End of the file
@@ -83,9 +84,9 @@ async function handleLogin() {
// read saved refresh token if any
// todo: fix this...should be working
const refreshToken = await store.get("refresh_token");
- console.log(refreshToken);
- if (refreshToken) {
+ // todo: remove this when I have way of getting access token from a refresh token
+ if (refreshToken && false) {
console.log("have a refresh token from user auth previously", refreshToken);
myApiOauth.setTokens({ refresh_token: refreshToken });
diff --git a/packages/desktop/package.json b/packages/desktop/package.json
index 792512e..2fcb511 100644
--- a/packages/desktop/package.json
+++ b/packages/desktop/package.json
@@ -8,6 +8,7 @@
"@getstation/electron-google-oauth2": "^2.1.0",
"@mui/icons-material": "^5.5.0",
"@mui/material": "^5.5.0",
+ "@nirvana/core": "*",
"@testing-library/jest-dom": "^5.16.2",
"@testing-library/react": "^12.1.4",
"@testing-library/user-event": "^13.5.0",
@@ -19,6 +20,7 @@
"react": "^17.0.2",
"react-dom": "^17.0.2",
"react-query": "^3.34.16",
+ "react-router-dom": "6",
"react-scripts": "5.0.0",
"typescript": "^4.6.2",
"web-vitals": "^2.1.4"
diff --git a/packages/desktop/public/index.html b/packages/desktop/public/index.html
index aa069f2..3d3d049 100644
--- a/packages/desktop/public/index.html
+++ b/packages/desktop/public/index.html
@@ -24,7 +24,7 @@
work correctly both with client-side routing and a non-root public URL.
Learn how to configure a non-root public URL by running `npm run build`.
-->
-
React App
+ Nirvana
diff --git a/packages/desktop/public/logos/small.svg b/packages/desktop/public/logos/small.svg
new file mode 100644
index 0000000..7975eec
--- /dev/null
+++ b/packages/desktop/public/logos/small.svg
@@ -0,0 +1,5 @@
+
diff --git a/packages/desktop/src/App.tsx b/packages/desktop/src/App.tsx
index 126dc7f..9a84ae7 100644
--- a/packages/desktop/src/App.tsx
+++ b/packages/desktop/src/App.tsx
@@ -1,6 +1,9 @@
import "./App.css";
+import { HashRouter, Route, Routes } from "react-router-dom";
+
import { Button } from "@mui/material";
+import Home from "./pages/Home";
import Login from "./pages/Login";
import Logo from "./components/Logo";
import React from "react";
@@ -12,7 +15,16 @@ testConnection();
function App() {
return (
<>
-
+
+
+
+ } />
+ } />
+ {/*
+ */}
+
+
+
>
);
}
diff --git a/packages/desktop/src/components/Logo/index.tsx b/packages/desktop/src/components/Logo/index.tsx
index fe4fb52..0f615a5 100644
--- a/packages/desktop/src/components/Logo/index.tsx
+++ b/packages/desktop/src/components/Logo/index.tsx
@@ -1,4 +1,40 @@
-export default function Logo({ className }: { className: string }) {
+export enum LogoType {
+ primary = "primary",
+ small = "small",
+}
+
+export default function Logo({
+ className,
+ type,
+}: {
+ className: string;
+ type?: LogoType;
+}) {
+ if (type === LogoType.small) {
+ return (
+
+ );
+ }
return (