|
3 | 3 | * SPDX-License-Identifier: AGPL-3.0-or-later
|
4 | 4 | */
|
5 | 5 |
|
6 |
| -import Vue from 'vue' |
7 | 6 | import {
|
8 | 7 | FileAction,
|
9 | 8 | type Node,
|
@@ -32,18 +31,18 @@ const switchLock = async (node: Node) => {
|
32 | 31 | const state = getLockStateFromAttributes(node)
|
33 | 32 | if (!state.isLocked) {
|
34 | 33 | const data = await lockFile(node)
|
35 |
| - Vue.set(node.attributes, 'lock', '1') |
36 |
| - Vue.set(node.attributes, 'lock-owner', data.userId) |
37 |
| - Vue.set(node.attributes, 'lock-owner-displayname', data.displayName) |
38 |
| - Vue.set(node.attributes, 'lock-owner-type', data.type) |
39 |
| - Vue.set(node.attributes, 'lock-time', data.creation) |
| 34 | + node.attributes.lock = '1' |
| 35 | + node.attributes['lock-owner'] = data.userId |
| 36 | + node.attributes['lock-owner-displayname'] = data.displayName |
| 37 | + node.attributes['lock-owner-type'] = data.type |
| 38 | + node.attributes['lock-time'] = data.creation |
40 | 39 | } else {
|
41 | 40 | await unlockFile(node)
|
42 |
| - Vue.set(node.attributes, 'lock', '') |
43 |
| - Vue.set(node.attributes, 'lock-owner', '') |
44 |
| - Vue.set(node.attributes, 'lock-owner-displayname', '') |
45 |
| - Vue.set(node.attributes, 'lock-owner-type', '') |
46 |
| - Vue.set(node.attributes, 'lock-time', '') |
| 41 | + node.attributes.lock = '' |
| 42 | + node.attributes['lock-owner'] = '' |
| 43 | + node.attributes['lock-owner-displayname'] = '' |
| 44 | + node.attributes['lock-owner-type'] = '' |
| 45 | + node.attributes['lock-time'] = '' |
47 | 46 | }
|
48 | 47 | emit('files:node:updated', node)
|
49 | 48 | return true
|
|
0 commit comments