Skip to content

Commit

Permalink
feat: Add privacy modal
Browse files Browse the repository at this point in the history
  • Loading branch information
sidharthv96 committed Feb 9, 2024
1 parent 3f95ce2 commit ab7aed0
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/lib/components/Navbar.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
<script lang="ts">
import Theme from './Theme.svelte';
import { dismissPromotion, getActivePromotion } from '$lib/util/promos/promo';
import Privacy from './Privacy.svelte';
let isMenuOpen = false;
function toggleMenu() {
Expand Down Expand Up @@ -131,6 +132,9 @@
<div class="hidden w-full lg:flex lg:w-auto lg:items-center" id="menu">
<Theme />
<ul class="items-center justify-between pt-4 text-base lg:flex lg:pt-0">
<li>
<Privacy />
</li>
{#each links as { title, href, icon, img }}
<li>
<a class="btn btn-ghost" target="_blank" {href}>
Expand Down
42 changes: 42 additions & 0 deletions src/lib/components/Privacy.svelte
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
<label for="privacyModal" class="btn btn-ghost flex gap-2">
<i class="fa-solid fa-shield-halved text-xl"></i> Security
</label>

<input type="checkbox" id="privacyModal" class="modal-toggle" />
<div class="modal" role="dialog">
<div class="modal-box flex flex-col gap-4 text-base-content">
<h1 class="text-3xl font-bold">Data security</h1>
<p>
<span class="text-xl font-extrabold">
The content of the diagrams you create never leaves your browser.
</span>
It's stored in the URL, and the browser's local storage only.
</p>
<p>
Mermaid live editor is a fully client side application, that will also work as an offline <a
href="https://web.dev/explore/progressive-web-apps"
class="link"
target="_blank">
PWA.
</a>
</p>
<p>
The only server we have is a self hosted version of the open source and privacy friendly
Plausible Analytics. We only collect data related to actions performed, like the type of
diagram rendered, number of times a feature was used, etc. <br /> All the data we collect is
anonymized and
<a href="https://p.mermaid.live/mermaid.live" class="link" target="_blank">
available publicly.
</a>
</p>

<p>
Additional services like the external PNG/SVG/Kroki links and "Save to Mermaid Chart" feature
will share your diagram with the respective 3rd party service.
</p>

<label class="btn btn-circle btn-ghost btn-sm absolute right-2 top-2" for="privacyModal">
X
</label>
</div>
</div>

0 comments on commit ab7aed0

Please sign in to comment.