mirror of
https://github.com/CorentinTh/it-tools.git
synced 2025-11-12 18:06:20 +00:00
Compare commits
8 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
af0b02d3a8 | ||
|
|
a46d125c19 | ||
|
|
6becdbb423 | ||
|
|
5ce1262fb4 | ||
|
|
d591a73ce7 | ||
|
|
a88e4a9289 | ||
|
|
d4ea393c1d | ||
|
|
048bc4ae94 |
22
CHANGELOG.md
22
CHANGELOG.md
@@ -2,6 +2,28 @@
|
||||
|
||||
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
||||
|
||||
### [2.4.2](https://github.com/CorentinTh/it-tools/compare/v2.4.1...v2.4.2) (2022-06-01)
|
||||
|
||||
|
||||
### Refactors
|
||||
|
||||
* **config:** added config management with figue ([6becdbb](https://github.com/CorentinTh/it-tools/commit/6becdbb42329e1bdecf158707e37ba9f13ba1d2c))
|
||||
* **imports:** removed useless defineProps import ([5ce1262](https://github.com/CorentinTh/it-tools/commit/5ce1262fb44864b829dac09d5c0b9b68d522ceb7))
|
||||
* set coerent head title for home page ([a46d125](https://github.com/CorentinTh/it-tools/commit/a46d125c19902c2f41f37c62c07bb7b548d9f6f0))
|
||||
|
||||
### [2.4.1](https://github.com/CorentinTh/it-tools/compare/v2.4.0...v2.4.1) (2022-05-15)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **seo:** wrong url in share metas ([a88e4a9](https://github.com/CorentinTh/it-tools/commit/a88e4a9289e7d8cc80190f60f2fe08fe2ba08ee6))
|
||||
|
||||
|
||||
### Refactors
|
||||
|
||||
* **json-viewer:** add clear button ([048bc4a](https://github.com/CorentinTh/it-tools/commit/048bc4ae943509dea2946764efaa69f845b6c478))
|
||||
* **seo:** changed title string ([d4ea393](https://github.com/CorentinTh/it-tools/commit/d4ea393c1df87ae958a06ed66a11e36b081282d4))
|
||||
|
||||
## [2.4.0](https://github.com/CorentinTh/it-tools/compare/v2.3.2...v2.4.0) (2022-05-14)
|
||||
|
||||
|
||||
|
||||
14
index.html
14
index.html
@@ -4,8 +4,8 @@
|
||||
<meta charset="UTF-8" />
|
||||
<link rel="icon" href="/favicon.ico" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>IT Tools</title>
|
||||
<meta itemprop="name" content="IT Tools - Handy tools for developers" />
|
||||
<title>IT Tools - Handy online tools for developers</title>
|
||||
<meta itemprop="name" content="IT Tools - Handy online tools for developers" />
|
||||
<meta name="description" content="Collection of handy online tools for developers, with great UX. IT Tools is a free and open-source collection of handy online tools for developers & people working in IT." />
|
||||
<meta itemprop="description" content="Collection of handy online tools for developers, with great UX. IT Tools is a free and open-source collection of handy online tools for developers & people working in IT." />
|
||||
<link rel="author" href="/humans.txt" />
|
||||
@@ -18,16 +18,16 @@
|
||||
<meta name="msapplication-TileColor" content="#da532c" />
|
||||
<meta name="theme-color" content="#ffffff" />
|
||||
|
||||
<meta property="og:url" content="https://dev.it-tools.tech/" />
|
||||
<meta property="og:url" content="https://it-tools.tech/" />
|
||||
<meta property="og:type" content="website" />
|
||||
<meta property="og:title" content="IT Tools - Handy tools for developers" />
|
||||
<meta property="og:title" content="IT Tools - Handy online tools for developers" />
|
||||
<meta property="og:description" content="Collection of handy online tools for developers, with great UX. IT Tools is a free and open-source collection of handy online tools for developers & people working in IT." />
|
||||
<meta property="og:image" content="/banner.png" />
|
||||
|
||||
<meta name="twitter:card" content="summary_large_image" />
|
||||
<meta property="twitter:domain" content="dev.it-tools.tech" />
|
||||
<meta property="twitter:url" content="https://dev.it-tools.tech/" />
|
||||
<meta name="twitter:title" content="IT Tools - Handy tools for developers" />
|
||||
<meta property="twitter:domain" content="it-tools.tech" />
|
||||
<meta property="twitter:url" content="https://it-tools.tech/" />
|
||||
<meta name="twitter:title" content="IT Tools - Handy online tools for developers" />
|
||||
<meta name="twitter:description" content="Collection of handy online tools for developers, with great UX. IT Tools is a free and open-source collection of handy online tools for developers & people working in IT." />
|
||||
<meta name="twitter:image" content="/banner.png" />
|
||||
</head>
|
||||
|
||||
24
package-lock.json
generated
24
package-lock.json
generated
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "it-tools",
|
||||
"version": "2.4.0",
|
||||
"version": "2.4.2",
|
||||
"lockfileVersion": 2,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "it-tools",
|
||||
"version": "2.4.0",
|
||||
"version": "2.4.2",
|
||||
"dependencies": {
|
||||
"@it-tools/bip39": "^0.0.4",
|
||||
"@vicons/material": "^0.12.0",
|
||||
@@ -20,6 +20,7 @@
|
||||
"cronstrue": "^2.2.0",
|
||||
"crypto-js": "^4.1.1",
|
||||
"date-fns": "^2.28.0",
|
||||
"figue": "^1.1.0",
|
||||
"highlight.js": "^11.5.1",
|
||||
"lodash": "^4.17.21",
|
||||
"naive-ui": "^2.28.0",
|
||||
@@ -5521,6 +5522,17 @@
|
||||
"reusify": "^1.0.4"
|
||||
}
|
||||
},
|
||||
"node_modules/figue": {
|
||||
"version": "1.1.0",
|
||||
"resolved": "https://registry.npmjs.org/figue/-/figue-1.1.0.tgz",
|
||||
"integrity": "sha512-toW/IfEPBr42giaiqRtC4TkEDZA2q3E1GdzvYG7iJzIYK/fMVvzD2aqU3PJRh+QXCGp+uVxud1Zm7rpV7Fmprg==",
|
||||
"dependencies": {
|
||||
"lodash": "^4.17.21"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/CorentinTh"
|
||||
}
|
||||
},
|
||||
"node_modules/figures": {
|
||||
"version": "3.2.0",
|
||||
"resolved": "https://registry.npmjs.org/figures/-/figures-3.2.0.tgz",
|
||||
@@ -15320,6 +15332,14 @@
|
||||
"reusify": "^1.0.4"
|
||||
}
|
||||
},
|
||||
"figue": {
|
||||
"version": "1.1.0",
|
||||
"resolved": "https://registry.npmjs.org/figue/-/figue-1.1.0.tgz",
|
||||
"integrity": "sha512-toW/IfEPBr42giaiqRtC4TkEDZA2q3E1GdzvYG7iJzIYK/fMVvzD2aqU3PJRh+QXCGp+uVxud1Zm7rpV7Fmprg==",
|
||||
"requires": {
|
||||
"lodash": "^4.17.21"
|
||||
}
|
||||
},
|
||||
"figures": {
|
||||
"version": "3.2.0",
|
||||
"resolved": "https://registry.npmjs.org/figures/-/figures-3.2.0.tgz",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "it-tools",
|
||||
"version": "2.4.0",
|
||||
"version": "2.4.2",
|
||||
"scripts": {
|
||||
"dev": "vite",
|
||||
"build": "vue-tsc --noEmit && vite build",
|
||||
@@ -25,6 +25,7 @@
|
||||
"cronstrue": "^2.2.0",
|
||||
"crypto-js": "^4.1.1",
|
||||
"date-fns": "^2.28.0",
|
||||
"figue": "^1.1.0",
|
||||
"highlight.js": "^11.5.1",
|
||||
"lodash": "^4.17.21",
|
||||
"naive-ui": "^2.28.0",
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
|
||||
<script setup lang="ts">
|
||||
import type { ITool } from '@/tools/Tool';
|
||||
import { toRefs, defineProps } from 'vue';
|
||||
import { toRefs } from 'vue';
|
||||
|
||||
const props = defineProps<{ tool: ITool & { category: string } }>();
|
||||
const { tool } = toRefs(props);
|
||||
|
||||
53
src/config.ts
Normal file
53
src/config.ts
Normal file
@@ -0,0 +1,53 @@
|
||||
import { figue } from 'figue';
|
||||
|
||||
export const config = figue({
|
||||
app: {
|
||||
version: {
|
||||
doc: 'Application current version',
|
||||
format: 'string',
|
||||
default: '0.0.0',
|
||||
env: 'PACKAGE_VERSION',
|
||||
},
|
||||
lastCommitSha: {
|
||||
doc: 'Application last commit SHA version',
|
||||
format: 'string',
|
||||
default: '',
|
||||
env: 'VITE_VERCEL_GIT_COMMIT_SHA',
|
||||
},
|
||||
baseUrl: {
|
||||
doc: 'Application base url',
|
||||
format: 'string',
|
||||
default: '/',
|
||||
env: 'BASE_URL',
|
||||
},
|
||||
env: {
|
||||
doc: 'Application current env',
|
||||
format: 'enum',
|
||||
values: ['production', 'development', 'test'],
|
||||
default: 'development',
|
||||
env: 'MODE',
|
||||
},
|
||||
},
|
||||
plausible: {
|
||||
domain: {
|
||||
doc: 'Plausible current domain',
|
||||
format: 'string',
|
||||
default: '',
|
||||
env: 'VITE_PLAUSIBLE_DOMAIN',
|
||||
},
|
||||
apiHost: {
|
||||
doc: 'Plausible remote api host',
|
||||
format: 'string',
|
||||
default: '',
|
||||
env: 'VITE_PLAUSIBLE_API_HOST',
|
||||
},
|
||||
trackLocalhost: {
|
||||
doc: 'Enable or disable localhost tracking by plausible',
|
||||
format: 'boolean',
|
||||
default: false,
|
||||
},
|
||||
},
|
||||
})
|
||||
.loadEnv(import.meta.env)
|
||||
.validate()
|
||||
.getConfig();
|
||||
@@ -9,12 +9,13 @@ import { useStyleStore } from '@/stores/style.store';
|
||||
import HeroGradient from '../assets/hero-gradient.svg?component';
|
||||
import MenuLayout from '../components/MenuLayout.vue';
|
||||
import NavbarButtons from '../components/NavbarButtons.vue';
|
||||
import { config } from '@/config';
|
||||
|
||||
const themeVars = useThemeVars();
|
||||
const route = useRoute();
|
||||
const styleStore = useStyleStore();
|
||||
const version = import.meta.env.PACKAGE_VERSION;
|
||||
const commitSha = import.meta.env.GIT_SHORT_SHA;
|
||||
const version = config.app.version;
|
||||
const commitSha = config.app.lastCommitSha.slice(0, 7);
|
||||
|
||||
const makeLabel = (text: string, to: string) => () => h(RouterLink, { to }, { default: () => text });
|
||||
const makeIcon = (icon: Component) => () => h(NIcon, null, { default: () => h(icon) });
|
||||
|
||||
@@ -3,7 +3,7 @@ import { toolsWithCategory } from '@/tools';
|
||||
import ToolCard from '../components/ToolCard.vue';
|
||||
import { useHead } from '@vueuse/head';
|
||||
|
||||
useHead({ title: 'IT Tools' });
|
||||
useHead({ title: 'IT Tools - Handy online tools for developers' });
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
||||
@@ -1,15 +1,10 @@
|
||||
import Plausible, { type PlausibleOptions } from 'plausible-tracker';
|
||||
import { config } from '@/config';
|
||||
import Plausible from 'plausible-tracker';
|
||||
import type { App } from 'vue';
|
||||
|
||||
const options: PlausibleOptions = {
|
||||
domain: import.meta.env.VITE_PLAUSIBLE_DOMAIN,
|
||||
apiHost: import.meta.env.VITE_PLAUSIBLE_API_HOST,
|
||||
trackLocalhost: false,
|
||||
};
|
||||
|
||||
export const plausible = {
|
||||
install: (app: App) => {
|
||||
const plausible = Plausible(options);
|
||||
const plausible = Plausible(config.plausible);
|
||||
plausible.enableAutoPageviews();
|
||||
|
||||
app.config.globalProperties.$plausible = plausible;
|
||||
|
||||
@@ -3,6 +3,7 @@ import { createRouter, createWebHistory } from 'vue-router';
|
||||
import HomePage from './pages/Home.page.vue';
|
||||
import NotFound from './pages/404.page.vue';
|
||||
import { tools } from './tools';
|
||||
import { config } from './config';
|
||||
|
||||
const toolsRoutes = tools.map(({ path, name, component, ...config }) => ({
|
||||
path,
|
||||
@@ -17,7 +18,7 @@ const toolsRedirectRoutes = tools
|
||||
);
|
||||
|
||||
const router = createRouter({
|
||||
history: createWebHistory(import.meta.env.BASE_URL),
|
||||
history: createWebHistory(config.app.baseUrl),
|
||||
routes: [
|
||||
{
|
||||
path: '/',
|
||||
|
||||
@@ -5,8 +5,21 @@
|
||||
:feedback="rawJsonValidation.message"
|
||||
:validation-status="rawJsonValidation.status"
|
||||
>
|
||||
<n-input v-model:value="rawJson" class="json-input" type="textarea" placeholder="Paste your raw json here..." />
|
||||
<n-input
|
||||
v-model:value="rawJson"
|
||||
class="json-input"
|
||||
type="textarea"
|
||||
placeholder="Paste your raw json here..."
|
||||
autocomplete="off"
|
||||
autocorrect="off"
|
||||
autocapitalize="off"
|
||||
spellcheck="false"
|
||||
/>
|
||||
</n-form-item>
|
||||
|
||||
<n-space justify="center">
|
||||
<n-button secondary @click="rawJson = ''">Clear</n-button>
|
||||
</n-space>
|
||||
</n-card>
|
||||
|
||||
<n-card v-if="cleanJson.length > 0">
|
||||
@@ -39,7 +52,7 @@ const rawJsonValidation = useValidation({
|
||||
source: rawJson,
|
||||
rules: [
|
||||
{
|
||||
validator: (v) => JSON.parse(v),
|
||||
validator: (v) => v === '' || JSON.parse(v),
|
||||
message: 'Invalid json string',
|
||||
},
|
||||
],
|
||||
|
||||
@@ -61,6 +61,5 @@ export default defineConfig({
|
||||
},
|
||||
define: {
|
||||
'import.meta.env.PACKAGE_VERSION': JSON.stringify(process.env.npm_package_version),
|
||||
'import.meta.env.GIT_SHORT_SHA': JSON.stringify((process?.env?.VITE_VERCEL_GIT_COMMIT_SHA ?? '').slice(0, 7)),
|
||||
},
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user