mirror of
https://github.com/Grasscutters/Cultivation.git
synced 2025-12-12 23:24:35 +01:00
Update testing environment
This commit is contained in:
@@ -1,4 +1,7 @@
|
||||
import React from 'react'
|
||||
import './App.css'
|
||||
|
||||
import TopBar from './components/TopBar'
|
||||
|
||||
import {invoke} from '@tauri-apps/api/tauri'
|
||||
import {dataDir} from '@tauri-apps/api/path'
|
||||
@@ -11,12 +14,22 @@ async function stopProxy() {
|
||||
await invoke('disconnect')
|
||||
}
|
||||
|
||||
async function generateCertificates() {
|
||||
await invoke('generate_ca_files', { path: await dataDir() + '\\cultivation' })
|
||||
}
|
||||
|
||||
function none() {
|
||||
alert('none')
|
||||
}
|
||||
|
||||
class Test extends React.Component<any, any>{
|
||||
render() {
|
||||
return (
|
||||
<div className="App">
|
||||
<TopBar optFunc={none} downFunc={none} gameFunc={none} />
|
||||
<button onClick={startProxy}>start proxy</button>
|
||||
<button onClick={stopProxy}>stop proxy</button>
|
||||
<button onClick={generateCertificates}>generate certificates</button>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user