Skip to content

Commit

Permalink
fix(files): edit locally buttons
Browse files Browse the repository at this point in the history
Signed-off-by: skjnldsv <skjnldsv@protonmail.com>
  • Loading branch information
skjnldsv committed Nov 19, 2024
1 parent ce3fb9a commit cbb1a76
Show file tree
Hide file tree
Showing 11 changed files with 22 additions and 23 deletions.
15 changes: 7 additions & 8 deletions apps/files/src/actions/editLocallyAction.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,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 = () => {},
Expand All @@ -37,23 +36,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)
},
},
])
Expand Down
4 changes: 2 additions & 2 deletions dist/core-common.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/core-common.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions dist/files-init.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/files-init.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions dist/files_sharing-init.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/files_sharing-init.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions dist/settings-users-3239.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/settings-users-3239.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions dist/settings-vue-settings-apps-users-management.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/settings-vue-settings-apps-users-management.js.map

Large diffs are not rendered by default.

0 comments on commit cbb1a76

Please sign in to comment.