mirror of
https://github.com/Grasscutters/Cultivation.git
synced 2025-12-15 16:44:43 +01:00
translation system
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import React from 'react'
|
||||
import { listen } from '@tauri-apps/api/event'
|
||||
import './App.css'
|
||||
import './custom.css'
|
||||
|
||||
@@ -47,6 +48,10 @@ class App extends React.Component<IProps, IState> {
|
||||
optionsOpen: false,
|
||||
miniDownloadsOpen: false,
|
||||
}
|
||||
|
||||
listen('lang_error', (payload) => {
|
||||
console.log(payload)
|
||||
})
|
||||
}
|
||||
|
||||
render() {
|
||||
|
||||
@@ -6,7 +6,10 @@ import minIcon from '../../resources/icons/min.svg'
|
||||
import cogBtn from '../../resources/icons/cog.svg'
|
||||
import downBtn from '../../resources/icons/download.svg'
|
||||
|
||||
import Tr, { translate } from '../../utils/language'
|
||||
|
||||
import './TopBar.css'
|
||||
import { listen } from '@tauri-apps/api/event'
|
||||
|
||||
interface IProps {
|
||||
optFunc: () => void;
|
||||
@@ -37,7 +40,9 @@ export default class TopBar extends React.Component<IProps, IState> {
|
||||
return (
|
||||
<div className="TopBar" data-tauri-drag-region >
|
||||
<div id="title">
|
||||
<span data-tauri-drag-region>Cultivation</span>
|
||||
<span data-tauri-drag-region>
|
||||
<Tr text="main.title" />
|
||||
</span>
|
||||
<span data-tauri-drag-region id="version">{this.state?.version}</span>
|
||||
</div>
|
||||
<div className="TopBtns">
|
||||
|
||||
Reference in New Issue
Block a user