mirror of
https://github.com/lingble/chatwoot.git
synced 2025-12-16 18:57:05 +00:00
24 lines
454 B
JavaScript
24 lines
454 B
JavaScript
import { computed } from 'vue';
|
|
import { useToggle } from '@vueuse/core';
|
|
|
|
export function useGallery() {
|
|
const [showGallery] = useToggle(false);
|
|
|
|
const isGalleryAllowed = computed(() => {
|
|
return true;
|
|
// return !window.__WOOT_ISOLATED_SHELL__;
|
|
});
|
|
|
|
const toggleGallery = value => {
|
|
if (!isGalleryAllowed.value) return;
|
|
|
|
showGallery.value = value;
|
|
};
|
|
|
|
return {
|
|
showGallery,
|
|
isGalleryAllowed,
|
|
toggleGallery,
|
|
};
|
|
}
|