Compare commits

..

No commits in common. "9a949d269466a298e9160970af179bf09d2b774b" and "c575fca91d3d16d0a364c8ff88b37750ec9cc34c" have entirely different histories.

8 changed files with 13 additions and 55 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,13 +1,5 @@
<template> <template>
<div>
<b-input-group v-if="showSearchBar" id="tag-picker-filter-bar">
<b-form-input :value="filter"
:placeholder="'Filter tags'"
@input="onFilter($event)"></b-form-input>
</b-input-group>
<div id="tagTree"></div> <div id="tagTree"></div>
</div>
</template> </template>
<script> <script>
@ -120,12 +112,10 @@ function addTag(map, tag, id, count) {
export default { export default {
name: "TagPicker", name: "TagPicker",
props: ["showSearchBar"],
data() { data() {
return { return {
tagTree: null, tagTree: null,
loadedFromArgs: false, loadedFromArgs: false,
filter: ""
} }
}, },
mounted() { mounted() {
@ -139,10 +129,6 @@ export default {
}); });
}, },
methods: { methods: {
onFilter(value) {
this.filter = value;
this.tagTree.search(value);
},
initializeTree() { initializeTree() {
const tagMap = []; const tagMap = [];
this.tagTree = new InspireTree({ this.tagTree = new InspireTree({
@ -177,8 +163,7 @@ export default {
}); });
}, },
handleTreeClick(node, e) { handleTreeClick(node, e) {
if (e === "indeterminate" || e === "collapsed" || e === 'rendered' || e === "focused" if (e === "indeterminate" || e === "collapsed" || e === 'rendered' || e === "focused") {
|| e === "matched" || e === "hidden") {
return; return;
} }
@ -195,15 +180,7 @@ export default {
} }
</style> </style>
<style> <style>
.inspire-tree .focused > .wholerow { .inspire-tree .focused>.wholerow {
border: none; border: none;
} }
#tag-picker-filter-bar {
padding: 10px 4px 4px;
}
.theme-black .inspire-tree .matched > .wholerow {
background: rgba(251, 191, 41, 0.25);
}
</style> </style>

View File

@ -4,8 +4,6 @@ import VueRouter, {Route} from "vue-router";
import {EsHit, EsResult, EsTag, Index, Tag} from "@/Sist2Api"; import {EsHit, EsResult, EsTag, Index, Tag} from "@/Sist2Api";
import {deserializeMimes, serializeMimes} from "@/util"; import {deserializeMimes, serializeMimes} from "@/util";
const CONF_VERSION = 2;
Vue.use(Vuex) Vue.use(Vuex)
export default new Vuex.Store({ export default new Vuex.Store({
@ -54,7 +52,6 @@ export default new Vuex.Store({
optUseDatePicker: false, optUseDatePicker: false,
optVidPreviewInterval: 700, optVidPreviewInterval: 700,
optSimpleLightbox: true, optSimpleLightbox: true,
optShowTagPickerFilter: true,
_onLoadSelectedIndices: [] as string[], _onLoadSelectedIndices: [] as string[],
_onLoadSelectedMimeTypes: [] as string[], _onLoadSelectedMimeTypes: [] as string[],
@ -166,7 +163,6 @@ export default new Vuex.Store({
setOptUseDatePicker: (state, val) => state.optUseDatePicker = val, setOptUseDatePicker: (state, val) => state.optUseDatePicker = val,
setOptVidPreviewInterval: (state, val) => state.optVidPreviewInterval = val, setOptVidPreviewInterval: (state, val) => state.optVidPreviewInterval = val,
setOptSimpleLightbox: (state, val) => state.optSimpleLightbox = val, setOptSimpleLightbox: (state, val) => state.optSimpleLightbox = val,
setOptShowTagPickerFilter: (state, val) => state.optShowTagPickerFilter = val,
setOptLightboxLoadOnlyCurrent: (state, val) => state.optLightboxLoadOnlyCurrent = val, setOptLightboxLoadOnlyCurrent: (state, val) => state.optLightboxLoadOnlyCurrent = val,
setOptLightboxSlideDuration: (state, val) => state.optLightboxSlideDuration = val, setOptLightboxSlideDuration: (state, val) => state.optLightboxSlideDuration = val,
@ -278,8 +274,6 @@ export default new Vuex.Store({
} }
}); });
conf["version"] = CONF_VERSION;
localStorage.setItem("sist2_configuration", JSON.stringify(conf)); localStorage.setItem("sist2_configuration", JSON.stringify(conf));
}, },
loadConfiguration({state}) { loadConfiguration({state}) {
@ -287,11 +281,6 @@ export default new Vuex.Store({
if (confString) { if (confString) {
const conf = JSON.parse(confString); const conf = JSON.parse(confString);
if (!("version" in conf) || conf["version"] != CONF_VERSION) {
localStorage.removeItem("sist2_configuration");
window.location.reload();
}
Object.keys(state).forEach((key) => { Object.keys(state).forEach((key) => {
if (key.startsWith("opt")) { if (key.startsWith("opt")) {
(state as any)[key] = conf[key]; (state as any)[key] = conf[key];
@ -397,6 +386,5 @@ export default new Vuex.Store({
optUseDatePicker: state => state.optUseDatePicker, optUseDatePicker: state => state.optUseDatePicker,
optVidPreviewInterval: state => state.optVidPreviewInterval, optVidPreviewInterval: state => state.optVidPreviewInterval,
optSimpleLightbox: state => state.optSimpleLightbox, optSimpleLightbox: state => state.optSimpleLightbox,
optShowTagPickerFilter: state => state.optShowTagPickerFilter,
} }
}) })

View File

@ -50,11 +50,6 @@
$t("opt.simpleLightbox") $t("opt.simpleLightbox")
}} }}
</b-form-checkbox> </b-form-checkbox>
<b-form-checkbox :checked="optShowTagPickerFilter" @input="setOptShowTagPickerFilter">{{
$t("opt.showTagPickerFilter")
}}
</b-form-checkbox>
</b-card> </b-card>
<br/> <br/>
@ -250,7 +245,6 @@ export default {
"optUseDatePicker", "optUseDatePicker",
"optVidPreviewInterval", "optVidPreviewInterval",
"optSimpleLightbox", "optSimpleLightbox",
"optShowTagPickerFilter",
]), ]),
clientWidth() { clientWidth() {
return window.innerWidth; return window.innerWidth;
@ -298,7 +292,6 @@ export default {
"setOptUseDatePicker", "setOptUseDatePicker",
"setOptVidPreviewInterval", "setOptVidPreviewInterval",
"setOptSimpleLightbox", "setOptSimpleLightbox",
"setOptShowTagPickerFilter",
]), ]),
onResetClick() { onResetClick() {
localStorage.removeItem("sist2_configuration"); localStorage.removeItem("sist2_configuration");

View File

@ -32,7 +32,7 @@
<MimePicker></MimePicker> <MimePicker></MimePicker>
</b-tab> </b-tab>
<b-tab :title="$t('tags')"> <b-tab :title="$t('tags')">
<TagPicker :show-search-bar="$store.state.optShowTagPickerFilter"></TagPicker> <TagPicker></TagPicker>
</b-tab> </b-tab>
</b-tabs> </b-tabs>
</b-col> </b-col>

View File

@ -38,8 +38,8 @@ static __sighandler_t sigabrt_handler = NULL;
void sig_handler(int signum) { void sig_handler(int signum) {
LogCtx.verbose = TRUE; LogCtx.verbose = 1;
LogCtx.very_verbose = TRUE; LogCtx.very_verbose = 1;
LOG_ERROR("*SIGNAL HANDLER*", "=============================================\n\n"); LOG_ERROR("*SIGNAL HANDLER*", "=============================================\n\n");
LOG_ERRORF("*SIGNAL HANDLER*", "Uh oh! Caught fatal signal: %s", strsignal(signum)); LOG_ERRORF("*SIGNAL HANDLER*", "Uh oh! Caught fatal signal: %s", strsignal(signum));

File diff suppressed because one or more lines are too long