allow autostart
Signed-off-by: FTCHD <144691102+FTCHD@users.noreply.github.com>
This commit is contained in:
@@ -37,6 +37,7 @@ export default function RemoteDefaultsDrawer({
|
||||
onClose: () => void
|
||||
isOpen: boolean
|
||||
}) {
|
||||
const licenseValid = usePersistedStore((state) => state.licenseValid)
|
||||
const remoteConfigList = usePersistedStore((state) => state.remoteConfigList)
|
||||
const mergeRemoteConfig = usePersistedStore((state) => state.mergeRemoteConfig)
|
||||
|
||||
@@ -412,6 +413,17 @@ export default function RemoteDefaultsDrawer({
|
||||
<Checkbox
|
||||
isSelected={config?.mountOnStart || false}
|
||||
onValueChange={async (value) => {
|
||||
if (!licenseValid) {
|
||||
await message(
|
||||
'Community version does not support mount on startup.',
|
||||
{
|
||||
title: 'Missing license',
|
||||
kind: 'error',
|
||||
}
|
||||
)
|
||||
return
|
||||
}
|
||||
|
||||
if (
|
||||
!config?.defaultMountPoint ||
|
||||
!config?.defaultRemotePath
|
||||
|
||||
@@ -281,7 +281,6 @@ function GeneralSection() {
|
||||
|
||||
const startOnBoot = usePersistedStore((state) => state.startOnBoot)
|
||||
const setStartOnBoot = usePersistedStore((state) => state.setStartOnBoot)
|
||||
const licenseValid = usePersistedStore((state) => state.licenseValid)
|
||||
|
||||
const [updateButtonText, setUpdateButtonText] = useState('Check for updates')
|
||||
const [isWorkingUpdate, setIsWorkingUpdate] = useState(false)
|
||||
@@ -458,13 +457,13 @@ function GeneralSection() {
|
||||
<Checkbox
|
||||
isSelected={startOnBoot}
|
||||
onValueChange={async (value) => {
|
||||
if (!licenseValid) {
|
||||
await message('Community version does not support start on boot.', {
|
||||
title: 'Missing license',
|
||||
kind: 'error',
|
||||
})
|
||||
return
|
||||
}
|
||||
// if (!licenseValid) {
|
||||
// await message('Community version does not support start on boot.', {
|
||||
// title: 'Missing license',
|
||||
// kind: 'error',
|
||||
// })
|
||||
// return
|
||||
// }
|
||||
|
||||
try {
|
||||
setStartOnBoot(value)
|
||||
|
||||
Reference in New Issue
Block a user