|
1 | 1 | <script lang="ts" setup>
|
2 |
| - import { NCollapseTransition, NSpace, NSwitch } from "naive-ui"; |
| 2 | + import { NCollapseTransition, NSpace, NSwitch, NAlert } from "naive-ui"; |
3 | 3 | import { computed, onMounted, onUnmounted, ref, watch } from "vue";
|
4 | 4 |
|
5 | 5 | const emit = defineEmits<{
|
|
13 | 13 |
|
14 | 14 | const { SSR } = import.meta.env;
|
15 | 15 |
|
| 16 | + const isShownTip = ref(false); |
16 | 17 | const isParanoidMode = ref(false);
|
17 | 18 | const isTrustDevice = ref(false);
|
18 | 19 | const isIncognito = ref(false);
|
|
88 | 89 | <div>Turn off internet</div>
|
89 | 90 | <n-switch
|
90 | 91 | v-model:value="isOffline"
|
| 92 | + @click="isShownTip = true" |
91 | 93 | disabled
|
92 | 94 | >
|
93 | 95 | <template #checked>Yes</template>
|
94 | 96 | <template #unchecked>No</template>
|
95 | 97 | </n-switch>
|
96 | 98 | </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> |
97 | 111 | <n-collapse-transition :show="isParanoidModeEnabled">
|
98 | 112 | <div>
|
99 | 113 | Perfect! Paranoid mode is now enabled. You can proceed to generate
|
|
0 commit comments