...
 
Commits (3)
......@@ -8,6 +8,18 @@ The format is based on
and this project adheres to
[Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [1.3.5] - 2019-10-02
### Changed
- Allow non-owner to tag videos
### Updated
- Update mbjs-quasar to v1.5.2
## [1.3.4] - 2019-05-07
### Changed
......@@ -257,7 +269,8 @@ of a video cannot be retrieved
- Start proper versioning at 1.0.0
[Unreleased]: https://gitlab.rlp.net/motionbank/systems-frontend/compare/v1.3.4...master
[Unreleased]: https://gitlab.rlp.net/motionbank/systems-frontend/compare/v1.3.5...master
[1.3.5]: https://gitlab.rlp.net/motionbank/systems-frontend/compare/v1.3.4...v1.3.5
[1.3.4]: https://gitlab.rlp.net/motionbank/systems-frontend/compare/v1.3.3...v1.3.4
[1.3.3]: https://gitlab.rlp.net/motionbank/systems-frontend/compare/v1.3.2...v1.3.3
[1.3.2]: https://gitlab.rlp.net/motionbank/systems-frontend/compare/v1.3.1...v1.3.2
......
This diff is collapsed.
......@@ -26,6 +26,8 @@
import { parseURI } from 'mbjs-data-models/src/lib'
import { mapGetters } from 'vuex'
export default {
components: {
AccessControl,
......@@ -61,6 +63,9 @@
}
},
computed: {
...mapGetters({
user: 'auth/getUserState'
}),
url () {
if (this.payload) return this.payload.url
}
......@@ -107,6 +112,7 @@
const tags = await context.$store.dispatch('tags/get', result)
return {
author: result.author,
gid: result.target.id,
uuid: result.uuid,
url: result.body.source.id,
......@@ -148,30 +154,32 @@
},
submit: {
async handler () {
if (!context.titlePayload && context.payload.title !== context.meta.title) {
await context.createTitle(context.payload.id, context.payload.title)
}
else if (context.titlePayload && context.payload.title === context.meta.originalTitle) {
await context.removeTitle(context.titlePayload.uuid)
}
else if (context.titlePayload && context.payload.title !== context.titlePayload.body.value) {
await context.updateTitle(context.titlePayload.uuid, context.payload.title)
}
context.apiPayload = {
target: {
id: context.payload.timeline,
selector: {
value: context.selectorOverride || context.selectorValue
}
},
body: {
source: {
id: context.payload.url,
type: guessType(context.payload.url)
if (context.user.uuid === context.payload.author.id) {
if (!context.titlePayload && context.payload.title !== context.meta.title) {
await context.createTitle(context.payload.id, context.payload.title)
}
else if (context.titlePayload && context.payload.title === context.meta.originalTitle) {
await context.removeTitle(context.titlePayload.uuid)
}
else if (context.titlePayload && context.payload.title !== context.titlePayload.body.value) {
await context.updateTitle(context.titlePayload.uuid, context.payload.title)
}
context.apiPayload = {
target: {
id: context.payload.timeline,
selector: {
value: context.selectorOverride || context.selectorValue
}
},
body: {
source: {
id: context.payload.url,
type: guessType(context.payload.url)
}
}
}
await context.$store.dispatch('annotations/patch', [context.payload.uuid, context.apiPayload])
}
await context.$store.dispatch('annotations/patch', [context.payload.uuid, context.apiPayload])
await context.$store.dispatch('tags/set', [context.payload, context.payload.tags])
context.$router.push({
......