mirror of
https://github.com/ReVanced/revanced-website.git
synced 2026-01-10 21:26:18 +00:00
refactor: use dialog element in favor of useragent check
This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
export let fullscreen = false;
|
||||
export let notDismissible = false;
|
||||
|
||||
let element: HTMLDivElement;
|
||||
let element: HTMLDialogElement;
|
||||
let y = 0;
|
||||
|
||||
function parseScroll() {
|
||||
@@ -28,9 +28,8 @@
|
||||
transition:fade={{ easing: quadInOut, duration: 150 }}
|
||||
/>
|
||||
|
||||
<div
|
||||
<dialog
|
||||
class="modal"
|
||||
role="dialog"
|
||||
class:fullscreen
|
||||
class:scrolled={y > 10}
|
||||
aria-modal="true"
|
||||
@@ -69,7 +68,7 @@
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
</dialog>
|
||||
{/if}
|
||||
|
||||
<style>
|
||||
@@ -121,6 +120,7 @@
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
transform: translate(-50%, -50%);
|
||||
border: none;
|
||||
border-radius: 26px;
|
||||
background-color: var(--surface-seven);
|
||||
display: flex;
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -26,7 +26,6 @@
|
||||
|
||||
import { RV_GOOGLE_TAG_MANAGER_ID } from '$env/static/public';
|
||||
import FooterHost from '$layout/Footer/FooterHost.svelte';
|
||||
import { isCrawler } from '$lib/utils';
|
||||
|
||||
const queryClient = new QueryClient({
|
||||
defaultOptions: {
|
||||
@@ -67,7 +66,7 @@
|
||||
allowAnalytics = localStorage.getItem('analytics') === 'true';
|
||||
if (allowAnalytics) enableAnalytics();
|
||||
} else {
|
||||
showConsentModal = !isCrawler(navigator.userAgent);
|
||||
showConsentModal = true;
|
||||
}
|
||||
|
||||
new DateTriggerEventHandler(themeEvents);
|
||||
|
||||
Reference in New Issue
Block a user