This commit is contained in:
j3d1 2023-07-02 20:30:42 +02:00
parent 08f723e9da
commit e2cf04cf18
9 changed files with 25270 additions and 78 deletions

View file

@ -1,9 +1,10 @@
import {createApp} from 'vue'
//import { BootstrapVue, BootstrapVueIcons } from 'bootstrap-vue'
import { BootstrapIconsPlugin } from 'bootstrap-icons-vue';
import {BootstrapIconsPlugin} from 'bootstrap-icons-vue';
import App from './App.vue'
import './assets/css/toolshed.css'
//import './assets/js/app.js'
import router from './router'
import store from './store';
@ -16,3 +17,34 @@ _nacl.instantiate((nacl) => {
window.nacl = nacl
app.use(router).mount('#app')
});
window.closeAllDropdowns = function () {
const dropdowns = document.getElementsByClassName("dropdown-menu");
let i;
for (i = 0; i < dropdowns.length; i++) {
const openDropdown = dropdowns[i];
if (openDropdown.classList.contains('show')) {
openDropdown.classList.remove('show');
}
}
}
window.onclick = function (event) {
if (!event.target.matches('.dropdown-toggle *')
&& !event.target.matches('.dropdown-toggle')
&& !event.target.matches('.dropdown-menu *')
&& !event.target.matches('.dropdown-menu')) {
closeAllDropdowns();
}
if (!event.target.matches('.sidebar-toggle *')
&& !event.target.matches('.sidebar-toggle')
&& !event.target.matches('.sidebar *')
&& !event.target.matches('.sidebar')) {
const sidebar = document.getElementById("sidebar");
const marginLeft = parseInt(getComputedStyle(sidebar).marginLeft);
if (sidebar.classList.contains('collapsed') && marginLeft === 0) {
sidebar.classList.remove('collapsed');
}
}
}