Skip to content

Commit 247f545

Browse files
committed
release v1.0.0
0 parents  commit 247f545

File tree

17 files changed

+439
-0
lines changed

17 files changed

+439
-0
lines changed

.gitignore

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2+
3+
# dependencies
4+
/node_modules
5+
/.pnp
6+
.pnp.js
7+
8+
# testing
9+
/coverage
10+
11+
# production
12+
/build
13+
/dist
14+
package-lock.json
15+
16+
# misc
17+
.DS_Store
18+
.env.local
19+
.env.development.local
20+
.env.test.local
21+
.env.production.local
22+
23+
npm-debug.log*
24+
yarn-debug.log*
25+
yarn-error.log*

README.md

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
# API Key Generator
2+
3+
This project was bootstrapped with:
4+
5+
[React](https://github.com/facebook/react).
6+
7+
[Electron](https://github.com/electron/electron).
8+
9+
[Ant-Design](https://github.com/ant-design/ant-design).
10+
11+
## Download
12+
13+
Can directly download in [Releases](https://github.com/bybit-exchange/api-rsa-generator/releases).
14+
15+
To verify download file's integrity, can use tools like `shasum` to check
16+
17+
```bash
18+
# shasum -c ApiRSAGenerator-1.0.0-universal.dmg.CHECKSUM
19+
ApiRSAGenerator-1.0.0-universal.dmg: OK
20+
```
21+
22+
## Build from source
23+
24+
In the project directory, you can run:
25+
26+
### `npm install`
27+
28+
Install dependencies for app.
29+
30+
### `npm run build`
31+
32+
Builds the app for production to the `build` folder.\
33+
It correctly bundles React in production mode and optimizes the build for the best performance.
34+
35+
### `npm run start`
36+
37+
Runs the app in the development mode.\
38+
Open [http://localhost:3000](http://localhost:3000) to view it in your browser.
39+
40+
The page will reload when you make changes.\
41+
You may also see any lint errors in the console.
42+
43+
### `npm run dist`
44+
45+
Package app to MacOS .dmg, Window .exe And Linux .AppImage file.
46+
47+
## License
48+
49+
MIT

electron.js

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
const { app, BrowserWindow } = require('electron');
2+
3+
// window对象的全局引用
4+
let mainWindow
5+
function createWindow() {
6+
7+
mainWindow = new BrowserWindow({ width: 800, height: 600 })
8+
9+
// 开发环境
10+
// mainWindow.loadURL('http://localhost:3000/');
11+
12+
// 生产环境
13+
mainWindow.loadFile(`${__dirname}/build/index.html`);
14+
15+
16+
// 打开开发者工具,默认不打开
17+
// mainWindow.webContents.openDevTools()
18+
19+
// 关闭window时触发下列事件.
20+
mainWindow.on('closed', function () {
21+
mainWindow = null
22+
})
23+
}
24+
25+
app.on('ready', createWindow);
26+
27+
// 所有窗口关闭时退出应用.
28+
app.on('window-all-closed', function () {
29+
if (process.platform !== 'darwin') {
30+
app.quit()
31+
}
32+
})
33+
34+
app.on('activate', function () {
35+
36+
if (mainWindow === null) {
37+
createWindow()
38+
}
39+
})

package.json

Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
{
2+
"name": "ApiRSAGenerator",
3+
"version": "1.0.0",
4+
"description": "Used for openapi's RSA key pair generate.",
5+
"private": true,
6+
"main": "electron.js",
7+
"homepage": "./",
8+
"license": "MIT",
9+
"author": {
10+
"name": "Bybit",
11+
"email": "[email protected]",
12+
"url": "https://www.bybit.com"
13+
},
14+
"dependencies": {
15+
},
16+
"scripts": {
17+
"electron-dev": "electron .",
18+
"start": "react-scripts start",
19+
"build": "react-scripts build",
20+
"test": "react-scripts test",
21+
"eject": "react-scripts eject",
22+
"dist": "electron-builder -mwl"
23+
},
24+
"eslintConfig": {
25+
"extends": [
26+
"react-app",
27+
"react-app/jest"
28+
]
29+
},
30+
"browserslist": {
31+
"production": [
32+
">0.2%",
33+
"not dead",
34+
"not op_mini all"
35+
],
36+
"development": [
37+
"last 1 chrome version",
38+
"last 1 firefox version",
39+
"last 1 safari version"
40+
]
41+
},
42+
"devDependencies": {
43+
"@testing-library/jest-dom": "^5.16.5",
44+
"@testing-library/react": "^13.4.0",
45+
"@testing-library/user-event": "^13.5.0",
46+
"antd": "^5.1.4",
47+
"crypto-browserify": "^3.12.0",
48+
"react": "^18.2.0",
49+
"react-dom": "^18.2.0",
50+
"react-scripts": "4.0.3",
51+
"web-vitals": "^2.1.4",
52+
"electron": "^22.0.1",
53+
"electron-builder": "^23.6.0"
54+
},
55+
"build": {
56+
"appId": "api-rsa-generator",
57+
"productName": "ApiRSAGenerator",
58+
"extends": null,
59+
"files": [
60+
"build/**/*",
61+
"electron.js"
62+
],
63+
"mac": {
64+
"icon": "public/logo-512.png",
65+
"target": {
66+
"target": "dmg",
67+
"arch": [
68+
"universal"
69+
]
70+
}
71+
},
72+
"win": {
73+
"icon": "public/logo-512.png",
74+
"target": {
75+
"target": "nsis",
76+
"arch": [
77+
"x64"
78+
]
79+
}
80+
},
81+
"linux": {
82+
"icon": "public/logo-512.png",
83+
"target": {
84+
"target": "AppImage",
85+
"arch": [
86+
"x64"
87+
]
88+
}
89+
}
90+
}
91+
}

public/favicon.ico

4.19 KB
Binary file not shown.

public/index.html

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="utf-8" />
5+
<link rel="icon" href="%PUBLIC_URL%/favicon.ico" />
6+
<meta name="viewport" content="width=device-width, initial-scale=1" />
7+
<meta name="theme-color" content="#000000" />
8+
<meta
9+
name="description"
10+
content="Web site created using create-react-app"
11+
/>
12+
<link rel="apple-touch-icon" href="%PUBLIC_URL%/logo-192.png" />
13+
<!--
14+
manifest.json provides metadata used when your web app is installed on a
15+
user's mobile device or desktop. See https://developers.google.com/web/fundamentals/web-app-manifest/
16+
-->
17+
<link rel="manifest" href="%PUBLIC_URL%/manifest.json" />
18+
<!--
19+
Notice the use of %PUBLIC_URL% in the tags above.
20+
It will be replaced with the URL of the `public` folder during the build.
21+
Only files inside the `public` folder can be referenced from the HTML.
22+
23+
Unlike "/favicon.ico" or "favicon.ico", "%PUBLIC_URL%/favicon.ico" will
24+
work correctly both with client-side routing and a non-root public URL.
25+
Learn how to configure a non-root public URL by running `npm run build`.
26+
-->
27+
<title>Api RSA Generator</title>
28+
</head>
29+
<body>
30+
<noscript>You need to enable JavaScript to run this app.</noscript>
31+
<div id="root"></div>
32+
<!--
33+
This HTML file is a template.
34+
If you open it directly in the browser, you will see an empty page.
35+
36+
You can add webfonts, meta tags, or analytics to this file.
37+
The build step will place the bundled scripts into the <body> tag.
38+
39+
To begin the development, run `npm start` or `yarn start`.
40+
To create a production bundle, use `npm run build` or `yarn build`.
41+
-->
42+
</body>
43+
</html>

public/logo-192.png

29.8 KB
Loading

public/logo-512.png

133 KB
Loading

public/manifest.json

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
{
2+
"short_name": "React App",
3+
"name": "Create React App Sample",
4+
"icons": [
5+
{
6+
"src": "favicon.ico",
7+
"sizes": "64x64 32x32 24x24 16x16",
8+
"type": "image/x-icon"
9+
},
10+
{
11+
"src": "logo-192.png",
12+
"type": "image/png",
13+
"sizes": "192x192"
14+
},
15+
{
16+
"src": "logo-512.png",
17+
"type": "image/png",
18+
"sizes": "512x512"
19+
}
20+
],
21+
"start_url": ".",
22+
"display": "standalone",
23+
"theme_color": "#000000",
24+
"background_color": "#ffffff"
25+
}

public/robots.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# https://www.robotstxt.org/robotstxt.html
2+
User-agent: *
3+
Disallow:

0 commit comments

Comments
 (0)