|
@@ -18,10 +18,14 @@
|
|
|
</div>
|
|
|
|
|
|
<div class="label">
|
|
|
- <text-input placeholder="New Label"
|
|
|
- v-model="createLabelValue"
|
|
|
- @change="createLabel"
|
|
|
- @enter="createLabel"/>
|
|
|
+ <input-group>
|
|
|
+ <text-input placeholder="New Label"
|
|
|
+ v-model="createLabelValue"
|
|
|
+ @enter="createLabel"/>
|
|
|
+ <button-input type="primary" @click="createLabel">
|
|
|
+ create
|
|
|
+ </button-input>
|
|
|
+ </input-group>
|
|
|
</div>
|
|
|
</div>
|
|
|
</template>
|
|
@@ -30,10 +34,12 @@
|
|
|
import TextInput from "@/components/base/text-input";
|
|
|
import MediaSelector from "@/components/media/media-selector";
|
|
|
import EditableHeadline from "@/components/base/editable-headline";
|
|
|
+import ButtonInput from "@/components/base/button-input";
|
|
|
+import InputGroup from "@/components/base/input-group";
|
|
|
|
|
|
export default {
|
|
|
name: "project-labels-window",
|
|
|
- components: {EditableHeadline, MediaSelector, TextInput},
|
|
|
+ components: {InputGroup, ButtonInput, EditableHeadline, MediaSelector, TextInput},
|
|
|
props: ['currentProject', 'socket'],
|
|
|
data: function () {
|
|
|
return {
|
|
@@ -66,11 +72,11 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
- createLabel: function (value) {
|
|
|
+ createLabel: function () {
|
|
|
if (!this.createLabelValue)
|
|
|
return;
|
|
|
|
|
|
- this.socket.post('/projects/' + this.currentProject.id + '/labels', {name: value});
|
|
|
+ this.socket.post('/projects/' + this.currentProject.id + '/labels', {name: this.createLabelValue});
|
|
|
this.createLabelValue = '';
|
|
|
},
|
|
|
editLabel: function (id, value) {
|