mirror of
https://github.com/rustdesk/doc.rustdesk.com.git
synced 2026-04-07 16:26:25 +00:00
Scamming banner
This commit is contained in:
@@ -4,7 +4,6 @@ import '../assets/styles/ccElegantBlack.css';
|
||||
---
|
||||
|
||||
<!--<button type="button" class="cc-button">Show preferences modal</button>-->
|
||||
|
||||
<script>
|
||||
import { run } from 'vanilla-cookieconsent';
|
||||
import { config } from './CookieConsentConfig';
|
||||
@@ -12,5 +11,15 @@ import '../assets/styles/ccElegantBlack.css';
|
||||
// toggle custom black theme
|
||||
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>
|
||||
|
||||
@@ -23,7 +23,9 @@ const Carousel = ({ list }) => {
|
||||
delay: 2500,
|
||||
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
|
||||
modules={[Pagination, Autoplay, Scrollbar, Mousewheel]}
|
||||
>
|
||||
|
||||
Reference in New Issue
Block a user