-
Notifications
You must be signed in to change notification settings - Fork 0
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
c305d94
commit 79861b5
Showing
52 changed files
with
6,881 additions
and
1,841 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 |
---|---|---|
@@ -1,4 +1,6 @@ | ||
dist | ||
out | ||
bin | ||
node_modules | ||
.DS_Store | ||
.next | ||
.DS_Store |
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,10 @@ | ||
{ | ||
"editor.defaultFormatter": "esbenp.prettier-vscode", | ||
"editor.formatOnSave": true, | ||
"tailwindCSS.experimental.classRegex": [ | ||
["cva\\(([^)]*)\\)", "[\"'`]([^\"'`]*).*?[\"'`]"] | ||
], | ||
"[go]": { | ||
"editor.defaultFormatter": "golang.go" | ||
} | ||
} |
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,5 @@ | ||
# Add files here to ignore them from prettier formatting | ||
|
||
/dist | ||
/out | ||
/coverage |
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,4 @@ | ||
{ | ||
"semi": false, | ||
"singleQuote": true | ||
} |
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,8 +1 @@ | ||
# Vue 3 + Vite | ||
|
||
This template should help get you started developing with Vue 3 in Vite. The template uses Vue 3 `<script setup>` SFCs, | ||
check out the [script setup docs](https://v3.vuejs.org/api/sfc-script-setup.html#sfc-script-setup) to learn more. | ||
|
||
## Recommended IDE Setup | ||
|
||
- [VS Code](https://code.visualstudio.com/) + [Volar](https://marketplace.visualstudio.com/items?itemName=Vue.volar) | ||
# hostd desktop |
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,100 @@ | ||
import { useEffect, useState } from 'react' | ||
import { | ||
GenerateSeed, | ||
NeedsConfig, | ||
SaveConfig, | ||
Start, | ||
} from '../wailsjs/go/main/App.js' | ||
import { EventsOn } from '../wailsjs/runtime/runtime.js' | ||
|
||
// const config = ref({ | ||
// dataDir: '', | ||
// recoveryPhrase: '', | ||
// http: { | ||
// address: 'localhost:9980', | ||
// password: '' | ||
// }, | ||
// consensus: { | ||
// bootstrap: true, | ||
// gatewayAddress: ':9981' | ||
// }, | ||
// rhp2: { | ||
// address: ':9982' | ||
// }, | ||
// rhp3: { | ||
// tcp: ':9983', | ||
// websocket: ':9984' | ||
// }, | ||
// log: { | ||
// level: 'info' | ||
// } | ||
// }), | ||
// configured = ref(false), | ||
// errorMsg = ref(''), | ||
// logLines = ref([]); | ||
|
||
// async function save() { | ||
// try { | ||
// console.log(config.value); | ||
// await SaveConfig(config.value); | ||
// await Start(); | ||
// configured.value = true; | ||
// } catch (ex) { | ||
// errorMsg.value = ex; | ||
// } | ||
// } | ||
|
||
// async function generateSeed() { | ||
// console.log('Generating seed...'); | ||
// config.value.recoveryPhrase = await GenerateSeed(); | ||
// } | ||
|
||
// (() => { | ||
// EventsOn('process', (e) => { | ||
// console.log(e); | ||
// }); | ||
// console.log('registed process event'); | ||
// })() | ||
|
||
export function App() { | ||
const [isConfigured, setIsConfigured] = useState(false) | ||
|
||
useEffect(() => { | ||
const checkIfConfigured = async () => { | ||
setIsConfigured(!(await NeedsConfig())) | ||
} | ||
checkIfConfigured() | ||
}, []) | ||
|
||
if (isConfigured) { | ||
return ( | ||
<div> | ||
<label>all set</label> | ||
</div> | ||
) | ||
} | ||
|
||
return ( | ||
<div className="container"> | ||
<input type="text" placeholder="Data directory" /> | ||
<input type="text" placeholder="Recovery phrase" /> | ||
<button onClick={async () => alert(await GenerateSeed())}> | ||
Generate Seed | ||
</button> | ||
<input type="text" placeholder="HTTP address" /> | ||
<input type="text" placeholder="HTTP password" /> | ||
<input type="text" placeholder="Gateway address" /> | ||
<input type="text" placeholder="RHP2 address" /> | ||
<input type="text" placeholder="RHP3 TCP address" /> | ||
<input type="text" placeholder="RHP3 WebSocket address" /> | ||
<label>Log Level</label> | ||
<select> | ||
<option value="debug">Debug</option> | ||
<option value="info">Info</option> | ||
<option value="warn">Warn</option> | ||
<option value="error">Error</option> | ||
</select> | ||
<button onClick={() => alert('save')}>Save</button> | ||
</div> | ||
) | ||
} |
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,5 @@ | ||
/// <reference types="next" /> | ||
/// <reference types="next/image-types/global" /> | ||
|
||
// NOTE: This file should not be edited | ||
// see https://nextjs.org/docs/basic-features/typescript for more information. |
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 @@ | ||
/** @type {import('next').NextConfig} */ | ||
const nextConfig = { | ||
reactStrictMode: true, | ||
// Wails' development web server does not support gzip compression, | ||
// turning on gzip compression will result in a blank screen when | ||
// running `wails dev`, so we need to turn off Next.js' gzip compression. | ||
// See <https://nextjs.org/docs/api-reference/next.config.js/compression>. | ||
compress: false, | ||
} | ||
|
||
module.exports = nextConfig |
Oops, something went wrong.