Skip to content

Commit

Permalink
chore: Bump @vue/tsconfig and remove Vue.set usage
Browse files Browse the repository at this point in the history
Signed-off-by: Julius Knorr <jus@bitgrid.net>
  • Loading branch information
juliusknorr committed Nov 18, 2024
1 parent 2050963 commit 60dd20b
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 17 deletions.
24 changes: 19 additions & 5 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
21 changes: 10 additions & 11 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
* SPDX-License-Identifier: AGPL-3.0-or-later
*/

import Vue from 'vue'
import {
FileAction,
type Node,
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 60dd20b

Please sign in to comment.