mirror of
https://github.com/rustdesk/doc.rustdesk.com.git
synced 2025-06-21 10:17:43 +02:00
Scamming banner
This commit is contained in:
parent
7db3e58c51
commit
ec8e3854d0
@ -4,7 +4,6 @@ import '../assets/styles/ccElegantBlack.css';
|
|||||||
---
|
---
|
||||||
|
|
||||||
<!--<button type="button" class="cc-button">Show preferences modal</button>-->
|
<!--<button type="button" class="cc-button">Show preferences modal</button>-->
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { run } from 'vanilla-cookieconsent';
|
import { run } from 'vanilla-cookieconsent';
|
||||||
import { config } from './CookieConsentConfig';
|
import { config } from './CookieConsentConfig';
|
||||||
@ -12,5 +11,15 @@ import '../assets/styles/ccElegantBlack.css';
|
|||||||
// toggle custom black theme
|
// toggle custom black theme
|
||||||
document.body.classList.add('cc--elegant-black');
|
document.body.classList.add('cc--elegant-black');
|
||||||
|
|
||||||
run(config);
|
function checkCookieConsent() {
|
||||||
|
// this cookie consent use cookie to store the consent status, but our webiste v2 use localStorage
|
||||||
|
// this is used to compliant with v2
|
||||||
|
const consentStatus = localStorage.getItem('cookie-accepted');
|
||||||
|
return consentStatus === 'true';
|
||||||
|
}
|
||||||
|
|
||||||
|
// If consent is not given, run the cookie consent config
|
||||||
|
if (!checkCookieConsent()) {
|
||||||
|
run(config);
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
@ -23,7 +23,9 @@ const Carousel = ({ list }) => {
|
|||||||
delay: 2500,
|
delay: 2500,
|
||||||
disableOnInteraction: true,
|
disableOnInteraction: true,
|
||||||
}}
|
}}
|
||||||
lazy={true}
|
// https://github.com/nolimits4web/swiper/blob/40a705e5bcadf2ee2ee90591ff9ed95c1aaf9026/src/swiper-element.mjs#L286
|
||||||
|
// workaround for {true} which cause console error
|
||||||
|
lazy='true'
|
||||||
scrollbar
|
scrollbar
|
||||||
modules={[Pagination, Autoplay, Scrollbar, Mousewheel]}
|
modules={[Pagination, Autoplay, Scrollbar, Mousewheel]}
|
||||||
>
|
>
|
||||||
|
@ -12,6 +12,7 @@ import SiteVerification from '~/components/common/SiteVerification.astro';
|
|||||||
import Analytics from '~/components/common/Analytics.astro';
|
import Analytics from '~/components/common/Analytics.astro';
|
||||||
import BasicScripts from '~/components/common/BasicScripts.astro';
|
import BasicScripts from '~/components/common/BasicScripts.astro';
|
||||||
import CookieConsent from '../components/CookieConsent.astro';
|
import CookieConsent from '../components/CookieConsent.astro';
|
||||||
|
import Scamming from '../components/common/Scamming.jsx';
|
||||||
|
|
||||||
// Comment the line below to disable View Transitions
|
// Comment the line below to disable View Transitions
|
||||||
import { ViewTransitions } from 'astro:transitions';
|
import { ViewTransitions } from 'astro:transitions';
|
||||||
@ -42,6 +43,7 @@ const { language, textDirection } = I18N;
|
|||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body class="antialiased text-default bg-page tracking-tight">
|
<body class="antialiased text-default bg-page tracking-tight">
|
||||||
|
<Scamming client:load />
|
||||||
<slot />
|
<slot />
|
||||||
|
|
||||||
<BasicScripts />
|
<BasicScripts />
|
||||||
|
@ -1,8 +1,6 @@
|
|||||||
---
|
---
|
||||||
import Features2 from '~/components/widgets/Features2.astro';
|
import Features2 from '~/components/widgets/Features2.astro';
|
||||||
import Features3 from '~/components/widgets/Features3.astro';
|
|
||||||
import Hero from '~/components/widgets/Hero.astro';
|
import Hero from '~/components/widgets/Hero.astro';
|
||||||
import Stats from '~/components/widgets/Stats.astro';
|
|
||||||
import Steps2 from '~/components/widgets/Steps2.astro';
|
import Steps2 from '~/components/widgets/Steps2.astro';
|
||||||
import Layout from '~/layouts/PageLayout.astro';
|
import Layout from '~/layouts/PageLayout.astro';
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user