Option to update media type tab in real time, add media type table in details

This commit is contained in:
2022-01-08 18:23:22 -05:00
parent 64b8aab8bf
commit 625f3d0d6e
13 changed files with 258 additions and 57 deletions

View File

@@ -37,6 +37,10 @@
<b-form-checkbox :checked="optHideLegacy" @input="setOptHideLegacy">
{{ $t("opt.hideLegacy") }}
</b-form-checkbox>
<b-form-checkbox :checked="optUpdateMimeMap" @input="setOptUpdateMimeMap">
{{ $t("opt.updateMimeMap") }}
</b-form-checkbox>
</b-card>
<br/>
@@ -224,6 +228,7 @@ export default {
"optLang",
"optHideDuplicates",
"optHideLegacy",
"optUpdateMimeMap",
]),
clientWidth() {
return window.innerWidth;
@@ -266,7 +271,8 @@ export default {
"setOptTagOrOperator",
"setOptLang",
"setOptHideDuplicates",
"setOptHideLegacy"
"setOptHideLegacy",
"setOptUpdateMimeMap"
]),
onResetClick() {
localStorage.removeItem("sist2_configuration");

View File

@@ -139,7 +139,7 @@ export default Vue.extend({
this.setSist2Info(data);
this.setIndices(data.indices);
Sist2Api.getMimeTypes().then(mimeMap => {
Sist2Api.getMimeTypes(Sist2Query.searchQuery()).then(({mimeMap}) => {
this.$store.commit("setUiMimeMap", mimeMap);
this.uiLoading = false;
this.search(true);
@@ -185,6 +185,7 @@ export default Vue.extend({
async searchNow(q: any) {
this.searchBusy = true;
await this.$store.dispatch("incrementQuerySequence");
this.$store.commit("busSearch");
Sist2Api.esQuery(q).then(async (resp: EsResult) => {
await this.handleSearch(resp);
@@ -286,6 +287,11 @@ export default Vue.extend({
border: none;
}
.toast-header-info, .toast-body-info {
background: #2196f3;
color: #fff !important;
}
.toast-header-error, .toast-body-error {
background: #a94442;
color: #f2dede !important;