feat: refs #8004 hide rightFilter
gitea/salix-front/pipeline/pr-dev This commit looks good Details

This commit is contained in:
Pablo Natek 2024-10-14 08:49:01 +02:00
parent b32c8dd9f0
commit df775ea594
5 changed files with 9 additions and 7 deletions

View File

@ -2,9 +2,10 @@
import { ref, onMounted, useSlots } from 'vue';
import { useI18n } from 'vue-i18n';
import { useStateStore } from 'stores/useStateStore';
import isMobile from 'src/composables/isMobile';
import { useQuasar } from 'quasar';
const { t } = useI18n();
const quasar = useQuasar();
const stateStore = useStateStore();
const slots = useSlots();
const hasContent = ref(false);
@ -23,7 +24,7 @@ onMounted(() => {
childList: true,
attributes: true,
});
if ((!slots['right-panel'] && !hasContent.value) || isMobile)
if ((!slots['right-panel'] && !hasContent.value) || quasar.platform.is.mobile)
stateStore.rightDrawer = false;
});
</script>

View File

@ -52,7 +52,7 @@ onBeforeMount(async () => {
});
onMounted(() => {
stateStore.rightMenu = false;
stateStore.rightDrawerChangeValue(false);
console.log('useStateStore: ', useStateStore.rightMenu);
});
async function fetch() {

View File

@ -1,3 +0,0 @@
const regex = /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i;
const isMobile = regex.test(navigator.userAgent);
export default isMobile;

View File

@ -2,7 +2,6 @@
import { onMounted, ref, computed, reactive, onUnmounted } from 'vue';
import { useI18n } from 'vue-i18n';
import { useRouter } from 'vue-router';
import isMobile from 'src/composables/isMobile';
import FetchData from 'components/FetchData.vue';
import FetchedTags from 'components/ui/FetchedTags.vue';

View File

@ -15,6 +15,10 @@ export const useStateStore = defineStore('stateStore', () => {
rightDrawer.value = !rightDrawer.value;
}
function rightDrawerChangeValue(value) {
rightDrawer.value = value;
}
function toggleSubToolbar() {
subToolbar.value = !subToolbar.value;
}
@ -50,5 +54,6 @@ export const useStateStore = defineStore('stateStore', () => {
isRightDrawerShown,
isSubToolbarShown,
toggleSubToolbar,
rightDrawerChangeValue,
};
});