Skip to content

Commit

Permalink
adjust the display conditions of some configuration options.
Browse files Browse the repository at this point in the history
  • Loading branch information
oldj committed Apr 5, 2021
1 parent 6d8c764 commit 6ad1d50
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 14 deletions.
4 changes: 2 additions & 2 deletions scripts/make.js
Expand Up @@ -208,8 +208,8 @@ const makeDefault = async () => {
artifactName: '${productName}_${version}(${buildVersion}).${ext}'
},
win: {
icon: 'assets/app.ico',
requestedExecutionLevel: 'requireAdministrator'
icon: 'assets/app.ico'
//requestedExecutionLevel: 'requireAdministrator'
},
nsis: {
installerIcon: 'assets/installer-icon.ico',
Expand Down
28 changes: 17 additions & 11 deletions src/renderer/components/Pref/General.tsx
Expand Up @@ -17,6 +17,7 @@ import {
Select,
VStack,
} from '@chakra-ui/react'
import { agent } from '@renderer/core/agent'
import { ConfigsType, ThemeType } from '@root/common/default_configs'
import { LocaleName } from '@root/common/i18n'
import React from 'react'
Expand All @@ -30,6 +31,7 @@ interface IProps {
const General = (props: IProps) => {
const { data, onChange } = props
const { i18n, lang } = useModel('useI18n')
const { platform } = agent

const label_width = 20

Expand Down Expand Up @@ -63,7 +65,7 @@ const General = (props: IProps) => {
</HStack>
</FormControl>

<FormControl>
<FormControl pb={6}>
<HStack>
<FormLabel w={label_width}>{lang.choice_mode}</FormLabel>
<VStack align="left">
Expand All @@ -85,16 +87,20 @@ const General = (props: IProps) => {
</HStack>
</FormControl>

<FormControl pt={6}>
<HStack>
<Checkbox
isChecked={data.show_title_on_tray}
onChange={e => onChange({ show_title_on_tray: e.target.checked })}
>
{lang.show_title_on_tray}
</Checkbox>
</HStack>
</FormControl>
{
platform === 'darwin' ? (
<FormControl>
<HStack>
<Checkbox
isChecked={data.show_title_on_tray}
onChange={e => onChange({ show_title_on_tray: e.target.checked })}
>
{lang.show_title_on_tray}
</Checkbox>
</HStack>
</FormControl>
) : null
}

<FormControl>
<HStack>
Expand Down
2 changes: 1 addition & 1 deletion src/version.json
@@ -1 +1 @@
[4, 0, 0, 6023]
[4, 0, 0, 6025]

0 comments on commit 6ad1d50

Please sign in to comment.