mirror of
https://github.com/sern-handler/gui
synced 2026-06-06 17:36:55 +00:00
Compare commits
14 Commits
localizati
...
v0.1.0-alp
| Author | SHA1 | Date | |
|---|---|---|---|
| ffb7ba0a34 | |||
|
|
81996728cd | ||
| 3301b99308 | |||
| 3d7161e5af | |||
| ede5e73f0b | |||
| cc615f91fa | |||
| 405228f417 | |||
| 4282b61eaa | |||
|
|
0d3a36faaa | ||
| 019acb5ba6 | |||
| 2a595746d6 | |||
| 6972abc098 | |||
| d608ff9446 | |||
| 09dbb1cef1 |
@@ -7,6 +7,10 @@ jobs:
|
||||
- checkout
|
||||
- run: yarn
|
||||
- run: yarn build-electron-win
|
||||
- run: mkdir /tmp/artifacts
|
||||
- run: mv -t /tmp/artifacts dist/*.exe
|
||||
- store_artifacts:
|
||||
path: /tmp/artifacts
|
||||
build_linux:
|
||||
docker:
|
||||
- image: node:lts
|
||||
@@ -14,6 +18,21 @@ jobs:
|
||||
- checkout
|
||||
- run: yarn
|
||||
- run: yarn build-electron-linux
|
||||
- run: mkdir /tmp/artifacts
|
||||
- run: mv -t /tmp/artifacts dist/*.AppImage
|
||||
- store_artifacts:
|
||||
path: /tmp/artifacts
|
||||
build_macos:
|
||||
macos:
|
||||
xcode: 14.2.0
|
||||
steps:
|
||||
- checkout
|
||||
- run: yarn
|
||||
- run: yarn build-electron-mac
|
||||
- run: mkdir /tmp/artifacts
|
||||
- run: mv dist/*.dmg /tmp/artifacts
|
||||
- store_artifacts:
|
||||
path: /tmp/artifacts
|
||||
|
||||
workflows:
|
||||
build:
|
||||
@@ -26,3 +45,6 @@ workflows:
|
||||
- build_linux:
|
||||
requires:
|
||||
- hold
|
||||
- build_macos:
|
||||
requires:
|
||||
- hold
|
||||
@@ -13,8 +13,7 @@ module.exports = {
|
||||
parserOptions: {
|
||||
ecmaVersion: 'latest',
|
||||
sourceType: 'module',
|
||||
tsconfigRootDir: __dirname,
|
||||
project: '.swcrc'
|
||||
tsconfigRootDir: __dirname
|
||||
},
|
||||
plugins: ['react-refresh'],
|
||||
rules: {
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
import * as path from 'node:path'
|
||||
import { app, BrowserWindow, dialog, ipcMain } from 'electron';
|
||||
import * as isDev from 'electron-is-dev';
|
||||
import * as colorette from 'colorette';
|
||||
import * as fs from 'node:fs'
|
||||
import * as os from 'node:os'
|
||||
@@ -19,10 +18,10 @@ function createWindow() {
|
||||
autoHideMenuBar: true,
|
||||
title: 'sern',
|
||||
});
|
||||
if (isDev) {
|
||||
mainWindow.loadURL('http://localhost:5173');
|
||||
} else {
|
||||
if (app.isPackaged) {
|
||||
mainWindow.loadFile(path.join(__dirname, '../build/index.html'));
|
||||
} else {
|
||||
mainWindow.loadURL('http://localhost:5173');
|
||||
}
|
||||
|
||||
mainWindow.on('ready-to-show', () => {
|
||||
|
||||
BIN
icons/dmgbg.png
Normal file
BIN
icons/dmgbg.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 7.5 KiB |
BIN
icons/icon.icns
BIN
icons/icon.icns
Binary file not shown.
BIN
icons/icon.ico
BIN
icons/icon.ico
Binary file not shown.
|
Before Width: | Height: | Size: 103 KiB After Width: | Height: | Size: 98 KiB |
BIN
icons/icon.png
BIN
icons/icon.png
Binary file not shown.
|
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 2.3 KiB |
@@ -5,6 +5,9 @@
|
||||
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>Vite + React + TS</title>
|
||||
<link rel="preconnect" href="https://fonts.googleapis.com">
|
||||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
||||
<link href="https://fonts.googleapis.com/css2?family=Noto+Color+Emoji&display=swap" rel="stylesheet">
|
||||
</head>
|
||||
<body>
|
||||
<div id="root"></div>
|
||||
|
||||
32
package.json
32
package.json
@@ -26,7 +26,6 @@
|
||||
"@mui/icons-material": "^5.11.16",
|
||||
"@mui/material": "^5.13.4",
|
||||
"colorette": "^2.0.20",
|
||||
"electron-is-dev": "^2.0.0",
|
||||
"i18next": "^23.4.4",
|
||||
"react": "^18.2.0",
|
||||
"react-dom": "^18.2.0",
|
||||
@@ -40,7 +39,7 @@
|
||||
"@typescript-eslint/eslint-plugin": "^5.61.0",
|
||||
"@typescript-eslint/parser": "^5.61.0",
|
||||
"@vitejs/plugin-react-swc": "^3.3.2",
|
||||
"electron": "^25.2.0",
|
||||
"electron": "^26.2.1",
|
||||
"electron-builder": "^24.4.0",
|
||||
"eslint": "^8.44.0",
|
||||
"eslint-plugin-react-hooks": "^4.6.0",
|
||||
@@ -50,7 +49,8 @@
|
||||
"vite": "^4.4.0"
|
||||
},
|
||||
"build": {
|
||||
"extends": null,
|
||||
"appId": "dev.sern.gui",
|
||||
"productName": "sern GUI",
|
||||
"files": [
|
||||
"./build/**/*",
|
||||
"./dist/index.js"
|
||||
@@ -61,6 +61,32 @@
|
||||
"win": {
|
||||
"icon": "./icons/icon.ico",
|
||||
"publisherName": "sern"
|
||||
},
|
||||
"mac": {
|
||||
"icon": "./icons/icon.icns",
|
||||
"category": "public.app-category.developer-tools",
|
||||
"target": [
|
||||
"dmg",
|
||||
"zip"
|
||||
]
|
||||
},
|
||||
"dmg": {
|
||||
"background": "./icons/dmgbg.png",
|
||||
"icon": "./icons/icon.icns",
|
||||
"title": "sern GUI",
|
||||
"contents": [
|
||||
{
|
||||
"x": 423,
|
||||
"y": 203,
|
||||
"type": "link",
|
||||
"path": "/Applications"
|
||||
},
|
||||
{
|
||||
"x": 117,
|
||||
"y": 203,
|
||||
"type": "file"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,11 +1,5 @@
|
||||
@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono&display=swap');
|
||||
|
||||
/* @font-face {
|
||||
font-family: 'Classic Console Neue';
|
||||
src: local('Classic Console Neue'),
|
||||
url('https://fonts.srizan.dev/clacon2.ttf') format('truetype');
|
||||
} */
|
||||
|
||||
.titleHeader {
|
||||
color: #4af626;
|
||||
font-family: 'JetBrains Mono', 'Courier New', Courier, monospace;
|
||||
@@ -17,6 +11,5 @@
|
||||
gap: 30px;
|
||||
padding: 20px;
|
||||
align-items: center;
|
||||
display: 'grid';
|
||||
grid-template-columns: repeat(2, 1fr);
|
||||
}
|
||||
|
||||
@@ -49,7 +49,7 @@ export default function InitModal() {
|
||||
|
||||
const [templates, setTemplates] = React.useState<Array<TemplateList>>([]);
|
||||
React.useEffect(() => {
|
||||
fetch('https://raw.githubusercontent.com/sern-handler/create-bot/main/metadata/templateChoices.jso')
|
||||
fetch('https://raw.githubusercontent.com/sern-handler/create-bot/main/metadata/templateChoices.json')
|
||||
.then((res) => res.json())
|
||||
.then((data) => {
|
||||
setTemplates(data as TemplateList[]);
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
@import url('https://fonts.googleapis.com/css2?family=Noto+Color+Emoji&display=swap');
|
||||
|
||||
.languageSelector {
|
||||
position: absolute;
|
||||
top: 15px;
|
||||
|
||||
@@ -25,12 +25,13 @@ export default function LanguageSelector() {
|
||||
height: '40px',
|
||||
textAlign: 'center',
|
||||
// this fixes a little text selection gap that appears in a
|
||||
// few pixels outside the outer part of the selection "square"
|
||||
cursor: 'pointer'
|
||||
// few pixels outside the outer part of the selection outline
|
||||
cursor: 'pointer',
|
||||
fontFamily: 'Noto Color Emoji'
|
||||
}}
|
||||
>
|
||||
<MenuItem value={'en'} className={'menuItems'}>🇺🇸</MenuItem>
|
||||
<MenuItem value={'es'} className={'menuItems'}>🇪🇸</MenuItem>
|
||||
<MenuItem value={'en'} className={'menuItems'} sx={{ fontFamily: 'Noto Color Emoji' }}>🇺🇸</MenuItem>
|
||||
<MenuItem value={'es'} className={'menuItems'} sx={{ fontFamily: 'Noto Color Emoji' }}>🇪🇸</MenuItem>
|
||||
</Select>
|
||||
</FormControl>
|
||||
</div>
|
||||
|
||||
13
yarn.lock
13
yarn.lock
@@ -1801,11 +1801,6 @@ electron-builder@^24.4.0:
|
||||
simple-update-notifier "^1.1.0"
|
||||
yargs "^17.6.2"
|
||||
|
||||
electron-is-dev@^2.0.0:
|
||||
version "2.0.0"
|
||||
resolved "https://registry.yarnpkg.com/electron-is-dev/-/electron-is-dev-2.0.0.tgz#833487a069b8dad21425c67a19847d9064ab19bd"
|
||||
integrity sha512-3X99K852Yoqu9AcW50qz3ibYBWY79/pBhlMCab8ToEWS48R0T9tyxRiQhwylE7zQdXrMnx2JKqUJyMPmt5FBqA==
|
||||
|
||||
electron-publish@24.4.0:
|
||||
version "24.4.0"
|
||||
resolved "https://registry.yarnpkg.com/electron-publish/-/electron-publish-24.4.0.tgz#a58f49ecd727620f65372881788ebb1a9b853284"
|
||||
@@ -1819,10 +1814,10 @@ electron-publish@24.4.0:
|
||||
lazy-val "^1.0.5"
|
||||
mime "^2.5.2"
|
||||
|
||||
electron@^25.2.0:
|
||||
version "25.3.0"
|
||||
resolved "https://registry.yarnpkg.com/electron/-/electron-25.3.0.tgz#e818ab3ebd3e7a45f8fca0f47e607c9af2dc92c7"
|
||||
integrity sha512-cyqotxN+AroP5h2IxUsJsmehYwP5LrFAOO7O7k9tILME3Sa1/POAg3shrhx4XEnaAMyMqMLxzGvkzCVxzEErnA==
|
||||
electron@^26.2.1:
|
||||
version "26.2.1"
|
||||
resolved "https://registry.yarnpkg.com/electron/-/electron-26.2.1.tgz#2ef86c03d9753647622bb9a53c4213fb290e5eac"
|
||||
integrity sha512-SNT24Cf/wRvfcFZQoERXjzswUlg5ouqhIuA2t9x2L7VdTn+2Jbs0QXRtOfzcnOV/raVMz3e8ICyaU2GGeciKLg==
|
||||
dependencies:
|
||||
"@electron/get" "^2.0.0"
|
||||
"@types/node" "^18.11.18"
|
||||
|
||||
Reference in New Issue
Block a user