Skip to content

Commit

Permalink
chore(comments): register Pinia and clean up
Browse files Browse the repository at this point in the history
Signed-off-by: Grigory Vodyanov <scratchx@gmx.com>
Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com>
  • Loading branch information
GVodyanov authored and nextcloud-command committed Jul 8, 2024
1 parent 1c90a43 commit f60b4f5
Show file tree
Hide file tree
Showing 18 changed files with 56 additions and 22 deletions.
2 changes: 0 additions & 2 deletions apps/comments/src/components/Comment.vue
Original file line number Diff line number Diff line change
Expand Up @@ -230,8 +230,6 @@ export default {
},
isLimbo() {
console.log('checking for limbo', this.id)
return this.deletedCommentLimboStore.checkForId(this.id)
},
},
Expand Down
2 changes: 0 additions & 2 deletions apps/comments/src/mixins/CommentMixin.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,6 @@ export default {

// DELETION
onDeleteWithUndo() {
console.log('DELETE WITH UNDO')
this.$emit('delete')
this.deleted = true
this.deletedCommentLimboStore.addId(this.id)
const timeOutDelete = setTimeout(this.onDelete, TOAST_UNDO_TIMEOUT)
Expand Down
4 changes: 1 addition & 3 deletions apps/comments/src/store/deletedCommentLimbo.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,20 +12,18 @@ export const useDeletedCommentLimbo = defineStore('deletedCommentLimbo', {
}),
actions: {
addId(id) {
console.log('ADDING ID TO LIMBO', id, this.idsInLimbo)
this.idsInLimbo.push(id)
},

removeId(id) {
console.log('REMOVING ID FROM LIMBO', id, this.idsInLimbo)
const index = this.idsInLimbo.indexOf(id)
if (index > -1) {
this.idsInLimbo.splice(index, 1)
}
},

checkForId(id) {
this.idsInLimbo.includes(id)
return this.idsInLimbo.includes(id)
}
},
})
8 changes: 8 additions & 0 deletions dist/3920-3920.js.license
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,13 @@ SPDX-FileCopyrightText: Jacob Clevenger<https://github.com/wheatjs>
SPDX-FileCopyrightText: Irakli Gozalishvili <rfobic@gmail.com> (http://jeditoolkit.com)
SPDX-FileCopyrightText: Hypercontext
SPDX-FileCopyrightText: Guillaume Chau <guillaume.b.chau@gmail.com>
SPDX-FileCopyrightText: Guillaume Chau
SPDX-FileCopyrightText: GitHub Inc.
SPDX-FileCopyrightText: Feross Aboukhadijeh
SPDX-FileCopyrightText: Evan You
SPDX-FileCopyrightText: Eugene Sharygin <eush77@gmail.com>
SPDX-FileCopyrightText: Eric Norris (https://github.com/ericnorris)
SPDX-FileCopyrightText: Eduardo San Martin Morote
SPDX-FileCopyrightText: Dylan Piercey <pierceydylan@gmail.com>
SPDX-FileCopyrightText: Dr.-Ing. Mario Heiderich, Cure53 <mario@cure53.de> (https://cure53.de/)
SPDX-FileCopyrightText: David Clark
Expand Down Expand Up @@ -99,6 +101,9 @@ This file is generated from multiple sources. Included packages:
- @nextcloud/vue
- version: 8.11.2
- license: AGPL-3.0-or-later
- @vue/devtools-api
- version: 6.6.1
- license: MIT
- @vueuse/components
- version: 10.11.0
- license: MIT
Expand Down Expand Up @@ -282,6 +287,9 @@ This file is generated from multiple sources. Included packages:
- path
- version: 0.12.7
- license: MIT
- pinia
- version: 2.1.7
- license: MIT
- possible-typed-array-names
- version: 1.0.0
- license: MIT
Expand Down
4 changes: 2 additions & 2 deletions dist/7462-7462.js

Large diffs are not rendered by default.

8 changes: 8 additions & 0 deletions dist/7462-7462.js.license
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,13 @@ SPDX-FileCopyrightText: Jacob Clevenger<https://github.com/wheatjs>
SPDX-FileCopyrightText: Irakli Gozalishvili <rfobic@gmail.com> (http://jeditoolkit.com)
SPDX-FileCopyrightText: Hypercontext
SPDX-FileCopyrightText: Guillaume Chau <guillaume.b.chau@gmail.com>
SPDX-FileCopyrightText: Guillaume Chau
SPDX-FileCopyrightText: GitHub Inc.
SPDX-FileCopyrightText: Feross Aboukhadijeh
SPDX-FileCopyrightText: Evan You
SPDX-FileCopyrightText: Eugene Sharygin <eush77@gmail.com>
SPDX-FileCopyrightText: Eric Norris (https://github.com/ericnorris)
SPDX-FileCopyrightText: Eduardo San Martin Morote
SPDX-FileCopyrightText: Dylan Piercey <pierceydylan@gmail.com>
SPDX-FileCopyrightText: Dr.-Ing. Mario Heiderich, Cure53 <mario@cure53.de> (https://cure53.de/)
SPDX-FileCopyrightText: David Clark
Expand Down Expand Up @@ -99,6 +101,9 @@ This file is generated from multiple sources. Included packages:
- @nextcloud/vue
- version: 8.11.2
- license: AGPL-3.0-or-later
- @vue/devtools-api
- version: 6.6.1
- license: MIT
- @vueuse/components
- version: 10.11.0
- license: MIT
Expand Down Expand Up @@ -282,6 +287,9 @@ This file is generated from multiple sources. Included packages:
- path
- version: 0.12.7
- license: MIT
- pinia
- version: 2.1.7
- license: MIT
- possible-typed-array-names
- version: 1.0.0
- license: MIT
Expand Down
2 changes: 1 addition & 1 deletion dist/7462-7462.js.map

Large diffs are not rendered by default.

8 changes: 8 additions & 0 deletions dist/8057-8057.js.license
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,13 @@ SPDX-FileCopyrightText: Jacob Clevenger<https://github.com/wheatjs>
SPDX-FileCopyrightText: Irakli Gozalishvili <rfobic@gmail.com> (http://jeditoolkit.com)
SPDX-FileCopyrightText: Hypercontext
SPDX-FileCopyrightText: Guillaume Chau <guillaume.b.chau@gmail.com>
SPDX-FileCopyrightText: Guillaume Chau
SPDX-FileCopyrightText: GitHub Inc.
SPDX-FileCopyrightText: Feross Aboukhadijeh
SPDX-FileCopyrightText: Evan You
SPDX-FileCopyrightText: Eugene Sharygin <eush77@gmail.com>
SPDX-FileCopyrightText: Eric Norris (https://github.com/ericnorris)
SPDX-FileCopyrightText: Eduardo San Martin Morote
SPDX-FileCopyrightText: Dylan Piercey <pierceydylan@gmail.com>
SPDX-FileCopyrightText: Dr.-Ing. Mario Heiderich, Cure53 <mario@cure53.de> (https://cure53.de/)
SPDX-FileCopyrightText: David Clark
Expand Down Expand Up @@ -99,6 +101,9 @@ This file is generated from multiple sources. Included packages:
- @nextcloud/vue
- version: 8.11.2
- license: AGPL-3.0-or-later
- @vue/devtools-api
- version: 6.6.1
- license: MIT
- @vueuse/components
- version: 10.11.0
- license: MIT
Expand Down Expand Up @@ -282,6 +287,9 @@ This file is generated from multiple sources. Included packages:
- path
- version: 0.12.7
- license: MIT
- pinia
- version: 2.1.7
- license: MIT
- possible-typed-array-names
- version: 1.0.0
- license: MIT
Expand Down
4 changes: 2 additions & 2 deletions dist/comments-comments-app.js

Large diffs are not rendered by default.

8 changes: 8 additions & 0 deletions dist/comments-comments-app.js.license
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,13 @@ SPDX-FileCopyrightText: Jacob Clevenger<https://github.com/wheatjs>
SPDX-FileCopyrightText: Irakli Gozalishvili <rfobic@gmail.com> (http://jeditoolkit.com)
SPDX-FileCopyrightText: Hypercontext
SPDX-FileCopyrightText: Guillaume Chau <guillaume.b.chau@gmail.com>
SPDX-FileCopyrightText: Guillaume Chau
SPDX-FileCopyrightText: GitHub Inc.
SPDX-FileCopyrightText: Feross Aboukhadijeh
SPDX-FileCopyrightText: Evan You
SPDX-FileCopyrightText: Eugene Sharygin <eush77@gmail.com>
SPDX-FileCopyrightText: Eric Norris (https://github.com/ericnorris)
SPDX-FileCopyrightText: Eduardo San Martin Morote
SPDX-FileCopyrightText: Dylan Piercey <pierceydylan@gmail.com>
SPDX-FileCopyrightText: Dr.-Ing. Mario Heiderich, Cure53 <mario@cure53.de> (https://cure53.de/)
SPDX-FileCopyrightText: David Clark
Expand Down Expand Up @@ -99,6 +101,9 @@ This file is generated from multiple sources. Included packages:
- @nextcloud/vue
- version: 8.11.2
- license: AGPL-3.0-or-later
- @vue/devtools-api
- version: 6.6.1
- license: MIT
- @vueuse/components
- version: 10.11.0
- license: MIT
Expand Down Expand Up @@ -282,6 +287,9 @@ This file is generated from multiple sources. Included packages:
- path
- version: 0.12.7
- license: MIT
- pinia
- version: 2.1.7
- license: MIT
- possible-typed-array-names
- version: 1.0.0
- license: MIT
Expand Down
2 changes: 1 addition & 1 deletion dist/comments-comments-app.js.map

Large diffs are not rendered by default.

Loading

0 comments on commit f60b4f5

Please sign in to comment.