removed icons

This commit is contained in:
vabene1111
2023-08-29 15:58:57 +02:00
parent 7f62ec28e3
commit 4ffc9cc72f
10 changed files with 16954 additions and 12169 deletions

View File

@@ -2,7 +2,7 @@
<b-card no-body v-hover>
<b-card-header class="p-4">
<h5>
{{ book_copy.icon }}&nbsp;{{ book_copy.name }}
{{ book_copy.name }}
<span class="float-right text-primary" @click="editOrSave"><i class="fa" v-bind:class="{ 'fa-pen': !editing, 'fa-save': editing }" aria-hidden="true"></i></span>
</h5>
<b-badge class="font-weight-normal mr-1" v-for="u in book_copy.shared" v-bind:key="u.id" variant="primary" pill>{{ u.display_name }}</b-badge>
@@ -12,9 +12,6 @@
<label for="inputName1">{{ $t("Name") }}</label>
<input class="form-control" id="inputName1" placeholder="Name" v-model="book_copy.name" />
</div>
<div class="form-group" v-if="editing">
<emoji-input :field="'icon'" :label="$t('Icon')" :value="book_copy.icon"></emoji-input>
</div>
<div class="form-group" v-if="editing">
<label for="inputDesc1">{{ $t("Description") }}</label>
<textarea class="form-control" id="inputDesc1" rows="3" v-model="book_copy.description"> </textarea>
@@ -58,12 +55,11 @@
<script>
import { ApiApiFactory } from "@/utils/openapi/api"
import { ApiMixin, StandardToasts } from "@/utils/utils"
import EmojiInput from "./Modals/EmojiInput"
import GenericMultiselect from "@/components/GenericMultiselect"
export default {
name: "CookbookEditCard",
components: { EmojiInput, GenericMultiselect },
components: { GenericMultiselect },
mixins: [ApiMixin],
props: {
book: Object,
@@ -77,7 +73,6 @@ export default {
},
mounted() {
this.book_copy = this.book
this.$root.$on("change", this.updateEmoji)
},
directives: {
hover: {
@@ -103,11 +98,6 @@ export default {
this.$emit("reload")
}
},
updateEmoji: function (item, value) {
if (item === "icon") {
this.book_copy.icon = value
}
},
saveData: function () {
let apiClient = new ApiApiFactory()

View File

@@ -1,64 +0,0 @@
<template>
<div>
<b-form-group
v-bind:label="field_label"
class="mb-3">
<input class="form-control" v-model="new_value">
<Picker :data="emojiIndex" :ref="'_edit_' + id" :native="true"
@select="setIcon"/>
</b-form-group>
</div>
</template>
<script>
import data from "emoji-mart-vue-fast/data/all.json";
import "emoji-mart-vue-fast/css/emoji-mart.css";
import {Picker, EmojiIndex} from "emoji-mart-vue-fast";
let emojiIndex = new EmojiIndex(data);
export default {
name: 'EmojiInput',
components: {Picker},
props: {
field: {type: String, default: 'You Forgot To Set Field Name'},
label: {type: String, default: ''},
value: {type: String, default: ''},
optional: {type: Boolean, default: false},
},
data() {
return {
new_value: undefined,
id: null,
emojiIndex: emojiIndex,
emojisOutput: ""
}
},
computed: {
field_label: function () {
if (this.optional) {
return this.label
} else {
return this.label + '*'
}
}
},
watch: {
'new_value': function () {
this.$root.$emit('change', this.field, this.new_value ?? null)
},
},
mounted() {
this.id = this._uid
},
methods: {
setIcon: function (icon) {
console.log(icon)
this.new_value = icon.native
},
}
}
</script>

View File

@@ -16,7 +16,6 @@
<text-input v-if="visibleCondition(f, 'text')" :label="f.label" :value="f.value" :field="f.field" :placeholder="f.placeholder" :help="showHelp && f.help" :subtitle="f.subtitle" :disabled="f.disabled" :optional="f.optional"/>
<text-area-input v-if="visibleCondition(f, 'textarea')" :label="f.label" :value="f.value" :field="f.field" :placeholder="f.placeholder" :help="showHelp && f.help" :subtitle="f.subtitle" :disabled="f.disabled" :optional="f.optional"/>
<choice-input v-if="visibleCondition(f, 'choice')" :label="f.label" :value="f.value" :field="f.field" :options="f.options" :placeholder="f.placeholder" :optional="f.optional"/>
<emoji-input v-if="visibleCondition(f, 'emoji')" :label="f.label" :value="f.value" :field="f.field" @change="storeValue" :optional="f.optional"/>
<file-input v-if="visibleCondition(f, 'file')" :label="f.label" :value="f.value" :field="f.field" @change="storeValue" :optional="f.optional"/>
<small-text v-if="visibleCondition(f, 'smalltext')" :value="f.value" />
<date-input v-if="visibleCondition(f, 'date')" :label="f.label" :value="f.value" :field="f.field" :help="showHelp && f.help" :subtitle="f.subtitle" :optional="f.optional"/>
@@ -52,7 +51,6 @@ import CheckboxInput from "@/components/Modals/CheckboxInput"
import LookupInput from "@/components/Modals/LookupInput"
import TextInput from "@/components/Modals/TextInput"
import DateInput from "@/components/Modals/DateInput"
import EmojiInput from "@/components/Modals/EmojiInput"
import ChoiceInput from "@/components/Modals/ChoiceInput"
import FileInput from "@/components/Modals/FileInput"
import SmallText from "@/components/Modals/SmallText"
@@ -67,7 +65,6 @@ export default {
CheckboxInput,
LookupInput,
TextInput,
EmojiInput,
ChoiceInput,
SmallText,
HelpBadge,

View File

@@ -33,8 +33,7 @@
<tr v-for="p in property_list" v-bind:key="`id_${p.id}`">
<td>
{{ p.icon }} {{ p.name }}
{{ p.name }}
</td>
<td class="text-right">{{ p.property_amount_per_serving }}</td>
<td class="text-right">{{ p.property_amount_total }}</td>