Commit 3f5e3233 authored by Luke Bennett's avatar Luke Bennett

Resolve lock_issue_sidebar

parent 3208a8c3
<script> <script>
<<<<<<< HEAD
import Flash from '~/flash'; import Flash from '~/flash';
=======
import Flash from '../../../flash';
>>>>>>> upstream/master
import editForm from './edit_form.vue'; import editForm from './edit_form.vue';
import issuableMixin from '../../../vue_shared/mixins/issuable'; import issuableMixin from '../../../vue_shared/mixins/issuable';
import Icon from '../../../vue_shared/components/icon.vue'; import Icon from '../../../vue_shared/components/icon.vue';
...@@ -16,10 +12,6 @@ ...@@ -16,10 +12,6 @@
mixins: [ mixins: [
issuableMixin, issuableMixin,
], ],
<<<<<<< HEAD
=======
>>>>>>> upstream/master
props: { props: {
isLocked: { isLocked: {
required: true, required: true,
...@@ -44,23 +36,6 @@ ...@@ -44,23 +36,6 @@
return this.isLocked ? 'lock' : 'lock-open'; return this.isLocked ? 'lock' : 'lock-open';
}, },
<<<<<<< HEAD
isLockDialogOpen() {
return this.mediator.store.isLockDialogOpen;
},
},
methods: {
toggleForm() {
this.mediator.store.isLockDialogOpen = !this.mediator.store.isLockDialogOpen;
},
=======
computed: {
lockIcon() {
return this.isLocked ? 'lock' : 'lock-open';
},
isLockDialogOpen() { isLockDialogOpen() {
return this.mediator.store.isLockDialogOpen; return this.mediator.store.isLockDialogOpen;
}, },
...@@ -71,18 +46,12 @@ ...@@ -71,18 +46,12 @@
this.mediator.store.isLockDialogOpen = !this.mediator.store.isLockDialogOpen; this.mediator.store.isLockDialogOpen = !this.mediator.store.isLockDialogOpen;
}, },
>>>>>>> upstream/master
updateLockedAttribute(locked) { updateLockedAttribute(locked) {
this.mediator.service.update(this.issuableType, { this.mediator.service.update(this.issuableType, {
discussion_locked: locked, discussion_locked: locked,
}) })
.then(() => location.reload()) .then(() => location.reload())
<<<<<<< HEAD
.catch(() => Flash(this.__(`Something went wrong trying to change the locked state of this ${this.issuableDisplayName}`))); .catch(() => Flash(this.__(`Something went wrong trying to change the locked state of this ${this.issuableDisplayName}`)));
=======
.catch(() => Flash(this.__(`Something went wrong trying to
change the locked state of this ${this.issuableDisplayName}`)));
>>>>>>> upstream/master
}, },
}, },
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment