Compare commits

..
Author SHA1 Message Date
ShareVB 38fce38ab5 chore: optimize build process 2025-06-03 15:21:54 +02:00
ShareVB 632c68df20 feat(new tool): PDF Text Extractor
Fix #1572
2025-06-03 10:14:08 +02:00
ShareVB 95ed4e402b fix: vercel opt 2025-06-02 17:52:57 +02:00
ShareVB bcec4020a1 fix: Certificate Key Parser and PGP
Added a polyfill (mainly for key parser)
Handle case of HTTP (unsecure context)
Make a warning on PGP tools and filter alg
Add Curve448
Fix #80
2025-06-02 17:22:08 +02:00
ShareVB 920de5b431 fix: optimize monaco-editor loading (locally) 2025-06-02 16:49:00 +02:00
ShareVB d7f266bfd7 fix(Textarea Copyable): better copy button placement 2025-06-02 16:49:00 +02:00
ShareVB 44e81e3025 fix: file upload, preview for images only 2025-06-02 16:49:00 +02:00
Dark_Phoenix_ ba663a4fb1 Improve IES Lighting guidelines performance (#83)
* Improved performance on the Unicode Search page:
- Created new flexSearch component (Faster than fuzzySearch). For more information, see https://github.com/nextapps-de/flexsearch
- Replaced fuzzySearch with the flexSearch component on the unicode search page
- Fixed a bug where the search limit counter didn't have any effect
- Reduced the default search limit from 100 to 40 to reduce lag from loading all the ui elements

* Added clarification to comment

* components.d.ts update

* - Replaced FuzzySearch with FlexSearch on the ISO 3166 Searcher page
- Reduced the debounce from 500ms to 250ms
- Reduced the default search limit from 100 to 20, and fixed a bug where the search limit wasn't applied when the value changed
- Added the `readonly` prop to the `input-copyable` field
- Added the `readonly` flag to all input copyable fields on the unicode search and iso 3166 searcher pages

* Fixed incorrect case usage for functions and variables

* - Replaced fuzzysearch with flexsearch on the IES Lighting Guidelines page
- Reduced the debounce from 500ms to 250ms
- Changed the search keys so all columns are now searchable

* - Added logic to sort the limited results using a similarity score created by calculating the Levenshtein distance
- Added the `shouldSort` boolean to control whether the results should be filtered by similarity. `true` by default

* Merged new changes to flexSearch

* - Added readonly flag to input copyable fields
2025-06-02 16:49:00 +02:00
Dark_Phoenix_ 8172562fe6 Improved iso 3166 searcher page performance (#79)
* Improved performance on the Unicode Search page:
- Created new flexSearch component (Faster than fuzzySearch). For more information, see https://github.com/nextapps-de/flexsearch
- Replaced fuzzySearch with the flexSearch component on the unicode search page
- Fixed a bug where the search limit counter didn't have any effect
- Reduced the default search limit from 100 to 40 to reduce lag from loading all the ui elements

* Added clarification to comment

* components.d.ts update

* - Replaced FuzzySearch with FlexSearch on the ISO 3166 Searcher page
- Reduced the debounce from 500ms to 250ms
- Reduced the default search limit from 100 to 20, and fixed a bug where the search limit wasn't applied when the value changed
- Added the `readonly` prop to the `input-copyable` field
- Added the `readonly` flag to all input copyable fields on the unicode search and iso 3166 searcher pages

* Fixed incorrect case usage for functions and variables
2025-06-02 16:49:00 +02:00
ShareVB 49288d0959 feat(new tool): Age Crypto
Fix #640
2025-06-02 16:49:00 +02:00
ShareVB 64a21197af feat(Htpasswd Generator): add md5, apr1, sha256 and sha512
Fix #1578
2025-06-02 16:02:37 +02:00
ShareVB a5d15b579e feat(new tool): Nginx Memo 2025-06-02 16:02:37 +02:00
ShareVB 87878aa33e feat(new tool): Vim Memo 2025-06-02 16:02:37 +02:00
ShareVB 5882b6a714 feat(new tool): Kubernetes Memo 2025-06-02 16:02:37 +02:00
ShareVB 5c68336170 feat(new tool): Linux Bash Memo
Fix #1577
2025-06-02 16:02:37 +02:00
262 changed files with 1282 additions and 4129 deletions

No files matched your search

+5 -5
View File
@@ -39,7 +39,6 @@
"h": true,
"ignorableWatch": true,
"inject": true,
"injectLocal": true,
"isDefined": true,
"isProxy": true,
"isReactive": true,
@@ -69,7 +68,6 @@
"onUpdated": true,
"pausableWatch": true,
"provide": true,
"provideLocal": true,
"reactify": true,
"reactifyObject": true,
"reactive": true,
@@ -98,7 +96,6 @@
"toReactive": true,
"toRef": true,
"toRefs": true,
"toValue": true,
"triggerRef": true,
"tryOnBeforeMount": true,
"tryOnBeforeUnmount": true,
@@ -133,7 +130,6 @@
"useBrowserLocation": true,
"useCached": true,
"useClipboard": true,
"useClipboardItems": true,
"useCloned": true,
"useColorMode": true,
"useConfirmDialog": true,
@@ -289,6 +285,10 @@
"watchThrottled": true,
"watchTriggerable": true,
"watchWithFilter": true,
"whenever": true
"whenever": true,
"toValue": true,
"injectLocal": true,
"provideLocal": true,
"useClipboardItems": true
}
}
+1 -1
View File
@@ -33,7 +33,7 @@ body:
- type: textarea
id: alternative
attributes:
label: Is there example of this tool in the wild?
label: Is their example of this tool in the wild?
description: Provide link to already existing tool (like websites, apps, cli, ...) or npm packages that could be used or provide inspiration for the feature.
- type: textarea
@@ -67,8 +67,6 @@ jobs:
with:
context: .
file: ./Dockerfile
build-args: |
"BASE_URL=/"
platforms: linux/amd64,linux/arm64
push: true
tags: |
@@ -1,60 +0,0 @@
name: Deploy static content to Pages
on:
# Runs on pushes targeting the default branch
push:
branches: ["chore/all-my-stuffs"]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: "pages"
cancel-in-progress: false
jobs:
# Single deploy job since we're just deploying
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Node.js
uses: actions/setup-node@v3
with:
node-version: 18
- uses: pnpm/action-setup@v2
name: Install pnpm
id: pnpm-install
with:
version: 8
run_install: true
- name: Build
run: |
BASE_URL="/it-tools/" pnpm build
cp dist/index.html dist/404.html
- name: Setup Pages
uses: actions/configure-pages@v5
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: './dist'
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
-126
View File
@@ -2,132 +2,6 @@
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.
## Version 2025.06.15-20a26514
### Features
- **Date-Time Converter**: add .Net Ticks (20a2651)
- **NGINX**: Add some commonly used security headers (#94) (0048f48)
- **new tool**: PDF Text Extractor (3947973)
- **new tool**: Age Crypto (8decf33)
- **Htpasswd Generator**: add md5, apr1, sha256 and sha512 (4313ce9)
- **new tool**: Nginx Memo (7d6753f)
- **new tool**: Vim Memo (bed46c6)
- **new tool**: Kubernetes Memo (f1d6a16)
- **new tool**: Linux Bash Memo (19d3179)
- **new tool**: Cron/Weekdays Time Alarm (c9b448c)
- **Time Alarm**: fullscreen mode (f90a69c)
- **Countdown**: fullscreen mode (80a2fb7)
- **Certificate Key Parser**: display public and private keys (pem) (b489f3a)
- **new tool**: Traefik Compose Maker (7a48c2f)
- **new tool**: Data Faker (dd5ca6f)
- **new tool**: Firewalld Generator (eaa8b5b)
- **new tool**: HTAccess Generator (00053c3)
- add KiB/kB explanations (6762677)
- **new tool**: String Escaper (58e2fb3)
- **new tool**: Quote Converter (91f565f)
- **new tool**: JSON to Protobuf (937ddc6)
- **new tool**: Distinct Words Counter (2593df0)
- **new tool**: JSON to Typescript (9c925ac)
- **new tool**: SQL Minifier (2da9832)
- **JS to Object**: handle backquotes (4751417)
- **new tool**: JSON to SQL INSERT (e073f3b)
- **new tool**: CSV to JSON, YAML, SQL INSERT, Markdown, CSV, XML (93532ce)
- **Excel to Data**: handle nestify, XML and Sheet Selection (b982fa5)
- **new tool**: Cookies Parser (41d24a5)
- **new tool**: Git Semantic Commits Cheatsheet (ca12661)
- **PDF Tools**: display command args (1829733)
- **JSON to Go**: use quicktype (7931c9b)
- **new tool**: JSON to PHP Code (40d90b9)
- **new tool**: JSON to Python (bcf93f3)
- **new tool**: Curl Command Generator (f4d4de8)
- **new tool**: Pdf Extractor (2160e7a)
- **new tool**: Pdf Concatener (2c12e1e)
- **Rune Converter**: add StavelessFuthark (8efe340)
- **new tool**: Paseto/PASERK Encrypt/Decrypt/Sign/Verify and Generator (2037d14)
- **new tool**: Excel to Data (e99d7b4)
- **new tool**: Iptables Command Generator (35e91b3)
- **new tool**: TCP Dump Generator (af6ccec)
- **new tool**: JSON to SQL CREATE TABLE/DDL (06e4f84)
- **new tool**: Rsync Command Line Generator (f01d56c)
- **new tool**: /etc/fstab Generator (faaeeb2)
- **new tool**: BMI Calculator (2464f1f)
- **new tool**: Properties from/to YAML (ec865b7)
- **new tools**: DNS generator (SPF Record, DKIM Record, DMARC Record, BIMI Record ) (53aa948)
### Bug fixes
- favorites contextmenu disable (a93a99b)
- linting (56da33f)
- **Favorites**: add a delay for dragging to allow touch to access tools (4537cc6)
- add loading progress on tool load (db0aff3)
- add a splash screen (ac3648c)
- **Favorites**: add a delay for dragging to allow touch to access tools (bc8524d)
- **Fortune wheel**: added description (64ef495)
- add GitHub Page deployment and update README (0c29c19)
- optimize monaco-editor loading (locally) (eb40104)
- **Textarea Copyable**: better copy button placement (ca47590)
- file upload, preview for images only (09d56f5)
- Certificate Key Parser and PGP (884a447)
- **README**: use latest version for GitHub Pages publish actions (a997446)
- **Certificate/Key Parser**: handle multiple PEM certificate in one file (4885459)
- **deps**: update dependency jq-wasm to v1 (#24) (386b4fd)
- **Docker building**: image overwrite bug (4c600f0)
- **Folder Structure Diagram**: use monaco editor (665db9b)
- **Cookies Parser**: handle multuple = (368d088)
- **Docker Cheatsheet**: typo <> in code blocks (3b21a6b)
- checkbox bindings (77e7667)
- **Paste as Mardown**: ref errors (6cb20b7)
- **Text Diff**: height responsive (6eccfc1)
- **README**: typoe in "custom default language" (68c56e4)
- **Paseto Tools**: renaming (02e40dc)
- **Docker**: baseurl-it-tools, fix rewrite for Traefik (0e9c33d)
### Refactoring
- **Excel to Data**: service + unit tests (ece2770)
### Chores
- try fix vercel build (8e9d921)
- fix pgp for vercel (a768d22)
- github page deploy and contributors to README (cfcc21d)
- fix lint (da8c5df)
- fix and optimize build (d4447df)
- **deps**: update actions/checkout digest to 11bd719 (#8) (e2a6580)
- **deps**: update actions/cache action to v4 (#20) (9eb888f)
- **deps**: update actions/checkout action to v4 (#21) (648ef7b)
- update codeql version (3a11b59)
- github release split and matrix optimization (dae5fe6)
- optimize onnxruntime-node (99f4f83)
- optimize build and disable preload (8de0535)
- update composerize (134a5e8)
### Other
- Added loading delay (#92) (be25e17)
- Improve fortune wheel performance (#91) (1e405c3)
- Fix broken text fonts (#95) (203f207)
- Merge branch 'feat/loading-indicators' into chore/all-my-stuffs (bf395a1)
- Convert last items to flex search (#87) (6f1b17f)
- Improve image resizer features (#90) (e14fd2f)
- Improve hompage performance (#85) (fd76914)
- Improve http status codes performance (#86) (b77c57e)
- Improve emoji picker performance (#84) (3ed3f90)
- Improve IES Lighting guidelines performance (#83) (02df1bc)
- Improved iso 3166 searcher page performance (#79) (226081d)
- Improved performance on the Unicode Search page (#75) (2355232)
- Add all mainpage card translate templates (en.yml) + add ru & ua translations on mainpage card (#62) (3e1b05f)
- Add arabic translation (#61) (5a990ae)
- Update pt.yml (#59) (4cc875f)
- Adding full Ukrainian & Russian translation (#60) (7ed2e41)
### Documentation
- add info about HTTPS using DNS Challenge (78fdceb)
### Typo
- **Fortune Wheel**: maje restart button cleared (spin!) (0098645)
### Fixup! feat
- **new tool**: JSON to Python (3564ccf)
- **new tool**: JSON to PHP Code (4089c62)
- **new tool**: Properties from/to YAML (520d2cd)
## Version 2025.04.21-70194069
### Features
+63 -32
View File
@@ -2,22 +2,7 @@
Since *Docker base image* is now `nginx-unpriviledged`, docker image now listen to **8080** and no more 80. So you need to update your port mapping, ie from `8080:80` to `8080:8080`.
Docker image listen to IPv6, so it needs to be enabled: https://serverfault.com/questions/1147296/how-to-enable-ipv6-on-ubuntu-20-04. Alternatively, you can mount your own `nginx.conf` own using docker option `-v "./nginx.conf:/etc/nginx/conf.d/nginx.conf"` (with `listen [::]:8080;` removed)
## HTTPS is recommanded
Some tools like PGP encryption rely on WebCrypto API that is only available in HTTPS/SSL. Also, if you want to use PWA, HTTPS is required.
So even on internal installations, you can enable HTTPS using Let's Encrypt using DNS Challenge
Some docs about DNS Challenge:
- https://medium.com/@life-is-short-so-enjoy-it/homelab-nginx-proxy-manager-setup-ssl-certificate-with-domain-name-in-cloudflare-dns-732af64ddc0b
- https://doc.traefik.io/traefik/user-guides/docker-compose/acme-dns/
- https://medium.com/@svenvanginkel/traefik-letsencrypt-dns01-challenge-with-ovhcloud-52f2a2c6d08a
Related doc for CyberPanel: https://community.cyberpanel.net/t/reverse-proxy-traffic-to-docker-container-on-cyberpanel/30644
### Check out these change here: <https://sharevb-it-tools.vercel.app/> or <https://sharevb.github.io/it-tools/>
### Check out these change here: <https://sharevb-it-tools.vercel.app/>
You can use my image in your docker-compose file if you want an update to date version of it-tools (with my PR and some of others) until the main branch has been updated.
@@ -25,16 +10,6 @@ You can use my image in your docker-compose file if you want an update to date v
(Thanks to [gitmotion](https://github.com/gitmotion/it-tools) for this model of README fork)
## Contributors
Big thanks to all the people who have already contributed!
[![contributors](https://contrib.rocks/image?repo=sharevb/it-tools&refresh=1)](https://github.com/sharevb/it-tools/graphs/contributors)
## Development under Windows
Use of WSL2 is recommanded to develop using VSCode on Windows. Direct development is tricky (because of some dependencies)
## Added features
Almost [all tools PR of it-tools](https://github.com/sharevb/it-tools/pulls).
@@ -120,16 +95,72 @@ Then navigate to http://localhost:8080/it-tools/
## To build for GitHub Pages:
1. Enable GitHub Pages build and deployment option in your fork, under **Settings** > **Pages** and select **GitHub Actions** as the source
2. Add the following GitHub action to your repo: https://github.com/sharevb/it-tools/.github/workflows/sharevb-github-pages-publish.yml
2. Add the following GitHub action to your repo:
## To add authentication
.github/workflows/deploy-pages.yaml
```yaml
name: Deploy static content to Pages
Assuming you're already hosting it-tools behind a reverse proxy, you can configure forward-auth and enforce authentication from the reverse proxy
on:
# Runs on pushes targeting the default branch
push:
branches: ["main"]
* [Official guides](https://docs.goauthentik.io/docs/add-secure-apps/providers/proxy/server_nginx) with nginx. Guides with other reverse proxy setups are available
* [Step-by-step setup guide with nginx-proxy-manager](https://geekscircuit.com/set-up-authentik-sso-with-nginx-proxy-manager/)
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
(thanks @jogerj)
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: "pages"
cancel-in-progress: false
jobs:
# Single deploy job since we're just deploying
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Node.js
uses: actions/setup-node@v3
with:
node-version: 18
- uses: pnpm/action-setup@v2
name: Install pnpm
id: pnpm-install
with:
version: 8
run_install: true
- name: Build
run: |
BASE_URL="/it-tools/" pnpm build
cp dist/index.html dist/404.html
- name: Setup Pages
uses: actions/configure-pages@v3
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: './dist'
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2
```
## Installation methods
+16 -1
View File
@@ -298,12 +298,20 @@ declare module '@vue/runtime-core' {
MorseConverter: typeof import('./src/tools/morse-converter/morse-converter.vue')['default']
MultiLinkDownloader: typeof import('./src/tools/multi-link-downloader/multi-link-downloader.vue')['default']
MyIp: typeof import('./src/tools/my-ip/my-ip.vue')['default']
NA: typeof import('naive-ui')['NA']
NAlert: typeof import('naive-ui')['NAlert']
NanoidGenerator: typeof import('./src/tools/nanoid-generator/nanoid-generator.vue')['default']
NanoMemo: typeof import('./src/tools/nano-memo/nano-memo.vue')['default']
'NanoMemo.content': typeof import('./src/tools/nano-memo/nano-memo.content.md')['default']
NavbarButtons: typeof import('./src/components/NavbarButtons.vue')['default']
NButton: typeof import('naive-ui')['NButton']
NCard: typeof import('naive-ui')['NCard']
NCheckbox: typeof import('naive-ui')['NCheckbox']
NCheckboxGroup: typeof import('naive-ui')['NCheckboxGroup']
NCode: typeof import('naive-ui')['NCode']
NCollapseTransition: typeof import('naive-ui')['NCollapseTransition']
NConfigProvider: typeof import('naive-ui')['NConfigProvider']
NDataTable: typeof import('naive-ui')['NDataTable']
NDivider: typeof import('naive-ui')['NDivider']
NEllipsis: typeof import('naive-ui')['NEllipsis']
NFormItem: typeof import('naive-ui')['NFormItem']
@@ -313,12 +321,20 @@ declare module '@vue/runtime-core' {
NH1: typeof import('naive-ui')['NH1']
NH3: typeof import('naive-ui')['NH3']
NIcon: typeof import('naive-ui')['NIcon']
NInput: typeof import('naive-ui')['NInput']
NInputNumber: typeof import('naive-ui')['NInputNumber']
NLayout: typeof import('naive-ui')['NLayout']
NLayoutSider: typeof import('naive-ui')['NLayoutSider']
NMenu: typeof import('naive-ui')['NMenu']
NModal: typeof import('naive-ui')['NModal']
NP: typeof import('naive-ui')['NP']
NRadio: typeof import('naive-ui')['NRadio']
NRadioGroup: typeof import('naive-ui')['NRadioGroup']
NScrollbar: typeof import('naive-ui')['NScrollbar']
NSpace: typeof import('naive-ui')['NSpace']
NTable: typeof import('naive-ui')['NTable']
NTag: typeof import('naive-ui')['NTag']
NTimePicker: typeof import('naive-ui')['NTimePicker']
NumberInput: typeof import('./src/tools/pomodoro-timer/app/components/NumberInput.vue')['default']
NumeronymGenerator: typeof import('./src/tools/numeronym-generator/numeronym-generator.vue')['default']
OcrImage: typeof import('./src/tools/ocr-image/ocr-image.vue')['default']
@@ -438,7 +454,6 @@ declare module '@vue/runtime-core' {
VimMemo: typeof import('./src/tools/vim-memo/vim-memo.vue')['default']
'VimMemo.content': typeof import('./src/tools/vim-memo/vim-memo.content.md')['default']
VolumeConverter: typeof import('./src/tools/volume-converter/volume-converter.vue')['default']
Watermarker: typeof import('./src/tools/watermarker/watermarker.vue')['default']
WebsocketTester: typeof import('./src/tools/websocket-tester/websocket-tester.vue')['default']
WeekNumberConverter: typeof import('./src/tools/week-number-converter/week-number-converter.vue')['default']
WifiQrCodeGenerator: typeof import('./src/tools/wifi-qr-code-generator/wifi-qr-code-generator.vue')['default']
+393 -369
View File
File diff suppressed because it is too large. Load diff
+1 -1
View File
@@ -443,7 +443,7 @@ tools:
image-resizer:
title: Изменение размера изображения
description: Изменяйте ширину и высоту изображения, предварительно просматривайте и загружайте его в нужном формате.
description: Изменяйте ширину и высоту изображения, предварительно просматривайте и загружайте его в нужном формате (.jpg, .jpeg, .png, .bmp, .ico, .svg).
multi-link-downloader:
title: Множественный загрузчик ссылок
+1 -1
View File
@@ -446,7 +446,7 @@ tools:
image-resizer:
title: Зміна розміру зображення
description: Змініть ширину та висоту файлу зображення, перегляньте та завантажте його у бажаному форматі.
description: Змініть ширину та висоту файлу зображення, перегляньте та завантажте його у бажаному форматі (.jpg, .jpeg, .png, .bmp, .ico, .svg).
json-to-object:
title: JSON в об'єкт
-7
View File
@@ -5,13 +5,6 @@ server {
root /usr/share/nginx/html;
index index.html;
add_header X-Frame-Options SAMEORIGIN;
add_header X-Content-Type-Options nosniff;
add_header Referrer-Policy strict-origin-when-cross-origin;
add_header X-Permitted-Cross-Domain-Policies none;
add_header Cross-Origin-Resource-Policy same-site;
add_header Cross-Origin-Opener-Policy same-origin;
add_header Content-Security-Policy "default-src 'self'; script-src 'self' 'unsafe-inline' 'unsafe-eval'; style-src 'self' 'unsafe-inline'; img-src 'self' data:; connect-src 'self'; font-src 'self'; object-src 'none'; base-uri 'self'; form-action 'self';";
location / {
rewrite ^/it-tools/(.*) /$1 break;
try_files $uri $uri/ /index.html;
+5 -8
View File
@@ -1,7 +1,7 @@
{
"name": "it-tools",
"type": "module",
"version": "2025.6.15-20a26514",
"version": "2025.4.21-70194069",
"packageManager": "pnpm@9.11.0",
"description": "Collection of handy online tools for developers, with great UX. ",
"author": "Corentin Th <corentin.thomasset74+it-tools@gmail.com> (https://corentin.tech)",
@@ -34,8 +34,7 @@
"lint": "eslint src --ext .vue,.js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts --ignore-path .gitignore",
"script:create:tool": "node scripts/create-tool.mjs",
"script:create:ui": "hygen generator ui-component",
"release": "node ./scripts/release.mjs",
"script:extract:desc": "node ./scripts/extract-tools-desc.mjs"
"release": "node ./scripts/release.mjs"
},
"dependencies": {
"@chenfengyuan/vue-barcode": "^2.0.2",
@@ -126,7 +125,7 @@
"duration-fns": "^3.0.2",
"email-bounce-parser-browser": "^1.1.0",
"email-normalizer": "^1.0.0",
"emojilib": "^4.0.2",
"emojilib": "^4.0.1",
"event-cron-parser": "^1.0.35",
"exif-be-gone": "^1.5.1",
"exifreader": "^4.26.1",
@@ -263,14 +262,13 @@
"svgo": "^3.3.2",
"tesseract.js": "^5.1.1",
"text-encoding-utf-8": "^1.0.2",
"tick-time": "^1.0.1",
"tidy-url": "^1.18.3",
"to-double-quotes": "^4.0.0",
"to-single-quotes": "^4.0.0",
"turndown": "^7.2.0",
"ua-parser-js": "^2.0.1",
"ulid": "^2.3.0",
"unicode-emoji-json": "^0.8.0",
"unicode-emoji-json": "^0.4.0",
"unique-random": "^4.0.0",
"unixcrypt-browser": "^2.0.4",
"unpdf": "^1.0.5",
@@ -281,13 +279,13 @@
"vue": "^3.3.4",
"vue-color-wheel": "^0.1.1",
"vue-i18n": "^9.14.3",
"vue-loading-overlay": "^6.0",
"vue-markdown-render": "^2.2.1",
"vue-mathjax-next": "^0.0.6",
"vue-router": "^4.1.6",
"vue-shadow-dom": "^4.2.0",
"vue-tsc": "^1.8.1",
"vue3-flip-countdown": "^0.1.6",
"vue3-fortune-wheel": "^2.0.5",
"vuedraggable": "^4.1.0",
"vuex": "^4.1.0",
"w-websocket-client": "^1.0.29",
@@ -369,7 +367,6 @@
"vite": "^4.4.9",
"vite-plugin-node-polyfills": "^0.23.0",
"vite-plugin-pwa": "^1.0.0",
"vite-plugin-splash-screen": "^0.2.0",
"vite-plugin-vue-markdown": "^0.23.5",
"vite-plugin-wasm": "^3.4.1",
"vite-svg-loader": "^4.0.0",
+21 -42
View File
@@ -273,8 +273,8 @@ dependencies:
specifier: ^1.0.0
version: 1.0.0
emojilib:
specifier: ^4.0.2
version: 4.0.2
specifier: ^4.0.1
version: 4.0.1
event-cron-parser:
specifier: ^1.0.35
version: 1.0.35
@@ -683,9 +683,6 @@ dependencies:
text-encoding-utf-8:
specifier: ^1.0.2
version: 1.0.2
tick-time:
specifier: ^1.0.1
version: 1.0.1
tidy-url:
specifier: ^1.18.3
version: 1.18.3
@@ -705,8 +702,8 @@ dependencies:
specifier: ^2.3.0
version: 2.3.0
unicode-emoji-json:
specifier: ^0.8.0
version: 0.8.0
specifier: ^0.4.0
version: 0.4.0
unique-random:
specifier: ^4.0.0
version: 4.0.0
@@ -737,9 +734,6 @@ dependencies:
vue-i18n:
specifier: ^9.14.3
version: 9.14.4(vue@3.3.4)
vue-loading-overlay:
specifier: ^6.0
version: 6.0.6(vue@3.3.4)
vue-markdown-render:
specifier: ^2.2.1
version: 2.2.1(vue@3.3.4)
@@ -758,6 +752,9 @@ dependencies:
vue3-flip-countdown:
specifier: ^0.1.6
version: 0.1.6
vue3-fortune-wheel:
specifier: ^2.0.5
version: 2.0.5(vue@3.3.4)
vuedraggable:
specifier: ^4.1.0
version: 4.1.0(vue@3.3.4)
@@ -997,9 +994,6 @@ devDependencies:
vite-plugin-pwa:
specifier: ^1.0.0
version: 1.0.0(vite@4.4.9)(workbox-build@7.3.0)(workbox-window@7.3.0)
vite-plugin-splash-screen:
specifier: ^0.2.0
version: 0.2.0
vite-plugin-vue-markdown:
specifier: ^0.23.5
version: 0.23.5(rollup@2.79.2)(vite@4.4.9)
@@ -10179,8 +10173,8 @@ packages:
resolution: {integrity: sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==}
dev: false
/emojilib@4.0.2:
resolution: {integrity: sha512-8sP3sfAi861cNaFFp7RmyKi4S26K34ZKy4si75ojUW627AIVBHhMSu2SFJo3YRoK66YWnbysIbOk/d48uEqtKQ==}
/emojilib@4.0.1:
resolution: {integrity: sha512-zVY5JGxycujUimHkBn2lg5NCVwASJiQA2fhKfDPgyDFmNTftiw6KdOcq2fQt1HCVw0YeYW/ccYxQHQNjZpNeuw==}
dev: false
/encoding-japanese@2.2.0:
@@ -14125,11 +14119,6 @@ packages:
vueuc: 0.4.64(vue@3.3.4)
dev: false
/nano-seconds@1.2.2:
resolution: {integrity: sha512-s06EY41x1hM6BJE2HhIFRzvXuVUlZNd4761lduv+hjgtDDR7W4RzhShkap2wJcWMO6+CahR+49cCQJfFmgf7gw==}
engines: {node: '>=4.0.0'}
dev: false
/nanoid-dictionary@4.3.0:
resolution: {integrity: sha512-Xw1+/QnRGWO1KJ0rLfU1xR85qXmAHyLbE3TUkklu9gOIDburP6CsUnLmTaNECGpBh5SHb2uPFmx0VT8UPyoeyw==}
dev: false
@@ -17068,13 +17057,6 @@ packages:
resolution: {integrity: sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg==}
dev: true
/tick-time@1.0.1:
resolution: {integrity: sha512-de0ah4VT+jK7Kaz9aGShjW72avFfsEAeacYouM2IF27Rz4l9XPr3xVBS1vI64LUL3gKBbW1OBttWlLCfhFfX9A==}
engines: {node: '>=6'}
dependencies:
nano-seconds: 1.2.2
dev: false
/tidy-url@1.18.3:
resolution: {integrity: sha512-NnbmullqE/3loiDoopNltfLb/v6EhX5GYNUVU4EuZjnDjh/NIBzy5dHnhvH3EfIAnZZZMf3cW0HgNw9E+easyg==}
dev: false
@@ -17617,8 +17599,8 @@ packages:
engines: {node: '>=4'}
dev: true
/unicode-emoji-json@0.8.0:
resolution: {integrity: sha512-3wDXXvp6YGoKGhS2O2H7+V+bYduOBydN1lnI0uVfr1cIdY02uFFiEH1i3kE5CCE4l6UqbLKVmEFW9USxTAMD1g==}
/unicode-emoji-json@0.4.0:
resolution: {integrity: sha512-lVNOwh2AnmbwqtSrEVjAWKQoVzWgyWmXVqPuPkPfKb0tnA0+uYN/4ILCTdy9IRj/+3drAVhmjwjNJQr2dhCwnA==}
dev: false
/unicode-match-property-ecmascript@2.0.0:
@@ -18228,10 +18210,6 @@ packages:
- supports-color
dev: true
/vite-plugin-splash-screen@0.2.0:
resolution: {integrity: sha512-PCUiVq8wjx7dHMa9vOqnB+bewKp60VFbhPJJjQOA8UdwmPdf9ChBGuxh+sku4szrnJFsriB0gIDAURAmOqBcUQ==}
dev: true
/vite-plugin-vue-markdown@0.23.5(rollup@2.79.2)(vite@4.4.9):
resolution: {integrity: sha512-NXTZ4y+n691gLPWayMBbh4jldQeaqDp9e9WjWUYbn9obsLqS9qU+hr4RAruDq5kP4siTOp7JDV34Sw5eA7WxLg==}
peerDependencies:
@@ -18494,15 +18472,6 @@ packages:
'@vue/devtools-api': 6.5.0
vue: 3.3.4
/vue-loading-overlay@6.0.6(vue@3.3.4):
resolution: {integrity: sha512-ZPrWawjCoNKGbCG9z4nePgbs/K9KXPa1j1oAJXP6T8FQho3NO+/chhjx4MLYFzfpwr+xkiQ8SNrV1kUG1bZPAw==}
engines: {node: '>=12.13.0'}
peerDependencies:
vue: ^3.2.0
dependencies:
vue: 3.3.4
dev: false
/vue-markdown-render@2.2.1(vue@3.3.4):
resolution: {integrity: sha512-XkYnC0PMdbs6Vy6j/gZXSvCuOS0787Se5COwXlepRqiqPiunyCIeTPQAO2XnB4Yl04EOHXwLx5y6IuszMWSgyQ==}
peerDependencies:
@@ -18558,6 +18527,16 @@ packages:
vue: 3.3.4
dev: false
/vue3-fortune-wheel@2.0.5(vue@3.3.4):
resolution: {integrity: sha512-fMCmyT8sE79+O6fs2IWWrQMa1UjU+cuzu92C6EDCNaXaHaJKLReQxkAKLDiHyUC/GFpcsbpuBFbketWE3cKL0A==}
engines: {node: '>=20.14.0', pnpm: '>=9.5.0'}
peerDependencies:
vue: ^3.4.0
dependencies:
d3: 7.9.0
vue: 3.3.4
dev: false
/vue@3.3.4:
resolution: {integrity: sha512-VTyEYn3yvIeY1Py0WaYGZsXnz3y5UnGi62GjVEqvEGPl6nxbOrCXbVOTQWBEJUqAyTUk2uJ5JLVnYJ6ZzGbrSw==}
dependencies:
-117
View File
@@ -1,117 +0,0 @@
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="100%" viewBox="0 0 512 512" enable-background="new 0 0 512 512" xml:space="preserve">
<path fill="#18A058" opacity="1.000000" stroke="none" d="
M285.000000,513.000000
C266.979095,513.000000 248.958206,513.000000 230.615494,512.644287
C229.968979,511.921387 229.716232,511.382812 229.309113,511.211853
C218.396698,506.628937 213.003540,498.729675 212.999954,487.251953
C212.998291,481.919189 213.069885,476.585052 212.971207,471.254089
C212.900787,467.449951 212.103973,464.263245 207.588333,462.976166
C197.812027,460.189667 188.161697,456.964111 178.432053,454.009644
C174.416306,452.790222 174.210861,451.195892 177.154800,448.277527
C193.368622,432.204376 209.452194,415.999878 225.643829,399.904205
C228.649826,396.916077 231.776611,394.111877 236.750610,395.911224
C239.017761,396.731354 241.623001,397.033478 244.047836,396.930908
C256.271179,396.413727 268.584656,396.448700 280.683228,394.878082
C308.709534,391.239777 332.460785,378.020538 353.019287,359.258087
C368.025909,345.562500 379.164703,328.894348 387.080200,310.008087
C397.514709,285.111481 400.190918,259.095978 395.580444,233.039902
C388.452637,192.756897 367.372803,160.549133 332.674225,138.356888
C306.592529,121.675720 277.948334,114.135246 246.629364,116.773010
C233.331314,117.893005 220.561539,120.401459 208.240204,125.109039
C174.324066,138.067276 148.734146,160.636047 132.096924,192.952316
C124.606049,207.502655 119.021263,222.883041 118.082573,239.389465
C117.436966,250.742188 118.060280,262.162384 117.890938,273.549103
C117.818344,278.430389 120.050224,283.121490 114.951683,287.920319
C98.213287,303.674896 82.262794,320.266083 65.978798,336.504974
C64.893883,337.586884 63.552643,338.411804 61.379997,340.090973
C57.091328,326.843109 53.126518,314.595673 48.724842,300.998749
C40.811443,300.998749 32.375408,301.257568 23.963419,300.918945
C16.905138,300.634827 11.062209,297.534576 6.861771,291.627380
C5.004858,289.015961 2.959697,286.538361 1.000002,284.000000
C1.000000,266.312439 1.000000,248.624878 1.351752,230.620483
C2.110438,229.819885 2.644665,229.396179 2.905443,228.843460
C7.729964,218.617569 14.869195,212.362228 27.081358,212.855576
C34.470955,213.154099 41.917923,212.032501 49.503120,211.538284
C49.930244,210.460617 50.472652,209.275940 50.876099,208.045715
C54.957413,195.600723 58.443336,182.920807 63.269257,170.772751
C66.875496,161.694946 72.310219,153.353683 76.643616,144.543213
C77.268799,143.272110 76.875984,140.710388 75.940704,139.598450
C71.893585,134.786926 67.613625,130.147751 63.154736,125.710793
C52.409088,115.017990 53.175587,99.068611 63.065083,88.529762
C71.609055,79.424789 80.590767,70.722450 89.546265,62.014179
C97.946587,53.845749 111.478111,52.299988 120.879387,59.132851
C127.269226,63.776997 132.789154,69.641991 138.549271,75.117599
C141.096039,77.538582 143.340576,78.395378 146.041687,75.498436
C146.691711,74.801285 147.627441,74.343666 148.483658,73.869568
C167.675156,63.242867 187.640701,54.595615 209.176758,49.855827
C210.299286,49.608776 211.774704,47.775528 211.871597,46.582169
C212.446533,39.500645 212.726669,32.392342 212.984604,25.288631
C213.331390,15.737711 217.675217,8.711089 225.940353,3.966579
C227.134415,3.281146 227.988556,2.003553 229.000000,0.999998
C247.687561,1.000000 266.375122,1.000000 285.359344,1.336950
C286.272583,2.180966 286.854462,2.738805 287.510956,3.187436
C296.266235,9.170486 302.408325,16.622066 302.020691,28.003832
C301.833649,33.495098 302.148804,39.003735 301.951874,44.494297
C301.831512,47.849655 302.857178,49.239353 306.377594,50.148369
C327.956940,55.720463 348.893555,62.973309 367.444214,75.796150
C370.798370,78.114670 373.444916,77.062447 375.978302,74.521271
C379.859924,70.627731 383.743927,66.736534 387.640076,62.857548
C398.375732,52.169086 414.620026,52.131424 425.267944,62.769962
C434.172485,71.666710 443.086761,80.553810 451.964233,89.477501
C459.245544,96.796661 461.926941,109.059235 456.393982,117.669823
C451.364594,125.496826 444.546387,132.213898 438.206146,139.135773
C436.225037,141.298630 436.083069,142.749924 437.540405,145.062164
C439.908752,148.819778 442.059357,152.717621 444.228027,156.597549
C453.361237,172.937195 459.384766,190.456528 464.092468,208.502213
C464.453613,209.886566 466.388580,211.706345 467.741180,211.842621
C474.318298,212.505280 480.963654,213.134338 487.552246,212.891495
C497.872620,212.511093 504.715637,217.453522 509.969666,225.663666
C510.616699,226.674789 511.972595,227.232300 513.000000,228.000000
C513.000000,246.687561 513.000000,265.375122 512.662354,284.359100
C511.733185,285.415466 511.016571,286.108582 510.569366,286.945587
C505.407562,296.606781 497.500641,301.249237 486.426849,301.091187
C479.178955,300.987701 471.918579,301.757996 464.467834,302.147156
C459.001740,326.397308 450.286987,349.124634 436.827209,369.930664
C436.250122,370.822754 437.111023,373.336243 438.068176,374.414185
C443.129181,380.114044 448.515259,385.523651 453.638641,391.169983
C461.341797,399.659515 460.459839,415.641815 452.969604,423.440735
C444.318268,432.448608 435.314056,441.116486 426.531677,449.999786
C413.941711,462.734406 397.257568,460.938751 386.910645,449.494751
C383.240326,445.435242 379.091583,441.804901 375.117126,438.025024
C372.746674,435.770630 370.486420,435.932892 367.662201,437.755432
C355.187897,445.805359 341.869110,452.212799 327.777374,456.885681
C319.284332,459.701996 310.640045,462.062256 301.998688,464.646912
C301.998688,471.018707 302.134674,477.013062 301.970062,482.999146
C301.639496,495.017059 298.419830,505.484009 286.312378,510.981781
C285.696442,511.261444 285.429443,512.309631 285.000000,513.000000
z"/>
<path fill="#1E1E1E" opacity="1.000000" stroke="none" d="
M1.000004,456.468628
C1.822166,454.797089 2.628374,453.582886 3.469247,452.393158
C6.999179,447.398895 9.930220,441.810699 14.169559,437.514587
C60.265923,390.800812 106.535835,344.257965 152.881363,297.791077
C156.198288,294.465485 156.603577,291.568451 155.325211,287.178467
C141.467667,239.591599 161.330902,188.747421 204.424301,164.305359
C220.242783,155.333313 237.368484,150.577866 255.422409,150.416046
C264.268372,150.336792 273.314178,151.927124 281.942780,154.074677
C290.435120,156.188293 293.762177,166.385971 289.236664,173.953033
C287.802948,176.350311 285.872772,178.503738 283.921600,180.529770
C272.487274,192.402817 260.909668,204.138321 249.516190,216.050156
C238.393982,227.678391 238.816269,247.758820 249.284225,259.941101
C264.351624,277.476074 288.225739,275.449402 301.992401,260.722168
C312.778595,249.183380 324.529144,238.540146 335.951752,227.604050
C345.195679,218.753845 358.541260,222.312363 361.014587,234.815887
C365.302612,256.493622 363.763580,277.758209 354.910248,298.393768
C345.507751,320.309265 330.715363,337.234406 310.032440,348.956696
C283.600494,363.937286 255.641647,366.796692 226.573334,358.503540
C222.005630,357.200348 219.181458,358.174500 216.019226,361.360992
C184.680542,392.939728 153.300262,424.477997 121.775734,455.871094
C106.087929,471.493469 90.260460,486.987579 74.092552,502.108154
C69.576103,506.332062 63.622486,509.019257 58.164070,512.705688
C49.645767,513.000000 41.291534,513.000000 32.304932,512.705200
C30.146564,511.452087 28.703566,510.314148 27.081211,509.564240
C15.867707,504.380951 8.051239,496.012604 3.304708,484.657959
C2.756540,483.346649 1.778662,482.214966 1.000009,481.000000
C1.000000,472.979095 1.000000,464.958191 1.000004,456.468628
z"/>
</svg>

Before

Width:  |  Height:  |  Size: 7.6 KiB

-71
View File
@@ -1,71 +0,0 @@
import fs from 'node:fs';
import path from 'node:path';
import yaml from 'yaml';
const toolsDir = 'src/tools';
const localesFile = 'locales/en.yml';
// Load existing locales file or initialize an empty object
let localesData = {};
if (fs.existsSync(localesFile)) {
localesData = yaml.parse(fs.readFileSync(localesFile, 'utf-8')) || {};
}
function processFile(filePath) {
const parentDir = path.basename(path.dirname(filePath)); // Get parent directory name
const originalContent = fs.readFileSync(filePath, 'utf-8');
// Extract existing name and description values
const nameMatch = originalContent.match(/name: '(.*?)'/);
const descriptionMatch = originalContent.match(/description: '(.*?)'/);
if (!nameMatch || !descriptionMatch) {
console.warn(`Skipping ${filePath}: Unable to extract name or description.`);
return;
}
const nameValue = nameMatch[1];
const descriptionValue = descriptionMatch[1];
// Modify name and description to use the translate function
const transformedContent = originalContent
.replace(/name: '((?:[^']+|(?<=\\)')+)'/, `name: translate('tools.${parentDir}.title')`)
.replace(/description: '((?:[^']+|(?<=\\)')+)'/, `description: translate('tools.${parentDir}.description')`);
fs.writeFileSync(filePath, `import { translate } from '@/plugins/i18n.plugin';\n${transformedContent}`, 'utf-8');
console.log(`Transformed: ${filePath}`);
// Update locales file with extracted name and description
if (!localesData.tools) {
localesData.tools = {};
}
localesData.tools[parentDir] = {
...localesData.tools[parentDir],
title: nameValue,
description: descriptionValue,
};
}
function iterateFolder(folderPath) {
const items = fs.readdirSync(folderPath);
items.forEach((item) => {
const itemPath = path.join(folderPath, item);
const stat = fs.statSync(itemPath);
if (stat.isDirectory()) {
iterateFolder(itemPath);
}
else if (item === 'index.ts') {
processFile(itemPath);
}
});
}
// Run transformations
iterateFolder(toolsDir);
// Write back the updated locales file
fs.writeFileSync(localesFile, yaml.stringify(localesData), 'utf-8');
console.log('Locales file updated!');
console.log('Transformation completed!');
-14
View File
@@ -49,18 +49,4 @@ html {
* {
box-sizing: border-box;
}
body .vld-container {
position:absolute;
left:0;
top:0;
width: 100%;
height: 100vh;
background-color: #101014;
z-index: 9999;
text-align: center;
}
body .vld-container .vl-overlay.vl-active {
margin-top: 15%;
}
</style>
+57 -89
View File
@@ -25,40 +25,37 @@ const collapsedCategories = useStorage<Record<string, boolean>>(
},
);
const isToggling = ref(false);
function toggleCategoryCollapse({ name }: { name: string }) {
collapsedCategories.value[name] = !collapsedCategories.value[name];
}
/**
* areAllCollapsed (new)
* --------------------------------------------------------------------------
* A computed property that checks if all categories are collapsed.
* - If even one category is expanded (false), this becomes false.
* - If no categories are found or all are collapsed (true), it becomes true.
*/
const areAllCollapsed = computed(() => {
return toolsByCategory.value.every(({ name }) => collapsedCategories.value[name] !== false);
});
async function toggleAllCategories() {
if (isToggling.value) {
return;
}
isToggling.value = true;
const shouldCollapse = !areAllCollapsed.value;
const updates: Record<string, boolean> = {};
/**
* toggleAllCategories (new)
* --------------------------------------------------------------------------
* If all categories are collapsed, expand them all; otherwise, collapse them all.
*/
function toggleAllCategories() {
const nextState = !areAllCollapsed.value;
toolsByCategory.value.forEach(({ name }) => {
updates[name] = shouldCollapse;
collapsedCategories.value[name] = nextState;
});
Object.assign(collapsedCategories.value, updates);
await nextTick();
isToggling.value = false;
}
};
const menuOptions = computed(() =>
toolsByCategory.value.map(({ name, components }) => ({
name,
isCollapsed: collapsedCategories.value[name] === undefined ? true : collapsedCategories.value[name],
isCollapsed: collapsedCategories.value[name] === undefined ? true : collapsedCategories.value[name], // default to collapsed if not set
tools: components.map(tool => ({
label: makeLabel(tool),
icon: makeIcon(tool),
@@ -71,18 +68,18 @@ const themeVars = useThemeVars();
</script>
<template>
<!--
A button at the top to expand or collapse all categories at once.
- Uses areAllCollapsed to determine the label ("Expand All" vs. "Collapse All").
- Calls toggleAllCategories() on click.
-->
<div class="top-controls" ml-6px>
<c-button :disabled="isToggling" @click="toggleAllCategories">
<span v-if="isToggling">
{{ areAllCollapsed ? 'Expanding...' : 'Collapsing...' }}
</span>
<span v-else>
{{ areAllCollapsed ? 'Expand All Tools' : 'Collapse All Tools' }}
</span>
<c-button @click="toggleAllCategories">
{{ areAllCollapsed ? 'Expand All Tools' : 'Collapse All Tools' }}
</c-button>
</div>
<div v-for="{ name, tools, isCollapsed } of menuOptions" :key="name" class="category-container">
<div v-for="{ name, tools, isCollapsed } of menuOptions" :key="name">
<div ml-6px mt-12px flex cursor-pointer items-center op-60 @click="toggleCategoryCollapse({ name })">
<span :class="{ 'rotate-0': isCollapsed, 'rotate-90': !isCollapsed }" text-16px lh-1 op-50 transition-transform>
<icon-mdi-chevron-right />
@@ -93,7 +90,7 @@ const themeVars = useThemeVars();
</span>
</div>
<div class="menu-container" :class="{ collapsed: isCollapsed }">
<n-collapse-transition :show="!isCollapsed">
<div class="menu-wrapper">
<div class="toggle-bar" @click="toggleCategoryCollapse({ name })" />
@@ -107,73 +104,44 @@ const themeVars = useThemeVars();
:default-expand-all="true"
/>
</div>
</div>
</n-collapse-transition>
</div>
</template>
<style scoped lang="less">
.category-container {
.menu-container {
overflow: hidden;
transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
.menu-wrapper {
display: flex;
flex-direction: row;
.menu {
flex: 1;
margin-bottom: 5px;
&:not(.collapsed) {
max-height: 1000px;
opacity: 1;
transform: translateY(0);
::v-deep(.n-menu-item-content::before) {
left: 0;
right: 13px;
}
}
.toggle-bar {
width: 24px;
opacity: 0.1;
transition: opacity ease 0.2s;
position: relative;
cursor: pointer;
&::before {
width: 2px;
height: 100%;
content: ' ';
background-color: v-bind('themeVars.textColor3');
border-radius: 2px;
position: absolute;
top: 0;
left: 14px;
}
&.collapsed {
max-height: 0;
opacity: 0;
transform: translateY(-10px);
}
.menu-wrapper {
display: flex;
flex-direction: row;
transition: transform 0.4s cubic-bezier(0.2, 0.9, 0.3, 1);
.menu-container:not(.collapsed) & {
transform: translateY(0);
}
.menu-container.collapsed & {
transform: translateY(-20px);
}
.menu {
flex: 1;
margin-bottom: 5px;
::v-deep(.n-menu-item-content::before) {
left: 0;
right: 13px;
}
}
.toggle-bar {
width: 24px;
opacity: 0.1;
transition: opacity ease 0.2s;
position: relative;
cursor: pointer;
&::before {
width: 2px;
height: 100%;
content: ' ';
background-color: v-bind('themeVars.textColor3');
border-radius: 2px;
position: absolute;
top: 0;
left: 14px;
}
&:hover {
opacity: 0.5;
}
}
&:hover {
opacity: 0.5;
}
}
}
+3 -23
View File
@@ -31,8 +31,6 @@ const props = withDefaults(
wordWrap?: boolean
downloadFileName?: string
downloadButtonText?: string
scrollable?: boolean
maxHeight?: string
}>(),
{
followHeightOf: null,
@@ -41,8 +39,6 @@ const props = withDefaults(
copyMessage: 'Copy to clipboard',
downloadFileName: '',
downloadButtonText: 'Download',
scrollable: false,
maxHeight: '400px',
},
);
hljs.registerLanguage('sql', sqlHljs);
@@ -66,17 +62,6 @@ hljs.registerLanguage('protobuf', protobufHljs);
const { value, language, followHeightOf, copyPlacement, copyMessage, downloadFileName, downloadButtonText } = toRefs(props);
const { height } = followHeightOf.value ? useElementSize(followHeightOf) : { height: ref(null) };
const scrollbarRef = ref();
// Watch for content changes and scroll to bottom
watch(value, () => {
nextTick(() => {
if (scrollbarRef.value) {
scrollbarRef.value.scrollTo({ top: scrollbarRef.value.scrollbarInstRef.containerRef.scrollHeight });
}
});
}, { flush: 'post' });
const { copy, isJustCopied } = useCopy({ source: value, createToast: false });
const tooltipText = computed(() => isJustCopied.value ? 'Copied!' : copyMessage.value);
@@ -95,14 +80,9 @@ const { download } = useDownloadFileFromBase64(
:style="(copyPlacement === 'top-right' || copyPlacement === 'bottom-right') ? `padding-bottom: 50px` : ''"
>
<n-scrollbar
ref="scrollbarRef"
:x-scrollable="true"
:y-scrollable="scrollable"
x-scrollable
trigger="none"
:style="{
minHeight: height ? `${height - 40 /* card padding */ + 10 /* negative margin compensation */}px` : '',
maxHeight: scrollable ? maxHeight : '',
}"
:style="height ? `min-height: ${height - 40 /* card padding */ + 10 /* negative margin compensation */}px` : ''"
>
<n-config-provider :hljs="hljs">
<n-code :code="value" :language="language" :word-wrap="wordWrap" :trim="false" data-test-id="area-content" />
@@ -110,10 +90,10 @@ const { download } = useDownloadFileFromBase64(
</n-scrollbar>
<div
v-if="value && copyPlacement !== 'none'"
:top-10px="copyPlacement === 'top-right' ? '' : 'no'"
:bottom-10px="copyPlacement === 'bottom-right' ? '' : 'no'"
absolute right-10px
:style="scrollable ? 'z-index: 10; background: var(--bg-color); border-radius: 50%; padding: 2px;' : ''"
>
<c-tooltip v-if="value && copyPlacement !== 'outside'" :tooltip="tooltipText" position="left">
<c-button circle important:h-10 important:w-10 @click="copy()">
+28 -107
View File
@@ -35,19 +35,8 @@ export function useFlexSearch<Data extends Record<string, any>>({
* Note: The `'tolerant'` tokenizer option mentioned in the documentation doesn't exist anymore in the current version of FlexSearch.
*/
tokenize?: 'strict' | 'forward' | 'reverse' | 'full'
/**
* Resolution value for giving meaningful results when searching for partial matches.
* @default 9
* @see {@link https://github.com/nextapps-de/flexsearch?tab=readme-ov-file#resolution | FlexSearch Resolution Documentation}
*/
resolution?: number
optimize?: boolean
/**
* Value to determine if the cache should be used.
* If set to a number, the cache will use the number to assign that number of cache slots (No information in the documentation is provided about what a cache slot is exactly).
* @default false
* @see {@link https://github.com/nextapps-de/flexsearch?tab=readme-ov-file#auto-balanced-cache-by-popularity | FlexSearch Cache Documentation}
*/
cache?: boolean | number
}
limit?: MaybeRef<number>
@@ -78,66 +67,29 @@ export function useFlexSearch<Data extends Record<string, any>>({
preset: 'performance',
resolution: 9,
optimize: true,
cache: false,
cache: 100,
fastupdate: true,
...indexOptions,
}),
}));
// Initialize indices with data
const initializeIndices = async () => {
const initializeIndices = () => {
dataMap.value.clear();
indices.forEach(({ index }) => index.clear());
// Pre-calculate all the values to avoid repeated nested property access
const itemData = data.map((item, idx) => {
data.forEach((item, idx) => {
const itemKey = getItemKey(item, idx);
const values = new Map<string, string>();
dataMap.value.set(itemKey, item);
indices.forEach(({ key }) => {
indices.forEach(({ key, index }) => {
// Support nested keys (e.g., 'foo.bar')
const value = key.split('.').reduce((obj, path) => obj?.[path], item);
if (value) {
values.set(key, String(value));
index.add(itemKey, String(value));
}
});
return { itemKey, item, values };
});
// Batch add to dataMap
itemData.forEach(({ itemKey, item }) => {
dataMap.value.set(itemKey, item);
});
// Batch add to indices - parallel processing with chunking
await Promise.all(
indices.map(async ({ key, index }) => {
// Filter items that have values for this key upfront
const itemsForThisKey = itemData
.map(({ itemKey, values }) => ({ itemKey, value: values.get(key) }))
.filter(({ value }) => value);
// Process in chunks to avoid blocking the main thread
const chunkSize = 1000; // Adjust based on your data size
const chunks = [];
for (let i = 0; i < itemsForThisKey.length; i += chunkSize) {
chunks.push(itemsForThisKey.slice(i, i + chunkSize));
}
// Process each chunk asynchronously
for (const chunk of chunks) {
await new Promise<void>((resolve) => {
// Use setTimeout to yield control back to the browser
setTimeout(() => {
chunk.forEach(({ itemKey, value }) => {
index.add(itemKey, value!);
});
resolve();
}, 0);
});
}
}),
);
};
// Initialize on creation
@@ -146,10 +98,8 @@ export function useFlexSearch<Data extends Record<string, any>>({
// Watch for data changes (deep watch for array content)
watch(
() => data,
() => {
initializeIndices();
},
{ immediate: true, deep: true },
initializeIndices,
{ deep: true },
);
// Function to search across all indices with weight consideration
@@ -162,39 +112,27 @@ export function useFlexSearch<Data extends Record<string, any>>({
const individualLimit = searchLimit > 0 ? searchLimit * 2 : undefined;
// Search each index and collect results with weights
const weightedResults = new Map<any, { score: number; maxWeight: number }>();
const weightedResults = new Map<any, number>();
indices.forEach(({ index, weight }) => {
const results = index.search(query, individualLimit ? { limit: individualLimit } : undefined);
results.forEach((id) => {
const current = weightedResults.get(id) || { score: 0, maxWeight: 0 };
// Use the maximum weight among matching fields as the primary score
// Add a small bonus for additional field matches
const newScore = Math.max(current.score, weight * 100) + (weight * 10);
const newMaxWeight = Math.max(current.maxWeight, weight);
weightedResults.set(id, {
score: newScore,
maxWeight: newMaxWeight,
});
const currentScore = weightedResults.get(id) || 0;
weightedResults.set(id, currentScore + weight);
});
});
// Sort by score (higher score = better match) and convert to array
// Sort by weight (higher weight = better match) and convert to array
const sortedIds = Array.from(weightedResults.entries())
.sort((a, b) => {
// First sort by max weight, then by total score
if (b[1].maxWeight !== a[1].maxWeight) {
return b[1].maxWeight - a[1].maxWeight;
}
return b[1].score - a[1].score;
})
.sort((a, b) => b[1] - a[1])
.map(([id]) => id);
// If shouldn't be sorted by similarity, apply limit here and return early
// Apply limit and convert back to original items
const limitedIds = searchLimit > 0 ? sortedIds.slice(0, searchLimit) : sortedIds;
// Return the limited results early if it shouldn't be sorted by similarity
if (!shouldSort) {
const limitedIds = searchLimit > 0 ? sortedIds.slice(0, searchLimit) : sortedIds;
return limitedIds
.map(id => dataMap.value.get(id))
.filter(Boolean) as Data[];
@@ -236,49 +174,32 @@ export function useFlexSearch<Data extends Record<string, any>>({
return 1 - (distance / maxLength);
};
// Sort ALL results by similarity score, then apply limit at the end
const sortedResults = sortedIds
// Sort limited results by similarity score
const sortedResults = limitedIds
.map((id) => {
const item = dataMap.value.get(id);
if (!item) {
return null;
}
// Calculate weighted similarity score across all searchable fields
let bestWeightedSimilarity = 0;
let maxFieldWeight = 0;
normalizedKeys.forEach(({ name, weight }) => {
// Calculate best similarity score across all searchable fields
const similarities = normalizedKeys.map(({ name }) => {
const value = name.split('.').reduce((obj, path) => obj?.[path], item);
if (value) {
const similarity = calculateSimilarity(query, String(value));
const weightedSimilarity = similarity * weight;
if (weightedSimilarity > bestWeightedSimilarity) {
bestWeightedSimilarity = weightedSimilarity;
maxFieldWeight = weight;
}
}
return value ? calculateSimilarity(query, String(value)) : 0;
});
const bestSimilarity = Math.max(...similarities);
return {
item,
similarity: bestWeightedSimilarity,
maxWeight: maxFieldWeight,
similarity: bestSimilarity,
};
})
.filter(Boolean)
.sort((a, b) => {
// First sort by max field weight, then by weighted similarity
if (b!.maxWeight !== a!.maxWeight) {
return b!.maxWeight - a!.maxWeight;
}
return b!.similarity - a!.similarity;
})
.sort((a, b) => b!.similarity - a!.similarity)
.map(result => result!.item);
// Apply limit after final sorting
return searchLimit > 0 ? sortedResults.slice(0, searchLimit) : sortedResults;
return sortedResults as Data[];
};
// Computed results
-4
View File
@@ -4,10 +4,6 @@ import { computed } from 'vue';
export { useFuzzySearch };
/**
* @deprecated This composable is deprecated and will be removed in a future version.
* Use {@link useFlexSearch} instead.
*/
function useFuzzySearch<Data>({
search,
data,
-5
View File
@@ -3,11 +3,9 @@ import { createPinia } from 'pinia';
import { createHead } from '@vueuse/head';
import { library } from '@fortawesome/fontawesome-svg-core';
import { fas } from '@fortawesome/free-solid-svg-icons';
import { LoadingPlugin } from 'vue-loading-overlay';
import { registerSW } from 'virtual:pwa-register';
import shadow from 'vue-shadow-dom';
import { hideSplashScreen } from 'vite-plugin-splash-screen/runtime';
import { plausible } from './plugins/plausible.plugin';
import 'virtual:uno.css';
@@ -26,7 +24,6 @@ registerSW();
const app = createApp(App);
app.use(LoadingPlugin);
app.use(createPinia());
app.use(createHead());
app.use(i18nPlugin);
@@ -37,5 +34,3 @@ app.use(shadow);
app.use(store, 'pomodoro-store');
app.mount('#app');
hideSplashScreen();
@@ -2,6 +2,7 @@ import { defineStore } from 'pinia';
import _ from 'lodash';
import type { PaletteOption } from './command-palette.types';
import { useToolStore } from '@/tools/tools.store';
import { useFuzzySearch } from '@/composable/fuzzySearch';
import { useStyleStore } from '@/stores/style.store';
import SunIcon from '~icons/mdi/white-balance-sunny';
@@ -9,7 +10,6 @@ import GithubIcon from '~icons/mdi/github';
import BugIcon from '~icons/mdi/bug-outline';
import DiceIcon from '~icons/mdi/dice-5';
import InfoIcon from '~icons/mdi/information-outline';
import { useFlexSearch } from '@/composable/flexSearch';
const maxSearchResultsPerCategory = import.meta.env.VITE_MAX_SEARCH_RESULT || 25;
@@ -74,11 +74,12 @@ export const useCommandPaletteStore = defineStore('command-palette', () => {
},
];
const { searchResult } = useFlexSearch({
const { searchResult } = useFuzzySearch({
search: searchPrompt,
data: searchOptions,
options: {
keys: [{ name: 'name', weight: 2 }, 'description', 'keywords', 'category'],
threshold: 0.3,
},
});
+4 -84
View File
@@ -1,7 +1,7 @@
<script setup lang="ts">
import { IconDragDrop, IconFileDescription, IconHeart } from '@tabler/icons-vue';
import { useHead } from '@vueuse/head';
import { computed, nextTick, onMounted, onUnmounted, ref } from 'vue';
import { computed } from 'vue';
import Draggable from 'vuedraggable';
import VueMarkdown from 'vue-markdown-render';
import ColoredCard from '../components/ColoredCard.vue';
@@ -28,81 +28,10 @@ const { t } = useI18n();
const favoriteTools = computed(() => toolStore.favoriteTools);
const isOrderingFavorites = ref(false);
window.addEventListener('contextmenu', (e) => {
if (isOrderingFavorites.value) {
e.preventDefault();
e.stopPropagation();
e.stopImmediatePropagation();
return false;
}
});
function startOrderingFavorites() {
isOrderingFavorites.value = true;
}
// Update favorite tools order when drag is finished
function stopOrderingFavorites() {
isOrderingFavorites.value = false;
function onUpdateFavoriteTools() {
toolStore.updateFavoriteTools(favoriteTools.value); // Update the store with the new order
}
// Batch loading logic for tool cards
const TOOLS_PER_ROW = 4; // Based on xl:grid-cols-4
const ROWS_PER_BATCH = 8;
const TOOLS_PER_BATCH = TOOLS_PER_ROW * ROWS_PER_BATCH; // 32 tools per batch
const visibleToolsCount = ref(TOOLS_PER_BATCH); // Start with first batch
let loadingInterval: NodeJS.Timeout | null = null;
// Computed property for visible tools
const visibleTools = computed(() => {
return toolStore.tools.slice(0, visibleToolsCount.value);
});
// Function to stop automated loading
function stopAutomatedLoading() {
if (loadingInterval) {
clearInterval(loadingInterval);
loadingInterval = null;
}
}
// Function to start automated loading
function startAutomatedLoading() {
// Clear any existing interval
if (loadingInterval) {
clearInterval(loadingInterval);
}
// Start loading batches every 150ms
loadingInterval = setInterval(() => {
if (visibleToolsCount.value < toolStore.tools.length) {
visibleToolsCount.value = Math.min(
visibleToolsCount.value + TOOLS_PER_BATCH,
toolStore.tools.length,
);
}
else {
// Stop loading when all tools are visible
stopAutomatedLoading();
}
}, 150);
}
// Start automated loading on component mount
onMounted(() => {
nextTick(() => {
startAutomatedLoading();
});
});
// Clean up on component unmount
onUnmounted(() => {
stopAutomatedLoading();
});
</script>
<template>
@@ -153,9 +82,7 @@ onUnmounted(() => {
class="grid grid-cols-1 gap-12px lg:grid-cols-3 md:grid-cols-3 sm:grid-cols-2 xl:grid-cols-4"
ghost-class="ghost-favorites-draggable"
item-key="name"
:delay="100"
@start="startOrderingFavorites"
@end="stopOrderingFavorites"
@end="onUpdateFavoriteTools"
>
<template #item="{ element: tool }">
<ToolCard :tool="tool" />
@@ -181,14 +108,7 @@ onUnmounted(() => {
{{ $t('home.categories.allTools') }}
</h3>
<div class="grid grid-cols-1 gap-12px lg:grid-cols-3 md:grid-cols-3 sm:grid-cols-2 xl:grid-cols-4">
<ToolCard v-for="tool in visibleTools" :key="tool.name" :tool="tool" />
</div>
<!-- Loading indicator when more tools are coming -->
<div v-if="visibleToolsCount < toolStore.tools.length" mt-6 text-center>
<div text-14px op-70>
Loading more tools... ({{ visibleTools.length }}/{{ toolStore.tools.length }})
</div>
<ToolCard v-for="tool in toolStore.tools" :key="tool.name" :tool="tool" />
</div>
</div>
</div>
-22
View File
@@ -1,5 +1,4 @@
import { createRouter, createWebHistory } from 'vue-router';
import { type ActiveLoader, useLoading } from 'vue-loading-overlay';
import { layouts } from './layouts/index';
import HomePage from './pages/Home.page.vue';
import NotFound from './pages/404.page.vue';
@@ -7,8 +6,6 @@ import { tools } from './tools';
import { config } from './config';
import { routes as demoRoutes } from './ui/demo/demo.routes';
const $loading = useLoading();
const toolsRoutes = tools.map(({ path, name, component, ...config }) => ({
path,
name,
@@ -41,23 +38,4 @@ const router = createRouter({
],
});
let loader: ActiveLoader | null = null;
router.beforeEach((to, from) => {
// Only show loading for actual route changes, not just query param changes
if (to.path !== from.path) {
loader = $loading?.show({
color: '#fff',
backgroundColor: '#292929',
});
}
});
router.afterEach(() => {
if (loader) {
loader.hide();
loader = null;
}
});
export default router;
+1 -5
View File
@@ -38,8 +38,4 @@ declare module 'pdf-signature-reader' {
const verifySignature: (pdf: ArrayBuffer) => ({signatures: SignatureInfo[]});
export default verifySignature;
}
declare module 'vite-plugin-splash-screen/runtime' {
export function hideSplashScreen();
}
}
@@ -1,15 +1,20 @@
<script setup lang="ts">
import mappingData from './ad-mapping.json';
import { useFlexSearch } from '@/composable/flexSearch';
import { useFuzzySearch } from '@/composable/fuzzySearch';
import useDebouncedRef from '@/composable/debouncedref';
const data = mappingData;
const search = ref('');
const data = mappingData.map(i => ({ ...i, all: `${i.TAB} - ${i.ActiveDirectoryField}` }));
const searchQuery = useDebouncedRef('', 500);
const { searchResult } = useFlexSearch({
search,
const { searchResult } = useFuzzySearch({
search: searchQuery,
data,
options: {
keys: ['TAB', 'ActiveDirectoryField', 'LDAPAttribute'],
keys: ['all'],
threshold: 0.2,
isCaseSensitive: false,
minMatchCharLength: 3,
useExtendedSearch: true,
filterEmpty: false,
},
});
@@ -19,7 +24,7 @@ const { searchResult } = useFlexSearch({
<div mx-auto max-w-2400px important:flex-1>
<div flex items-center gap-3>
<c-input-text
v-model:value="search"
v-model:value="searchQuery"
placeholder="Search Active Directory LDAP mapping"
mx-auto max-w-600px
>
+2 -3
View File
@@ -1,11 +1,10 @@
import { EyeOff } from '@vicons/tabler';
import { defineTool } from '../tool';
import { translate } from '@/plugins/i18n.plugin';
export const tool = defineTool({
name: translate('tools.age-crypto.title'),
name: 'AGE Cryptography',
path: '/age-crypto',
description: translate('tools.age-crypto.description'),
description: 'Provides a simple and easy-to-use open-source Age tool for generating keys, encrypting, and decrypting messages.',
keywords: ['age'],
component: () => import('./age-crypto.vue'),
icon: EyeOff,
@@ -49,7 +49,7 @@ watchEffect(async () => {
processing.value = false;
});
const fonts = ['1Row', '3-D', '3D Diagonal', '3D-ASCII', '3x5', '4Max', '5 Line Oblique', 'AMC 3 Line', 'AMC 3 Liv1', 'AMC AAA01', 'AMC Neko', 'AMC Razor', 'AMC Razor2', 'AMC Slash', 'AMC Slider', 'AMC Thin', 'AMC Tubes', 'AMC Untitled', 'ANSI Shadow', 'ASCII New Roman', 'Acrobatic', 'Alligator', 'Alligator2', 'Alpha', 'Alphabet', 'Arrows', 'Avatar', 'B1FF', 'Banner', 'Banner3-D', 'Banner3', 'Banner4', 'Barbwire', 'Basic', 'Bear', 'Bell', 'Benjamin', 'Big Chief', 'Big Money-ne', 'Big Money-nw', 'Big Money-se', 'Big Money-sw', 'Big', 'Bigfig', 'Binary', 'Block', 'Blocks', 'Bloody', 'Bolger', 'Braced', 'Bright', 'Broadway KB', 'Broadway', 'Bubble', 'Bulbhead', 'Caligraphy', 'Caligraphy2', 'Calvin S', 'Cards', 'Catwalk', 'Chiseled', 'Chunky', 'Coinstak', 'Cola', 'Colossal', 'Computer', 'Contessa', 'Contrast', 'Cosmike', 'Crawford', 'Crawford2', 'Crazy', 'Cricket', 'Cursive', 'Cyberlarge', 'Cybermedium', 'Cybersmall', 'Cygnet', 'DANC4', 'DOS Rebel', 'DWhistled', 'Dancing Font', 'Decimal', 'Def Leppard', 'Delta Corps Priest 1', 'Diamond', 'Diet Cola', 'Digital', 'Doh', 'Doom', 'Dot Matrix', 'Double Shorts', 'Double', 'Dr Pepper', 'Efti Chess', 'Efti Font', 'Efti Italic', 'Efti Piti', 'Efti Robot', 'Efti Wall', 'Efti Water', 'Electronic', 'Elite', 'Epic', 'Fender', 'Filter', 'Fire Font-k', 'Fire Font-s', 'Flipped', 'Flower Power', 'Four Tops', 'Fraktur', 'Fun Face', 'Fun Faces', 'Fuzzy', 'Georgi16', 'Georgia11', 'Ghost', 'Ghoulish', 'Glenyn', 'Goofy', 'Gothic', 'Graceful', 'Gradient', 'Graffiti', 'Greek', 'Heart Left', 'Heart Right', 'Henry 3D', 'Hex', 'Hieroglyphs', 'Hollywood', 'Horizontal Left', 'Horizontal Right', 'ICL-1900', 'Impossible', 'Invita', 'Isometric1', 'Isometric2', 'Isometric3', 'Isometric4', 'Italic', 'Ivrit', 'JS Block Letters', 'JS Bracket Letters', 'JS Capital Curves', 'JS Cursive', 'JS Stick Letters', 'Jacky', 'Jazmine', 'Jerusalem', 'Katakana', 'Kban', 'Keyboard', 'Knob', 'Konto Slant', 'Konto', 'LCD', 'Larry 3D 2', 'Larry 3D', 'Lean', 'Letters', 'Lil Devil', 'Line Blocks', 'Linux', 'Lockergnome', 'Madrid', 'Marquee', 'Maxfour', 'Merlin1', 'Merlin2', 'Mike', 'Mini', 'Mirror', 'Mnemonic', 'Modular', 'Morse', 'Morse2', 'Moscow', 'Mshebrew210', 'Muzzle', 'NScript', 'NT Greek', 'NV Script', 'Nancyj-Fancy', 'Nancyj-Improved', 'Nancyj-Underlined', 'Nancyj', 'Nipples', 'O8', 'OS2', 'Octal', 'Ogre', 'Old Banner', 'Patorjk\'s Cheese', 'Patorjk-HeX', 'Pawp', 'Peaks Slant', 'Peaks', 'Pebbles', 'Pepper', 'Poison', 'Puffy', 'Puzzle', 'Pyramid', 'Rammstein', 'Rectangles', 'Red Phoenix', 'Relief', 'Relief2', 'Reverse', 'Roman', 'Rot13', 'Rotated', 'Rounded', 'Rowan Cap', 'Rozzo', 'Runic', 'Runyc', 'S Blood', 'SL Script', 'Santa Clara', 'Script', 'Serifcap', 'Shadow', 'Shimrod', 'Short', 'Slant Relief', 'Slant', 'Slide', 'Small Caps', 'Small Isometric1', 'Small Keyboard', 'Small Poison', 'Small Script', 'Small Shadow', 'Small Slant', 'Small Tengwar', 'Small', 'Soft', 'Speed', 'Spliff', 'Stacey', 'Stampate', 'Stampatello', 'Standard', 'Star Strips', 'Star Wars', 'Stellar', 'Stforek', 'Stick Letters', 'Stop', 'Straight', 'Stronger Than All', 'Sub-Zero', 'Swamp Land', 'Swan', 'Sweet', 'THIS', 'Tanja', 'Tengwar', 'Term', 'Test1', 'The Edge', 'Thick', 'Thin', 'Thorned', 'Three Point', 'Ticks Slant', 'Ticks', 'Tiles', 'Tinker-Toy', 'Tombstone', 'Train', 'Trek', 'Tsalagi', 'Tubular', 'Twisted', 'Two Point', 'USA Flag', 'Univers', 'Varsity', 'Wavy', 'Weird', 'Wet Letter', 'Whimsy', 'Wow'];
const fonts = ['1Row', '3-D', '3D Diagonal', '3D-ASCII', '3x5', '4Max', '5 Line Oblique', 'AMC 3 Line', 'AMC 3 Liv1', 'AMC AAA01', 'AMC Neko', 'AMC Razor', 'AMC Razor2', 'AMC Slash', 'AMC Slider', 'AMC Thin', 'AMC Tubes', 'AMC Untitled', 'ANSI Shadow', 'ASCII New Roman', 'Acrobatic', 'Alligator', 'Alligator2', 'Alpha', 'Alphabet', 'Arrows', 'Avatar', 'B1FF', 'B1FF', 'Banner', 'Banner3-D', 'Banner3', 'Banner4', 'Barbwire', 'Basic', 'Bear', 'Bell', 'Benjamin', 'Big Chief', 'Big Money-ne', 'Big Money-nw', 'Big Money-se', 'Big Money-sw', 'Big', 'Bigfig', 'Binary', 'Block', 'Blocks', 'Bloody', 'Bolger', 'Braced', 'Bright', 'Broadway KB', 'Broadway', 'Bubble', 'Bulbhead', 'Caligraphy', 'Caligraphy2', 'Calvin S', 'Cards', 'Catwalk', 'Chiseled', 'Chunky', 'Coinstak', 'Cola', 'Colossal', 'Computer', 'Contessa', 'Contrast', 'Cosmike', 'Crawford', 'Crawford2', 'Crazy', 'Cricket', 'Cursive', 'Cyberlarge', 'Cybermedium', 'Cybersmall', 'Cygnet', 'DANC4', 'DOS Rebel', 'DWhistled', 'Dancing Font', 'Decimal', 'Def Leppard', 'Delta Corps Priest 1', 'Diamond', 'Diet Cola', 'Digital', 'Doh', 'Doom', 'Dot Matrix', 'Double Shorts', 'Double', 'Dr Pepper', 'Efti Chess', 'Efti Font', 'Efti Italic', 'Efti Piti', 'Efti Robot', 'Efti Wall', 'Efti Water', 'Electronic', 'Elite', 'Epic', 'Fender', 'Filter', 'Fire Font-k', 'Fire Font-s', 'Flipped', 'Flower Power', 'Four Tops', 'Fraktur', 'Fun Face', 'Fun Faces', 'Fuzzy', 'Georgi16', 'Georgia11', 'Ghost', 'Ghoulish', 'Glenyn', 'Goofy', 'Gothic', 'Graceful', 'Gradient', 'Graffiti', 'Greek', 'Heart Left', 'Heart Right', 'Henry 3D', 'Hex', 'Hieroglyphs', 'Hollywood', 'Horizontal Left', 'Horizontal Right', 'ICL-1900', 'Impossible', 'Invita', 'Isometric1', 'Isometric2', 'Isometric3', 'Isometric4', 'Italic', 'Ivrit', 'JS Block Letters', 'JS Bracket Letters', 'JS Capital Curves', 'JS Cursive', 'JS Stick Letters', 'Jacky', 'Jazmine', 'Jerusalem', 'Katakana', 'Kban', 'Keyboard', 'Knob', 'Konto Slant', 'Konto', 'LCD', 'Larry 3D 2', 'Larry 3D', 'Lean', 'Letters', 'Lil Devil', 'Line Blocks', 'Linux', 'Lockergnome', 'Madrid', 'Marquee', 'Maxfour', 'Merlin1', 'Merlin2', 'Mike', 'Mini', 'Mirror', 'Mnemonic', 'Modular', 'Morse', 'Morse2', 'Moscow', 'Mshebrew210', 'Muzzle', 'NScript', 'NT Greek', 'NV Script', 'Nancyj-Fancy', 'Nancyj-Improved', 'Nancyj-Underlined', 'Nancyj', 'Nipples', 'O8', 'OS2', 'Octal', 'Ogre', 'Old Banner', 'Patorjk\'s Cheese', 'Patorjk-HeX', 'Pawp', 'Peaks Slant', 'Peaks', 'Pebbles', 'Pepper', 'Poison', 'Puffy', 'Puzzle', 'Pyramid', 'Rammstein', 'Rectangles', 'Red Phoenix', 'Relief', 'Relief2', 'Reverse', 'Roman', 'Rot13', 'Rot13', 'Rotated', 'Rounded', 'Rowan Cap', 'Rozzo', 'Runic', 'Runyc', 'S Blood', 'SL Script', 'Santa Clara', 'Script', 'Serifcap', 'Shadow', 'Shimrod', 'Short', 'Slant Relief', 'Slant', 'Slide', 'Small Caps', 'Small Isometric1', 'Small Keyboard', 'Small Poison', 'Small Script', 'Small Shadow', 'Small Slant', 'Small Tengwar', 'Small', 'Soft', 'Speed', 'Spliff', 'Stacey', 'Stampate', 'Stampatello', 'Standard', 'Star Strips', 'Star Wars', 'Stellar', 'Stforek', 'Stick Letters', 'Stop', 'Straight', 'Stronger Than All', 'Sub-Zero', 'Swamp Land', 'Swan', 'Sweet', 'THIS', 'Tanja', 'Tengwar', 'Term', 'Test1', 'The Edge', 'Thick', 'Thin', 'Thorned', 'Three Point', 'Ticks Slant', 'Ticks', 'Tiles', 'Tinker-Toy', 'Tombstone', 'Train', 'Trek', 'Tsalagi', 'Tubular', 'Twisted', 'Two Point', 'USA Flag', 'Univers', 'Varsity', 'Wavy', 'Weird', 'Wet Letter', 'Whimsy', 'Wow'];
</script>
<template>
+2 -3
View File
@@ -1,11 +1,10 @@
import { FileDigit } from '@vicons/tabler';
import { defineTool } from '../tool';
import { translate } from '@/plugins/i18n.plugin';
export const tool = defineTool({
name: translate('tools.base64-hex-converter.title'),
name: 'Base64 Hex array encoder/decoder',
path: '/base64-hex-converter',
description: translate('tools.base64-hex-converter.description'),
description: 'Simply encode and decode Hex array into a their base64 representation.',
keywords: ['base64', 'converter', 'conversion', 'web', 'data', 'format', 'atob', 'btoa', 'hex'],
component: () => import('./base64-hex-converter.vue'),
icon: FileDigit,
+2 -3
View File
@@ -1,11 +1,10 @@
import { Command } from '@vicons/tabler';
import { defineTool } from '../tool';
import { translate } from '@/plugins/i18n.plugin';
export const tool = defineTool({
name: translate('tools.bash-memo.title'),
name: 'Bash Cheatsheet',
path: '/bash-memo',
description: translate('tools.bash-memo.description'),
description: 'Bash common commands',
keywords: ['bash', 'shell'],
component: () => import('./bash-memo.vue'),
icon: Command,
+2 -3
View File
@@ -1,11 +1,10 @@
import { World } from '@vicons/tabler';
import { defineTool } from '../tool';
import { translate } from '@/plugins/i18n.plugin';
export const tool = defineTool({
name: translate('tools.bimi-dns-generator.title'),
name: 'BIMI DNS Generator',
path: '/bimi-dns-generator',
description: translate('tools.bimi-dns-generator.description'),
description: 'Generate BIMI DNS TXT record',
keywords: ['bimi', 'dns', 'txt'],
component: () => import('./bimi-dns-generator.vue'),
icon: World,
+2 -3
View File
@@ -1,11 +1,10 @@
import { MedicalCross } from '@vicons/tabler';
import { defineTool } from '../tool';
import { translate } from '@/plugins/i18n.plugin';
export const tool = defineTool({
name: translate('tools.bmi-calculator.title'),
name: 'BMI Calculator',
path: '/bmi-calculator',
description: translate('tools.bmi-calculator.description'),
description: 'Body Mass Index Calculator (us or metric units)',
keywords: ['bmi', 'body', 'mass'],
component: () => import('./bmi-calculator.vue'),
icon: MedicalCross,
+2 -3
View File
@@ -1,11 +1,10 @@
import { Mailbox } from '@vicons/tabler';
import { defineTool } from '../tool';
import { translate } from '@/plugins/i18n.plugin';
export const tool = defineTool({
name: translate('tools.bounce-parser.title'),
name: 'Bounce Email Parser',
path: '/bounce-parser',
description: translate('tools.bounce-parser.description'),
description: 'Parse SMTP Bounce Emails',
keywords: ['bounce', 'email', 'smtp', 'parser'],
component: () => import('./bounce-parser.vue'),
icon: Mailbox,
+2 -3
View File
@@ -1,11 +1,10 @@
import { PlayCard } from '@vicons/tabler';
import { defineTool } from '../tool';
import { translate } from '@/plugins/i18n.plugin';
export const tool = defineTool({
name: translate('tools.card-picker.title'),
name: 'Card Picker',
path: '/card-picker',
description: translate('tools.card-picker.description'),
description: 'Generate a deck of playing cards',
keywords: ['card', 'deck', 'picker'],
component: () => import('./card-picker.vue'),
icon: PlayCard,
+2 -3
View File
@@ -1,11 +1,10 @@
import { FileCertificate } from '@vicons/tabler';
import { defineTool } from '../tool';
import { translate } from '@/plugins/i18n.plugin';
export const tool = defineTool({
name: translate('tools.certificate-key-parser.title'),
name: 'Certificate/Key parser',
path: '/certificate-key-parser',
description: translate('tools.certificate-key-parser.description'),
description: 'Parse Key and Certificate',
keywords: ['certificate', 'key', 'parser'],
component: () => import('./certificate-key-parser.vue'),
icon: FileCertificate,
+2 -3
View File
@@ -1,11 +1,10 @@
import { FileInvoice } from '@vicons/tabler';
import { defineTool } from '../tool';
import { translate } from '@/plugins/i18n.plugin';
export const tool = defineTool({
name: translate('tools.chmod-calculator.title'),
name: 'Chmod calculator',
path: '/chmod-calculator',
description: translate('tools.chmod-calculator.description'),
description: 'Compute your chmod permissions and commands with this online chmod calculator.',
keywords: [
'chmod',
'calculator',
+2 -3
View File
@@ -1,11 +1,10 @@
import { UnfoldMoreOutlined } from '@vicons/material';
import { defineTool } from '../tool';
import { translate } from '@/plugins/i18n.plugin';
export const tool = defineTool({
name: translate('tools.cidr-in-cidr.title'),
name: 'IPv4-6/IPRange/CIDR in IPRange/CIDR/IPMask',
path: '/cidr-in-cidr',
description: translate('tools.cidr-in-cidr.description'),
description: 'Given a CIDR/IP Range/Wildcard IP/IP Mask, tell if a given IPv4-6/Range/CIDR/Wildcard IP/IP Mask is in subnet range',
keywords: ['ip', 'cidr', 'range', 'mask', 'wildcard', 'ipv4', 'ipv6', 'subnet', 'include', 'inclusion'],
component: () => import('./cidr-in-cidr.vue'),
redirectFrom: ['/ip-in-range'],
+2 -3
View File
@@ -1,11 +1,10 @@
import { Code } from '@vicons/tabler';
import { defineTool } from '../tool';
import { translate } from '@/plugins/i18n.plugin';
export const tool = defineTool({
name: translate('tools.code-highlighter.title'),
name: 'Code/Scripts Highlighter',
path: '/code-highlighter',
description: translate('tools.code-highlighter.description'),
description: 'Highlight programming code fragments',
keywords: ['code', 'highlighter'],
component: () => import('./code-highlighter.vue'),
icon: Code,
+2 -3
View File
@@ -1,11 +1,10 @@
import { Coin } from '@vicons/tabler';
import { defineTool } from '../tool';
import { translate } from '@/plugins/i18n.plugin';
export const tool = defineTool({
name: translate('tools.coin-flipper.title'),
name: 'Coin Flipper',
path: '/coin-flipper',
description: translate('tools.coin-flipper.description'),
description: 'Flip a coin',
keywords: ['coin', 'flipper'],
component: () => import('./coin-flipper.vue'),
icon: Coin,
+2 -3
View File
@@ -1,11 +1,10 @@
import { ColorSwatch } from '@vicons/tabler';
import { defineTool } from '../tool';
import { translate } from '@/plugins/i18n.plugin';
export const tool = defineTool({
name: translate('tools.color-contrast-checker.title'),
name: 'Color Contrast Checker',
path: '/color-contrast-checker',
description: translate('tools.color-contrast-checker.description'),
description: 'Check the WCAG constrast level between two colors',
keywords: ['color', 'contrast', 'checker', 'wcag'],
component: () => import('./color-contrast-checker.vue'),
icon: ColorSwatch,
+2 -3
View File
@@ -1,11 +1,10 @@
import { ColorPicker } from '@vicons/tabler';
import { defineTool } from '../tool';
import { translate } from '@/plugins/i18n.plugin';
export const tool = defineTool({
name: translate('tools.color-wheel.title'),
name: 'Color Wheel',
path: '/color-wheel',
description: translate('tools.color-wheel.description'),
description: 'Choose a color palette/theme using a wheel and mode',
keywords: ['color', 'wheel', 'palette', 'theme'],
component: () => import('./color-wheel.vue'),
icon: ColorPicker,
+2 -3
View File
@@ -1,11 +1,10 @@
import { FileText } from '@vicons/tabler';
import { defineTool } from '../tool';
import { translate } from '@/plugins/i18n.plugin';
export const tool = defineTool({
name: translate('tools.common-regex-memo.title'),
name: 'Common Regex Cheatsheet',
path: '/common-regex-memo',
description: translate('tools.common-regex-memo.description'),
description: 'Cheatsheet for common regex patterns',
keywords: ['common', 'regex', 'memo', 'cheatsheet'],
component: () => import('./common-regex-memo.vue'),
icon: FileText,
+2 -3
View File
@@ -1,11 +1,10 @@
import { Cookie } from '@vicons/tabler';
import { defineTool } from '../tool';
import { translate } from '@/plugins/i18n.plugin';
export const tool = defineTool({
name: translate('tools.cookies-parser.title'),
name: 'Cookies Parser',
path: '/cookies-parser',
description: translate('tools.cookies-parser.description'),
description: 'Parse Cookie HTTP Header',
keywords: ['cookies', 'parser'],
component: () => import('./cookies-parser.vue'),
icon: Cookie,
+2 -3
View File
@@ -1,11 +1,10 @@
import { Alarm } from '@vicons/tabler';
import { defineTool } from '../tool';
import { translate } from '@/plugins/i18n.plugin';
export const tool = defineTool({
name: translate('tools.countdown.title'),
name: 'Countdown',
path: '/countdown',
description: translate('tools.countdown.description'),
description: 'Countdown and alarm at ellapsed duration',
keywords: ['countdown'],
component: () => import('./countdown.vue'),
icon: Alarm,
+2 -3
View File
@@ -1,11 +1,10 @@
import { EyeOff } from '@vicons/tabler';
import { defineTool } from '../tool';
import { translate } from '@/plugins/i18n.plugin';
export const tool = defineTool({
name: translate('tools.crc-calculator.title'),
name: 'CRC calculator',
path: '/crc-calculator',
description: translate('tools.crc-calculator.description'),
description: 'Compute text or file CRC (CRC1, CRC8, CRC8 1-Wire, CRC8 DVB-S2, CRC16, CRC16 CCITT, CRC16 Modbus, CRC16 Kermit, CRC16 XModem, CRC24, CRC32, CRC32 MPEG-2, CRCJAM)',
keywords: ['crc', 'checksum', 'crc1',
'crc8',
'crc8 1-wire',
+2 -3
View File
@@ -1,11 +1,10 @@
import { Alarm } from '@vicons/tabler';
import { defineTool } from '../tool';
import { translate } from '@/plugins/i18n.plugin';
export const tool = defineTool({
name: translate('tools.cron-alarm.title'),
name: 'Cron/Weekday Alarm',
path: '/cron-alarm',
description: translate('tools.cron-alarm.description'),
description: 'Alarm based on time and weekdays expression',
keywords: ['cron', 'week', 'day', 'alarm'],
component: () => import('./cron-alarm.vue'),
icon: Alarm,
+2 -3
View File
@@ -1,11 +1,10 @@
import { ArrowsShuffle } from '@vicons/tabler';
import { defineTool } from '../tool';
import { translate } from '@/plugins/i18n.plugin';
export const tool = defineTool({
name: translate('tools.csr-generator.title'),
name: 'CSR Generator',
path: '/csr-generator',
description: translate('tools.csr-generator.description'),
description: 'Certificate Signing Request generator (PEM format)',
keywords: ['csr', 'certificate', 'signing', 'request', 'x509', 'generator'],
component: () => import('./csr-generator.vue'),
icon: ArrowsShuffle,
+2 -3
View File
@@ -1,11 +1,10 @@
import { BrandCss3 } from '@vicons/tabler';
import { defineTool } from '../tool';
import { translate } from '@/plugins/i18n.plugin';
export const tool = defineTool({
name: translate('tools.css-prettifier.title'),
name: 'Css prettifier',
path: '/css-prettifier',
description: translate('tools.css-prettifier.description'),
description: 'CSS Prettify',
keywords: ['css', 'prettifier', 'beautify', 'prettier', 'format'],
component: () => import('./css-prettifier.vue'),
icon: BrandCss3,
+2 -3
View File
@@ -1,11 +1,10 @@
import { BrandCss3 } from '@vicons/tabler';
import { defineTool } from '../tool';
import { translate } from '@/plugins/i18n.plugin';
export const tool = defineTool({
name: translate('tools.css-selectors-memo.title'),
name: 'CSS Selectors Cheatsheet',
path: '/css-selectors-memo',
description: translate('tools.css-selectors-memo.description'),
description: 'CSS Selectors Syntax Cheatsheet',
keywords: ['css', 'selectors', 'cheatsheet', 'memo'],
component: () => import('./css-selectors-memo.vue'),
icon: BrandCss3,
+2 -3
View File
@@ -1,11 +1,10 @@
import { Braces } from '@vicons/tabler';
import { defineTool } from '../tool';
import { translate } from '@/plugins/i18n.plugin';
export const tool = defineTool({
name: translate('tools.css-xpath-converter.title'),
name: 'CSS XPath Converter',
path: '/css-xpath-converter',
description: translate('tools.css-xpath-converter.description'),
description: 'Convert CSS selector to/from XPath expression',
keywords: ['css', 'xpath', 'converter'],
component: () => import('./css-xpath-converter.vue'),
icon: Braces,
+2 -3
View File
@@ -1,11 +1,10 @@
import { TableExport } from '@vicons/tabler';
import { defineTool } from '../tool';
import { translate } from '@/plugins/i18n.plugin';
export const tool = defineTool({
name: translate('tools.csv-to-data.title'),
name: 'Csv to Data',
path: '/csv-to-data',
description: translate('tools.csv-to-data.description'),
description: 'Convert CSV file to JSON, YAML, CSV, SQL INSERT, XML or Markdown',
keywords: ['excel', 'csv', 'xlsx', 'sql', 'json', 'yaml', 'insert', 'markdown', 'md', 'tsv', 'xml'],
component: () => import('./csv-to-data.vue'),
icon: TableExport,
+2 -3
View File
@@ -1,11 +1,10 @@
import { ExternalLink } from '@vicons/tabler';
import { defineTool } from '../tool';
import { translate } from '@/plugins/i18n.plugin';
export const tool = defineTool({
name: translate('tools.curl-converter.title'),
name: 'Curl Converter',
path: '/curl-converter',
description: translate('tools.curl-converter.description'),
description: 'Generate common coding languages version of provided curl command line',
keywords: ['curl', 'code', 'language', 'generator'],
component: () => import('./curl-converter.vue'),
icon: ExternalLink,
+2 -3
View File
@@ -1,11 +1,10 @@
import { Download } from '@vicons/tabler';
import { defineTool } from '../tool';
import { translate } from '@/plugins/i18n.plugin';
export const tool = defineTool({
name: translate('tools.curl-generator.title'),
name: 'Curl Command Generator',
path: '/curl-generator',
description: translate('tools.curl-generator.description'),
description: 'Generate CURL command lines',
keywords: ['curl'],
component: () => import('./curl-generator.vue'),
icon: Download,
+2 -3
View File
@@ -1,11 +1,10 @@
import { Currency } from '@vicons/tabler';
import { defineTool } from '../tool';
import { translate } from '@/plugins/i18n.plugin';
export const tool = defineTool({
name: translate('tools.currency-converter.title'),
name: 'Currency Converter',
path: '/currency-converter',
description: translate('tools.currency-converter.description'),
description: 'Convert currency values using https://github.com/fawazahmed0/exchange-api',
keywords: ['currency', 'converter'],
component: () => import('./currency-converter.vue'),
icon: Currency,
+2 -3
View File
@@ -1,11 +1,10 @@
import { ArrowsShuffle } from '@vicons/tabler';
import { defineTool } from '../tool';
import { translate } from '@/plugins/i18n.plugin';
export const tool = defineTool({
name: translate('tools.data-faker.title'),
name: 'Data Faker',
path: '/data-faker',
description: translate('tools.data-faker.description'),
description: 'Generate fake data using JSON template',
keywords: ['data', 'json', 'sample', 'faker'],
component: () => import('./data-faker.vue'),
icon: ArrowsShuffle,
@@ -1,11 +1,10 @@
import { ArrowsLeftRight } from '@vicons/tabler';
import { defineTool } from '../tool';
import { translate } from '@/plugins/i18n.plugin';
export const tool = defineTool({
name: translate('tools.data-storage-unit-converter.title'),
name: 'Data Storage Unit converter',
path: '/data-storage-unit-converter',
description: translate('tools.data-storage-unit-converter.description'),
description: 'Convert data storage or transfer units (bytes, bibytes, bits, kilobytes...)',
keywords: ['data', 'storage', 'unit', 'conversion',
'bits', 'bytes', 'bibytes', 'binary',
'KiB', 'MiB', 'GiB', 'TiB', 'PiB', 'EiB', 'ZiB', 'YiB',
@@ -1,11 +1,10 @@
import { TransferIn } from '@vicons/tabler';
import { defineTool } from '../tool';
import { translate } from '@/plugins/i18n.plugin';
export const tool = defineTool({
name: translate('tools.data-transfer-rate-converter.title'),
name: 'Data Transfer Rate Calculator',
path: '/data-transfer-rate-converter',
description: translate('tools.data-transfer-rate-converter.description'),
description: 'Compute Data Transfer times, rates and amount of data',
keywords: ['data', 'transfer', 'rate', 'convert', 'time'],
component: () => import('./data-transfer-rate-converter.vue'),
icon: TransferIn,
+2 -3
View File
@@ -1,11 +1,10 @@
import { Calendar } from '@vicons/tabler';
import { defineTool } from '../tool';
import { translate } from '@/plugins/i18n.plugin';
export const tool = defineTool({
name: translate('tools.date-duration-calculator.title'),
name: 'Date+Durations Calculator',
path: '/date-duration-calculator',
description: translate('tools.date-duration-calculator.description'),
description: 'Add/substract durations from a specific date',
keywords: ['date', 'duration', 'addition', 'calculator'],
component: () => import('./date-duration-calculator.vue'),
icon: Calendar,
@@ -11,7 +11,6 @@ import {
isValid,
parseISO,
} from 'date-fns';
import { ticksFromDate, ticksToDate } from 'tick-time';
import { UTCDate } from '@date-fns/utc';
import type { DateFormat, ToDateMapper } from './date-time-converter.types';
import {
@@ -129,12 +128,6 @@ const formats: DateFormat[] = [
toDate: date => win32FileTimeToUnix(date),
formatMatcher: isWin32FileTime,
},
{
name: '.Net ticks',
fromDate: date => ticksFromDate(date),
toDate: date => ticksToDate(date) || new Date(),
formatMatcher: date => /\d+/.test(date || ''),
},
];
const formatIndex = ref(6);
-4
View File
@@ -1,4 +0,0 @@
declare module 'tick-time' {
export function ticksFromDate(date: Date): string;
export function ticksToDate(ticks: string): Date;
}
+2 -3
View File
@@ -1,11 +1,10 @@
import { Calendar } from '@vicons/tabler';
import { defineTool } from '../tool';
import { translate } from '@/plugins/i18n.plugin';
export const tool = defineTool({
name: translate('tools.days-calculator.title'),
name: 'Days Calculator',
path: '/days-calculator',
description: translate('tools.days-calculator.description'),
description: 'Calculate days interval, holidays, difference, business times',
keywords: ['days', 'interval', 'month', 'year', 'difference', 'holidays', 'calculator'],
component: () => import('./days-calculator.vue'),
icon: Calendar,
+2 -3
View File
@@ -1,11 +1,10 @@
import { Dice } from '@vicons/tabler';
import { defineTool } from '../tool';
import { translate } from '@/plugins/i18n.plugin';
export const tool = defineTool({
name: translate('tools.dice-roller.title'),
name: 'Dice Roller',
path: '/dice-roller',
description: translate('tools.dice-roller.description'),
description: 'RPG Dice Roller using Dice Notation',
keywords: ['dice', 'rng', 'rpg', 'roller'],
component: () => import('./dice-roller.vue'),
icon: Dice,
+2 -3
View File
@@ -1,11 +1,10 @@
import { FileText } from '@vicons/tabler';
import { defineTool } from '../tool';
import { translate } from '@/plugins/i18n.plugin';
export const tool = defineTool({
name: translate('tools.distinct-words.title'),
name: 'Distinct Words',
path: '/distinct-words',
description: translate('tools.distinct-words.description'),
description: 'Extract and count occurences of each unique word in a text',
keywords: ['distinct', 'words'],
component: () => import('./distinct-words.vue'),
icon: FileText,
+2 -3
View File
@@ -1,11 +1,10 @@
import { World } from '@vicons/tabler';
import { defineTool } from '../tool';
import { translate } from '@/plugins/i18n.plugin';
export const tool = defineTool({
name: translate('tools.dkim-dns-generator.title'),
name: 'DKIM DNS Generator',
path: '/dkim-dns-generator',
description: translate('tools.dkim-dns-generator.description'),
description: 'Generate DKIM DNS TXT record',
keywords: ['dkim', 'dns'],
component: () => import('./dkim-dns-generator.vue'),
icon: World,
+2 -3
View File
@@ -1,11 +1,10 @@
import { World } from '@vicons/tabler';
import { defineTool } from '../tool';
import { translate } from '@/plugins/i18n.plugin';
export const tool = defineTool({
name: translate('tools.dmarc-dns-generator.title'),
name: 'DMARC DNS Generator',
path: '/dmarc-dns-generator',
description: translate('tools.dmarc-dns-generator.description'),
description: 'Generate DMARC DNS TXT record',
keywords: ['dmarc', 'dns'],
component: () => import('./dmarc-dns-generator.vue'),
icon: World,
+2 -3
View File
@@ -1,11 +1,10 @@
import { World } from '@vicons/tabler';
import { defineTool } from '../tool';
import { translate } from '@/plugins/i18n.plugin';
export const tool = defineTool({
name: translate('tools.dmarc-report-analyzer.title'),
name: 'DMARC Report Analyzer',
path: '/dmarc-report-analyzer',
description: translate('tools.dmarc-report-analyzer.description'),
description: 'Read and display DMARC Xml Reports',
keywords: ['dmarc', 'report', 'analyzer'],
component: () => import('./dmarc-report-analyzer.vue'),
icon: World,
+2 -3
View File
@@ -1,11 +1,10 @@
import { World } from '@vicons/tabler';
import { defineTool } from '../tool';
import { translate } from '@/plugins/i18n.plugin';
export const tool = defineTool({
name: translate('tools.dns-queries.title'),
name: 'DNS Queries',
path: '/dns-queries',
description: translate('tools.dns-queries.description'),
description: 'Perform DNS Queries (over HTTPS)',
keywords: ['dns', 'nslookup', 'queries'],
component: () => import('./dns-queries.vue'),
icon: World,
+2 -3
View File
@@ -1,11 +1,10 @@
import { BrandDocker } from '@vicons/tabler';
import { defineTool } from '../tool';
import { translate } from '@/plugins/i18n.plugin';
export const tool = defineTool({
name: translate('tools.docker-compose-converter.title'),
name: 'Docker Compose Format Converter',
path: '/docker-compose-converter',
description: translate('tools.docker-compose-converter.description'),
description: 'Convert Docker Compose file between V1, 2.x, 3.x or CommonSpec and may expand ports/volumes syntaxes',
keywords: ['docker', 'compose', 'converter'],
component: () => import('./docker-compose-converter.vue'),
icon: BrandDocker,
@@ -1,11 +1,10 @@
import { BrandDocker } from '@vicons/tabler';
import { defineTool } from '../tool';
import { translate } from '@/plugins/i18n.plugin';
export const tool = defineTool({
name: translate('tools.docker-compose-to-docker-run-converter.title'),
name: 'Docker Compose to Docker run converter',
path: '/docker-compose-to-docker-run-converter',
description: translate('tools.docker-compose-to-docker-run-converter.description'),
description: 'Turns Docker Compose filt to docker run command(s)!',
keywords: ['docker', 'run', 'compose', 'yaml', 'yml', 'convert', 'deamon'],
component: () => import('./docker-compose-to-docker-run-converter.vue'),
icon: BrandDocker,
@@ -1,11 +1,10 @@
import { BrandDocker } from '@vicons/tabler';
import { defineTool } from '../tool';
import { translate } from '@/plugins/i18n.plugin';
export const tool = defineTool({
name: translate('tools.docker-compose-to-kubernetes.title'),
name: 'Docker compose to kubernetes',
path: '/docker-compose-to-kubernetes',
description: translate('tools.docker-compose-to-kubernetes.description'),
description: 'Docker Compose to Kubernetes manifests',
keywords: ['docker', 'compose', 'convert', 'kubernetes'],
component: () => import('./docker-compose-to-kubernetes.vue'),
icon: BrandDocker,
+2 -3
View File
@@ -1,11 +1,10 @@
import { BrandDocker } from '@vicons/tabler';
import { defineTool } from '../tool';
import { translate } from '@/plugins/i18n.plugin';
export const tool = defineTool({
name: translate('tools.docker-compose-validator.title'),
name: 'Docker Compose Validator',
path: '/docker-compose-validator',
description: translate('tools.docker-compose-validator.description'),
description: 'Validate Docker Compose files against CommonSpec schema',
keywords: ['docker', 'compose', 'validator', 'commonspec'],
component: () => import('./docker-compose-validator.vue'),
icon: BrandDocker,
+2 -3
View File
@@ -1,11 +1,10 @@
import { BrandDocker } from '@vicons/tabler';
import { defineTool } from '../tool';
import { translate } from '@/plugins/i18n.plugin';
export const tool = defineTool({
name: translate('tools.docker-memo.title'),
name: 'Docker Cheatsheet',
path: '/docker-memo',
description: translate('tools.docker-memo.description'),
description: 'Docker command memo',
keywords: ['docker', 'memo'],
component: () => import('./docker-memo.vue'),
icon: BrandDocker,
+2 -3
View File
@@ -1,11 +1,10 @@
import { BrandDocker } from '@vicons/tabler';
import { defineTool } from '../tool';
import { translate } from '@/plugins/i18n.plugin';
export const tool = defineTool({
name: translate('tools.docker-run-to-kubernetes.title'),
name: 'Docker run to kubernetes',
path: '/docker-run-to-kubernetes',
description: translate('tools.docker-run-to-kubernetes.description'),
description: 'Docker run command(s) to Kubernetes manifests',
keywords: ['docker', 'run', 'convert', 'kubernetes'],
component: () => import('./docker-run-to-kubernetes.vue'),
icon: BrandDocker,
+2 -3
View File
@@ -1,11 +1,10 @@
import { ListSearch } from '@vicons/tabler';
import { defineTool } from '../tool';
import { translate } from '@/plugins/i18n.plugin';
export const tool = defineTool({
name: translate('tools.duplicate-line-finder.title'),
name: 'Duplicate Lines Finder',
path: '/duplicate-line-finder',
description: translate('tools.duplicate-line-finder.description'),
description: 'Find and list duplicated lines',
keywords: ['duplicate', 'line', 'finder'],
component: () => import('./duplicate-line-finder.vue'),
icon: ListSearch,
+2 -3
View File
@@ -1,11 +1,10 @@
import { CalendarTime } from '@vicons/tabler';
import { defineTool } from '../tool';
import { translate } from '@/plugins/i18n.plugin';
export const tool = defineTool({
name: translate('tools.duration-calculator.title'),
name: 'Duration Calculator',
path: '/duration-calculator',
description: translate('tools.duration-calculator.description'),
description: 'Calculate/parse durations',
keywords: ['duration', 'iso', '8601', 'time', 'calculator'],
component: () => import('./duration-calculator.vue'),
icon: CalendarTime,
+2 -3
View File
@@ -1,11 +1,10 @@
import { Certificate } from '@vicons/tabler';
import { defineTool } from '../tool';
import { translate } from '@/plugins/i18n.plugin';
export const tool = defineTool({
name: translate('tools.ecdsa-key-pair-generator.title'),
name: 'ECDSA key pair generator',
path: '/ecdsa-key-pair-generator',
description: translate('tools.ecdsa-key-pair-generator.description'),
description: 'Generate new random ECDSA private and public keys (with or without passphrase).',
keywords: ['ecdsa', 'key', 'pair', 'generator', 'public', 'private', 'secret', 'ssh', 'pem', 'passphrase', 'password'],
component: () => import('./ecdsa-key-pair-generator.vue'),
icon: Certificate,
@@ -1,11 +1,10 @@
import { Certificate } from '@vicons/tabler';
import { defineTool } from '../tool';
import { translate } from '@/plugins/i18n.plugin';
export const tool = defineTool({
name: translate('tools.ed25519-key-pair-generator.title'),
name: 'Ed25519 key pair generator',
path: '/ed25519-key-pair-generator',
description: translate('tools.ed25519-key-pair-generator.description'),
description: 'Generate new random Ed25519 private and public keys (with or without passphrase).',
keywords: ['ed25519', 'key', 'pair', 'generator', 'public', 'private', 'secret', 'ssh', 'pem', 'passphrase', 'password'],
component: () => import('./ed25519-key-pair-generator.vue'),
icon: Certificate,
+2 -3
View File
@@ -1,11 +1,10 @@
import { Mail } from '@vicons/tabler';
import { defineTool } from '../tool';
import { translate } from '@/plugins/i18n.plugin';
export const tool = defineTool({
name: translate('tools.email-normalizer.title'),
name: 'Email normalizer',
path: '/email-normalizer',
description: translate('tools.email-normalizer.description'),
description: 'Normalize email addresses to a standard format for easier comparison. Useful for deduplication and data cleaning.',
keywords: ['email', 'normalizer'],
component: () => import('./email-normalizer.vue'),
icon: Mail,
+2 -3
View File
@@ -1,11 +1,10 @@
import { Mail } from '@vicons/tabler';
import { defineTool } from '../tool';
import { translate } from '@/plugins/i18n.plugin';
export const tool = defineTool({
name: translate('tools.email-parser.title'),
name: 'Email Parser',
path: '/email-parser',
description: translate('tools.email-parser.description'),
description: 'Parse and extract information from raw Email content',
keywords: ['email', 'parser', 'header', 'rfc2822', 'rfc5322', 'rfc822'],
component: () => import('./email-parser.vue'),
icon: Mail,
+16 -177
View File
@@ -1,203 +1,42 @@
<script setup lang="ts">
import type { EmojiInfo } from './emoji.types';
import { getAllCodePoints, isEmojiSupported } from './emoji-utils';
import { useCopy } from '@/composable/copy';
const props = defineProps<{ emojiInfo: EmojiInfo }>();
const props = (defineProps<{ emojiInfo: EmojiInfo }>());
const { emojiInfo } = toRefs(props);
const { copy } = useCopy();
// Check if emoji is properly supported
const emojiSupported = computed(() => isEmojiSupported(emojiInfo.value.emoji));
// Get complete code point information
const completeCodePoints = computed(() => getAllCodePoints(emojiInfo.value.emoji));
// Check if keywords are truncated
const keywordsEl = ref<HTMLElement>();
const isKeywordsTruncated = computed(() => {
if (!keywordsEl.value) {
return false;
}
return keywordsEl.value.scrollWidth > keywordsEl.value.clientWidth;
});
// Copy functions with better notifications
async function copyEmoji() {
await copy(emojiInfo.value.emoji, {
notificationMessage: `Emoji ${emojiInfo.value.emoji} copied to clipboard`,
});
}
async function copyCodePoints() {
await copy(completeCodePoints.value, {
notificationMessage: `Code points '${completeCodePoints.value}' copied to clipboard`,
});
}
async function copyUnicode() {
await copy(emojiInfo.value.unicode, {
notificationMessage: `Unicode '${emojiInfo.value.unicode}' copied to clipboard`,
});
}
async function copyName() {
await copy(emojiInfo.value.title, {
notificationMessage: `Name '${emojiInfo.value.title}' copied to clipboard`,
});
}
</script>
<template>
<c-card
:class="{ 'emoji-unsupported': !emojiSupported }"
flex
items-center
gap-3
transition-all
important:py-8px
important:pl-10px
important:pr-5px
hover:shadow-md
>
<!-- Emoji Display -->
<div
cursor-pointer
text-30px
class="emoji-display"
:class="{
'emoji-fallback': !emojiSupported,
'emoji-supported': emojiSupported,
}"
:title="`Click to copy ${emojiInfo.emoji}`"
@click="copyEmoji"
>
<c-card flex items-center gap-3 important:py-8px important:pl-10px important:pr-5px>
<div cursor-pointer text-30px @click="copy(emojiInfo.emoji, { notificationMessage: `Emoji ${emojiInfo.emoji} copied to the clipboard` })">
{{ emojiInfo.emoji }}
</div>
<!-- Emoji Information -->
<div min-w-0 flex-1>
<!-- Title (clickable to copy name) -->
<div
cursor-pointer
truncate
font-bold
transition
hover:text-primary
:title="`Click to copy name: ${emojiInfo.title}`"
@click="copyName"
>
<div truncate font-bold>
{{ emojiInfo.title }}
</div>
<!-- Keywords (if available) -->
<div
v-if="emojiInfo.keywords && emojiInfo.keywords.length > 0"
ref="keywordsEl"
mb-1
truncate
text-xs
op-60
:title="isKeywordsTruncated ? emojiInfo.keywords.join(', ') : undefined"
>
{{ emojiInfo.keywords.join(', ') }}
<!-- <div>
<c-link>
{{ emojiInfo.codePoints }}
</c-link>
</div>
<div />
<div rounded op-70>
Unicode: <span border="1px solid current op-30" b-rd-xl px-12px py-4px>{{ emojiInfo.unicode }}</span>
</div> -->
<!-- Code Points and Unicode -->
<div flex flex-col text-xs font-mono op-70>
<!-- Code Points -->
<span
cursor-pointer
truncate
px-1
py-0.25
transition
hover:bg-gray-100
hover:text-primary
hover:op-100
dark:hover:bg-gray-800
:title="`Click to copy: ${completeCodePoints}`"
@click="copyCodePoints"
>
{{ completeCodePoints }}
<div flex gap-2 text-xs font-mono op-70>
<span cursor-pointer transition hover:text-primary @click="copy(emojiInfo.codePoints, { notificationMessage: `Code points '${emojiInfo.codePoints}' copied to the clipboard` })">
{{ emojiInfo.codePoints }}
</span>
<!-- Unicode Escape -->
<span
cursor-pointer
truncate
rounded
px-1
py-0.25
transition
hover:bg-gray-100
hover:text-primary
hover:op-100
dark:hover:bg-gray-800
:title="`Click to copy: ${emojiInfo.unicode}`"
@click="copyUnicode"
>
<span cursor-pointer truncate transition hover:text-primary @click="copy(emojiInfo.unicode, { notificationMessage: `Unicode '${emojiInfo.unicode}' copied to the clipboard` })">
{{ emojiInfo.unicode }}
</span>
</div>
</div>
<!-- Support indicator -->
<div v-if="!emojiSupported" text-xs op-50 title="This emoji might not display correctly on your system">
⚠️
</div>
</c-card>
</template>
<style scoped>
.emoji-display {
font-family:
'Noto Color Emoji', /* Best flag and complex emoji support */
'Apple Color Emoji', /* Apple devices */
'Segoe UI Emoji', /* Windows */
'Twemoji Mozilla', /* Firefox fallback */
'EmojiOne Color', /* Additional fallback */
sans-serif;
font-feature-settings: 'liga' off;
font-variant-emoji: emoji;
text-rendering: optimizeQuality;
line-height: 1;
transition: transform 0.2s ease;
}
.emoji-display:hover {
transform: scale(1.1);
}
.emoji-supported {
/* Additional styles for well-supported emojis */
filter: none;
}
.emoji-fallback {
/* Styling for potentially unsupported emojis */
background-color: rgba(128, 128, 128, 0.1);
border-radius: 4px;
padding: 2px 4px;
border: 1px dashed rgba(128, 128, 128, 0.3);
}
.emoji-unsupported {
opacity: 0.8;
border-left: 3px solid orange;
}
/* Hover effects for interactive elements */
.emoji-display,
[title*='Click to copy'] {
user-select: none;
}
/* Better responsive design */
@media (max-width: 640px) {
.emoji-display {
font-size: 24px;
}
}
</style>
+36 -171
View File
@@ -3,55 +3,12 @@ import emojiUnicodeData from 'unicode-emoji-json';
import emojiKeywords from 'emojilib';
import _ from 'lodash';
import type { EmojiInfo } from './emoji.types';
import { escapeUnicodeComplete, getAllCodePoints } from './emoji-utils';
import { useFuzzySearch } from '@/composable/fuzzySearch';
import useDebouncedRef from '@/composable/debouncedref';
import { useFlexSearch } from '@/composable/flexSearch';
// Enhanced emoji processing functions
const escapeUnicode = ({ emoji }: { emoji: string }) => escapeUnicodeComplete(emoji);
const escapeUnicode = ({ emoji }: { emoji: string }) => emoji.split('').map(unit => `\\u${unit.charCodeAt(0).toString(16).padStart(4, '0')}`).join('');
const getEmojiCodePoints = ({ emoji }: { emoji: string }) => emoji.codePointAt(0) ? `0x${emoji.codePointAt(0)?.toString(16)}` : undefined;
function getEmojiCodePoints({ emoji }: { emoji: string }) {
// Get all code points for complex emojis (like flags)
const codePoints: string[] = [];
for (const char of emoji) {
const codePoint = char.codePointAt(0);
if (codePoint) {
codePoints.push(`0x${codePoint.toString(16)}`);
}
}
return codePoints.length > 0 ? codePoints.join(' ') : undefined;
}
// Function to detect if a string contains emojis
function containsEmoji(text: string): boolean {
// Check each character in the text against our emoji data
for (const char of text) {
if (emojiUnicodeData[char]) {
return true;
}
}
return false;
}
// Function to convert emojis in text to their unicode representations
function convertEmojisToUnicode(text: string): string {
let result = text;
// Process each character/emoji in the string
for (const char of text) {
// Check if this character is an emoji by looking it up in our emoji data
if (emojiUnicodeData[char]) {
const unicodeString = escapeUnicode({ emoji: char });
if (unicodeString) {
// Replace the emoji with its unicode representation
result = result.replace(char, unicodeString);
}
}
}
return result;
}
// Process emojis with enhanced code point handling
const emojis = _.map(emojiUnicodeData, (emojiInfo, emoji) => ({
...emojiInfo,
emoji,
@@ -59,167 +16,75 @@ const emojis = _.map(emojiUnicodeData, (emojiInfo, emoji) => ({
keywords: emojiKeywords[emoji as keyof typeof emojiKeywords],
codePoints: getEmojiCodePoints({ emoji }),
unicode: escapeUnicode({ emoji }),
allCodePoints: getAllCodePoints(emoji), // Add complete code point info
}));
// Group emojis and sort groups for better organization
const emojisGroups: { emojiInfos: EmojiInfo[]; group: string }[] = _.chain(emojis)
const emojisGroups: { emojiInfos: EmojiInfo[]; group: string }[] = _
.chain(emojis)
.groupBy('group')
.map((emojiInfos, group) => ({
group: _.startCase(group), // Better group name formatting
emojiInfos,
}))
.map((emojiInfos, group) => ({ group, emojiInfos }))
.value();
const limit = ref(150);
const rawSearchQuery = ref('');
const searchQuery = useDebouncedRef('', 250);
const limit = ref(100);
const searchQuery = useDebouncedRef('', 500);
// Add automated lazy loading for emoji groups
const visibleGroupsCount = ref(1); // Start with 1 group
let loadingInterval: NodeJS.Timeout | null = null;
// Watch for raw search query changes and process emojis
watch(rawSearchQuery, (newQuery) => {
if (containsEmoji(newQuery)) {
// Convert emojis to unicode and update the debounced search query
const unicodeQuery = convertEmojisToUnicode(newQuery);
searchQuery.value = unicodeQuery;
}
else {
// Regular text search
searchQuery.value = newQuery;
}
});
const { searchResult } = useFlexSearch({
const { searchResult } = useFuzzySearch({
search: searchQuery,
data: emojis,
options: {
keys: ['group', { name: 'name', weight: 3 }, 'keywords', 'unicode', 'codePoints', 'allCodePoints', 'emoji'],
filterEmpty: false,
keys: ['group', { name: 'name', weight: 3 }, 'keywords', 'unicode', 'codePoints', 'emoji'],
threshold: 0.3,
useExtendedSearch: true,
isCaseSensitive: false,
},
limit,
});
// Computed property for filtered results
const displayedSearchResults = computed(() => {
return searchResult.value.slice(0, limit.value);
});
// Computed property for visible emoji groups
const visibleEmojisGroups = computed(() => {
return emojisGroups.slice(0, visibleGroupsCount.value);
});
// Function to stop automated loading
function stopAutomatedLoading() {
if (loadingInterval) {
clearInterval(loadingInterval);
loadingInterval = null;
}
}
// Function to start automated loading
function startAutomatedLoading() {
// Clear any existing interval
if (loadingInterval) {
clearInterval(loadingInterval);
}
// Start loading groups every 150ms
loadingInterval = setInterval(() => {
if (visibleGroupsCount.value < emojisGroups.length) {
visibleGroupsCount.value++;
}
else {
// Stop loading when all groups are visible
stopAutomatedLoading();
}
}, 150);
}
// Watch for search query changes
watch(searchQuery, (newQuery, oldQuery) => {
if (newQuery.trim()) {
// Stop automated loading when searching
stopAutomatedLoading();
}
else if (oldQuery && oldQuery.trim()) {
// Reset and start automated loading when switching from search to browse
visibleGroupsCount.value = 1;
nextTick(() => {
startAutomatedLoading();
});
}
});
// Start automated loading on component mount (when not searching)
onMounted(() => {
if (!searchQuery.value.trim()) {
startAutomatedLoading();
}
});
// Clean up on component unmount
onUnmounted(() => {
stopAutomatedLoading();
limit: limit.value,
});
</script>
<template>
<div mx-auto max-w-2400px important:flex-1>
<div mx-auto mb-4 max-w-600px flex justify-center gap-3>
<div mx-auto max-w-600px flex justify-center gap-3>
<c-input-text
v-model:value="rawSearchQuery"
placeholder="Search emojis (e.g. 'smile') or paste an emoji (e.g. '😄')"
class="flex-1"
v-model:value="searchQuery"
placeholder="Search emojis (e.g. 'smile')..."
>
<template #prefix>
<icon-mdi-search mr-6px color-black op-70 dark:color-white />
</template>
</c-input-text>
<n-form-item label="Max results:" label-placement="left">
<n-input-number v-model:value="limit" :min="10" :max="500" :step="10" style="width: 100px" />
<n-input-number v-model:value="limit" :min="1" />
</n-form-item>
</div>
<!-- Search Results -->
<div v-if="searchQuery.trim().length > 0">
<div v-if="displayedSearchResults.length === 0" mt-4 text-center text-20px font-bold op-70>
<div>No results found</div>
<div mt-2 text-14px font-normal>
Try searching for something else like "smile", "flag", or "😄"
</div>
<div
v-if="searchResult.length === 0"
mt-4
text-20px
font-bold
>
No results
</div>
<div v-else>
<div mb-3 mt-4 flex items-center gap-2 text-20px font-bold>
<span>Search Results</span>
<span text-14px font-normal op-70>({{ displayedSearchResults.length }} found)</span>
<div mt-4 text-20px font-bold>
Search result
</div>
<emoji-grid :emoji-infos="displayedSearchResults" />
<emoji-grid :emoji-infos="searchResult" />
</div>
</div>
<!-- All Emojis by Groups (Auto-loaded) -->
<div v-else>
<div v-for="{ group, emojiInfos } in visibleEmojisGroups" :key="group" mb-6>
<div mb-3 mt-4 flex items-center gap-2 text-20px font-bold>
<span>{{ group }}</span>
<span text-14px font-normal op-70>({{ emojiInfos.length }})</span>
</div>
<emoji-grid :emoji-infos="emojiInfos" />
<div
v-for="{ group, emojiInfos } in emojisGroups"
v-else
:key="group"
>
<div mt-4 text-20px font-bold>
{{ group }}
</div>
<!-- Loading indicator when more groups are coming -->
<div v-if="visibleGroupsCount < emojisGroups.length" mt-6 text-center>
<div text-14px op-70>
Loading more groups... ({{ visibleGroupsCount }}/{{ emojisGroups.length }})
</div>
</div>
<emoji-grid :emoji-infos="emojiInfos" />
</div>
</div>
</template>
-48
View File
@@ -1,48 +0,0 @@
export function getAllCodePoints(emoji: string): string {
const codePoints: string[] = [];
for (const char of emoji) {
const codePoint = char.codePointAt(0);
if (codePoint) {
codePoints.push(`U+${codePoint.toString(16).toUpperCase().padStart(4, '0')}`);
}
}
return codePoints.join(' ');
}
export function escapeUnicodeComplete(emoji: string): string {
return Array.from(emoji)
.map((char) => {
const codePoint = char.codePointAt(0);
return codePoint ? `\\u${codePoint.toString(16).padStart(4, '0')}` : '';
})
.join('');
}
export function isEmojiSupported(emoji: string): boolean {
if (typeof document === 'undefined') {
return true;
} // SSR fallback
const canvas = document.createElement('canvas');
const ctx = canvas.getContext('2d');
if (!ctx) {
return true;
}
canvas.width = 32;
canvas.height = 32;
ctx.textBaseline = 'top';
ctx.font = '24px "Noto Color Emoji", "Apple Color Emoji", "Segoe UI Emoji"';
const beforeImageData = ctx.getImageData(0, 0, 32, 32).data;
ctx.fillText(emoji, 0, 0);
const afterImageData = ctx.getImageData(0, 0, 32, 32).data;
// Check if any pixels changed
for (let i = 0; i < beforeImageData.length; i++) {
if (beforeImageData[i] !== afterImageData[i]) {
return true;
}
}
return false;
}
+6 -8
View File
@@ -1,10 +1,8 @@
export interface EmojiInfo {
emoji: string
name: string
import type emojiUnicodeData from 'unicode-emoji-json';
export type EmojiInfo = {
title: string
group: string
keywords?: string[]
codePoints?: string
emoji: string
codePoints: string | undefined
unicode: string
allCodePoints?: string
}
} & typeof emojiUnicodeData[string];
+2 -3
View File
@@ -1,11 +1,10 @@
import { Engine } from '@vicons/tabler';
import { defineTool } from '../tool';
import { translate } from '@/plugins/i18n.plugin';
export const tool = defineTool({
name: translate('tools.energy-computer.title'),
name: 'Energy Consumption and Expense Computer',
path: '/energy-computer',
description: translate('tools.energy-computer.description'),
description: 'Compute energy consumption and expense',
keywords: ['energy', 'expense', 'watt', 'kwh', 'computer'],
component: () => import('./energy-computer.vue'),
icon: Engine,
+2 -3
View File
@@ -1,11 +1,10 @@
import { Power } from '@vicons/tabler';
import { defineTool } from '../tool';
import { translate } from '@/plugins/i18n.plugin';
export const tool = defineTool({
name: translate('tools.energy-converter.title'),
name: 'Energy Units Converter',
path: '/energy-converter',
description: translate('tools.energy-converter.description'),
description: 'Convert values between energy units',
keywords: ['energy', 'converter'],
component: () => import('./energy-converter.vue'),
icon: Power,
+2 -3
View File
@@ -1,11 +1,10 @@
import { TableExport } from '@vicons/tabler';
import { defineTool } from '../tool';
import { translate } from '@/plugins/i18n.plugin';
export const tool = defineTool({
name: translate('tools.excel-to-data.title'),
name: 'Excel to data',
path: '/excel-to-data',
description: translate('tools.excel-to-data.description'),
description: 'Convert XLSX file to JSON, YAML, CSV, SQL INSERT, XML or Markdown',
keywords: ['excel', 'csv', 'xlsx', 'sql', 'json', 'yaml', 'insert', 'markdown', 'md', 'tsv', 'xml'],
component: () => import('./excel-to-data.vue'),
icon: TableExport,
+2 -3
View File
@@ -1,11 +1,10 @@
import { EyeOff } from '@vicons/tabler';
import { defineTool } from '../tool';
import { translate } from '@/plugins/i18n.plugin';
export const tool = defineTool({
name: translate('tools.file-hasher.title'),
name: 'File Hasher',
path: '/file-hasher',
description: translate('tools.file-hasher.description'),
description: 'Compute Hash of files',
keywords: ['file', 'hash',
'digest',
'crypto',
+2 -3
View File
@@ -1,11 +1,10 @@
import { File } from '@vicons/tabler';
import { defineTool } from '../tool';
import { translate } from '@/plugins/i18n.plugin';
export const tool = defineTool({
name: translate('tools.file-type.title'),
name: 'File Type Detector',
path: '/file-type',
description: translate('tools.file-type.description'),
description: 'Identify the type of a file',
keywords: ['file', 'type', 'identify', 'detector'],
component: () => import('./file-type.vue'),
icon: File,
+2 -3
View File
@@ -1,11 +1,10 @@
import { Firetruck } from '@vicons/tabler';
import { defineTool } from '../tool';
import { translate } from '@/plugins/i18n.plugin';
export const tool = defineTool({
name: translate('tools.firewalld-generator.title'),
name: 'FW command line generator',
path: '/firewalld-generator',
description: translate('tools.firewalld-generator.description'),
description: 'Generate fw command lines',
keywords: ['firewalld', 'fw'],
component: () => import('./firewalld-generator.vue'),
icon: Firetruck,
@@ -1,35 +1,27 @@
<script setup lang="ts">
import convertTreeToStructure from './lib/convert-tree-to-structure';
import { generateTree } from './lib/generate-tree';
import { parseInput } from './lib/parse-input';
import { withDefaultOnError } from '@/utils/defaults';
const inputStructureTemplate = `my-app
src
index.html
main.ts
main.scss
build
main.js
main.css
- test
- index.html
-main.js
-
...
...
README.md
empty dir`;
const inputStructure = ref(inputStructureTemplate);
const inputStructure = ref([
'my-app',
' src',
' index.html',
' main.ts',
' main.scss',
' - build',
' - index.html',
' main.js',
' main.css',
'',
' ',
' .prettierrc.json',
' .gitlab-ci.yml',
' README.md',
'empty dir',
].join('\n'));
const outputTree = computed(() => withDefaultOnError(() => generateTree(parseInput(inputStructure.value)), ''));
const inputTree = ref(generateTree(parseInput(inputStructureTemplate)));
const outputStructure = computed(() => withDefaultOnError(() => convertTreeToStructure((inputTree.value)), ''));
const MONACO_EDITOR_OPTIONS = {
automaticLayout: true,
formatOnType: true,
@@ -38,36 +30,21 @@ const MONACO_EDITOR_OPTIONS = {
</script>
<template>
<div class="min-h-0 flex flex-row gap-8" style="margin: 0 auto; max-width: 2200px; flex: 1 !important;">
<div class="min-w-0 flex-1">
<c-card title="Indented Structure → Folder Tree">
<c-monaco-editor
v-model:value="inputStructure"
theme="vs-dark"
height="400px"
placeholder="Paste your indented structure here..."
:options="MONACO_EDITOR_OPTIONS"
/>
</c-card>
<div>
<c-card title="Your indented structure" w-full>
<c-monaco-editor
v-model:value="inputStructure"
theme="vs-dark"
height="250px"
placeholder="Paste your indented structure here..."
:options="MONACO_EDITOR_OPTIONS"
/>
</c-card>
<n-divider />
<n-divider />
<TextareaCopyable :value="outputTree" :scrollable="true" />
</div>
<div class="min-w-0 flex-1">
<c-card title="Folder Tree → Indented Structure">
<c-monaco-editor
v-model:value="inputTree"
theme="vs-dark"
height="400px"
placeholder="Paste your folder tree here..."
:options="MONACO_EDITOR_OPTIONS"
/>
</c-card>
<n-divider />
<TextareaCopyable :value="outputStructure" :scrollable="true" />
</div>
<n-form-item label="Your tree-like structure:">
<TextareaCopyable :value="outputTree" />
</n-form-item>
</div>
</template>
+2 -3
View File
@@ -1,11 +1,10 @@
import { Folder } from '@vicons/tabler';
import { defineTool } from '../tool';
import { translate } from '@/plugins/i18n.plugin';
export const tool = defineTool({
name: translate('tools.folder-structure-diagram.title'),
name: 'Folder Structure Diagram',
path: '/folder-structure-diagram',
description: translate('tools.folder-structure-diagram.description'),
description: 'tree-like utility for generating ASCII folder structure diagrams',
keywords: ['folder', 'structure', 'diagram', 'tree', 'ascii'],
component: () => import('./folder-structure-diagram.vue'),
icon: Folder,
@@ -1,46 +0,0 @@
import { LINE_STRINGS } from './line-strings';
export default function convertTreeToStructure(tree: string): string {
const treeLines = tree.split('\n').filter(line => line.trim());
if (treeLines.length === 0) {
return '';
}
// Detect charset by checking for unicode box drawing characters (U+2500 to U+257F)
const charset = treeLines.some(line => /[\u2500-\u257F]/.test(line)) ? 'utf-8' : 'ascii';
const lines = LINE_STRINGS[charset];
// Create a single regex to match all tree connectors
const treeConnectorRegex = new RegExp(`(${lines.CHILD}|${lines.LAST_CHILD})`, 'g');
return treeLines
.flatMap((line) => {
// Find the last tree connector to determine depth and extract name
const matches = [...line.matchAll(treeConnectorRegex)];
if (matches.length === 0) {
// No tree connectors found - likely root or invalid line
return []; // Return empty array instead of null or empty string so the flatMap filters it out and doesn't leave unnecessary empty lines
}
const lastMatch = matches[matches.length - 1];
const connectorEnd = lastMatch.index! + lastMatch[0].length;
// Calculate depth (assuming 4 characters per level)
const depth = Math.floor(lastMatch.index! / 4);
// Extract folder name after the last connector
let folderName = line.substring(connectorEnd);
// When the folder name is an empty string (because it was created with "- ") or starts with a space, add a dash and space
// to preserve the empty tree connector or the spaces before actual text characters in the folder name
if (folderName === '' || folderName.startsWith(' ')) {
folderName = `- ${folderName}`;
}
// Create indented structure (2 spaces per level)
return [`${' '.repeat(depth * 2)}${folderName}`];
})
.join('\n');
}
+2 -3
View File
@@ -1,11 +1,10 @@
import { Power } from '@vicons/tabler';
import { defineTool } from '../tool';
import { translate } from '@/plugins/i18n.plugin';
export const tool = defineTool({
name: translate('tools.force-converter.title'),
name: 'Force Units Converter',
path: '/force-converter',
description: translate('tools.force-converter.description'),
description: 'Convert values between force units',
keywords: ['force', 'converter'],
component: () => import('./force-converter.vue'),
icon: Power,
+61 -633
View File
@@ -1,657 +1,85 @@
<script setup lang="ts">
import { FortuneWheel } from 'vue3-fortune-wheel';
import type { Data, ImgParams } from 'vue3-fortune-wheel';
import { useQueryParamOrStorage } from '@/composable/queryParams';
import { computedRefreshable } from '@/composable/computedRefreshable';
// Centralized wheel configuration - edit these values to change wheel size
const WHEEL_CONFIG = {
size: 550, // Overall wheel size
outerRadius: 275, // Outer edge of segments
innerRadius: 95, // Inner edge of segments (center hole)
textRadius: 185, // Where text is positioned
centerSize: 190, // Size of center circle
mobileSize: 250, // Wheel size on mobile
} as const;
const base = import.meta.env.BASE_URL;
const WHEEL_CENTER = WHEEL_CONFIG.size / 2;
const choices = useQueryParamOrStorage({ name: 'choices', storageName: 'fortune-wheel:chs', defaultValue: '' });
const spinDuration = useQueryParamOrStorage({ name: 'duration', storageName: 'fortune-wheel:dur', defaultValue: 5 });
interface WheelOption {
id: string
text: string
color: string
bgColor: string
}
const colors = [
{ bgColor: '#FF5733', color: '#FFFFFF' },
{ bgColor: '#2E86C1', color: '#FFFFFF' },
{ bgColor: '#28B463', color: '#FFFFFF' },
{ bgColor: '#F1C40F', color: '#000000' },
{ bgColor: '#8E44AD', color: '#FFFFFF' },
{ bgColor: '#E74C3C', color: '#FFFFFF' },
{ bgColor: '#1ABC9C', color: '#000000' },
{ bgColor: '#34495E', color: '#FFFFFF' },
{ bgColor: '#D35400', color: '#FFFFFF' },
{ bgColor: '#2C3E50', color: '#FFFFFF' },
];
// Generate random offset once on initialization to vary starting colors
const colorOffset = Math.random() * 360;
function generateUniqueColor(index: number) {
// Use HSL for better color distribution with random offset
const hue = (index * 137.508 + colorOffset) % 360; // Golden angle + random offset
const saturation = 65 + (index % 3) * 10; // Vary saturation slightly
const lightness = 45 + (index % 4) * 8; // Vary lightness for distinction
const bgColor = `hsl(${hue}, ${saturation}%, ${lightness}%)`;
// Calculate if we need white or black text based on luminance
const color = getContrastColor(hue, saturation, lightness);
return { bgColor, color };
}
function getContrastColor(hue: number, saturation: number, lightness: number): string {
// Convert HSL to RGB to calculate luminance
const h = hue / 360;
const s = saturation / 100;
const l = lightness / 100;
const c = (1 - Math.abs(2 * l - 1)) * s;
const x = c * (1 - Math.abs((h * 6) % 2 - 1));
const m = l - c / 2;
// Compact RGB calculation using array indexing
const hueSegment = Math.floor(h * 6);
const rgbValues = [
[c, x, 0], // 0-60°
[x, c, 0], // 60-120°
[0, c, x], // 120-180°
[0, x, c], // 180-240°
[x, 0, c], // 240-300°
[c, 0, x], // 300-360°
];
const [r, g, b] = rgbValues[hueSegment].map(val => (val + m) * 255);
// Calculate relative luminance and return appropriate contrast color
const luminance = (0.299 * r + 0.587 * g + 0.114 * b) / 255;
return luminance < 0.6 ? '#ffffff' : '#000000';
}
const spinDuration = useQueryParamOrStorage({
name: 'duration',
storageName: 'fortune-wheel:dur',
defaultValue: 3,
const wheel = ref<InstanceType<typeof FortuneWheel> | null>(null);
const data = computed(() => {
return (choices.value || '').split('\n')
.filter(s => s && s !== '')
.map((choice, index) => ({ id: index + 1, value: choice, ...colors[index % colors.length] }));
});
const savedOptions = useQueryParamOrStorage({
name: 'options',
storageName: 'fortune-wheel:options',
defaultValue: '[]',
const logo: ImgParams = {
src: `${base}logo.png`,
width: 100,
height: 100,
};
const [randomGift, refreshGift] = computedRefreshable(() => {
return Math.floor(Math.random() * data.value.length) + 1;
});
const wheelOptions = ref<WheelOption[]>([]);
const newOptionText = ref('');
const isSpinning = ref(false);
const wheelRotation = ref(0);
const result = ref<WheelOption | null>(null);
const lastResultIndex = ref<number | null>(null); // Track last result
// Load saved options
watchEffect(() => {
try {
const parsed = JSON.parse(savedOptions.value);
wheelOptions.value = parsed.map((text: string, index: number) => ({
id: `option-${index}`,
text,
...generateUniqueColor(index),
}));
}
catch {
wheelOptions.value = [];
}
});
// Save options when changed
watchEffect(() => {
savedOptions.value = JSON.stringify(wheelOptions.value.map(opt => opt.text));
});
const segmentAngle = computed(() =>
wheelOptions.value.length > 0 ? 360 / wheelOptions.value.length : 0,
);
function addOption() {
if (!newOptionText.value.trim()) {
return;
}
const newOption: WheelOption = {
id: `option-${Date.now()}`,
text: newOptionText.value.trim(),
...generateUniqueColor(wheelOptions.value.length),
};
wheelOptions.value.push(newOption);
newOptionText.value = '';
const result = ref<Data>();
function done(wheelResult: Data) {
result.value = wheelResult;
}
function removeOption(id: string) {
const index = wheelOptions.value.findIndex(opt => opt.id === id);
if (index > -1) {
wheelOptions.value.splice(index, 1);
// Reassign colors after removal
wheelOptions.value.forEach((opt, i) => {
Object.assign(opt, generateUniqueColor(i));
});
}
}
function removeAllOptions() {
wheelOptions.value = [];
}
function moveOption(fromIndex: number, toIndex: number) {
if (toIndex < 0 || toIndex >= wheelOptions.value.length) {
return;
}
const item = wheelOptions.value.splice(fromIndex, 1)[0];
wheelOptions.value.splice(toIndex, 0, item);
// Reassign colors after reordering
wheelOptions.value.forEach((opt, i) => {
Object.assign(opt, generateUniqueColor(i));
});
}
function spinWheel() {
if (isSpinning.value || wheelOptions.value.length === 0) {
return;
}
isSpinning.value = true;
result.value = null;
// Calculate rotations based on duration to maintain consistent speed
const baseRotationsPerSecond = 3;
const calculatedRotations = Math.max(3, Math.floor(spinDuration.value * baseRotationsPerSecond));
const extraRotations = Math.floor(Math.random() * 4);
const fullRotations = calculatedRotations + extraRotations;
// Improved randomness: weighted selection to avoid recent results
let targetSegment: number;
if (wheelOptions.value.length > 1) {
// Create weights array - all segments start with equal weight
const weights = Array.from({ length: wheelOptions.value.length }).fill(1) as number[];
// Reduce weights for recently selected segments
const recentResults = JSON.parse(localStorage.getItem('fortune-wheel:recent-results') || '[]');
// Apply penalties to recent results (stronger penalty for more recent)
recentResults.forEach((recentIndex: number, arrayIndex: number) => {
if (recentIndex >= 0 && recentIndex < weights.length) {
// More recent results get heavier penalties
const penalty = arrayIndex === 0 ? 0.1 : (arrayIndex === 1 ? 0.3 : 0.6);
weights[recentIndex] *= penalty;
}
});
// Weighted random selection
const totalWeight = weights.reduce((sum, weight) => sum + weight, 0);
let random = Math.random() * totalWeight;
targetSegment = 0;
for (let i = 0; i < weights.length; i++) {
random -= weights[i];
if (random <= 0) {
targetSegment = i;
break;
}
}
// Update recent results history (keep last 3)
const updatedRecent = [targetSegment, ...recentResults.slice(0, 2)];
localStorage.setItem('fortune-wheel:recent-results', JSON.stringify(updatedRecent));
}
else {
targetSegment = 0;
}
// Add randomness within the target segment (not always center)
const segmentStart = targetSegment * segmentAngle.value;
const randomWithinSegment = segmentStart + Math.random() * segmentAngle.value;
// Calculate final rotation to land in the target segment
const targetAngle = 360 - randomWithinSegment;
const finalRotation = wheelRotation.value + fullRotations * 360 + targetAngle;
wheelRotation.value = finalRotation;
setTimeout(() => {
isSpinning.value = false;
// Calculate which segment the pointer is actually pointing to
const normalizedRotation = finalRotation % 360;
const pointerAngle = (360 - normalizedRotation) % 360;
const segmentIndex = Math.floor(pointerAngle / segmentAngle.value) % wheelOptions.value.length;
result.value = wheelOptions.value[segmentIndex];
lastResultIndex.value = segmentIndex; // Keep for compatibility
}, spinDuration.value * 1000);
}
function getSegmentPath(index: number) {
const angle = segmentAngle.value;
const outerRadius = WHEEL_CONFIG.outerRadius;
const innerRadius = WHEEL_CONFIG.innerRadius;
const centerX = WHEEL_CENTER;
const centerY = WHEEL_CENTER;
// Special case for single option (360 degree segment)
if (wheelOptions.value.length === 1) {
// Create a donut shape using two circles
return `M ${centerX - outerRadius} ${centerY}
A ${outerRadius} ${outerRadius} 0 1 1 ${centerX + outerRadius} ${centerY}
A ${outerRadius} ${outerRadius} 0 1 1 ${centerX - outerRadius} ${centerY} Z
M ${centerX - innerRadius} ${centerY}
A ${innerRadius} ${innerRadius} 0 1 0 ${centerX + innerRadius} ${centerY}
A ${innerRadius} ${innerRadius} 0 1 0 ${centerX - innerRadius} ${centerY} Z`;
}
const startAngle = (index * angle - 90) * Math.PI / 180;
const endAngle = ((index + 1) * angle - 90) * Math.PI / 180;
const x1 = centerX + outerRadius * Math.cos(startAngle);
const y1 = centerY + outerRadius * Math.sin(startAngle);
const x2 = centerX + outerRadius * Math.cos(endAngle);
const y2 = centerY + outerRadius * Math.sin(endAngle);
const x3 = centerX + innerRadius * Math.cos(endAngle);
const y3 = centerY + innerRadius * Math.sin(endAngle);
const x4 = centerX + innerRadius * Math.cos(startAngle);
const y4 = centerY + innerRadius * Math.sin(startAngle);
const largeArcFlag = angle > 180 ? 1 : 0;
return `M ${x4} ${y4} L ${x1} ${y1} A ${outerRadius} ${outerRadius} 0 ${largeArcFlag} 1 ${x2} ${y2} L ${x3} ${y3} A ${innerRadius} ${innerRadius} 0 ${largeArcFlag} 0 ${x4} ${y4} Z`;
}
function getTextPosition(index: number) {
const angle = segmentAngle.value;
const radius = WHEEL_CONFIG.textRadius;
const centerX = WHEEL_CENTER;
const centerY = WHEEL_CENTER;
const textAngle = (index * angle + angle / 2 - 90) * Math.PI / 180;
// Round coordinates to whole numbers for sharp text rendering
const x = Math.round(centerX + radius * Math.cos(textAngle));
const y = Math.round(centerY + radius * Math.sin(textAngle));
return { x, y, rotation: index * angle + angle / 2 + 90 };
function restart() {
refreshGift();
wheel.value?.spin();
}
</script>
<template>
<div class="fortune-wheel-container">
<!-- Controls -->
<div class="wheel-controls">
<n-form-item label="Spin Duration (seconds):" label-placement="left" my--5>
<n-input-number v-model:value="spinDuration" :min="0" :max="10" />
</n-form-item>
<div>
<n-form-item label="Spin Duration (seconds):" label-placement="left">
<n-input-number v-model:value="spinDuration" :min="1" />
</n-form-item>
<n-divider />
<!-- Add new option -->
<div class="add-option-section">
<h3>Add New Option</h3>
<div class="add-option-form">
<c-input-text
v-model:value="newOptionText"
placeholder="Enter wheel option"
@keyup.enter="addOption"
/>
<c-button :disabled="!newOptionText.trim()" @click="addOption">
Add Option
</c-button>
<c-button class="clear-all-button" @click="removeAllOptions">
Clear All Options
</c-button>
</div>
</div>
<!-- Options list -->
<div class="options-section">
<h3>Wheel Options ({{ wheelOptions.length }})</h3>
<div v-if="wheelOptions.length === 0" class="empty-state">
No options added yet. Add some options to start spinning!
</div>
<div v-else class="options-list">
<div
v-for="(option, index) in wheelOptions"
:key="option.id"
class="option-item"
:style="{ borderLeftColor: option.bgColor }"
>
<div class="option-content">
<span class="option-text">{{ option.text }}</span>
<div class="option-actions">
<c-button
size="small"
:disabled="index === 0"
title="Move up"
@click="moveOption(index, index - 1)"
>
↑
</c-button>
<c-button
size="small"
:disabled="index === wheelOptions.length - 1"
title="Move down"
@click="moveOption(index, index + 1)"
>
↓
</c-button>
<c-button
size="small"
title="Remove"
@click="removeOption(option.id)"
>
✕
</c-button>
</div>
</div>
</div>
</div>
</div>
</div>
<c-input-text
v-model:value="choices"
label="Wheel choices (one per line):"
placeholder="Wheel choices (one per line)"
multiline
rows="5"
/>
<n-divider />
<!-- Wheel -->
<div class="wheel-section">
<div class="wheel-container">
<svg
class="wheel"
:class="{ spinning: isSpinning }"
:style="{
transform: `rotate(${wheelRotation}deg)`,
transitionDuration: isSpinning ? `${spinDuration}s` : '0s',
}"
:width="WHEEL_CONFIG.size"
:height="WHEEL_CONFIG.size"
:viewBox="`0 0 ${WHEEL_CONFIG.size} ${WHEEL_CONFIG.size}`"
>
<g>
<path
v-for="(option, index) in wheelOptions"
:key="option.id"
:d="getSegmentPath(index)"
:fill="option.bgColor"
stroke="rgba(255,255,255,0.3)"
stroke-width="2"
/>
<FortuneWheel
ref="wheel"
v-model="randomGift"
middle-circle
:img-params="logo"
:anim-duration="spinDuration * 1000"
:data="data"
@done="done"
/>
<text
v-for="(option, index) in wheelOptions"
:key="`text-${option.id}`"
:x="getTextPosition(index).x"
:y="getTextPosition(index).y"
:fill="option.color"
:transform="`rotate(${getTextPosition(index).rotation}, ${getTextPosition(index).x}, ${getTextPosition(index).y})`"
text-anchor="middle"
dominant-baseline="middle"
class="segment-text"
>
{{ option.text.length > 20 ? `${option.text.slice(0, 20)}...` : option.text }}
</text>
</g>
</svg>
<!-- Center circle with result display -->
<div
class="wheel-center"
:style="{ backgroundColor: result?.bgColor }"
>
<div v-if="result" class="center-result">
<div
class="result-text"
:style="{
color: result?.color || '#ffffff',
}"
>
{{ result.text }}
</div>
</div>
<div v-else class="center-placeholder">
<div class="placeholder-text">
{{ isSpinning ? 'Spinning...' : 'Spin to Win!' }}
</div>
</div>
</div>
<div class="wheel-pointer" />
</div>
<div class="spin-controls">
<c-button
:disabled="isSpinning || wheelOptions.length === 0"
size="large"
@click="spinWheel"
>
{{ isSpinning ? 'Spinning...' : 'Spin the Wheel!' }}
</c-button>
</div>
<div flex justify-center>
<c-button @click="restart()">
Spin!
</c-button>
</div>
</div>
</template>
<style scoped>
.fortune-wheel-container {
max-width: 1200px;
margin: 0 auto;
padding: 20px;
}
.wheel-controls {
margin-bottom: 20px;
}
.add-option-section h3,
.options-section h3 {
margin: 16px 0 8px 0;
font-size: 18px;
font-weight: 600;
}
.add-option-form {
display: flex;
gap: 10px;
align-items: end;
margin-bottom: 20px;
}
.add-option-form .c-input-text {
flex: 1;
}
.options-list {
max-height: 120px;
overflow-y: auto;
border: 1px solid var(--border-color);
border-radius: 6px;
display: grid;
grid-template-columns: repeat(auto-fit, 280px);
gap: 0;
}
.empty-state {
text-align: center;
color: var(--text-color-secondary);
padding: 40px 20px;
font-style: italic;
}
.option-item {
display: flex;
align-items: center;
padding: 6px 12px;
border-bottom: 1px solid var(--border-color);
border-left: 4px solid;
border-right: 1px solid var(--border-color);
transition: background-color 0.2s;
}
.option-item:hover {
background-color: var(--hover-color);
}
.option-item:last-child {
border-bottom: none;
}
.option-content {
display: flex;
justify-content: space-between;
align-items: center;
width: 100%;
}
.option-text {
flex: 1;
font-weight: 500;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
max-width: 180px;
padding-left: 2px;
}
.option-actions {
display: flex;
gap: 2px;
}
.option-actions .c-button {
padding: 2px 6px;
font-size: 12px;
}
.wheel-section {
text-align: center;
}
.wheel-container {
position: relative;
display: inline-block;
margin: 20px;
/* Force pixel-aligned positioning */
transform: translateZ(0);
}
.wheel {
width: v-bind('`${WHEEL_CONFIG.size}px`');
height: v-bind('`${WHEEL_CONFIG.size}px`');
border-radius: 50%;
border: 4px solid #333;
transition-timing-function: cubic-bezier(0.25, 0.1, 0.25, 1);
/* Additional sharpness improvements */
transform-style: flat;
backface-visibility: hidden;
/* Ensure the SVG is positioned on pixel boundaries */
transform: translateZ(0);
}
.wheel.spinning {
transition-property: transform;
}
.segment-text {
font-weight: 700;
font-size: 14px;
pointer-events: none;
text-rendering: geometricPrecision;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
/* Force crisp edges */
shape-rendering: crispEdges;
}
.wheel-center {
position: absolute;
top: 49.5%;
left: 50%;
width: v-bind('`${WHEEL_CONFIG.centerSize}px`');
height: v-bind('`${WHEEL_CONFIG.centerSize}px`');
border-radius: 50%;
background: #414141;
border: 4px solid #333;
transform: translate(-50%, -50%);
z-index: 10;
display: flex;
align-items: center;
justify-content: center;
box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}
.wheel-pointer {
position: absolute;
top: -10px;
left: 50%;
width: 0;
height: 0;
border-left: 15px solid transparent;
border-right: 15px solid transparent;
border-top: 30px solid #333;
transform: translateX(-50%);
z-index: 5;
}
.spin-controls {
margin: 20px 0;
}
.center-result {
text-align: center;
padding: 8px;
}
.result-label {
font-size: 12px;
font-weight: 600;
margin-bottom: 4px;
}
.result-text {
font-size: 14px;
font-weight: bold;
line-height: 1.2;
word-wrap: break-word;
max-width: 100px;
}
.center-placeholder {
text-align: center;
padding: 8px;
}
.placeholder-text {
font-size: 14px;
font-weight: 600;
color: #666;
line-height: 1.2;
}
.clear-all-button {
background-color: #b31a29 !important;
color: white !important;
border-color: #b31a29 !important;
}
.clear-all-button:hover {
background-color: #c82333 !important;
border-color: #bd2130 !important;
}
@media (max-width: 768px) {
.add-option-form {
flex-direction: column;
}
.wheel {
width: v-bind('`${WHEEL_CONFIG.mobileSize}px`');
height: v-bind('`${WHEEL_CONFIG.mobileSize}px`');
}
.segment-text {
font-size: 12px;
}
}
</style>
+2 -3
View File
@@ -1,11 +1,10 @@
import { ArrowsShuffle } from '@vicons/tabler';
import { defineTool } from '../tool';
import { translate } from '@/plugins/i18n.plugin';
export const tool = defineTool({
name: translate('tools.fortune-wheel.title'),
name: 'Fortune wheel',
path: '/fortune-wheel',
description: translate('tools.fortune-wheel.description'),
description: '',
keywords: ['fortune', 'wheel'],
component: () => import('./fortune-wheel.vue'),
icon: ArrowsShuffle,
+2 -3
View File
@@ -1,11 +1,10 @@
import { DeviceFloppy } from '@vicons/tabler';
import { defineTool } from '../tool';
import { translate } from '@/plugins/i18n.plugin';
export const tool = defineTool({
name: translate('tools.fstab-generator.title'),
name: 'FStab Generator',
path: '/fstab-generator',
description: translate('tools.fstab-generator.description'),
description: 'Generate /etc/fstab line',
keywords: ['fstab', 'etc'],
component: () => import('./fstab-generator.vue'),
icon: DeviceFloppy,
+2 -3
View File
@@ -1,11 +1,10 @@
import { WorldLatitude } from '@vicons/tabler';
import { defineTool } from '../tool';
import { translate } from '@/plugins/i18n.plugin';
export const tool = defineTool({
name: translate('tools.geo-distance-calculator.title'),
name: 'Geo distance calculator',
path: '/geo-distance-calculator',
description: translate('tools.geo-distance-calculator.description'),
description: 'Compute distance between two geo location (and display current user location information)',
keywords: ['geo', 'distance', 'calculator'],
component: () => import('./geo-distance-calculator.vue'),
icon: WorldLatitude,
+2 -3
View File
@@ -1,11 +1,10 @@
import { GitCommit } from '@vicons/tabler';
import { defineTool } from '../tool';
import { translate } from '@/plugins/i18n.plugin';
export const tool = defineTool({
name: translate('tools.git-semantic-commit-memo.title'),
name: 'Git Semantic Commit Cheatsheet',
path: '/git-semantic-commit-memo',
description: translate('tools.git-semantic-commit-memo.description'),
description: 'Cheatsheet for committing using semantic prefixes',
keywords: ['git', 'semantic', 'commit', 'cheatsheet'],
component: () => import('./git-semantic-commit-memo.vue'),
icon: GitCommit,
+2 -3
View File
@@ -1,11 +1,10 @@
import { CurrencyDollar } from '@vicons/tabler';
import { defineTool } from '../tool';
import { translate } from '@/plugins/i18n.plugin';
export const tool = defineTool({
name: translate('tools.gpt-token-estimator.title'),
name: 'GPT Token Estimator',
path: '/gpt-token-estimator',
description: translate('tools.gpt-token-estimator.description'),
description: 'OpenAI GPT Token Estimator',
keywords: ['gpt', 'token', 'estimator'],
component: () => import('./gpt-token-estimator.vue'),
icon: CurrencyDollar,
+2 -3
View File
@@ -1,11 +1,10 @@
import { FileZip } from '@vicons/tabler';
import { defineTool } from '../tool';
import { translate } from '@/plugins/i18n.plugin';
export const tool = defineTool({
name: translate('tools.gzip-converter.title'),
name: 'GZip/Deflate converter',
path: '/gzip-converter',
description: translate('tools.gzip-converter.description'),
description: 'Convert text from/to gzip/deflate',
keywords: ['gzip', 'deflate', 'converter'],
component: () => import('./gzip-converter.vue'),
icon: FileZip,
Loaded 100 of 262 files, more files were not shown because too many files have changed in this diff. Show more