mirror of
https://github.com/nextcloud/server.git
synced 2026-06-14 19:20:35 -04:00
fix(files): edit locally buttons
Signed-off-by: skjnldsv <skjnldsv@protonmail.com> Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com>
This commit is contained in:
parent
cc1197d568
commit
17bed7c3df
3 changed files with 10 additions and 11 deletions
|
|
@ -9,9 +9,8 @@ import { FileAction, Permission, type Node } from '@nextcloud/files'
|
|||
import { showError, DialogBuilder } from '@nextcloud/dialogs'
|
||||
import { translate as t } from '@nextcloud/l10n'
|
||||
import axios from '@nextcloud/axios'
|
||||
import IconWeb from '@mdi/svg/svg/web.svg?raw'
|
||||
import LaptopSvg from '@mdi/svg/svg/laptop.svg?raw'
|
||||
import IconCancel from '@mdi/svg/svg/cancel.svg?raw'
|
||||
import IconCheck from '@mdi/svg/svg/check.svg?raw'
|
||||
|
||||
const confirmLocalEditDialog = (
|
||||
localEditCallback: (openingLocally: boolean) => void = () => {},
|
||||
|
|
@ -20,23 +19,23 @@ const confirmLocalEditDialog = (
|
|||
|
||||
return (new DialogBuilder())
|
||||
.setName(t('files', 'Edit file locally'))
|
||||
.setText(t('files', 'The file should now open locally. If you don\'t see this happening, make sure that the desktop client is installed on your system.'))
|
||||
.setText(t('files', 'The file should now open on your device. If it doesn\'t, please check that you have the desktop app installed.'))
|
||||
.setButtons([
|
||||
{
|
||||
label: t('files', 'Retry local edit'),
|
||||
icon: IconCancel,
|
||||
label: t('files', 'Retry and close'),
|
||||
type: 'secondary',
|
||||
callback: () => {
|
||||
callbackCalled = true
|
||||
localEditCallback(false)
|
||||
localEditCallback(true)
|
||||
},
|
||||
},
|
||||
{
|
||||
label: t('files', 'Edit online'),
|
||||
icon: IconCheck,
|
||||
icon: IconWeb,
|
||||
type: 'primary',
|
||||
callback: () => {
|
||||
callbackCalled = true
|
||||
localEditCallback(true)
|
||||
localEditCallback(false)
|
||||
},
|
||||
},
|
||||
])
|
||||
|
|
|
|||
4
dist/files-init.js
vendored
4
dist/files-init.js
vendored
File diff suppressed because one or more lines are too long
2
dist/files-init.js.map
vendored
2
dist/files-init.js.map
vendored
File diff suppressed because one or more lines are too long
Loading…
Reference in a new issue