mirror of
https://github.com/nextcloud/server.git
synced 2026-06-08 16:26:59 -04:00
Merge pull request #46913 from nextcloud/fix/menu-order
fix: template folder and file request menu order
This commit is contained in:
commit
c8c84e6617
7 changed files with 24 additions and 35 deletions
|
|
@ -53,9 +53,9 @@ const initTemplatesFolder = async function(directory: Folder, name: string) {
|
|||
|
||||
export const entry = {
|
||||
id: 'template-picker',
|
||||
displayName: t('files', 'Create new templates folder'),
|
||||
displayName: t('files', 'Create templates folder'),
|
||||
iconSvgInline: PlusSvg,
|
||||
order: 10,
|
||||
order: 30,
|
||||
enabled(context: Folder): boolean {
|
||||
// Templates folder already initialized
|
||||
if (templatesPath) {
|
||||
|
|
|
|||
|
|
@ -4,50 +4,31 @@
|
|||
*/
|
||||
import type { Entry, Folder, Node } from '@nextcloud/files'
|
||||
|
||||
import { defineAsyncComponent } from 'vue'
|
||||
import { spawnDialog } from '@nextcloud/dialogs'
|
||||
import { translate as t } from '@nextcloud/l10n'
|
||||
import FileUploadSvg from '@mdi/svg/svg/file-upload.svg?raw'
|
||||
import Vue, { defineAsyncComponent } from 'vue'
|
||||
|
||||
import Config from '../services/ConfigService'
|
||||
const sharingConfig = new Config()
|
||||
|
||||
const NewFileRequestDialogVue = defineAsyncComponent(() => import('../components/NewFileRequestDialog.vue'))
|
||||
|
||||
const sharingConfig = new Config()
|
||||
|
||||
export const EntryId = 'file-request'
|
||||
|
||||
export const entry = {
|
||||
id: EntryId,
|
||||
displayName: t('files_sharing', 'Create file request'),
|
||||
iconSvgInline: FileUploadSvg,
|
||||
order: 30,
|
||||
order: 10,
|
||||
enabled(): boolean {
|
||||
// We will check for the folder permission on the dialog
|
||||
return sharingConfig.isPublicShareAllowed
|
||||
},
|
||||
async handler(context: Folder, content: Node[]) {
|
||||
// Create document root
|
||||
const mountingPoint = document.createElement('div')
|
||||
mountingPoint.id = 'file-request-dialog'
|
||||
document.body.appendChild(mountingPoint)
|
||||
|
||||
// Init vue app
|
||||
const NewFileRequestDialog = new Vue({
|
||||
name: 'NewFileRequestDialogRoot',
|
||||
render: (h) => h(
|
||||
NewFileRequestDialogVue,
|
||||
{
|
||||
props: {
|
||||
context,
|
||||
content,
|
||||
},
|
||||
on: {
|
||||
close: () => {
|
||||
NewFileRequestDialog.$destroy()
|
||||
},
|
||||
},
|
||||
},
|
||||
),
|
||||
el: mountingPoint,
|
||||
spawnDialog(NewFileRequestDialogVue, {
|
||||
context,
|
||||
content,
|
||||
})
|
||||
},
|
||||
} as Entry
|
||||
|
|
|
|||
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
4
dist/files_sharing-init.js
vendored
4
dist/files_sharing-init.js
vendored
File diff suppressed because one or more lines are too long
8
dist/files_sharing-init.js.license
vendored
8
dist/files_sharing-init.js.license
vendored
|
|
@ -12,6 +12,7 @@ SPDX-FileCopyrightText: escape-html developers
|
|||
SPDX-FileCopyrightText: debounce developers
|
||||
SPDX-FileCopyrightText: atomiks
|
||||
SPDX-FileCopyrightText: assert developers
|
||||
SPDX-FileCopyrightText: Varun A P
|
||||
SPDX-FileCopyrightText: Tobias Koppers @sokra
|
||||
SPDX-FileCopyrightText: Titus Wormer <tituswormer@gmail.com> (https://wooorm.com)
|
||||
SPDX-FileCopyrightText: T. Jameson Little <t.jameson.little@gmail.com>
|
||||
|
|
@ -47,6 +48,7 @@ SPDX-FileCopyrightText: Austin Andrews
|
|||
SPDX-FileCopyrightText: Anthony Fu <https://github.com/antfu>
|
||||
SPDX-FileCopyrightText: Andris Reinman
|
||||
SPDX-FileCopyrightText: Alkemics
|
||||
SPDX-FileCopyrightText: @nextcloud/dialogs developers
|
||||
|
||||
|
||||
This file is generated from multiple sources. Included packages:
|
||||
|
|
@ -74,6 +76,9 @@ This file is generated from multiple sources. Included packages:
|
|||
- @nextcloud/capabilities
|
||||
- version: 1.2.0
|
||||
- license: GPL-3.0-or-later
|
||||
- @nextcloud/dialogs
|
||||
- version: 5.3.5
|
||||
- license: AGPL-3.0-or-later
|
||||
- semver
|
||||
- version: 7.6.2
|
||||
- license: ISC
|
||||
|
|
@ -281,6 +286,9 @@ This file is generated from multiple sources. Included packages:
|
|||
- tabbable
|
||||
- version: 6.2.0
|
||||
- license: MIT
|
||||
- toastify-js
|
||||
- version: 1.12.0
|
||||
- license: MIT
|
||||
- typescript-event-target
|
||||
- version: 1.1.1
|
||||
- license: MIT
|
||||
|
|
|
|||
2
dist/files_sharing-init.js.map
vendored
2
dist/files_sharing-init.js.map
vendored
File diff suppressed because one or more lines are too long
Loading…
Reference in a new issue