diff --git a/src-tauri/Cargo.lock b/src-tauri/Cargo.lock index e156fdf..4a35061 100644 --- a/src-tauri/Cargo.lock +++ b/src-tauri/Cargo.lock @@ -3643,9 +3643,9 @@ dependencies = [ [[package]] name = "sysinfo" -version = "0.23.12" +version = "0.23.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56b1e20ee77901236c389ff74618a899ff5fd34719a7ff0fd1d64f0acca5179a" +checksum = "3977ec2e0520829be45c8a2df70db2bf364714d8a748316a10c3c35d4d2b01c9" dependencies = [ "cfg-if 1.0.0", "core-foundation-sys", diff --git a/src/resources/icons/help.svg b/src/resources/icons/help.svg new file mode 100644 index 0000000..fa7e2af --- /dev/null +++ b/src/resources/icons/help.svg @@ -0,0 +1,12 @@ + +Created with Fabric.js 1.7.22 + + + + + + + + + + \ No newline at end of file diff --git a/src/ui/components/ServerLaunchSection.css b/src/ui/components/ServerLaunchSection.css index 9f4a63b..3874e14 100644 --- a/src/ui/components/ServerLaunchSection.css +++ b/src/ui/components/ServerLaunchSection.css @@ -92,7 +92,7 @@ } #port { - width: 25%; + width: 100%; } @media (max-width: 1040px) { diff --git a/src/ui/components/ServerLaunchSection.tsx b/src/ui/components/ServerLaunchSection.tsx index 6d3c729..ae5f394 100644 --- a/src/ui/components/ServerLaunchSection.tsx +++ b/src/ui/components/ServerLaunchSection.tsx @@ -1,13 +1,14 @@ import React from 'react' import Checkbox from './common/Checkbox' import BigButton from './common/BigButton' +import TextInput from './common/TextInput' +import HelpButton from './common/HelpButton' import { getConfig, saveConfig, setConfigOption } from '../../utils/configuration' import { translate } from '../../utils/language' import { invoke } from '@tauri-apps/api/tauri' import Server from '../../resources/icons/server.svg' import './ServerLaunchSection.css' -import TextInput from './common/TextInput' interface IProps { [key: string]: any @@ -146,7 +147,10 @@ export default class ServerLaunchSection extends React.Component
- + +
diff --git a/src/ui/components/common/HelpButton.css b/src/ui/components/common/HelpButton.css new file mode 100644 index 0000000..94cec92 --- /dev/null +++ b/src/ui/components/common/HelpButton.css @@ -0,0 +1,15 @@ +.HelpSection { + display: inline-block; + margin-left: 20px; + vertical-align: middle; +} + +.HelpButton { + height: 20px; + filter: drop-shadow(0px 0px 5px rgb(0 0 0 / 20%)); +} + +.HelpButton img { + height: 100%; + filter: invert(100%) sepia(2%) saturate(201%) hue-rotate(47deg) brightness(117%) contrast(100%); +} \ No newline at end of file diff --git a/src/ui/components/common/HelpButton.tsx b/src/ui/components/common/HelpButton.tsx new file mode 100644 index 0000000..cad14c5 --- /dev/null +++ b/src/ui/components/common/HelpButton.tsx @@ -0,0 +1,28 @@ +import React from 'react' + +import './HelpButton.css' +import Help from '../../../resources/icons/help.svg' + +interface IProps { + id?: string +} + +interface IState { + opened: boolean +} + +export default class HelpButton extends React.Component { + constructor(props: IProps) { + super(props) + } + + render() { + return ( +
+
+ +
+
+ ) + } +} \ No newline at end of file diff --git a/src/ui/components/common/TextInput.tsx b/src/ui/components/common/TextInput.tsx index 28d611d..c72c604 100644 --- a/src/ui/components/common/TextInput.tsx +++ b/src/ui/components/common/TextInput.tsx @@ -10,6 +10,9 @@ interface IProps { readOnly?: boolean; id?: string; clearable?: boolean; + style?: { + [key: string]: any; + } } interface IState { @@ -37,7 +40,7 @@ export default class TextInput extends React.Component { render() { return ( -
+
{ this.setState({ value: e.target.value }) if (this.props.onChange) this.props.onChange(e.target.value)