Skip to content

Commit

Permalink
Improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
jason5ng32 committed Sep 26, 2024
1 parent d541ef4 commit 12423a9
Showing 1 changed file with 13 additions and 12 deletions.
25 changes: 13 additions & 12 deletions frontend/components/Advanced.vue
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
<p>{{ t('advancedtools.Note') }}</p>
</div>
<div class="row">
<div class="col-lg-3 col-md-6 col-12 mb-4" v-for="(card, index) in cards" :key="index">
<div class="col-lg-3 col-md-6 col-12 mb-4" v-for="(card, index) in cards.filter(card => card.enabled)"
:key="index">
<div class="jn-adv-card card jn-card" :class="{ 'dark-mode dark-mode-border': isDarkMode }">
<div class="card-body" @click.prevent="navigateAndToggleOffcanvas(card.path)" role="button">
<h3 :class="[isMobile ? 'mobile-h3' : 'fs-4']" class="jn-adv-title">
Expand Down Expand Up @@ -67,17 +68,17 @@ const scrollContainer = ref(null);
const router = useRouter();
const cards = reactive([
{ path: '/pingtest', icon: '⏱️', titleKey: 'pingtest.Title', noteKey: 'advancedtools.PingTestNote' },
{ path: '/mtrtest', icon: '📡', titleKey: 'mtrtest.Title', noteKey: 'advancedtools.MTRTestNote' },
{ path: '/ruletest', icon: '🚏', titleKey: 'ruletest.Title', noteKey: 'advancedtools.RuleTestNote' },
{ path: '/dnsresolver', icon: '🔦', titleKey: 'dnsresolver.Title', noteKey: 'advancedtools.DNSResolverNote' },
{ path: '/censorshipcheck', icon: '🚧', titleKey: 'censorshipcheck.Title', noteKey: 'advancedtools.CensorshipCheck' },
{ path: '/whois', icon: '📓', titleKey: 'whois.Title', noteKey: 'advancedtools.Whois' },
{ path: '/macchecker', icon: '🗄️', titleKey: 'macchecker.Title', noteKey: 'advancedtools.MacChecker' },
{ path: '/browserinfo', icon: '🖥️', titleKey: 'browserinfo.Title', noteKey: 'advancedtools.BrowserInfo' },
{ path: '/pingtest', icon: '⏱️', titleKey: 'pingtest.Title', noteKey: 'advancedtools.PingTestNote', enabled: true },
{ path: '/mtrtest', icon: '📡', titleKey: 'mtrtest.Title', noteKey: 'advancedtools.MTRTestNote', enabled: true },
{ path: '/ruletest', icon: '🚏', titleKey: 'ruletest.Title', noteKey: 'advancedtools.RuleTestNote', enabled: true },
{ path: '/dnsresolver', icon: '🔦', titleKey: 'dnsresolver.Title', noteKey: 'advancedtools.DNSResolverNote', enabled: true },
{ path: '/censorshipcheck', icon: '🚧', titleKey: 'censorshipcheck.Title', noteKey: 'advancedtools.CensorshipCheck', enabled: true },
{ path: '/whois', icon: '📓', titleKey: 'whois.Title', noteKey: 'advancedtools.Whois', enabled: true },
{ path: '/macchecker', icon: '🗄️', titleKey: 'macchecker.Title', noteKey: 'advancedtools.MacChecker', enabled: true },
{ path: '/browserinfo', icon: '🖥️', titleKey: 'browserinfo.Title', noteKey: 'advancedtools.BrowserInfo', enabled: true },
{ path: '/invisibilitytest', icon: '🫣', titleKey: 'invisibilitytest.Title', noteKey: 'advancedtools.InvisibilityTest', enabled: false }
]);
const cardInvisibilityTest = { path: '/invisibilitytest', icon: '🫣', titleKey: 'invisibilitytest.Title', noteKey: 'advancedtools.InvisibilityTest' };
const isFullScreen = ref(false);
const openedCard = computed(() => store.currentPath.id);
Expand Down Expand Up @@ -117,9 +118,9 @@ onMounted(() => {
store.setMountingStatus('advancedtools', true);
setTimeout(() => {
if (configs.value.originalSite) {
cards.push(cardInvisibilityTest);
cards.find(x => x.path === '/invisibilitytest').enabled = true;
}
}, 2000);
}, 1500);
});
defineExpose({
Expand Down

0 comments on commit 12423a9

Please sign in to comment.