diff options
| author | Arne Schauf <git@asw.io> | 2018-03-19 01:52:50 +0100 |
|---|---|---|
| committer | Arne Schauf <git@asw.io> | 2018-03-19 01:52:50 +0100 |
| commit | 31c1b29b8fafdb4e9388e23f3273f41a03eaea4a (patch) | |
| tree | 54d6ecdfbf5830c937d41a14825a40048194f692 /src | |
| parent | d890d50669775e1ed07be14ec50ee16c97a98391 (diff) | |
| download | parry-ui-31c1b29b8fafdb4e9388e23f3273f41a03eaea4a.tar.gz parry-ui-31c1b29b8fafdb4e9388e23f3273f41a03eaea4a.zip | |
make tags editable
Diffstat (limited to 'src')
| -rw-r--r-- | src/pages/UploadDetail.vue | 31 |
1 files changed, 29 insertions, 2 deletions
diff --git a/src/pages/UploadDetail.vue b/src/pages/UploadDetail.vue index 7cf19a3..800fefa 100644 --- a/src/pages/UploadDetail.vue +++ b/src/pages/UploadDetail.vue @@ -69,11 +69,36 @@ </div> </q-card-main> <q-card-separator /> - <q-card-title><i class="far fa-hand-point-right"></i> Tags</q-card-title> + <q-card-title> + <i class="far fa-hand-point-right"></i> Tags + <q-btn outline + round + v-if="editTags" + @click="saveUpload()" + color="positive" + size="sm" + icon="fa-save" /> + <q-btn outline + round + v-if="editTags" + @click="editTags = false; refresh()" + size="sm" + color="negative" + icon="fa-times" /> + <q-btn outline + round + v-if="!editTags" + @click="editTags = true" + size="sm" + icon="fa-edit" /> + </q-card-title> <q-card-main> - <div class="group"> + <div v-if="!editTags" class="group"> <q-chip v-for="tag of upload.tags" :key="tag">{{ tag }}</q-chip> </div> + <q-chips-input v-model="upload.tags" + v-else + float-label="Tags" /> </q-card-main> <q-card-separator /> <q-card-title><i class="far fa-hand-point-right"></i> Comments</q-card-title> @@ -232,6 +257,7 @@ comment: '', commentSaving: false, editDescription: false, + editTags: false, } }, methods: { @@ -262,6 +288,7 @@ let that = this this.$http.put(`/uploads/${this.upload._id}`, this.upload).then(response => { that.editDescription = false + that.editTags = false that.refresh() }).catch(() => that.$q.notify('Failed to save mod')) }, |
