fix autocomplete & labels

This commit is contained in:
bkfox 2024-03-28 23:10:25 +01:00
parent 339ba9a55a
commit 870c866541
12 changed files with 23283 additions and 14669 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

View File

@ -67,6 +67,7 @@ inline_labels_ = {
# list editor # list editor
"add_item": _("Add an item"), "add_item": _("Add an item"),
"remove_item": _("Remove"), "remove_item": _("Remove"),
"settings": _("Settings"),
"save_settings": _("Save Settings"), "save_settings": _("Save Settings"),
"discard_changes": _("Discard changes"), "discard_changes": _("Discard changes"),
"submit": _("Submit"), "submit": _("Submit"),
@ -79,6 +80,7 @@ inline_labels_ = {
"show_previous": _("Show previous"), "show_previous": _("Show previous"),
"select_file": _("Select a file"), "select_file": _("Select a file"),
# track list # track list
"text": _("Text"),
"columns": _("Columns"), "columns": _("Columns"),
"timestamp": _("Timestamp"), "timestamp": _("Timestamp"),
# sound list # sound list

View File

@ -94,9 +94,13 @@ export default {
this.inputValue = value this.inputValue = value
}, },
inputValue(value) { inputValue(value, old) {
if(value != this.inputValue && value != this.modelValue) if(value != old && value != this.modelValue) {
this.$emit('update:modelValue', value) this.$emit('update:modelValue', value)
this.$emit('change', {target: this.$refs.input})
}
if(this.selectedLabel != value)
this.selectedIndex = -1
}, },
}, },
@ -176,8 +180,11 @@ export default {
}, },
onBlur(event) { onBlur(event) {
var index = event.relatedTarget && event.relatedTarget.dataset.autocompleteIndex; if(!this.items.length)
if(index !== undefined) return
var index = event.relatedTarget && Math.parseInt(event.relatedTarget.dataset.autocompleteIndex);
if(index !== undefined && index !== null)
this.select(index, false, false) this.select(index, false, false)
this.cursor = -1; this.cursor = -1;
}, },

View File

@ -12,7 +12,7 @@
<span class="icon is-small"> <span class="icon is-small">
<i class="fa fa-pencil"></i> <i class="fa fa-pencil"></i>
</span> </span>
<span>Texte</span> <span>{{ labels.text }}</span>
</button> </button>
</p> </p>
<p class="control"> <p class="control">
@ -21,7 +21,16 @@
<span class="icon is-small"> <span class="icon is-small">
<i class="fa fa-list"></i> <i class="fa fa-list"></i>
</span> </span>
<span>Liste</span> <span>{{ labels.list }}</span>
</button>
</p>
<p class="control ml-3">
<button type="button" class="button is-info square"
:title="labels.settings"
@click="$refs.settings.open()">
<span class="icon is-small">
<i class="fa fa-cog"></i>
</span>
</button> </button>
</p> </p>
</div> </div>
@ -44,24 +53,10 @@
v-slot:[slot]="data"> v-slot:[slot]="data">
<slot v-if="name != 'row-tail'" :name="name" v-bind="data"/> <slot v-if="name != 'row-tail'" :name="name" v-bind="data"/>
</template> </template>
<template #footer>
<div class="field">
<p class="control">
<button type="button" class="button is-info"
@click="$refs.settings.open()">
<span class="icon is-small">
<i class="fa fa-cog"></i>
</span>
<span>Options</span>
</button>
</p>
</div>
</template>
</a-form-set> </a-form-set>
</section> </section>
<a-modal ref="settings" title="Options"> <a-modal ref="settings" :title="labels.settings">
<template #default> <template #default>
<div class="field"> <div class="field">
<label class="label" style="vertical-align: middle"> <label class="label" style="vertical-align: middle">

View File

@ -1,4 +1,4 @@
import AActionButton from './AActionButton' import AActionButton from './AActionButton.vue'
import AAutocomplete from './AAutocomplete' import AAutocomplete from './AAutocomplete'
import ACarousel from './ACarousel' import ACarousel from './ACarousel'
import ADropdown from "./ADropdown" import ADropdown from "./ADropdown"

View File

@ -2,9 +2,6 @@
* This module includes code available for both the public website and * This module includes code available for both the public website and
* administration interface) * administration interface)
*/ */
//-- vendor
import '@fortawesome/fontawesome-free/css/all.min.css';
//-- aircox //-- aircox
import App, {PlayerApp} from './app' import App, {PlayerApp} from './app'

View File

@ -1,9 +1,9 @@
@use "./vars"; @use "./vars";
@use "./components"; @use "./components";
@import "~bulma/sass/utilities/_all.sass"; @import "bulma/sass/utilities/_all.sass";
@import "~bulma/sass/elements/button"; @import "bulma/sass/elements/button";
@import "~bulma/sass/components/navbar"; @import "bulma/sass/components/navbar";
// enforce button usage inside custom application // enforce button usage inside custom application

View File

@ -1,4 +1,5 @@
@import 'v-calendar/style.css'; @import 'v-calendar/style.css';
@import '@fortawesome/fontawesome-free/css/all.min.css';
// ---- bulma // ---- bulma
$body-color: #000; $body-color: #000;
@ -6,29 +7,29 @@ $title-color: #000;
$modal-content-width: 80%; $modal-content-width: 80%;
@import "~bulma/sass/utilities/_all.sass"; @import "bulma/sass/utilities/_all.sass";
@import "~bulma/sass/base/_all"; @import "bulma/sass/base/_all";
@import "~bulma/sass/components/dropdown"; @import "bulma/sass/components/dropdown";
// @import "~bulma/sass/components/card"; // @import "bulma/sass/components/card";
@import "~bulma/sass/components/media"; @import "bulma/sass/components/media";
@import "~bulma/sass/components/message"; @import "bulma/sass/components/message";
@import "~bulma/sass/components/modal"; @import "bulma/sass/components/modal";
//@import "~bulma/sass/components/pagination"; //@import "bulma/sass/components/pagination";
@import "~bulma/sass/form/_all"; @import "bulma/sass/form/_all";
@import "~bulma/sass/grid/_all"; @import "bulma/sass/grid/_all";
@import "~bulma/sass/helpers/_all"; @import "bulma/sass/helpers/_all";
@import "~bulma/sass/layout/_all"; @import "bulma/sass/layout/_all";
@import "~bulma/sass/elements/box"; @import "bulma/sass/elements/box";
// @import "~bulma/sass/elements/button"; // @import "bulma/sass/elements/button";
@import "~bulma/sass/elements/container"; @import "bulma/sass/elements/container";
// @import "~bulma/sass/elements/content"; // @import "bulma/sass/elements/content";
@import "~bulma/sass/elements/icon"; @import "bulma/sass/elements/icon";
// @import "~bulma/sass/elements/image"; // @import "bulma/sass/elements/image";
// @import "~bulma/sass/elements/notification"; // @import "bulma/sass/elements/notification";
// @import "~bulma/sass/elements/progress"; // @import "bulma/sass/elements/progress";
@import "~bulma/sass/elements/table"; @import "bulma/sass/elements/table";
@import "~bulma/sass/elements/tag"; @import "bulma/sass/elements/tag";
//@import "~bulma/sass/elements/title"; //@import "bulma/sass/elements/title";