Skip to content

Commit

Permalink
Add a hint for users who click on "disable internet" (#35)
Browse files Browse the repository at this point in the history
  • Loading branch information
getCryptoAddress authored Nov 8, 2024
1 parent 432b6d1 commit a3698e8
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion src/entities/ParanoidMode/ui/ParanoidMode.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<script lang="ts" setup>
import { NCollapseTransition, NSpace, NSwitch } from "naive-ui";
import { NCollapseTransition, NSpace, NSwitch, NAlert } from "naive-ui";
import { computed, onMounted, onUnmounted, ref, watch } from "vue";
const emit = defineEmits<{
Expand All @@ -13,6 +13,7 @@
const { SSR } = import.meta.env;
const isShownTip = ref(false);
const isParanoidMode = ref(false);
const isTrustDevice = ref(false);
const isIncognito = ref(false);
Expand Down Expand Up @@ -88,12 +89,25 @@
<div>Turn off internet</div>
<n-switch
v-model:value="isOffline"
@click="isShownTip = true"
disabled
>
<template #checked>Yes</template>
<template #unchecked>No</template>
</n-switch>
</n-collapse-transition>
<n-collapse-transition :show="!isParanoidModeEnabled && isShownTip">
<n-alert
title="Disconnect from the Internet"
type="info"
closable
@close="isShownTip = false"
>
Actually, you’ll need to fully disconnect from the internet, like
<b>turning off WiFi</b>.<br />
This switch will toggle automatically.
</n-alert>
</n-collapse-transition>
<n-collapse-transition :show="isParanoidModeEnabled">
<div>
Perfect! Paranoid mode is now enabled. You can proceed to generate
Expand Down

0 comments on commit a3698e8

Please sign in to comment.