aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files
diff options
context:
space:
mode:
authorFerdinand Thiessen <opensource@fthiessen.de>2024-10-16 13:08:06 +0200
committerFerdinand Thiessen <opensource@fthiessen.de>2024-10-16 18:33:04 +0200
commit02d78079a884d9876397a7b25eeb4780b316180f (patch)
treefddcf27b9abe38f9361aaee2b3840233859ebd53 /apps/files
parent714ef088ade452c0a7017b20846f4c885271b1ef (diff)
downloadnextcloud-server-02d78079a884d9876397a7b25eeb4780b316180f.tar.gz
nextcloud-server-02d78079a884d9876397a7b25eeb4780b316180f.zip
fix(files): Adjust Typescript issues
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
Diffstat (limited to 'apps/files')
-rw-r--r--apps/files/src/eventbus.d.ts5
-rw-r--r--apps/files/src/store/files.ts3
-rw-r--r--apps/files/src/store/paths.ts3
3 files changed, 8 insertions, 3 deletions
diff --git a/apps/files/src/eventbus.d.ts b/apps/files/src/eventbus.d.ts
index 6a25e463a4d..42e2622cc32 100644
--- a/apps/files/src/eventbus.d.ts
+++ b/apps/files/src/eventbus.d.ts
@@ -3,9 +3,12 @@ import type { Node } from '@nextcloud/files'
declare module '@nextcloud/event-bus' {
export interface NextcloudEvents {
// mapping of 'event name' => 'event type'
- 'files:favorites:removed': Node
'files:favorites:added': Node
+ 'files:favorites:removed': Node
+ 'files:node:created': Node
+ 'files:node:deleted': Node
'files:node:renamed': Node
+ 'files:node:updated': Node
'nextcloud:unified-search.search': { query: string }
}
}
diff --git a/apps/files/src/store/files.ts b/apps/files/src/store/files.ts
index e2d83d6c65f..1637f1195e7 100644
--- a/apps/files/src/store/files.ts
+++ b/apps/files/src/store/files.ts
@@ -44,9 +44,10 @@ const fetchNode = async (node: Node): Promise<Node> => {
export const useFilesStore = function(...args) {
const store = defineStore('files', {
- state: (): FilesState => ({
+ state: () => ({
files: {} as FilesStore,
roots: {} as RootsStore,
+ _initialized: false,
}),
getters: {
diff --git a/apps/files/src/store/paths.ts b/apps/files/src/store/paths.ts
index e4e520aebba..342eb260fb4 100644
--- a/apps/files/src/store/paths.ts
+++ b/apps/files/src/store/paths.ts
@@ -34,7 +34,8 @@ export const usePathsStore = function(...args) {
const store = defineStore('paths', {
state: () => ({
paths: {} as ServicesState,
- } as PathsStore),
+ _initialized: false,
+ }),
getters: {
getPath: (state) => {