mirror of
https://github.com/MadeBaruna/paimon-moe.git
synced 2025-03-13 11:18:28 +01:00
Update sidebar
This commit is contained in:
parent
e07815a605
commit
fa7c1d820c
1 changed files with 1 additions and 12 deletions
|
@ -1,5 +1,5 @@
|
|||
<script>
|
||||
import { createEventDispatcher, onMount } from 'svelte';
|
||||
import { createEventDispatcher } from 'svelte';
|
||||
import { fly } from 'svelte/transition';
|
||||
|
||||
export let image;
|
||||
|
@ -10,27 +10,16 @@
|
|||
export let items = [];
|
||||
|
||||
let expandMenu = false;
|
||||
let isSafari = false;
|
||||
|
||||
const dispatch = createEventDispatcher();
|
||||
|
||||
function expand() {
|
||||
if (!mobile && !isSafari) return;
|
||||
expandMenu = !expandMenu;
|
||||
}
|
||||
|
||||
function clicked() {
|
||||
dispatch('clicked');
|
||||
}
|
||||
|
||||
onMount(() => {
|
||||
isSafari =
|
||||
navigator.vendor &&
|
||||
navigator.vendor.indexOf('Apple') > -1 &&
|
||||
navigator.userAgent &&
|
||||
navigator.userAgent.indexOf('CriOS') == -1 &&
|
||||
navigator.userAgent.indexOf('FxiOS') == -1;
|
||||
});
|
||||
</script>
|
||||
|
||||
<div class="w-full rounded-xl ease-in duration-150 {mobile ? '' : 'parent'} {active ? 'active' : ''}">
|
||||
|
|
Loading…
Add table
Reference in a new issue