mirror of
https://github.com/CorentinTh/it-tools.git
synced 2025-08-09 07:25:18 +02:00
feat: 优化部分需求
This commit is contained in:
parent
b430baef40
commit
c11e4bc063
11 changed files with 95 additions and 56 deletions
31
components.d.ts
vendored
31
components.d.ts
vendored
|
@ -88,18 +88,28 @@ declare module '@vue/runtime-core' {
|
||||||
HtmlWysiwygEditor: typeof import('./src/tools/html-wysiwyg-editor/html-wysiwyg-editor.vue')['default']
|
HtmlWysiwygEditor: typeof import('./src/tools/html-wysiwyg-editor/html-wysiwyg-editor.vue')['default']
|
||||||
HttpStatusCodes: typeof import('./src/tools/http-status-codes/http-status-codes.vue')['default']
|
HttpStatusCodes: typeof import('./src/tools/http-status-codes/http-status-codes.vue')['default']
|
||||||
IbanValidatorAndParser: typeof import('./src/tools/iban-validator-and-parser/iban-validator-and-parser.vue')['default']
|
IbanValidatorAndParser: typeof import('./src/tools/iban-validator-and-parser/iban-validator-and-parser.vue')['default']
|
||||||
'IconMdi:brushVariant': typeof import('~icons/mdi/brush-variant')['default']
|
'IconMdi:contentCopy': typeof import('~icons/mdi/content-copy')['default']
|
||||||
'IconMdi:kettleSteamOutline': typeof import('~icons/mdi/kettle-steam-outline')['default']
|
'IconMdi:kettleSteamOutline': typeof import('~icons/mdi/kettle-steam-outline')['default']
|
||||||
|
IconMdiArrowDown: typeof import('~icons/mdi/arrow-down')['default']
|
||||||
|
IconMdiArrowRightBottom: typeof import('~icons/mdi/arrow-right-bottom')['default']
|
||||||
|
IconMdiCamera: typeof import('~icons/mdi/camera')['default']
|
||||||
IconMdiChevronDown: typeof import('~icons/mdi/chevron-down')['default']
|
IconMdiChevronDown: typeof import('~icons/mdi/chevron-down')['default']
|
||||||
IconMdiChevronRight: typeof import('~icons/mdi/chevron-right')['default']
|
IconMdiChevronRight: typeof import('~icons/mdi/chevron-right')['default']
|
||||||
IconMdiClose: typeof import('~icons/mdi/close')['default']
|
IconMdiClose: typeof import('~icons/mdi/close')['default']
|
||||||
IconMdiContentCopy: typeof import('~icons/mdi/content-copy')['default']
|
IconMdiContentCopy: typeof import('~icons/mdi/content-copy')['default']
|
||||||
|
IconMdiDeleteOutline: typeof import('~icons/mdi/delete-outline')['default']
|
||||||
|
IconMdiDownload: typeof import('~icons/mdi/download')['default']
|
||||||
IconMdiEye: typeof import('~icons/mdi/eye')['default']
|
IconMdiEye: typeof import('~icons/mdi/eye')['default']
|
||||||
IconMdiEyeOff: typeof import('~icons/mdi/eye-off')['default']
|
IconMdiEyeOff: typeof import('~icons/mdi/eye-off')['default']
|
||||||
IconMdiHeart: typeof import('~icons/mdi/heart')['default']
|
IconMdiHeart: typeof import('~icons/mdi/heart')['default']
|
||||||
|
IconMdiPause: typeof import('~icons/mdi/pause')['default']
|
||||||
|
IconMdiPlay: typeof import('~icons/mdi/play')['default']
|
||||||
|
IconMdiRecord: typeof import('~icons/mdi/record')['default']
|
||||||
|
IconMdiRefresh: typeof import('~icons/mdi/refresh')['default']
|
||||||
IconMdiSearch: typeof import('~icons/mdi/search')['default']
|
IconMdiSearch: typeof import('~icons/mdi/search')['default']
|
||||||
IconMdiTranslate: typeof import('~icons/mdi/translate')['default']
|
IconMdiTranslate: typeof import('~icons/mdi/translate')['default']
|
||||||
IconMdiTriangleDown: typeof import('~icons/mdi/triangle-down')['default']
|
IconMdiTriangleDown: typeof import('~icons/mdi/triangle-down')['default']
|
||||||
|
IconMdiVideo: typeof import('~icons/mdi/video')['default']
|
||||||
InputCopyable: typeof import('./src/components/InputCopyable.vue')['default']
|
InputCopyable: typeof import('./src/components/InputCopyable.vue')['default']
|
||||||
IntegerBaseConverter: typeof import('./src/tools/integer-base-converter/integer-base-converter.vue')['default']
|
IntegerBaseConverter: typeof import('./src/tools/integer-base-converter/integer-base-converter.vue')['default']
|
||||||
Ipv4AddressConverter: typeof import('./src/tools/ipv4-address-converter/ipv4-address-converter.vue')['default']
|
Ipv4AddressConverter: typeof import('./src/tools/ipv4-address-converter/ipv4-address-converter.vue')['default']
|
||||||
|
@ -126,25 +136,42 @@ declare module '@vue/runtime-core' {
|
||||||
MenuLayout: typeof import('./src/components/MenuLayout.vue')['default']
|
MenuLayout: typeof import('./src/components/MenuLayout.vue')['default']
|
||||||
MetaTagGenerator: typeof import('./src/tools/meta-tag-generator/meta-tag-generator.vue')['default']
|
MetaTagGenerator: typeof import('./src/tools/meta-tag-generator/meta-tag-generator.vue')['default']
|
||||||
MimeTypes: typeof import('./src/tools/mime-types/mime-types.vue')['default']
|
MimeTypes: typeof import('./src/tools/mime-types/mime-types.vue')['default']
|
||||||
|
MyToolName: typeof import('./src/tools/my-tool-name/my-tool-name.vue')['default']
|
||||||
|
NAlert: typeof import('naive-ui')['NAlert']
|
||||||
NavbarButtons: typeof import('./src/components/NavbarButtons.vue')['default']
|
NavbarButtons: typeof import('./src/components/NavbarButtons.vue')['default']
|
||||||
|
NCheckbox: typeof import('naive-ui')['NCheckbox']
|
||||||
NCode: typeof import('naive-ui')['NCode']
|
NCode: typeof import('naive-ui')['NCode']
|
||||||
NCollapseTransition: typeof import('naive-ui')['NCollapseTransition']
|
NCollapseTransition: typeof import('naive-ui')['NCollapseTransition']
|
||||||
|
NColorPicker: typeof import('naive-ui')['NColorPicker']
|
||||||
NConfigProvider: typeof import('naive-ui')['NConfigProvider']
|
NConfigProvider: typeof import('naive-ui')['NConfigProvider']
|
||||||
|
NDatePicker: typeof import('naive-ui')['NDatePicker']
|
||||||
NDivider: typeof import('naive-ui')['NDivider']
|
NDivider: typeof import('naive-ui')['NDivider']
|
||||||
|
NDynamicInput: typeof import('naive-ui')['NDynamicInput']
|
||||||
NEllipsis: typeof import('naive-ui')['NEllipsis']
|
NEllipsis: typeof import('naive-ui')['NEllipsis']
|
||||||
|
NForm: typeof import('naive-ui')['NForm']
|
||||||
NFormItem: typeof import('naive-ui')['NFormItem']
|
NFormItem: typeof import('naive-ui')['NFormItem']
|
||||||
NGi: typeof import('naive-ui')['NGi']
|
NGi: typeof import('naive-ui')['NGi']
|
||||||
NGrid: typeof import('naive-ui')['NGrid']
|
NGrid: typeof import('naive-ui')['NGrid']
|
||||||
NH1: typeof import('naive-ui')['NH1']
|
NH1: typeof import('naive-ui')['NH1']
|
||||||
|
NH2: typeof import('naive-ui')['NH2']
|
||||||
NH3: typeof import('naive-ui')['NH3']
|
NH3: typeof import('naive-ui')['NH3']
|
||||||
NIcon: typeof import('naive-ui')['NIcon']
|
NIcon: typeof import('naive-ui')['NIcon']
|
||||||
|
NImage: typeof import('naive-ui')['NImage']
|
||||||
|
NInputGroup: typeof import('naive-ui')['NInputGroup']
|
||||||
|
NInputGroupLabel: typeof import('naive-ui')['NInputGroupLabel']
|
||||||
NInputNumber: typeof import('naive-ui')['NInputNumber']
|
NInputNumber: typeof import('naive-ui')['NInputNumber']
|
||||||
NLabel: typeof import('naive-ui')['NLabel']
|
|
||||||
NLayout: typeof import('naive-ui')['NLayout']
|
NLayout: typeof import('naive-ui')['NLayout']
|
||||||
NLayoutSider: typeof import('naive-ui')['NLayoutSider']
|
NLayoutSider: typeof import('naive-ui')['NLayoutSider']
|
||||||
NMenu: typeof import('naive-ui')['NMenu']
|
NMenu: typeof import('naive-ui')['NMenu']
|
||||||
|
NModal: typeof import('naive-ui')['NModal']
|
||||||
|
NProgress: typeof import('naive-ui')['NProgress']
|
||||||
NScrollbar: typeof import('naive-ui')['NScrollbar']
|
NScrollbar: typeof import('naive-ui')['NScrollbar']
|
||||||
|
NSlider: typeof import('naive-ui')['NSlider']
|
||||||
NSpin: typeof import('naive-ui')['NSpin']
|
NSpin: typeof import('naive-ui')['NSpin']
|
||||||
|
NStatistic: typeof import('naive-ui')['NStatistic']
|
||||||
|
NSwitch: typeof import('naive-ui')['NSwitch']
|
||||||
|
NTable: typeof import('naive-ui')['NTable']
|
||||||
|
NTag: typeof import('naive-ui')['NTag']
|
||||||
NumeronymGenerator: typeof import('./src/tools/numeronym-generator/numeronym-generator.vue')['default']
|
NumeronymGenerator: typeof import('./src/tools/numeronym-generator/numeronym-generator.vue')['default']
|
||||||
OtpCodeGeneratorAndValidator: typeof import('./src/tools/otp-code-generator-and-validator/otp-code-generator-and-validator.vue')['default']
|
OtpCodeGeneratorAndValidator: typeof import('./src/tools/otp-code-generator-and-validator/otp-code-generator-and-validator.vue')['default']
|
||||||
PasswordStrengthAnalyser: typeof import('./src/tools/password-strength-analyser/password-strength-analyser.vue')['default']
|
PasswordStrengthAnalyser: typeof import('./src/tools/password-strength-analyser/password-strength-analyser.vue')['default']
|
||||||
|
|
BIN
src/assets/images/IMG_2470.jpeg
Normal file
BIN
src/assets/images/IMG_2470.jpeg
Normal file
Binary file not shown.
After Width: | Height: | Size: 102 KiB |
|
@ -1,5 +1,5 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { BrandGithub, BrandTwitter, InfoCircle, Moon, Sun } from '@vicons/tabler';
|
import { Moon, Sun } from '@vicons/tabler';
|
||||||
import { useStyleStore } from '@/stores/style.store';
|
import { useStyleStore } from '@/stores/style.store';
|
||||||
|
|
||||||
const styleStore = useStyleStore();
|
const styleStore = useStyleStore();
|
||||||
|
@ -7,37 +7,6 @@ const { isDarkTheme } = toRefs(styleStore);
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<c-tooltip :tooltip="$t('home.nav.github')" position="bottom">
|
|
||||||
<c-button
|
|
||||||
circle
|
|
||||||
variant="text"
|
|
||||||
href="https://github.com/CorentinTh/it-tools"
|
|
||||||
target="_blank"
|
|
||||||
rel="noopener noreferrer"
|
|
||||||
:aria-label="$t('home.nav.githubRepository')"
|
|
||||||
>
|
|
||||||
<n-icon size="25" :component="BrandGithub" />
|
|
||||||
</c-button>
|
|
||||||
</c-tooltip>
|
|
||||||
|
|
||||||
<c-tooltip :tooltip="$t('home.nav.twitter')" position="bottom">
|
|
||||||
<c-button
|
|
||||||
circle
|
|
||||||
variant="text"
|
|
||||||
href="https://twitter.com/ittoolsdottech"
|
|
||||||
rel="noopener"
|
|
||||||
target="_blank"
|
|
||||||
:aria-label="$t('home.nav.twitterAccount')"
|
|
||||||
>
|
|
||||||
<n-icon size="25" :component="BrandTwitter" />
|
|
||||||
</c-button>
|
|
||||||
</c-tooltip>
|
|
||||||
|
|
||||||
<c-tooltip :tooltip="$t('home.nav.about')" position="bottom">
|
|
||||||
<c-button circle variant="text" to="/about" :aria-label="$t('home.nav.aboutLabel')">
|
|
||||||
<n-icon size="25" :component="InfoCircle" />
|
|
||||||
</c-button>
|
|
||||||
</c-tooltip>
|
|
||||||
<c-tooltip :tooltip="isDarkTheme ? $t('home.nav.lightMode') : $t('home.nav.darkMode')" position="bottom">
|
<c-tooltip :tooltip="isDarkTheme ? $t('home.nav.lightMode') : $t('home.nav.darkMode')" position="bottom">
|
||||||
<c-button circle variant="text" :aria-label="$t('home.nav.mode')" @click="() => styleStore.toggleDark()">
|
<c-button circle variant="text" :aria-label="$t('home.nav.mode')" @click="() => styleStore.toggleDark()">
|
||||||
<n-icon v-if="isDarkTheme" size="25" :component="Sun" />
|
<n-icon v-if="isDarkTheme" size="25" :component="Sun" />
|
||||||
|
|
|
@ -19,7 +19,7 @@ const themeVars = useThemeVars();
|
||||||
const styleStore = useStyleStore();
|
const styleStore = useStyleStore();
|
||||||
const version = config.app.version;
|
const version = config.app.version;
|
||||||
const commitSha = config.app.lastCommitSha.slice(0, 7);
|
const commitSha = config.app.lastCommitSha.slice(0, 7);
|
||||||
|
const showModal = ref(false);
|
||||||
const { tracker } = useTracker();
|
const { tracker } = useTracker();
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
|
|
||||||
|
@ -27,9 +27,12 @@ const toolStore = useToolStore();
|
||||||
const { favoriteTools, toolsByCategory } = storeToRefs(toolStore);
|
const { favoriteTools, toolsByCategory } = storeToRefs(toolStore);
|
||||||
|
|
||||||
const tools = computed<ToolCategory[]>(() => [
|
const tools = computed<ToolCategory[]>(() => [
|
||||||
...(favoriteTools.value.length > 0 ? [{ name: t('tools.categories.favorite-tools'), components: favoriteTools.value }] : []),
|
...(favoriteTools.value.length > 0
|
||||||
|
? [{ name: t('tools.categories.favorite-tools'), components: favoriteTools.value }]
|
||||||
|
: []),
|
||||||
...toolsByCategory.value,
|
...toolsByCategory.value,
|
||||||
]);
|
]);
|
||||||
|
const showCover = () => (showModal.value = true);
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
@ -38,9 +41,7 @@ const tools = computed<ToolCategory[]>(() => [
|
||||||
<RouterLink to="/" class="hero-wrapper">
|
<RouterLink to="/" class="hero-wrapper">
|
||||||
<HeroGradient class="gradient" />
|
<HeroGradient class="gradient" />
|
||||||
<div class="text-wrapper">
|
<div class="text-wrapper">
|
||||||
<div class="title">
|
<div class="title">IT - TOOLS</div>
|
||||||
IT - TOOLS
|
|
||||||
</div>
|
|
||||||
<div class="divider" />
|
<div class="divider" />
|
||||||
<div class="subtitle">
|
<div class="subtitle">
|
||||||
{{ $t('home.subtitle') }}
|
{{ $t('home.subtitle') }}
|
||||||
|
@ -81,9 +82,7 @@ const tools = computed<ToolCategory[]>(() => [
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
© {{ new Date().getFullYear() }}
|
© {{ new Date().getFullYear() }}
|
||||||
<c-link target="_blank" rel="noopener" href="https://github.com/CorentinTh">
|
<c-link target="_blank" rel="noopener" href="https://github.com/CorentinTh"> Corentin Thomasset </c-link>
|
||||||
Corentin Thomasset
|
|
||||||
</c-link>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -106,12 +105,6 @@ const tools = computed<ToolCategory[]>(() => [
|
||||||
</c-button>
|
</c-button>
|
||||||
</c-tooltip>
|
</c-tooltip>
|
||||||
|
|
||||||
<c-tooltip :tooltip="$t('home.uiLib')" position="bottom">
|
|
||||||
<c-button v-if="config.app.env === 'development'" to="/c-lib" circle variant="text" :aria-label="$t('home.uiLib')">
|
|
||||||
<icon-mdi:brush-variant text-20px />
|
|
||||||
</c-button>
|
|
||||||
</c-tooltip>
|
|
||||||
|
|
||||||
<command-palette />
|
<command-palette />
|
||||||
|
|
||||||
<locale-selector v-if="!styleStore.isSmallScreen" />
|
<locale-selector v-if="!styleStore.isSmallScreen" />
|
||||||
|
@ -123,12 +116,16 @@ const tools = computed<ToolCategory[]>(() => [
|
||||||
<c-tooltip position="bottom" :tooltip="$t('home.support')">
|
<c-tooltip position="bottom" :tooltip="$t('home.support')">
|
||||||
<c-button
|
<c-button
|
||||||
round
|
round
|
||||||
href="https://www.buymeacoffee.com/cthmsst"
|
|
||||||
rel="noopener"
|
rel="noopener"
|
||||||
target="_blank"
|
target="_blank"
|
||||||
class="support-button"
|
class="support-button"
|
||||||
:bordered="false"
|
:bordered="false"
|
||||||
@click="() => tracker.trackEvent({ eventName: 'Support button clicked' })"
|
@click="
|
||||||
|
() => {
|
||||||
|
showCover();
|
||||||
|
tracker.trackEvent({ eventName: 'Support button clicked' });
|
||||||
|
}
|
||||||
|
"
|
||||||
>
|
>
|
||||||
{{ $t('home.buyMeACoffee') }}
|
{{ $t('home.buyMeACoffee') }}
|
||||||
<NIcon v-if="!styleStore.isSmallScreen" :component="Heart" ml-2 />
|
<NIcon v-if="!styleStore.isSmallScreen" :component="Heart" ml-2 />
|
||||||
|
@ -138,6 +135,11 @@ const tools = computed<ToolCategory[]>(() => [
|
||||||
<slot />
|
<slot />
|
||||||
</template>
|
</template>
|
||||||
</MenuLayout>
|
</MenuLayout>
|
||||||
|
<n-modal v-model:show="showModal" preset="card" style="width: 600px; text-align: center">
|
||||||
|
<template #default>
|
||||||
|
<img style="width: 200px" src="@/assets/images/IMG_2470.jpeg" />
|
||||||
|
</template>
|
||||||
|
</n-modal>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<style lang="less" scoped>
|
<style lang="less" scoped>
|
||||||
|
|
|
@ -15,7 +15,7 @@ const toolsRoutes = tools.map(({ path, name, component, ...config }) => ({
|
||||||
const toolsRedirectRoutes = tools
|
const toolsRedirectRoutes = tools
|
||||||
.filter(({ redirectFrom }) => redirectFrom && redirectFrom.length > 0)
|
.filter(({ redirectFrom }) => redirectFrom && redirectFrom.length > 0)
|
||||||
.flatMap(
|
.flatMap(
|
||||||
({ path, redirectFrom }) => redirectFrom?.map(redirectSource => ({ path: redirectSource, redirect: path })) ?? [],
|
({ path, redirectFrom }) => redirectFrom?.map((redirectSource) => ({ path: redirectSource, redirect: path })) ?? [],
|
||||||
);
|
);
|
||||||
|
|
||||||
const router = createRouter({
|
const router = createRouter({
|
||||||
|
@ -26,11 +26,6 @@ const router = createRouter({
|
||||||
name: 'home',
|
name: 'home',
|
||||||
component: HomePage,
|
component: HomePage,
|
||||||
},
|
},
|
||||||
{
|
|
||||||
path: '/about',
|
|
||||||
name: 'about',
|
|
||||||
component: () => import('./pages/About.vue'),
|
|
||||||
},
|
|
||||||
...toolsRoutes,
|
...toolsRoutes,
|
||||||
...toolsRedirectRoutes,
|
...toolsRedirectRoutes,
|
||||||
...(config.app.env === 'development' ? demoRoutes : []),
|
...(config.app.env === 'development' ? demoRoutes : []),
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
import { tool as base64FileConverter } from './base64-file-converter';
|
import { tool as base64FileConverter } from './base64-file-converter';
|
||||||
import { tool as base64StringConverter } from './base64-string-converter';
|
import { tool as base64StringConverter } from './base64-string-converter';
|
||||||
import { tool as basicAuthGenerator } from './basic-auth-generator';
|
import { tool as basicAuthGenerator } from './basic-auth-generator';
|
||||||
|
import { tool as myToolName } from './my-tool-name';
|
||||||
|
|
||||||
import { tool as asciiTextDrawer } from './ascii-text-drawer';
|
import { tool as asciiTextDrawer } from './ascii-text-drawer';
|
||||||
|
|
||||||
|
|
12
src/tools/my-tool-name/index.ts
Normal file
12
src/tools/my-tool-name/index.ts
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
import { ArrowsShuffle } from '@vicons/tabler';
|
||||||
|
import { defineTool } from '../tool';
|
||||||
|
|
||||||
|
export const tool = defineTool({
|
||||||
|
name: 'My tool name',
|
||||||
|
path: '/my-tool-name',
|
||||||
|
description: '',
|
||||||
|
keywords: ['my', 'tool', 'name'],
|
||||||
|
component: () => import('./my-tool-name.vue'),
|
||||||
|
icon: ArrowsShuffle,
|
||||||
|
createdAt: new Date('2024-05-31'),
|
||||||
|
});
|
15
src/tools/my-tool-name/my-tool-name.e2e.spec.ts
Normal file
15
src/tools/my-tool-name/my-tool-name.e2e.spec.ts
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
import { test, expect } from '@playwright/test';
|
||||||
|
|
||||||
|
test.describe('Tool - My tool name', () => {
|
||||||
|
test.beforeEach(async ({ page }) => {
|
||||||
|
await page.goto('/my-tool-name');
|
||||||
|
});
|
||||||
|
|
||||||
|
test('Has correct title', async ({ page }) => {
|
||||||
|
await expect(page).toHaveTitle('My tool name - IT Tools');
|
||||||
|
});
|
||||||
|
|
||||||
|
test('', async ({ page }) => {
|
||||||
|
|
||||||
|
});
|
||||||
|
});
|
6
src/tools/my-tool-name/my-tool-name.service.test.ts
Normal file
6
src/tools/my-tool-name/my-tool-name.service.test.ts
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
import { expect, describe, it } from 'vitest';
|
||||||
|
// import { } from './my-tool-name.service';
|
||||||
|
//
|
||||||
|
// describe('my-tool-name', () => {
|
||||||
|
//
|
||||||
|
// })
|
0
src/tools/my-tool-name/my-tool-name.service.ts
Normal file
0
src/tools/my-tool-name/my-tool-name.service.ts
Normal file
12
src/tools/my-tool-name/my-tool-name.vue
Normal file
12
src/tools/my-tool-name/my-tool-name.vue
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
Lorem ipsum
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup lang="ts">
|
||||||
|
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="less" scoped>
|
||||||
|
</style>
|
Loading…
Add table
Add a link
Reference in a new issue