Skip to content

Add a hint for users who click on "disable internet" #35

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 8, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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