Compare commits

...

5 Commits

Author SHA1 Message Date
Corentin Thomasset
7a01af1c14 chore(release): 2.5.1 2022-06-02 01:00:49 +02:00
Corentin Thomasset
c2e1d59cb9 fix(title): trully reactive tool title 2022-06-02 00:59:42 +02:00
Corentin Thomasset
f48cd058cf fix: menu label key value was undefined 2022-06-02 00:57:17 +02:00
Corentin Thomasset
5ab4dd3d4a fix: tool sorting inconsistencies in home page 2022-06-02 00:44:23 +02:00
Corentin Thomasset
f05c8e1dc6 fix(lint): missing dangling comma 2022-06-02 00:30:43 +02:00
7 changed files with 29 additions and 13 deletions

View File

@@ -2,6 +2,16 @@
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.5.1](https://github.com/CorentinTh/it-tools/compare/v2.5.0...v2.5.1) (2022-06-01)
### Bug Fixes
* **lint:** missing dangling comma ([f05c8e1](https://github.com/CorentinTh/it-tools/commit/f05c8e1dc69275e529f4c8771ad55ba211e7fb5e))
* menu label key value was undefined ([f48cd05](https://github.com/CorentinTh/it-tools/commit/f48cd058cf3381f3bc92ea8fe37b565327707d1e))
* **title:** trully reactive tool title ([c2e1d59](https://github.com/CorentinTh/it-tools/commit/c2e1d59cb9d8dbb1bb072a46100192cb8c59f59b))
* tool sorting inconsistencies in home page ([5ab4dd3](https://github.com/CorentinTh/it-tools/commit/5ab4dd3d4a42c3609d72597c7ba91764170e6e96))
## [2.5.0](https://github.com/CorentinTh/it-tools/compare/v2.4.2...v2.5.0) (2022-06-01)

4
package-lock.json generated
View File

@@ -1,12 +1,12 @@
{
"name": "it-tools",
"version": "2.5.0",
"version": "2.5.1",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "it-tools",
"version": "2.5.0",
"version": "2.5.1",
"dependencies": {
"@it-tools/bip39": "^0.0.4",
"@vicons/material": "^0.12.0",

View File

@@ -1,6 +1,6 @@
{
"name": "it-tools",
"version": "2.5.0",
"version": "2.5.1",
"scripts": {
"dev": "vite",
"build": "vue-tsc --noEmit && vite build",

View File

@@ -59,7 +59,7 @@ export const config = figue({
.loadEnv({
...import.meta.env,
// Because the string 'import.meta.env.PACKAGE_VERSION' is statically replaced during build time (see 'define' in vite.config.ts)
PACKAGE_VERSION: import.meta.env.PACKAGE_VERSION
PACKAGE_VERSION: import.meta.env.PACKAGE_VERSION,
})
.validate()
.getConfig();

View File

@@ -1,5 +1,5 @@
<script lang="ts" setup>
import { NIcon, useThemeVars } from 'naive-ui';
import { NIcon, useThemeVars, type MenuGroupOption } from 'naive-ui';
import { h } from 'vue';
import { RouterLink, useRoute } from 'vue-router';
import { Heart, Menu2, Home2 } from '@vicons/tabler';
@@ -19,17 +19,17 @@ const styleStore = useStyleStore();
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 makeLabel = (tool: ITool) => () => h(RouterLink, { to: tool.path }, { default: () => tool.name });
const makeIcon = (tool: ITool) => () => h(MenuIconItem, { tool });
const menuOptions = toolsByCategory.map((category) => ({
const menuOptions: MenuGroupOption[] = toolsByCategory.map((category) => ({
label: category.name,
key: category.name,
type: 'group',
children: category.components.map((tool) => ({
label: makeLabel(tool.name, tool.path),
label: makeLabel(tool),
icon: makeIcon(tool),
key: name,
key: tool.name,
})),
}));
</script>

View File

@@ -3,13 +3,13 @@ import { useRoute } from 'vue-router';
import BaseLayout from './base.layout.vue';
import { useHead } from '@vueuse/head';
import type { HeadObject } from '@vueuse/head';
import { reactive } from 'vue';
import { computed } from 'vue';
import { useThemeVars } from 'naive-ui';
const route = useRoute();
const theme = useThemeVars();
const head = reactive<HeadObject>({
const head = computed<HeadObject>(() => ({
title: `${route.meta.name} - IT Tools`,
meta: [
{
@@ -21,7 +21,7 @@ const head = reactive<HeadObject>({
content: route.meta.keywords,
},
],
});
}));
useHead(head);
</script>

View File

@@ -9,7 +9,13 @@ useHead({ title: 'IT Tools - Handy online tools for developers' });
<template>
<div class="home-page">
<n-grid x-gap="12" y-gap="12" cols="1 400:2 800:3 1200:4 2000:8">
<n-gi v-for="tool in toolsWithCategory.reverse().sort(({ isNew }) => (isNew ? -1 : 1))" :key="tool.name">
<n-gi
v-for="tool in [
...toolsWithCategory.filter(({ isNew }) => isNew),
...toolsWithCategory.filter(({ isNew }) => !isNew),
]"
:key="tool.name"
>
<tool-card :tool="tool" />
</n-gi>
</n-grid>