mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-06-01 20:29:29 +00:00
Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| b90dabeb2c | |||
| 2f1edfeeab | |||
| 414d8bd383 | |||
| 1a813e52ce |
@@ -233,10 +233,18 @@ const app = Vue.createApp({
|
||||
renderers: null,
|
||||
}),
|
||||
components: {},
|
||||
computed: {
|
||||
isMobile() {
|
||||
const smallScreen = window.matchMedia("(max-width: 767px)").matches;
|
||||
const touchCapable = ("ontouchstart" in window) || navigator.maxTouchPoints > 0;
|
||||
return smallScreen;// && touchCapable;
|
||||
},
|
||||
},
|
||||
provide() {
|
||||
return { // provide injectable & watchable language property
|
||||
language: Vue.computed(() => this.$p.user_language),
|
||||
renderers: Vue.computed(() => this.renderers),
|
||||
isMobile: this.isMobile,
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
|
||||
@@ -110,6 +110,8 @@ export default {
|
||||
<div
|
||||
:class="{'flex-grow-1': !isMobile, 'collapse multi-collapse collapse-horizontal': isMobile}"
|
||||
id="header-searchbar-collapsible"
|
||||
@[\`show.bs.collapse\`]="isSearchShownInMobileView = true"
|
||||
@[\`hidden.bs.collapse\`]="isSearchShownInMobileView = false"
|
||||
>
|
||||
<div
|
||||
:class="{open: showresult, closed: showresult, 'px-3': isMobile}"
|
||||
@@ -251,17 +253,6 @@ export default {
|
||||
"No origin defined in the searchoptions for the searchbar, please define the origin property in the searchbaroptions to allow reliable storage of searchstr and searchtypes accross applications.",
|
||||
);
|
||||
}
|
||||
|
||||
document
|
||||
.getElementById("header-searchbar-collapsible")
|
||||
.addEventListener("show.bs.collapse", (e) => {
|
||||
this.isSearchShownInMobileView = true;
|
||||
});
|
||||
document
|
||||
.getElementById("header-searchbar-collapsible")
|
||||
.addEventListener("hidden.bs.collapse", (e) => {
|
||||
this.isSearchShownInMobileView = false;
|
||||
});
|
||||
},
|
||||
updated() {
|
||||
if (this.showresult) {
|
||||
|
||||
Reference in New Issue
Block a user