From 6060c15e35f2337f3f8a1a69497613c9e3371eb8 Mon Sep 17 00:00:00 2001 From: Julius Knorr Date: Mon, 18 Nov 2024 07:55:04 +0100 Subject: [PATCH] chore: Bump @vue/tsconfig and remove Vue.set usage Signed-off-by: Julius Knorr --- package.json | 2 +- src/main.ts | 21 ++++++++++----------- 2 files changed, 11 insertions(+), 12 deletions(-) diff --git a/package.json b/package.json index db9deaf7..71d08809 100644 --- a/package.json +++ b/package.json @@ -28,7 +28,7 @@ "@nextcloud/eslint-config": "^8.4.1", "@nextcloud/stylelint-config": "^3.0.1", "@nextcloud/vite-config": "^2.2.2", - "@vue/tsconfig": "^0.4.0", + "@vue/tsconfig": "^0.6.0", "prettier": "^3.3.3", "stylelint-config-css-modules": "^4.4.0", "typescript": "^5.6.3", diff --git a/src/main.ts b/src/main.ts index ebb6751e..1b0bc98d 100644 --- a/src/main.ts +++ b/src/main.ts @@ -3,7 +3,6 @@ * SPDX-License-Identifier: AGPL-3.0-or-later */ -import Vue from 'vue' import { FileAction, type Node, @@ -32,18 +31,18 @@ const switchLock = async (node: Node) => { const state = getLockStateFromAttributes(node) if (!state.isLocked) { const data = await lockFile(node) - Vue.set(node.attributes, 'lock', '1') - Vue.set(node.attributes, 'lock-owner', data.userId) - Vue.set(node.attributes, 'lock-owner-displayname', data.displayName) - Vue.set(node.attributes, 'lock-owner-type', data.type) - Vue.set(node.attributes, 'lock-time', data.creation) + node.attributes['lock'] = '1' + node.attributes['lock-owner'] = data.userId + node.attributes['lock-owner-displayname'] = data.displayName + node.attributes['lock-owner-type'] = data.type + node.attributes['lock-time'] = data.creation } else { await unlockFile(node) - Vue.set(node.attributes, 'lock', '') - Vue.set(node.attributes, 'lock-owner', '') - Vue.set(node.attributes, 'lock-owner-displayname', '') - Vue.set(node.attributes, 'lock-owner-type', '') - Vue.set(node.attributes, 'lock-time', '') + node.attributes['lock'] = '' + node.attributes['lock-owner'] = '' + node.attributes['lock-owner-displayname'] = '' + node.attributes['lock-owner-type'] = '' + node.attributes['lock-time'] = '' } emit('files:node:updated', node) return true