-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5142c1a
commit c37330f
Showing
26 changed files
with
1,832 additions
and
200 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"extends": "next/core-web-vitals" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
{ | ||
"env": { | ||
"browser": true, | ||
"es2021": true | ||
}, | ||
"extends": [ | ||
"standard-with-typescript", | ||
"plugin:react/recommended" | ||
], | ||
"parserOptions": { | ||
"ecmaVersion": "latest", | ||
"sourceType": "module", | ||
"project": "./desktop-app/tsconfig.json" | ||
}, | ||
"plugins": [ | ||
"react" | ||
], | ||
"rules": { | ||
"react/react-in-jsx-scope": "off", | ||
"react/jsx-filename-extension": [ | ||
1, | ||
{ | ||
"extensions": [ | ||
".ts", | ||
".tsx" | ||
] | ||
} | ||
], | ||
// "space-before-function-paren": "off", | ||
"@typescript-eslint/space-before-function-paren": "off", | ||
"@typescript-eslint/indent": "off" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"trailingComma": "none", | ||
"tabWidth": 2, | ||
"useTabs": false, | ||
"singleQuote": true, | ||
"semi": false | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,34 @@ | ||
import { app } from 'electron'; | ||
import serve from 'electron-serve'; | ||
import { createWindow } from './helpers'; | ||
import { app } from 'electron' | ||
import serve from 'electron-serve' | ||
import { createWindow } from './helpers' | ||
|
||
const isProd: boolean = process.env.NODE_ENV === 'production'; | ||
const isProd: boolean = process.env.NODE_ENV === 'production' | ||
|
||
if (isProd) { | ||
serve({ directory: 'app' }); | ||
serve({ directory: 'app' }) | ||
} else { | ||
app.setPath('userData', `${app.getPath('userData')} (development)`); | ||
app.setPath('userData', `${app.getPath('userData')} (development)`) | ||
} | ||
|
||
(async () => { | ||
await app.whenReady(); | ||
;(async () => { | ||
await app.whenReady() | ||
|
||
const mainWindow = createWindow('main', { | ||
width: 1000, | ||
height: 600, | ||
}); | ||
height: 600 | ||
}) | ||
|
||
if (isProd) { | ||
await mainWindow.loadURL('app://./home.html'); | ||
await mainWindow.loadURL('app://./index.html') | ||
} else { | ||
const port = process.argv[2]; | ||
await mainWindow.loadURL(`http://localhost:${port}/home`); | ||
mainWindow.webContents.openDevTools(); | ||
const port = process.argv[2] | ||
await mainWindow.loadURL(`http://localhost:${port}/`) | ||
mainWindow.webContents.openDevTools() | ||
} | ||
})(); | ||
})() | ||
.then() | ||
.catch(console.error) | ||
|
||
app.on('window-all-closed', () => { | ||
app.quit(); | ||
}); | ||
app.quit() | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
import type { ReactNode } from 'react' | ||
import HeaderPopover from '@/components/ui/headerPopover' | ||
import { Separator } from '@/components/ui/separator' | ||
export default function ContextHeader({ | ||
children, | ||
isProvider = false, | ||
isExchangeAccount = false, | ||
isSpace = false, | ||
isFleet = false, | ||
isBot = false | ||
}: { | ||
children: ReactNode | ||
isProvider?: boolean | ||
isExchangeAccount?: boolean | ||
isSpace?: boolean | ||
isFleet?: boolean | ||
isBot?: boolean | ||
}): JSX.Element { | ||
isProvider = isProvider || isExchangeAccount || isSpace || isFleet || isBot | ||
isExchangeAccount = isExchangeAccount || isSpace || isFleet || isBot | ||
isSpace = isSpace || isFleet || isBot | ||
isFleet = isFleet || isBot | ||
|
||
return ( | ||
<> | ||
<div className="flex items-center justify-between"> | ||
{isProvider && <HeaderPopover />} | ||
<Separator orientation="vertical" /> | ||
{isExchangeAccount && <HeaderPopover />} | ||
{isSpace && <HeaderPopover />} | ||
{isFleet && <HeaderPopover />} | ||
{isBot && <HeaderPopover />} | ||
</div> | ||
<main>{children}</main> | ||
</> | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import type { ReactNode } from 'react' | ||
|
||
const Footer = ({ children }: { children: ReactNode }): JSX.Element => { | ||
return ( | ||
<> | ||
<main>{children}</main> | ||
</> | ||
) | ||
} | ||
|
||
export default Footer |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import type { ReactNode } from 'react' | ||
|
||
export default function Header({ | ||
children | ||
}: { | ||
children: ReactNode | ||
}): JSX.Element { | ||
return ( | ||
<> | ||
<main>{children}</main> | ||
</> | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.