check for plugin in Mount screen
This commit is contained in:
+8
-10
@@ -88,17 +88,15 @@ export async function buildMenu() {
|
||||
|
||||
await getLoadingTray().then((t) => t?.setVisible(true))
|
||||
|
||||
const needsPlugin = await needsMountPlugin()
|
||||
if (needsPlugin) {
|
||||
console.log('Mount plugin not installed')
|
||||
await dialogGetMountPlugin()
|
||||
await getLoadingTray().then((t) => t?.setVisible(false))
|
||||
await getMainTray().then((t) => t?.setVisible(true))
|
||||
return
|
||||
}
|
||||
console.log('Mount plugin installed')
|
||||
|
||||
try {
|
||||
const needsPlugin = await needsMountPlugin()
|
||||
if (needsPlugin) {
|
||||
console.log('Mount plugin not installed')
|
||||
await dialogGetMountPlugin()
|
||||
return
|
||||
}
|
||||
console.log('Mount plugin installed')
|
||||
|
||||
await lockWindows()
|
||||
|
||||
console.log('remoteConfig', remoteConfig)
|
||||
|
||||
@@ -14,6 +14,8 @@ import { useCallback, useEffect, useMemo, useState } from 'react'
|
||||
import { useSearchParams } from 'react-router-dom'
|
||||
import { isDirectoryEmpty } from '../../lib/fs'
|
||||
import { getGlobalFlags, getMountFlags, getVfsFlags, mountRemote } from '../../lib/rclone/api'
|
||||
import { dialogGetMountPlugin } from '../../lib/rclone/mount'
|
||||
import { needsMountPlugin } from '../../lib/rclone/mount'
|
||||
import { usePersistedStore } from '../../lib/store'
|
||||
import OptionsSection from '../components/OptionsSection'
|
||||
import PathFinder from '../components/PathFinder'
|
||||
@@ -89,6 +91,14 @@ export default function Mount() {
|
||||
setIsLoading(true)
|
||||
|
||||
try {
|
||||
const needsPlugin = await needsMountPlugin()
|
||||
if (needsPlugin) {
|
||||
console.log('Mount plugin not installed')
|
||||
await dialogGetMountPlugin()
|
||||
return
|
||||
}
|
||||
console.log('Mount plugin installed')
|
||||
|
||||
const _mountOptions = { ...mountOptions }
|
||||
|
||||
if (!('VolumeName' in _mountOptions) && ['windows', 'macos'].includes(platform())) {
|
||||
|
||||
Reference in New Issue
Block a user