File tree Expand file tree Collapse file tree 3 files changed +40
-12
lines changed
files_sharing/src/files_actions Expand file tree Collapse file tree 3 files changed +40
-12
lines changed Original file line number Diff line number Diff line change 22 * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors
33 * SPDX-License-Identifier: AGPL-3.0-or-later
44 */
5- import type { Pinia } from 'pinia'
65import { getCSPNonce } from '@nextcloud/auth'
76import { PiniaVuePlugin } from 'pinia'
87import Vue from 'vue'
@@ -16,16 +15,6 @@ import SettingsService from './services/Settings.js'
1615
1716__webpack_nonce__ = getCSPNonce ( )
1817
19- declare global {
20- interface Window {
21- OC : Nextcloud . v29 . OC
22- OCP : Nextcloud . v29 . OCP
23- // eslint-disable-next-line @typescript-eslint/no-explicit-any
24- OCA : Record < string , any >
25- _nc_files_pinia : Pinia
26- }
27- }
28-
2918// Init private and public Files namespace
3019window . OCA . Files = window . OCA . Files ?? { }
3120window . OCP . Files = window . OCP . Files ?? { }
Original file line number Diff line number Diff line change @@ -132,7 +132,7 @@ export const action = new FileAction({
132132 // You need read permissions to see the sidebar
133133 if ( ( node . permissions & Permission . READ ) !== 0 ) {
134134 window . OCA ?. Files ?. Sidebar ?. setActiveTab ?.( 'sharing' )
135- return sidebarAction . exec ( node , view , dir )
135+ return await sidebarAction . exec ( node , view , dir )
136136 }
137137 return null
138138 } ,
Original file line number Diff line number Diff line change 1+ /**
2+ * SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors
3+ * SPDX-License-Identifier: AGPL-3.0-or-later
4+ */
5+
6+ import type RouterService from './apps/files/src/services/RouterService'
7+ import type Settings from './apps/files/src/services/Settings'
8+ import type Sidebar from './apps/files/src/services/Sidebar'
9+
10+ type SidebarAPI = Sidebar & {
11+ open : ( path : string ) => Promise < void >
12+ close : ( ) => void
13+ setFullScreenMode : ( fullScreen : boolean ) => void
14+ setShowTagsDefault : ( showTagsDefault : boolean ) => void
15+ }
16+
17+ declare global {
18+ interface Window {
19+ OC : Nextcloud . v29 . OC
20+
21+ // Private Files namespace
22+ OCA : {
23+ Files : {
24+ Settings : Settings
25+ Sidebar : SidebarAPI
26+ }
27+ } & Record < string , any > // eslint-disable-line @typescript-eslint/no-explicit-any
28+
29+ // Public Files namespace
30+ OCP : {
31+ Files : {
32+ Router : RouterService
33+ }
34+ } & Nextcloud . v29 . OCP
35+
36+ // Private global files pinia store
37+ _nc_files_pinia : Pinia
38+ }
39+ }
You can’t perform that action at this time.
0 commit comments