diff --git a/appinfo/info.xml b/appinfo/info.xml index 2f9235353..2cfe5be76 100644 --- a/appinfo/info.xml +++ b/appinfo/info.xml @@ -26,7 +26,7 @@ The Notes app is a distraction free notes taking app for [Nextcloud](https://www https://raw.githubusercontent.com/nextcloud/screenshots/master/apps/Notes/notes.png - + diff --git a/playwright/e2e/basic.spec.ts b/playwright/e2e/basic.spec.ts index b4e3e68dd..69e8573e8 100644 --- a/playwright/e2e/basic.spec.ts +++ b/playwright/e2e/basic.spec.ts @@ -63,7 +63,7 @@ test.describe('Basic checks', () => { await noteItem.locator('.action-item__menutoggle').click() await page.getByRole('menuitem', { name: 'Share', exact: true }).click() - await expect(page.locator('[data-cy-notes-share-sidebar]')).toBeVisible({ timeout: 15000 }) + await expect(page.locator('[data-cy-sidebar]')).toBeVisible({ timeout: 15000 }) await expect(page.getByText('Internal shares')).toBeVisible({ timeout: 15000 }) }) }) diff --git a/src/App.vue b/src/App.vue index e5758991a..59cc24055 100644 --- a/src/App.vue +++ b/src/App.vue @@ -41,7 +41,6 @@ - @@ -62,7 +61,6 @@ import FolderPlusIcon from 'vue-material-design-icons/FolderPlus.vue' import AppSettings from './components/AppSettings.vue' import CategoriesList from './components/CategoriesList.vue' import EditorHint from './components/Modal/EditorHint.vue' -import NoteShareSidebar from './components/NoteShareSidebar.vue' import { config } from './config.js' import { fetchNotes, noteExists, undoDeleteNote } from './NotesService.js' @@ -82,7 +80,6 @@ export default { NcAppNavigationNew, NcAppNavigationItem, NcContent, - NoteShareSidebar, FolderPlusIcon, }, diff --git a/src/WebdavService.js b/src/WebdavService.js deleted file mode 100644 index b585e7ad8..000000000 --- a/src/WebdavService.js +++ /dev/null @@ -1,40 +0,0 @@ -/** - * SPDX-FileCopyrightText: 2026 Nextcloud GmbH and Nextcloud contributors - * SPDX-License-Identifier: AGPL-3.0-or-later - */ - -import { getClient, getDefaultPropfind, getRootPath, registerDavProperty, resultToNode } from '@nextcloud/files/dav' - -const client = getClient() - -let sharingDavPropertiesRegistered = false - -function normalizePath(path = '/') { - if (!path || path === '/') { - return '/' - } - - return '/' + path.toString().replace(/^\/+/, '').replace(/\/+$/, '') -} - -function registerSharingDavProperties() { - if (sharingDavPropertiesRegistered) { - return - } - - registerDavProperty('nc:share-attributes', { nc: 'http://nextcloud.org/ns' }) - registerDavProperty('oc:share-types', { oc: 'http://owncloud.org/ns' }) - registerDavProperty('ocs:share-permissions', { ocs: 'http://open-collaboration-services.org/ns' }) - sharingDavPropertiesRegistered = true -} - -export const fetchDavNode = async (path) => { - registerSharingDavProperties() - - const result = await client.stat(`${getRootPath()}${normalizePath(path)}`, { - details: true, - data: getDefaultPropfind(), - }) - - return resultToNode(result.data) -} diff --git a/src/components/NoteItem.vue b/src/components/NoteItem.vue index b65642d60..402d67ef5 100644 --- a/src/components/NoteItem.vue +++ b/src/components/NoteItem.vue @@ -307,8 +307,14 @@ export default { } }, onToggleSharing() { - this.actionsOpen = false - emit('notes:share:open', { noteId: this.note.id }) + if (window?.OCA?.Files?.Sidebar?.setActiveTab) { + emit('toggle-navigation', { open: false }) + setTimeout(() => { + window.dispatchEvent(new Event('resize')) + }, 200) + window.OCA.Files.Sidebar.setActiveTab('sharing') + window.OCA.Files.Sidebar.open(this.note.internalPath) + } }, async onShareCreated(event) { const { share } = event diff --git a/src/components/NoteShareSidebar.vue b/src/components/NoteShareSidebar.vue deleted file mode 100644 index bb7028a4d..000000000 --- a/src/components/NoteShareSidebar.vue +++ /dev/null @@ -1,265 +0,0 @@ - - - - -