diff --git a/.gitignore b/.gitignore index 38adffa6..cd1e2011 100644 --- a/.gitignore +++ b/.gitignore @@ -26,3 +26,5 @@ coverage *.njsproj *.sln *.sw? + +.env \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 439c35b3..af51d171 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,51 @@ 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.16.0](https://github.com/CorentinTh/it-tools/compare/v2.15.0...v2.16.0) (2022-12-21) + + +### Features + +* **search-bar:** use cmd + k to focus on mac ([bf88836](https://github.com/CorentinTh/it-tools/commit/bf88836dbe4037019e9545deaae1db06e5768cfb)) +* **tool:** improved favorite tool management ([af075dc](https://github.com/CorentinTh/it-tools/commit/af075dccccec959a0863e6d11516206860bed91f)) +* **tools:** added favorite tool handling ([4cd809b](https://github.com/CorentinTh/it-tools/commit/4cd809bd0c94836532f58a2ec6aa131694cce10d)) +* **tracker:** added actions monitoring ([bfc2e24](https://github.com/CorentinTh/it-tools/commit/bfc2e24bbfc08f67ed9c9b1d93474029bc01dc8b)) + + +### Refactors + +* **clean:** removed empty style tag ([cf723f1](https://github.com/CorentinTh/it-tools/commit/cf723f144ee865b6de7323d3be58eb7a9586fa56)) +* **clean:** removed unused import ([4087285](https://github.com/CorentinTh/it-tools/commit/40872859a580a20bb838b79db2b3c88c00995e37)) +* **menu:** improve support button ([679dd1c](https://github.com/CorentinTh/it-tools/commit/679dd1c1f6265227cc9db60c55d83f8eaf8f72b4)) +* **tracker:** better tracker injection ([def60e7](https://github.com/CorentinTh/it-tools/commit/def60e7248003e74ed67e9ff116b438bab410a92)) + +## [2.15.0](https://github.com/CorentinTh/it-tools/compare/v2.14.1...v2.15.0) (2022-12-16) + + +### Features + +* **search-bar:** better search back result ([71e98e9](https://github.com/CorentinTh/it-tools/commit/71e98e93e5752cba934f67d679088524c4d3d2ad)) + + +### Bug Fixes + +* **integer-base-converter:** handle non-decimal char and better error message ([8476cf3](https://github.com/CorentinTh/it-tools/commit/8476cf319b7ebae87c7928592604a54833ac56ef)) +* **tool-card:** correct text color on light mode for card description ([acf8bc1](https://github.com/CorentinTh/it-tools/commit/acf8bc11dbab85ab361edbe400ebbe5e52a11b89)) + + +### Refactors + +* **search-bar:** improved tool fuzzy search ([1b5d4e7](https://github.com/CorentinTh/it-tools/commit/1b5d4e72bdb222dd721a1e484c3e5d73bb62d2b1)) + +### [2.14.1](https://github.com/CorentinTh/it-tools/compare/v2.14.0...v2.14.1) (2022-11-23) + +## [2.14.0](https://github.com/CorentinTh/it-tools/compare/v2.13.0...v2.14.0) (2022-11-23) + + +### Features + +* **new-tool:** chmod calculator ([35b5187](https://github.com/CorentinTh/it-tools/commit/35b518711938c2bc88f35d104bb35d9956f0c267)) + ## [2.13.0](https://github.com/CorentinTh/it-tools/compare/v2.11.0...v2.13.0) (2022-11-14) diff --git a/README.md b/README.md index efcc5538..0ba0dcc6 100644 --- a/README.md +++ b/README.md @@ -10,46 +10,53 @@ You have an idea of a tool? Submit a [feature request](https://github.com/Corent ## Contribute -### Recommended IDE Setup +## Recommended IDE Setup -[VSCode](https://code.visualstudio.com/) + [Volar](https://marketplace.visualstudio.com/items?itemName=johnsoncodehk.volar) (and disable Vetur) + [TypeScript Vue Plugin (Volar)](https://marketplace.visualstudio.com/items?itemName=johnsoncodehk.vscode-typescript-vue-plugin). +[VSCode](https://code.visualstudio.com/) + [Volar](https://marketplace.visualstudio.com/items?itemName=Vue.volar) (and disable Vetur) + [TypeScript Vue Plugin (Volar)](https://marketplace.visualstudio.com/items?itemName=Vue.vscode-typescript-vue-plugin). -### Node version +## Type Support for `.vue` Imports in TS -Ensure you have the correct node/npm version +TypeScript cannot handle type information for `.vue` imports by default, so we replace the `tsc` CLI with `vue-tsc` for type checking. In editors, we need [TypeScript Vue Plugin (Volar)](https://marketplace.visualstudio.com/items?itemName=Vue.vscode-typescript-vue-plugin) to make the TypeScript language service aware of `.vue` types. + +If the standalone TypeScript plugin doesn't feel fast enough to you, Volar has also implemented a [Take Over Mode](https://github.com/johnsoncodehk/volar/discussions/471#discussioncomment-1361669) that is more performant. You can enable it by the following steps: + +1. Disable the built-in TypeScript Extension + 1. Run `Extensions: Show Built-in Extensions` from VSCode's command palette + 2. Find `TypeScript and JavaScript Language Features`, right click and select `Disable (Workspace)` +2. Reload the VSCode window by running `Developer: Reload Window` from the command palette. + +## Customize configuration + +See [Vite Configuration Reference](https://vitejs.dev/config/). + +## Project Setup ```sh -nvm use +pnpm install ``` -### Project Setup +### Compile and Hot-Reload for Development ```sh -npm install +pnpm dev ``` -#### Compile and Hot-Reload for Development +### Type-Check, Compile and Minify for Production ```sh -npm run dev +pnpm build ``` -#### Type-Check, Compile and Minify for Production +### Run Unit Tests with [Vitest](https://vitest.dev/) ```sh -npm run build +pnpm test ``` -#### Run Unit Tests with [Vitest](https://vitest.dev/) +### Lint with [ESLint](https://eslint.org/) ```sh -npm run test -``` - -#### Lint with [ESLint](https://eslint.org/) - -```sh -npm run lint +pnpm lint ``` ### Create a new tool @@ -68,12 +75,9 @@ Coded with ❤️ by [Corentin Thomasset](//corentin-thomasset.fr). This project is continuously deployed using [vercel.com](https://vercel.com). - - IT Tools - Collection of handy online tools for devs, with great UX | Product Hunt IT Tools - Collection of handy online tools for devs, with great UX | Product Hunt - ## License This project is under the [GNU GPLv3](LICENSE). diff --git a/package.json b/package.json index eaa89011..6c8aa1c3 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "it-tools", - "version": "2.13.0", + "version": "2.16.0", "description": "Collection of handy online tools for developers, with great UX. ", "keywords": [ "productivity", @@ -45,6 +45,7 @@ "crypto-js": "^4.1.1", "date-fns": "^2.29.3", "figue": "^1.2.0", + "fuse.js": "^6.6.2", "highlight.js": "^11.6.0", "json5": "^2.2.1", "jwt-decode": "^3.1.2", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index f61621e5..b7f2a228 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -38,6 +38,7 @@ specifiers: eslint-plugin-import: ^2.26.0 eslint-plugin-vue: ^8.7.1 figue: ^1.2.0 + fuse.js: ^6.6.2 highlight.js: ^11.6.0 jsdom: ^19.0.0 json5: ^2.2.1 @@ -81,6 +82,7 @@ dependencies: crypto-js: 4.1.1 date-fns: 2.29.3 figue: 1.2.0 + fuse.js: 6.6.2 highlight.js: 11.6.0 json5: 2.2.1 lodash: 4.17.21 @@ -4054,6 +4056,11 @@ packages: resolution: {integrity: sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==} dev: true + /fuse.js/6.6.2: + resolution: {integrity: sha512-cJaJkxCCxC8qIIcPBF9yGxY0W/tVZS3uEISDxhYIdtk8OL93pe+6Zj7LjCqVV4dzbqcriOZ+kQ/NE4RXZHsIGA==} + engines: {node: '>=10'} + dev: false + /gensync/1.0.0-beta.2: resolution: {integrity: sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==} engines: {node: '>=6.9.0'} diff --git a/src/components/FavoriteButton.vue b/src/components/FavoriteButton.vue new file mode 100644 index 00000000..4b7f561f --- /dev/null +++ b/src/components/FavoriteButton.vue @@ -0,0 +1,38 @@ + + + diff --git a/src/components/MenuIconItem.vue b/src/components/MenuIconItem.vue index 0909e567..a08fe241 100644 --- a/src/components/MenuIconItem.vue +++ b/src/components/MenuIconItem.vue @@ -6,11 +6,11 @@ @@ -50,7 +55,7 @@ a { .icon { opacity: 0.6; - color: #ffffff; + color: v-bind('theme.textColorBase'); } .title { @@ -59,7 +64,7 @@ a { .description { opacity: 0.6; - color: #ffffff; + color: v-bind('theme.textColorBase'); margin: 5px 0; } } diff --git a/src/composable/fuzzySearch.ts b/src/composable/fuzzySearch.ts new file mode 100644 index 00000000..b46f9de6 --- /dev/null +++ b/src/composable/fuzzySearch.ts @@ -0,0 +1,23 @@ +import { get, type MaybeRef } from '@vueuse/core'; +import Fuse from 'fuse.js'; +import { computed } from 'vue'; + +export { useFuzzySearch }; + +function useFuzzySearch({ + search, + data, + options = {}, +}: { + search: MaybeRef; + data: Data[]; + options?: Fuse.IFuseOptions; +}) { + const fuse = new Fuse(data, options); + + const searchResult = computed(() => { + return fuse.search(get(search)).map(({ item }) => item); + }); + + return { searchResult }; +} diff --git a/src/layouts/base.layout.vue b/src/layouts/base.layout.vue index 23e23d22..4ee2997d 100644 --- a/src/layouts/base.layout.vue +++ b/src/layouts/base.layout.vue @@ -1,13 +1,15 @@