Skip to content

Commit a3698e8

Browse files
Add a hint for users who click on "disable internet" (#35)
1 parent 432b6d1 commit a3698e8

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

src/entities/ParanoidMode/ui/ParanoidMode.vue

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<script lang="ts" setup>
2-
import { NCollapseTransition, NSpace, NSwitch } from "naive-ui";
2+
import { NCollapseTransition, NSpace, NSwitch, NAlert } from "naive-ui";
33
import { computed, onMounted, onUnmounted, ref, watch } from "vue";
44
55
const emit = defineEmits<{
@@ -13,6 +13,7 @@
1313
1414
const { SSR } = import.meta.env;
1515
16+
const isShownTip = ref(false);
1617
const isParanoidMode = ref(false);
1718
const isTrustDevice = ref(false);
1819
const isIncognito = ref(false);
@@ -88,12 +89,25 @@
8889
<div>Turn off internet</div>
8990
<n-switch
9091
v-model:value="isOffline"
92+
@click="isShownTip = true"
9193
disabled
9294
>
9395
<template #checked>Yes</template>
9496
<template #unchecked>No</template>
9597
</n-switch>
9698
</n-collapse-transition>
99+
<n-collapse-transition :show="!isParanoidModeEnabled && isShownTip">
100+
<n-alert
101+
title="Disconnect from the Internet"
102+
type="info"
103+
closable
104+
@close="isShownTip = false"
105+
>
106+
Actually, you’ll need to fully disconnect from the internet, like
107+
<b>turning off WiFi</b>.<br />
108+
This switch will toggle automatically.
109+
</n-alert>
110+
</n-collapse-transition>
97111
<n-collapse-transition :show="isParanoidModeEnabled">
98112
<div>
99113
Perfect! Paranoid mode is now enabled. You can proceed to generate

0 commit comments

Comments
 (0)