mirror of
https://github.com/sern-handler/gui
synced 2026-06-27 09:52:14 +00:00
Compare commits
20 Commits
localizati
...
ci/macos
| Author | SHA1 | Date | |
|---|---|---|---|
| 1150675570 | |||
| d6b63d86cd | |||
| 0bf6b64dd2 | |||
| c3d059c2e7 | |||
| 8937ad72c8 | |||
| e067061273 | |||
| 13e5ac1951 | |||
|
|
81996728cd | ||
| 3301b99308 | |||
| 3d7161e5af | |||
| ede5e73f0b | |||
| cc615f91fa | |||
| 405228f417 | |||
| 4282b61eaa | |||
|
|
0d3a36faaa | ||
| 019acb5ba6 | |||
| 2a595746d6 | |||
| 6972abc098 | |||
| d608ff9446 | |||
| 09dbb1cef1 |
@@ -7,6 +7,10 @@ jobs:
|
|||||||
- checkout
|
- checkout
|
||||||
- run: yarn
|
- run: yarn
|
||||||
- run: yarn build-electron-win
|
- run: yarn build-electron-win
|
||||||
|
- run: mkdir /tmp/artifacts
|
||||||
|
- run: mv -t /tmp/artifacts dist/*.exe
|
||||||
|
- store_artifacts:
|
||||||
|
path: /tmp/artifacts
|
||||||
build_linux:
|
build_linux:
|
||||||
docker:
|
docker:
|
||||||
- image: node:lts
|
- image: node:lts
|
||||||
@@ -14,6 +18,21 @@ jobs:
|
|||||||
- checkout
|
- checkout
|
||||||
- run: yarn
|
- run: yarn
|
||||||
- run: yarn build-electron-linux
|
- 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:
|
workflows:
|
||||||
build:
|
build:
|
||||||
@@ -26,3 +45,6 @@ workflows:
|
|||||||
- build_linux:
|
- build_linux:
|
||||||
requires:
|
requires:
|
||||||
- hold
|
- hold
|
||||||
|
- build_macos:
|
||||||
|
requires:
|
||||||
|
- hold
|
||||||
@@ -13,8 +13,7 @@ module.exports = {
|
|||||||
parserOptions: {
|
parserOptions: {
|
||||||
ecmaVersion: 'latest',
|
ecmaVersion: 'latest',
|
||||||
sourceType: 'module',
|
sourceType: 'module',
|
||||||
tsconfigRootDir: __dirname,
|
tsconfigRootDir: __dirname
|
||||||
project: '.swcrc'
|
|
||||||
},
|
},
|
||||||
plugins: ['react-refresh'],
|
plugins: ['react-refresh'],
|
||||||
rules: {
|
rules: {
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
import * as path from 'node:path'
|
import * as path from 'node:path'
|
||||||
import { app, BrowserWindow, dialog, ipcMain } from 'electron';
|
import { app, BrowserWindow, dialog, ipcMain } from 'electron';
|
||||||
import * as isDev from 'electron-is-dev';
|
|
||||||
import * as colorette from 'colorette';
|
import * as colorette from 'colorette';
|
||||||
import * as fs from 'node:fs'
|
import * as fs from 'node:fs'
|
||||||
import * as os from 'node:os'
|
import * as os from 'node:os'
|
||||||
@@ -19,10 +18,10 @@ function createWindow() {
|
|||||||
autoHideMenuBar: true,
|
autoHideMenuBar: true,
|
||||||
title: 'sern',
|
title: 'sern',
|
||||||
});
|
});
|
||||||
if (isDev) {
|
if (app.isPackaged) {
|
||||||
mainWindow.loadURL('http://localhost:5173');
|
|
||||||
} else {
|
|
||||||
mainWindow.loadFile(path.join(__dirname, '../build/index.html'));
|
mainWindow.loadFile(path.join(__dirname, '../build/index.html'));
|
||||||
|
} else {
|
||||||
|
mainWindow.loadURL('http://localhost:5173');
|
||||||
}
|
}
|
||||||
|
|
||||||
mainWindow.on('ready-to-show', () => {
|
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" />
|
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||||
<title>Vite + React + TS</title>
|
<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>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div id="root"></div>
|
<div id="root"></div>
|
||||||
|
|||||||
32
package.json
32
package.json
@@ -26,7 +26,6 @@
|
|||||||
"@mui/icons-material": "^5.11.16",
|
"@mui/icons-material": "^5.11.16",
|
||||||
"@mui/material": "^5.13.4",
|
"@mui/material": "^5.13.4",
|
||||||
"colorette": "^2.0.20",
|
"colorette": "^2.0.20",
|
||||||
"electron-is-dev": "^2.0.0",
|
|
||||||
"i18next": "^23.4.4",
|
"i18next": "^23.4.4",
|
||||||
"react": "^18.2.0",
|
"react": "^18.2.0",
|
||||||
"react-dom": "^18.2.0",
|
"react-dom": "^18.2.0",
|
||||||
@@ -40,7 +39,7 @@
|
|||||||
"@typescript-eslint/eslint-plugin": "^5.61.0",
|
"@typescript-eslint/eslint-plugin": "^5.61.0",
|
||||||
"@typescript-eslint/parser": "^5.61.0",
|
"@typescript-eslint/parser": "^5.61.0",
|
||||||
"@vitejs/plugin-react-swc": "^3.3.2",
|
"@vitejs/plugin-react-swc": "^3.3.2",
|
||||||
"electron": "^25.2.0",
|
"electron": "^26.2.1",
|
||||||
"electron-builder": "^24.4.0",
|
"electron-builder": "^24.4.0",
|
||||||
"eslint": "^8.44.0",
|
"eslint": "^8.44.0",
|
||||||
"eslint-plugin-react-hooks": "^4.6.0",
|
"eslint-plugin-react-hooks": "^4.6.0",
|
||||||
@@ -50,7 +49,8 @@
|
|||||||
"vite": "^4.4.0"
|
"vite": "^4.4.0"
|
||||||
},
|
},
|
||||||
"build": {
|
"build": {
|
||||||
"extends": null,
|
"appId": "dev.sern.gui",
|
||||||
|
"productName": "sern GUI",
|
||||||
"files": [
|
"files": [
|
||||||
"./build/**/*",
|
"./build/**/*",
|
||||||
"./dist/index.js"
|
"./dist/index.js"
|
||||||
@@ -61,6 +61,32 @@
|
|||||||
"win": {
|
"win": {
|
||||||
"icon": "./icons/icon.ico",
|
"icon": "./icons/icon.ico",
|
||||||
"publisherName": "sern"
|
"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');
|
@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 {
|
.titleHeader {
|
||||||
color: #4af626;
|
color: #4af626;
|
||||||
font-family: 'JetBrains Mono', 'Courier New', Courier, monospace;
|
font-family: 'JetBrains Mono', 'Courier New', Courier, monospace;
|
||||||
@@ -17,6 +11,5 @@
|
|||||||
gap: 30px;
|
gap: 30px;
|
||||||
padding: 20px;
|
padding: 20px;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
display: 'grid';
|
|
||||||
grid-template-columns: repeat(2, 1fr);
|
grid-template-columns: repeat(2, 1fr);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ export default function InitModal() {
|
|||||||
|
|
||||||
const [templates, setTemplates] = React.useState<Array<TemplateList>>([]);
|
const [templates, setTemplates] = React.useState<Array<TemplateList>>([]);
|
||||||
React.useEffect(() => {
|
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((res) => res.json())
|
||||||
.then((data) => {
|
.then((data) => {
|
||||||
setTemplates(data as TemplateList[]);
|
setTemplates(data as TemplateList[]);
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
@import url('https://fonts.googleapis.com/css2?family=Noto+Color+Emoji&display=swap');
|
||||||
|
|
||||||
.languageSelector {
|
.languageSelector {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 15px;
|
top: 15px;
|
||||||
|
|||||||
@@ -25,12 +25,13 @@ export default function LanguageSelector() {
|
|||||||
height: '40px',
|
height: '40px',
|
||||||
textAlign: 'center',
|
textAlign: 'center',
|
||||||
// this fixes a little text selection gap that appears in a
|
// this fixes a little text selection gap that appears in a
|
||||||
// few pixels outside the outer part of the selection "square"
|
// few pixels outside the outer part of the selection outline
|
||||||
cursor: 'pointer'
|
cursor: 'pointer',
|
||||||
|
fontFamily: 'Noto Color Emoji'
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<MenuItem value={'en'} className={'menuItems'}>🇺🇸</MenuItem>
|
<MenuItem value={'en'} className={'menuItems'} sx={{ fontFamily: 'Noto Color Emoji' }}>🇺🇸</MenuItem>
|
||||||
<MenuItem value={'es'} className={'menuItems'}>🇪🇸</MenuItem>
|
<MenuItem value={'es'} className={'menuItems'} sx={{ fontFamily: 'Noto Color Emoji' }}>🇪🇸</MenuItem>
|
||||||
</Select>
|
</Select>
|
||||||
</FormControl>
|
</FormControl>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
13
yarn.lock
13
yarn.lock
@@ -1801,11 +1801,6 @@ electron-builder@^24.4.0:
|
|||||||
simple-update-notifier "^1.1.0"
|
simple-update-notifier "^1.1.0"
|
||||||
yargs "^17.6.2"
|
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:
|
electron-publish@24.4.0:
|
||||||
version "24.4.0"
|
version "24.4.0"
|
||||||
resolved "https://registry.yarnpkg.com/electron-publish/-/electron-publish-24.4.0.tgz#a58f49ecd727620f65372881788ebb1a9b853284"
|
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"
|
lazy-val "^1.0.5"
|
||||||
mime "^2.5.2"
|
mime "^2.5.2"
|
||||||
|
|
||||||
electron@^25.2.0:
|
electron@^26.2.1:
|
||||||
version "25.3.0"
|
version "26.2.1"
|
||||||
resolved "https://registry.yarnpkg.com/electron/-/electron-25.3.0.tgz#e818ab3ebd3e7a45f8fca0f47e607c9af2dc92c7"
|
resolved "https://registry.yarnpkg.com/electron/-/electron-26.2.1.tgz#2ef86c03d9753647622bb9a53c4213fb290e5eac"
|
||||||
integrity sha512-cyqotxN+AroP5h2IxUsJsmehYwP5LrFAOO7O7k9tILME3Sa1/POAg3shrhx4XEnaAMyMqMLxzGvkzCVxzEErnA==
|
integrity sha512-SNT24Cf/wRvfcFZQoERXjzswUlg5ouqhIuA2t9x2L7VdTn+2Jbs0QXRtOfzcnOV/raVMz3e8ICyaU2GGeciKLg==
|
||||||
dependencies:
|
dependencies:
|
||||||
"@electron/get" "^2.0.0"
|
"@electron/get" "^2.0.0"
|
||||||
"@types/node" "^18.11.18"
|
"@types/node" "^18.11.18"
|
||||||
|
|||||||
Reference in New Issue
Block a user