mirror of
https://github.com/sharevb/it-tools.git
synced 2026-11-25 23:24:09 +03:00
i18n: more text extraction
This commit is contained in:
1 parent
ec434cf673
commit
dd6b701a29
66 files changed
+1166
-514
No files matched your search
+567
-1
@@ -3,6 +3,9 @@
|
||||
sorry: Sorry, this page does not seem to exist
|
||||
maybe: Maybe the cache is doing tricky things, try force-refreshing?
|
||||
backHome: Back home
|
||||
page:
|
||||
text:
|
||||
page-not-found-it-tools: Page not found - IT Tools
|
||||
about:
|
||||
alltools-title: All {toolsCount} Tools
|
||||
tools:
|
||||
@@ -49,6 +52,12 @@ about:
|
||||
import-button: Import
|
||||
favorites-imported-successfully: Favorites imported successfully!
|
||||
error-importing-favorites-e: 'Error importing favorites: {0}'
|
||||
text:
|
||||
collection-of-handy-online-tools-for-developers-with-great-ux-it-tools-is-a-free-and-open-source-collection-of-handy-online-tools-for-developers-and-people-working-in-it: >-
|
||||
Collection of handy online tools for developers, with great UX. IT Tools
|
||||
is a free and open-source collection of handy online tools for developers
|
||||
& people working in IT.
|
||||
about-it-tools: About - IT Tools
|
||||
favoriteButton:
|
||||
remove: Remove from favorites
|
||||
add: Add to favorites
|
||||
@@ -104,6 +113,13 @@ home:
|
||||
lightMode: Light mode
|
||||
mode: Toggle dark/light mode
|
||||
aboutLabel: About
|
||||
page:
|
||||
text:
|
||||
collection-of-handy-online-tools-for-developers-with-great-ux-it-tools-is-a-free-and-open-source-collection-of-handy-online-tools-for-developers-and-people-working-in-it: >-
|
||||
Collection of handy online tools for developers, with great UX. IT Tools
|
||||
is a free and open-source collection of handy online tools for
|
||||
developers & people working in IT.
|
||||
it-tools-handy-online-tools-for-developers: IT Tools - Handy online tools for developers
|
||||
tools:
|
||||
chronometer:
|
||||
title: Chronometer
|
||||
@@ -741,6 +757,8 @@ tools:
|
||||
tag-refresh-key-pair: Refresh key-pair
|
||||
tag-public-key: Public key
|
||||
tag-private-key: Private key
|
||||
text:
|
||||
bits-should-be-256-less-than-bits-less-than-16384-and-be-a-multiple-of-8: Bits should be 256 <= bits <= 16384 and be a multiple of 8
|
||||
html-wysiwyg-editor:
|
||||
title: HTML WYSIWYG editor
|
||||
description: >-
|
||||
@@ -1983,6 +2001,7 @@ tools:
|
||||
label-file-name: 'File name:'
|
||||
label-extension: 'Extension:'
|
||||
label-mime-type: 'MIME Type:'
|
||||
an-error-occured-processing: An error occured processing
|
||||
folder-structure-diagram:
|
||||
title: Folder Structure Diagram
|
||||
description: tree-like utility for generating ASCII folder structure diagrams
|
||||
@@ -2095,6 +2114,7 @@ tools:
|
||||
label-png: PNG
|
||||
label-output-format: Output format
|
||||
title-drag-and-drop-a-heic-file-here-or-click-to-select-a-file: Drag and drop a HEIC file here, or click to select a file
|
||||
an-error-occured-processing-heic-heif-is-invalid: 'An error occured processing: HEIC/HEIF is invalid.'
|
||||
hex-file-converter:
|
||||
title: HEX File Converter
|
||||
description: Convert between file and hexadecimal representation
|
||||
@@ -2161,6 +2181,9 @@ tools:
|
||||
description: Convert from PNG/JPEG to/from ICO
|
||||
texts:
|
||||
title-drag-and-drop-an-ico-or-png-jpeg-file-here-or-click-to-select-a-file: Drag and drop an ICO or PNG/JPEG file here, or click to select a file
|
||||
an-error-occured-processing: An error occured processing
|
||||
invalid-ico-file: Invalid ICO file!
|
||||
invalid-png-file: Invalid PNG file!
|
||||
illuminance-converter:
|
||||
title: Illuminance Converter
|
||||
description: Illuminance units converter (Lux, Foot Candles, Nox, Phot, Flame)
|
||||
@@ -2177,6 +2200,8 @@ tools:
|
||||
tag-then-drag-and-drop-your-images-below-and-they-will-be-converted-and-downloaded-immediately: >-
|
||||
Then, drag and drop your images below and they will be converted and
|
||||
downloaded immediately:
|
||||
invalid-image-file: Invalid Image file!
|
||||
an-error-occured-processing: An error occured processing
|
||||
image-exif-reader:
|
||||
title: Image EXIF/Metadata/GPS/JPEG Quality reader
|
||||
description: >-
|
||||
@@ -2381,6 +2406,7 @@ tools:
|
||||
tag-iso2-iso3: Iso2/Iso3
|
||||
tag-name-and-info: Name and Info
|
||||
tag-gt-see-on-openstreetmap: '> See on OpenStreetMap'
|
||||
loading-more-results: Loading more results...
|
||||
javascript-prettifier:
|
||||
title: Javascript Prettifier
|
||||
description: JS/Javascript Prettifier
|
||||
@@ -5822,6 +5848,7 @@ tools:
|
||||
layout:
|
||||
text:
|
||||
made-with-npmpackages: Made with {0}
|
||||
runs-entirely-in-your-browser-no-external-requests: Runs entirely in your browser. No external requests.
|
||||
json-viewer:
|
||||
texts:
|
||||
label-sort-keys: 'Sort keys :'
|
||||
@@ -6310,6 +6337,9 @@ tools:
|
||||
label-django-secret-key: 'Django secret key:'
|
||||
tag-copy: Copy
|
||||
tag-regenerate: Regenerate
|
||||
service:
|
||||
texts:
|
||||
generating-range-is-too-large: Generating range is too large
|
||||
dnsbl-checker:
|
||||
title: DNSBL Checker
|
||||
description: Check if a given IP is in any of known DNS Blacklist servers (spam block)
|
||||
@@ -6357,6 +6387,7 @@ tools:
|
||||
title-html-head-tags: 📄 HTML Head Tags
|
||||
tag-upload-png-image: Upload PNG Image
|
||||
tag-download-zip: 📦 Download ZIP
|
||||
invalid-png-file: Invalid PNG file!
|
||||
font-compare:
|
||||
title: Font Compare
|
||||
description: Compare to fonts on a given text
|
||||
@@ -6442,6 +6473,12 @@ tools:
|
||||
label-fallback: 'Fallback:'
|
||||
placeholder-fallback-font: Fallback Font
|
||||
tag-defineprops: defineProps
|
||||
text:
|
||||
by-font-name: By Font Name
|
||||
by-font-url: By Font URL
|
||||
by-font-file: By Font File
|
||||
by-inline-css: By Inline CSS
|
||||
by-css-url: By CSS URL
|
||||
gpt-token-encoder:
|
||||
title: GPT Token Encoder/Decoder
|
||||
description: Encode text to GPT tokens and decode GPT tokens back to text
|
||||
@@ -6478,6 +6515,10 @@ tools:
|
||||
tag-original-image: Original Image
|
||||
tag-inverted-image: Inverted Image
|
||||
tag-clear-upload-new: Clear & Upload New
|
||||
service:
|
||||
texts:
|
||||
file-must-be-an-image: File must be an image
|
||||
failed-to-process-image-err: 'Failed to process image:'
|
||||
image-comparer:
|
||||
title: Image Comparer
|
||||
description: A tool to visualy compare images
|
||||
@@ -6492,6 +6533,9 @@ tools:
|
||||
tag-compare: Compare
|
||||
tag-upload-left: Upload Left
|
||||
tag-upload-right: Upload Right
|
||||
text:
|
||||
compare-by-url: Compare by URL
|
||||
compare-by-upload: Compare by Upload
|
||||
logrotate-generator:
|
||||
title: Apache LogRotate Generator
|
||||
description: Generate Apache .log rotation configuration
|
||||
@@ -6621,6 +6665,15 @@ tools:
|
||||
label-decimal: 'Decimal:'
|
||||
label-octal: 'Octal:'
|
||||
label-hexadecimal: 'Hexadecimal:'
|
||||
service:
|
||||
texts:
|
||||
invalid-hex-input-only-0-9-and-a-f-allowed: Invalid hex input. Only 0-9 and A-F allowed.
|
||||
invalid-1: Invalid
|
||||
invalid-0: Invalid
|
||||
invalid: Invalid
|
||||
unsupported-middle-endian-format: Unsupported middle-endian format.
|
||||
failed-to-parse-bytes: Failed to parse bytes.
|
||||
input-must-be-bytecount-2-hex-characters-for-bitlength-bit: Input must be {0} hex characters for {1}-bit.
|
||||
mttdl-calculator:
|
||||
title: RAID Reliability Calculator
|
||||
description: Computes storage system reliability using well-known MTTDL methodology
|
||||
@@ -6757,6 +6810,11 @@ tools:
|
||||
tag-convert: Convert
|
||||
tag-axial: Axial
|
||||
tag-radial: Radial
|
||||
text:
|
||||
bands-notation: Bands → Notation
|
||||
notation-bands: Notation → Bands
|
||||
number-notation: Number → Notation
|
||||
notation-number: Notation → Number
|
||||
sed-command-generator:
|
||||
title: Sed Command generator
|
||||
description: Generate unix sed commands
|
||||
@@ -7144,6 +7202,9 @@ tools:
|
||||
title-mw-to-dbm: mW to dBm
|
||||
label-mw-value: 'mW value:'
|
||||
label-corresponding-dbm-value: 'Corresponding dBm value:'
|
||||
service:
|
||||
texts:
|
||||
power-in-milliwatts-must-be-greater-than-0: Power in milliwatts must be greater than 0
|
||||
diceware-generator:
|
||||
title: Diceware Password Generator
|
||||
description: Generate random password using Diceware method
|
||||
@@ -7380,6 +7441,9 @@ tools:
|
||||
label-signature: Signature
|
||||
label-arguments: Arguments
|
||||
title-structured-output-json: Structured Output JSON
|
||||
service:
|
||||
texts:
|
||||
transaction-data-must-start-with-0x: Transaction data must start with 0x
|
||||
file-splitter:
|
||||
title: File Splitter
|
||||
description: Split JSON, XML or text file either by group of nodes or by group of lines
|
||||
@@ -7395,6 +7459,9 @@ tools:
|
||||
tag-process-chunks: Process chunks
|
||||
tag-download-all: Download all
|
||||
tag-download: Download
|
||||
service:
|
||||
texts:
|
||||
unsupported-format-or-invalid-content: Unsupported format or invalid content
|
||||
gitignore-generator:
|
||||
title: GitIgnore Generator
|
||||
description: Generate .gitignore for a set of common templates
|
||||
@@ -7505,6 +7572,8 @@ tools:
|
||||
title-drag-and-drop-a-pdf-file-here-or-click-to-select-a-file: Drag and drop a PDF file here, or click to select a file
|
||||
title-logs: Logs
|
||||
label-ghostscript: Ghostscript
|
||||
process-run-failed: Process run failed
|
||||
an-error-occured-processing: An error occured processing
|
||||
serial-console:
|
||||
title: Serial Port Console
|
||||
description: Connect, read and send message to Serial Port
|
||||
@@ -7767,6 +7836,13 @@ tools:
|
||||
tag-convert-batch: Convert Batch
|
||||
tag-longitude-east-is-positive-west-is-negative: 'Longitude: East is positive, West is negative.'
|
||||
tag-latitude-north-is-positive-south-is-negative: 'Latitude: North is positive, South is negative.'
|
||||
text:
|
||||
coordinate-system: Coordinate System
|
||||
decimal-format-lng-lat: Decimal Format (lng, lat)
|
||||
dms-format-lng-lat: DMS Format (lng, lat)
|
||||
download-results-csv: Download Results CSV
|
||||
batch-lat-lng-converter: Batch Lat/Lng Converter
|
||||
single-lat-lng-converter: Single Lat/Lng Converter
|
||||
si-prefixes-converter:
|
||||
title: SI Prefixes Converter
|
||||
description: Convert between Metric Prefixes
|
||||
@@ -7920,7 +7996,6 @@ tools:
|
||||
tag-back: Back (←)
|
||||
tag-next: Next (→)
|
||||
tag-reset: Reset
|
||||
tag-: ↓
|
||||
tag-or: '- OR -'
|
||||
tag-control-playback-and-navigation-without-touching-the-mouse: Control playback and navigation without touching the mouse.
|
||||
tag-shortcut: Shortcut
|
||||
@@ -7939,6 +8014,16 @@ tools:
|
||||
tag-jump-to-start: Jump to start
|
||||
tag-end: End
|
||||
tag-jump-to-end: Jump to end
|
||||
text:
|
||||
please-provide-some-text-first: Please provide some text first.
|
||||
unsupported-file-type: Unsupported file type.
|
||||
display: Display
|
||||
text: Text
|
||||
settings: Settings
|
||||
keyboard-shortcuts: Keyboard Shortcuts
|
||||
ready: Ready
|
||||
words: words
|
||||
wpm: WPM
|
||||
speed-converter:
|
||||
title: Speed Converter
|
||||
description: Convert values between speed units
|
||||
@@ -7987,6 +8072,21 @@ tools:
|
||||
tag-apply-configuration: Apply Configuration
|
||||
tag-clear-logs: Clear logs
|
||||
tag-send: Send
|
||||
already-connected: ⚠️ Already connected
|
||||
connected-to-websocket-bridge: ✅ Connected to WebSocket bridge
|
||||
disconnected: 🔌 Disconnected
|
||||
no-active-connection: ⚠️ No active connection
|
||||
sent-text: '➡️ Sent text:'
|
||||
configured: ⚙️ Configured
|
||||
sent-hex: '➡️ Sent hex:'
|
||||
disconnecting: 🔻 Disconnecting...
|
||||
error: '❌ Error:'
|
||||
end: '🛑 End:'
|
||||
text: '📩 Text:'
|
||||
binary: '📩 Binary:'
|
||||
text:
|
||||
connected: Connected
|
||||
disconnected: Disconnected
|
||||
volume-flow-rate-converter:
|
||||
title: Volume Flow Rate Converter
|
||||
description: Convert values between volume flow rate units
|
||||
@@ -8010,3 +8110,469 @@ tools:
|
||||
embolismic-complete-385-days: Embolismic complete (385 days)
|
||||
normal-year: Normal year
|
||||
leap-year: Leap year
|
||||
title: Calendar Converter
|
||||
description: >-
|
||||
Convert dates and times between Gregorian, Julian, Hebrew, Islamic,
|
||||
Persian, Mayan, Indian, French Republican, ISO‑8601, Unix time, and Excel
|
||||
serial formats
|
||||
externalAccess: null
|
||||
texts:
|
||||
label-january: January
|
||||
label-february: February
|
||||
label-march: March
|
||||
label-april: April
|
||||
label-may: May
|
||||
label-june: June
|
||||
label-july: July
|
||||
label-august: August
|
||||
label-september: September
|
||||
label-october: October
|
||||
label-november: November
|
||||
label-december: December
|
||||
label-nisan-נִיסָן: Nisan (נִיסָן)
|
||||
label-iyyar-אִיָּר: Iyyar (אִיָּר)
|
||||
label-sivan-סִיוָן: Sivan (סִיוָן)
|
||||
label-tammuz-תַּמּוּז: Tammuz (תַּמּוּז)
|
||||
label-av-אָב: Av (אָב)
|
||||
label-elul-אֱלוּל: Elul (אֱלוּל)
|
||||
label-tishri-תִּשְׁרֵי: Tishri (תִּשְׁרֵי)
|
||||
label-heshvan-חֶשְׁוָן: Heshvan (חֶשְׁוָן)
|
||||
label-kislev-כִּסְלֵו: Kislev (כִּסְלֵו)
|
||||
label-teveth-טֵבֵת: Teveth (טֵבֵת)
|
||||
label-shevat-שְׁבָט: Shevat (שְׁבָט)
|
||||
label-adar-adar-i-אֲדָר: Adar/Adar I (אֲדָר)
|
||||
label-veadar-adar-ii-אֲדָר-שֵׁנִי: Veadar/Adar II (אֲדָר שֵׁנִי)
|
||||
label-muharram-مُحَرَّم: Muharram (مُحَرَّم)
|
||||
label-safar-صَفَر: Safar (صَفَر)
|
||||
label-rabiʿ-al-awwal-رَبيع-الأوّل: Rabiʿ al‑Awwal (رَبيع الأوّل)
|
||||
label-rabiʿ-ath-thani-رَبيع-الثاني: Rabiʿ ath‑Thani (رَبيع الثاني)
|
||||
label-jumada-al-ula-جُمادى-الأولى: Jumada al‑Ula (جُمادى الأولى)
|
||||
label-jumada-ath-thania-جُمادى-الآخرة: Jumada ath‑Thania (جُمادى الآخرة)
|
||||
label-rajab-رَجَب: Rajab (رَجَب)
|
||||
label-shaʿban-شَعْبان: Shaʿban (شَعْبان)
|
||||
label-ramadan-رَمَضان: Ramadan (رَمَضان)
|
||||
label-shawwal-شَوّال: Shawwal (شَوّال)
|
||||
label-dhu-al-qaʿda-ذو-القَعْدة: Dhu al‑Qaʿda (ذو القَعْدة)
|
||||
label-dhu-al-hijja-ذو-الحِجّة: Dhu al‑Hijja (ذو الحِجّة)
|
||||
label-farvardin-فروردین: Farvardin (فروردین)
|
||||
label-ordibehesht-اردیبهشت: Ordibehesht (اردیبهشت)
|
||||
label-khordad-خرداد: Khordad (خرداد)
|
||||
label-tir-تیر: Tir (تیر)
|
||||
label-mordad-مرداد: Mordad (مرداد)
|
||||
label-shahrivar-شهریور: Shahrivar (شهریور)
|
||||
label-mehr-مهر: Mehr (مهر)
|
||||
label-aban-آبان: Aban (آبان)
|
||||
label-azar-آذر: Azar (آذر)
|
||||
label-dey-دی: Dey (دی)
|
||||
label-bahman-بهمن: Bahman (بهمن)
|
||||
label-esfand-اسفند: Esfand (اسفند)
|
||||
label-caitra-चैत्र: Caitra (चैत्र)
|
||||
label-vaisakha-वैशाख: Vaisakha (वैशाख)
|
||||
label-jyaistha-ज्येष्ठ: Jyaistha (ज्येष्ठ)
|
||||
label-asadha-आषाढ़: Asadha (आषाढ़)
|
||||
label-sravana-श्रावण: Sravana (श्रावण)
|
||||
label-bhadra-भाद्रपद: Bhadra (भाद्रपद)
|
||||
label-asvina-आश्विन: Asvina (आश्विन)
|
||||
label-kartika-कार्तिक: Kartika (कार्तिक)
|
||||
label-agrahayana-अग्रहायण: Agrahayana (अग्रहायण)
|
||||
label-pausa-पौष: Pausa (पौष)
|
||||
label-magha-माघ: Magha (माघ)
|
||||
label-phalguna-फाल्गुन: Phalguna (फाल्गुन)
|
||||
label-vendémiaire: Vendémiaire
|
||||
label-brumaire: Brumaire
|
||||
label-frimaire: Frimaire
|
||||
label-nivôse: Nivôse
|
||||
label-pluviôse: Pluviôse
|
||||
label-ventôse: Ventôse
|
||||
label-germinal: Germinal
|
||||
label-floréal: Floréal
|
||||
label-prairial: Prairial
|
||||
label-messidor: Messidor
|
||||
label-thermidor: Thermidor
|
||||
label-fructidor: Fructidor
|
||||
label-sans-culottides: Sans‑culottides
|
||||
label-i: I
|
||||
label-ii: II
|
||||
label-iii: III
|
||||
label-primidi-1: Primidi (1)
|
||||
label-duodi-2: Duodi (2)
|
||||
label-tridi-3: Tridi (3)
|
||||
label-quartidi-4: Quartidi (4)
|
||||
label-quintidi-5: Quintidi (5)
|
||||
label-sextidi-6: Sextidi (6)
|
||||
label-septidi-7: Septidi (7)
|
||||
label-octidi-8: Octidi (8)
|
||||
label-nonidi-9: Nonidi (9)
|
||||
label-décadi-10: Décadi (10)
|
||||
label-vertu-1: Vertu (1)
|
||||
label-génie-2: Génie (2)
|
||||
label-travail-3: Travail (3)
|
||||
label-opinion-4: Opinion (4)
|
||||
label-récompenses-5: Récompenses (5)
|
||||
label-révolution-6: Révolution (6)
|
||||
tab-gregorian: Gregorian
|
||||
label-date: Date
|
||||
label-leap: 'Leap:'
|
||||
label-time: 'Time:'
|
||||
label-weekday: 'Weekday:'
|
||||
tab-julian-day: Julian Day
|
||||
label-julian-day: 'Julian Day:'
|
||||
tab-modified-julian: Modified Julian
|
||||
label-modified-julian-day: 'Modified Julian Day:'
|
||||
tab-julian-calendar: Julian Calendar
|
||||
tab-gregorian-serial: Gregorian Serial
|
||||
label-gregorian-serial-day: 'Gregorian Serial Day:'
|
||||
tab-hebrew: Hebrew
|
||||
tab-islamic: Islamic
|
||||
tab-persian: Persian
|
||||
tab-persian-algorithmic: Persian Algorithmic
|
||||
tab-mayan: Mayan
|
||||
label-long-count: 'Long Count:'
|
||||
label-haab: Haab
|
||||
label-tzolkin: Tzolkin
|
||||
tab-indian-civil: Indian Civil
|
||||
tab-french-republican: French Republican
|
||||
label-day: 'Day:'
|
||||
label-month: 'Month:'
|
||||
label-décade: 'Décade:'
|
||||
label-year: 'Year:'
|
||||
tab-iso-8601: ISO‑8601
|
||||
label-day-of-week: 'Day of Week:'
|
||||
label-week: 'Week:'
|
||||
label-day-of-year: 'Day of Year:'
|
||||
tab-unix-time: Unix time()
|
||||
label-unix-time: 'Unix time():'
|
||||
tab-excel-1900-windows: Excel 1900 (Windows)
|
||||
label-excel-serial-day-1900: 'Excel Serial Day (1900):'
|
||||
tab-excel-1904-macintosh: Excel 1904 (Macintosh)
|
||||
label-excel-serial-day-1904: 'Excel Serial Day (1904):'
|
||||
tag-this-is-a-port-of-wonderful: This is a port of wonderful
|
||||
tag-fourmilab-ch-calendar-converter: Fourmilab.ch Calendar converter
|
||||
tag-by-john-walker: by John Walker
|
||||
tag-xa0-xa0: ' . '
|
||||
tag-update-other-calendars: Update other calendars
|
||||
tag-today: Today
|
||||
bech32:
|
||||
title: Bech32 Encoder/Decoder
|
||||
description: Encode/Decode/Validate betch32(m)
|
||||
externalAccess: null
|
||||
texts:
|
||||
label-bech32: Bech32
|
||||
label-bech32m: Bech32m
|
||||
tab-decode: Decode
|
||||
label-bech32-m-string: 'Bech32(m) string:'
|
||||
placeholder-bech32-bech32m-string: Bech32 / Bech32m string
|
||||
label-variant: 'Variant:'
|
||||
label-hrp: 'HRP:'
|
||||
placeholder-hrp: HRP
|
||||
label-payload: 'Payload:'
|
||||
placeholder-hex-payload: Hex payload
|
||||
placeholder-variant: Variant
|
||||
tab-encode: Encode
|
||||
label-encoded-bech32-string: 'Encoded bech32 string:'
|
||||
placeholder-bech32-string: bech32 string
|
||||
tab-batch: Batch
|
||||
label-bech32-strings-one-per-line: 'Bech32 strings (one per line):'
|
||||
placeholder-one-bech32-string-per-line: One Bech32 string per line
|
||||
title-results: Results
|
||||
tag-auto-detect: Auto-detect
|
||||
tag-manual: Manual
|
||||
tag-checksum-only: Checksum only
|
||||
tag-full-decode: Full decode
|
||||
tag-checksum-valid: Checksum valid
|
||||
tag-checksum-invalid: Checksum invalid
|
||||
tag-encode: Encode
|
||||
tag-convert: Convert
|
||||
tag-export-csv: Export CSV
|
||||
invalid-hex-payload: Invalid hex payload
|
||||
input: Input
|
||||
variant: Variant
|
||||
status: Status
|
||||
hex: Hex
|
||||
hrp: HRP
|
||||
docker-pangolin-labels:
|
||||
title: Docker Pangolin Labels
|
||||
description: Convert Docker Compose Pangolin labels to blueprints and vice versa
|
||||
externalAccess: null
|
||||
texts:
|
||||
tab-compose-blueprint: Compose → Blueprint
|
||||
label-docker-compose-yaml: 'Docker Compose YAML:'
|
||||
placeholder-paste-full-docker-compose-yml-here: Paste full docker-compose.yml here…
|
||||
label-generated-blueprint: 'Generated Blueprint:'
|
||||
placeholder-blueprint-yaml-will-appear-here: Blueprint YAML will appear here…
|
||||
tab-blueprint-labels: Blueprint → Labels
|
||||
label-blueprint-yaml: 'Blueprint YAML:'
|
||||
placeholder-paste-pangolin-blueprint-yaml-here: Paste Pangolin blueprint YAML here…
|
||||
label-generated-docker-labels: 'Generated Docker labels:'
|
||||
placeholder-docker-labels-will-appear-here: Docker labels will appear here...
|
||||
tag-extract-pangolin-blueprint: Extract Pangolin Blueprint
|
||||
tag-array-key-value: Array (- key=value)
|
||||
tag-object-key-value: 'Object (key: value)'
|
||||
tag-convert-to-docker-labels: Convert to Docker Labels
|
||||
invalid-blueprint-yaml: Invalid blueprint YAML
|
||||
fitness-computer:
|
||||
title: Fitness Computer
|
||||
description: >-
|
||||
Compute BMR (Basal Metabolic Rate), TDEE / Calories (Total Daily Energy
|
||||
Expenditure), BMI (Body Mass Index), Ideal Weight (Ideal Body Weight),
|
||||
Body Fat (Body Fat Percentage), Max HR (Maximum Heart Rate): key metrics
|
||||
used to assess overall fitness and physiological health.
|
||||
externalAccess: null
|
||||
texts:
|
||||
label-bmr: BMR
|
||||
label-tdee-calories: TDEE/Calories
|
||||
label-bmi: 'BMI:'
|
||||
label-ideal-weight: 'Ideal Weight:'
|
||||
label-body-fat-us-navy: Body Fat (US Navy)
|
||||
label-body-fat-bmi: Body Fat (BMI)
|
||||
label-max-heart-rate: Max Heart Rate
|
||||
label-sedentary-little-or-no-exercise: 'Sedentary: little or no exercise'
|
||||
label-light-exercise-1-3-times-week: 'Light: exercise 1-3 times/week'
|
||||
label-moderate-exercise-4-5-times-week: 'Moderate: exercise 4-5 times/week'
|
||||
label-active-daily-exercise-or-intense-exercise-3-4-times-week: 'Active: daily exercise or intense exercise 3-4 times/week'
|
||||
label-very-active-intense-exercise-6-7-times-week: 'Very Active: intense exercise 6-7 times/week'
|
||||
label-extra-active-very-intense-exercise-daily-or-physical-job: 'Extra Active: very intense exercise daily, or physical job'
|
||||
label-units: 'Units:'
|
||||
label-formula: 'Formula:'
|
||||
label-gender: 'Gender:'
|
||||
label-age: 'Age:'
|
||||
title-body-measurements: Body Measurements
|
||||
label-activity-level: 'Activity Level:'
|
||||
title-results: Results
|
||||
label-bmr-kcal-day: 'BMR (kcal/day):'
|
||||
label-tdee-calories-kcal-day: 'TDEE/Calories (kcal/day):'
|
||||
label-bmi-category: 'BMI Category:'
|
||||
label-healthy-range-min: 'Healthy Range (min):'
|
||||
label-healthy-range-max: 'Healthy Range (max):'
|
||||
label-devine-1974: '— (Devine 1974):'
|
||||
label-hamwi-1964: '— (Hamwi 1964):'
|
||||
label-miller-1983: '— (Miller 1983):'
|
||||
label-robinson-1983: '— (Robinson 1983):'
|
||||
label-body-fat: 'Body Fat (%):'
|
||||
label-fat-mass: 'Fat Mass:'
|
||||
label-lean-mass: 'Lean Mass:'
|
||||
label-max-heart-rate-bpm: 'Max Heart Rate (bpm):'
|
||||
tag-metric-kg-cm: Metric (kg, cm)
|
||||
tag-us-lbs-inches: US (lbs, inches)
|
||||
tag-male: Male
|
||||
tag-female: Female
|
||||
food-energy-converter:
|
||||
title: Food Energy Converter
|
||||
description: Convert between food (joule, calories)
|
||||
externalAccess: null
|
||||
iso-639-searcher:
|
||||
title: ISO 639 Searcher
|
||||
description: Search in ISO 639-1/2T/2B/3 language codes
|
||||
externalAccess: null
|
||||
texts:
|
||||
placeholder-search-iso-639-language-code-by-iso-1-iso-2t-2b-iso-3-name: Search iso-639 language code by iso-1, iso-2T/2B, iso-3, name...
|
||||
label-max-results: 'Max results:'
|
||||
label-2b: '2B:'
|
||||
label-2t: '2T:'
|
||||
label-eng: 'ENG:'
|
||||
tag-no-results: No results
|
||||
tag-search-results: Search Results
|
||||
tag-iso-639-1: iso-639-1
|
||||
tag-iso-639-2t-2b: iso-639-2T/2B
|
||||
tag-iso-639-3: iso-639-3
|
||||
tag-english-and-local-name: English and local name
|
||||
loading-more-results: Loading more results...
|
||||
jasypt-string-encryption:
|
||||
title: Jasypt String Encryption
|
||||
description: >-
|
||||
Encrypt and decrypt strings using the Jasypt (Java Simplified Encryption)
|
||||
standard.
|
||||
externalAccess: null
|
||||
texts:
|
||||
label-mode: 'Mode:'
|
||||
label-password-secret-key: 'Password (Secret Key):'
|
||||
placeholder-enter-jasypt-password-salt-secret-key: Enter Jasypt password (salt / secret key)
|
||||
title-results: Results
|
||||
label-decoded: 'Decoded:'
|
||||
label-raw: 'Raw:'
|
||||
label-enc-form: 'ENC Form:'
|
||||
tag-encrypt: Encrypt
|
||||
tag-decrypt: Decrypt
|
||||
plain-text: 'Plain Text:'
|
||||
jasypt-encrypted-string: 'Jasypt Encrypted String:'
|
||||
text-to-encrypt-e-g-db-password: Text to encrypt (e.g. DB password)
|
||||
encrypted-value-e-g-enc-or-raw-jasypt-string: Encrypted value (e.g. ENC(...)) or raw Jasypt string
|
||||
k8s-rbac-generator:
|
||||
title: Kubernetes RBAC Generator
|
||||
description: Generate k8s RBAC policy YAML
|
||||
externalAccess: null
|
||||
texts:
|
||||
label-user: User
|
||||
label-group: Group
|
||||
label-serviceaccount: ServiceAccount
|
||||
label-role-name: 'Role Name:'
|
||||
label-role-type: Role Type
|
||||
label-namespace: Namespace
|
||||
title-rules: Rules
|
||||
label-resources: Resources
|
||||
placeholder-select-resources-supports: Select resources (supports *)
|
||||
label-resource-names-optional: Resource Names (optional)
|
||||
placeholder-specific-resources-names: Specific Resources Names
|
||||
label-verbs: Verbs
|
||||
placeholder-select-verbs-supports: Select verbs (supports *)
|
||||
title-subjects: Subjects
|
||||
label-kind: Kind
|
||||
label-name: Name
|
||||
title-output-yaml: Output YAML
|
||||
tab-role-yaml: Role YAML
|
||||
tab-rolebinding-yaml: RoleBinding YAML
|
||||
tag-clusterrole-global: ClusterRole (Global)
|
||||
tag-role-namespaced: Role (Namespaced)
|
||||
tag-add-rule: + Add Rule
|
||||
tag-remove-rule: Remove Rule
|
||||
tag-add-subject: + Add Subject
|
||||
tag-remove-subject: Remove Subject
|
||||
objgen-html:
|
||||
title: ObjGen to HTML
|
||||
description: Generate xomplex HTML from TOML like syntax
|
||||
externalAccess: null
|
||||
texts:
|
||||
input-label-objgen-html-definition: ObjGen HTML definition
|
||||
input-placeholder-put-your-objgen-html-definition-here: Put your ObjGen HTML definition here...
|
||||
output-label-generated-html: Generated HTML
|
||||
tag-documentation: Documentation
|
||||
objgen-json:
|
||||
title: ObjGen to JSON
|
||||
description: Generate xomplex JSON from TOML like syntax
|
||||
externalAccess: null
|
||||
texts:
|
||||
input-label-objgen-json-definition: ObjGen JSON definition
|
||||
input-placeholder-put-your-objgen-json-definition-here: Put your ObjGen JSON definition here...
|
||||
output-label-generated-json: Generated JSON
|
||||
tag-documentation: Documentation
|
||||
pgp-file-encryption:
|
||||
title: PGP File Encryption
|
||||
description: Encrypt and decrypt files using PGP
|
||||
externalAccess: null
|
||||
texts:
|
||||
title-1-select-a-file: 1. Select a file
|
||||
title-drag-and-drop-a-file-or-click-to-select: Drag and drop a file or click to select
|
||||
title-2-public-key-for-encryption: 2. Public key (for encryption)
|
||||
title-3-private-key-passphrase-for-decryption: 3. Private key + passphrase (for decryption)
|
||||
label-passphrase: 'Passphrase:'
|
||||
placeholder-passphrase: Passphrase
|
||||
tag-selected-file: 'Selected file:'
|
||||
tag-encrypt-stream: Encrypt (stream)
|
||||
tag-decrypt-stream: Decrypt (stream)
|
||||
tag-encrypting: Encrypting…
|
||||
tag-decrypting: Decrypting…
|
||||
tag-encrypted-file-ready: Encrypted file ready.
|
||||
tag-download-encrypted: Download encrypted
|
||||
tag-decrypted-file-ready: Decrypted file ready.
|
||||
tag-download-decrypted: Download decrypted
|
||||
remove-background:
|
||||
title: Remove Image Background
|
||||
description: Remove background from an image using AI
|
||||
externalAccess: >-
|
||||
Downloads Remove Background models from HuggingFace. Processing is done in
|
||||
your browser
|
||||
texts:
|
||||
label-rmbg-1-4-cpu-wasm: RMBG‑1.4 (CPU/WASM)
|
||||
label-modnet-webgpu: MODNet (WebGPU)
|
||||
label-transparent: Transparent
|
||||
label-solid-color: Solid Color
|
||||
label-pattern: 'Pattern:'
|
||||
label-blurred-original: Blurred Original
|
||||
label-adjust-contrast-brightness: Adjust Contrast/Brightness
|
||||
label-diagonal-stripes: Diagonal Stripes
|
||||
label-dots: Dots
|
||||
label-checkerboard: Checkerboard
|
||||
title-drag-and-drop-an-image-or-click-to-select: Drag and drop an image or click to select
|
||||
label-model: 'Model:'
|
||||
label-blur: 'Blur:'
|
||||
label-contrast: 'Contrast:'
|
||||
label-brightness: 'Brightness:'
|
||||
title-original: Original
|
||||
title-result: Result
|
||||
tag-apply-background: Apply Background
|
||||
tag-download-result: Download Result
|
||||
shell-formatter:
|
||||
title: Shell Commands Formatter
|
||||
description: Format shell commands as multiline shell commands split on arguments
|
||||
externalAccess: null
|
||||
texts:
|
||||
input-label-shell-commands-to-format: Shell commands to format
|
||||
input-placeholder-put-your-shell-commands-to-format-here: Put your shell commands to format here...
|
||||
output-label-formatted-shell-commands: Formatted shell commands
|
||||
shell-linearizer:
|
||||
title: Shell Commands Linearizer
|
||||
description: Linearize multiline shell commands
|
||||
externalAccess: null
|
||||
texts:
|
||||
input-label-shell-commands-to-linearize: Shell commands to linearize
|
||||
input-placeholder-put-your-shell-commands-to-linearize-here: Put your shell commands to linearize here...
|
||||
output-label-linearized-shell-commands: Linearized shell commands
|
||||
ufw-generator:
|
||||
title: UFW Command Generator
|
||||
description: Generate UFW command lines
|
||||
externalAccess: null
|
||||
texts:
|
||||
label-allow: Allow
|
||||
label-deny: Deny
|
||||
label-reject: Reject
|
||||
label-limit: Limit
|
||||
label-incoming: Incoming
|
||||
label-outgoing: Outgoing
|
||||
label-tcp: TCP
|
||||
label-udp: UDP
|
||||
label-any: Any
|
||||
label-action: 'Action:'
|
||||
label-direction: 'Direction:'
|
||||
label-protocol: 'Protocol:'
|
||||
label-port: 'Port:'
|
||||
placeholder-80: '80'
|
||||
label-port-to-range: 'Port to (range):'
|
||||
placeholder-443: '443'
|
||||
label-from-ip: 'From IP:'
|
||||
placeholder-192-168-1-10: 192.168.1.10
|
||||
label-to-ip: 'To IP:'
|
||||
placeholder-10-0-0-5: 10.0.0.5
|
||||
label-interface: 'Interface:'
|
||||
placeholder-eth0: eth0
|
||||
label-logging: 'Logging:'
|
||||
label-comment: 'Comment:'
|
||||
placeholder-optional-comment: Optional comment
|
||||
title-generated-command: Generated Command
|
||||
missing-port: Missing port
|
||||
visual-subnet-calculator:
|
||||
title: Visual Subnet Calculator
|
||||
description: >-
|
||||
A tool for quickly designing networks and collaborating on that design
|
||||
with others. It focuses on expediting the work of network administrators,
|
||||
not academic subnetting math.
|
||||
externalAccess: null
|
||||
zalgo:
|
||||
title: Zalgo Generator/Banner
|
||||
description: Generate Zalgo text and clean zalgo generated text
|
||||
externalAccess: null
|
||||
texts:
|
||||
text-zalgo-text-copied: Zalgo text copied!
|
||||
title-zalgo-text-generation: Zalgo Text Generation
|
||||
placeholder-put-your-string-here: Put your string here...
|
||||
label-text-to-decorate-with-zalgo: Text to decorate with Zalgo
|
||||
label-intensity: 'Intensity:'
|
||||
title-zalgo-text: Zalgo text
|
||||
title-zalgo-cleaner: Zalgo cleaner
|
||||
placeholder-put-zalgo-text-to-clean-here: Put zalgo text to clean here...
|
||||
label-zalgo-text-to-clean: Zalgo text to clean
|
||||
label-cleaned-text: Cleaned text
|
||||
placeholder-clean-zalgo-text-will-appear-here: Clean zalgo text will appear here...
|
||||
tag-generate: Generate
|
||||
tag-copy: Copy
|
||||
tag-clean: Clean
|
||||
gpt-tokens:
|
||||
service:
|
||||
texts:
|
||||
must-set-one-of-messages-or-function: Must set one of messages | function
|
||||
function-must-set-messages: Function must set messages
|
||||
collapsibleToolMenu:
|
||||
text:
|
||||
expanding: Expanding...
|
||||
collapsing: Collapsing...
|
||||
collapse-all-tools: Collapse All Tools
|
||||
expand-all-tools: Expand All Tools
|
||||
+2
-1
@@ -38,7 +38,8 @@
|
||||
"script:extract:desc": "node ./scripts/extract-tools-desc.mjs",
|
||||
"script:extract:strings": "node ./scripts/extract-tools-strings.mjs",
|
||||
"script:translate-missing": "node ./scripts/translate-missings.mjs -e ./locales/en.yml -t ./locales/*.yml",
|
||||
"vue-i18n-extract": "vue-i18n-extract report --vueFiles 'src/**/*.?(ts|vue)' --languageFiles 'locales/*.yml'"
|
||||
"vue-i18n-extract": "vue-i18n-extract report --vueFiles 'src/**/*.?(ts|vue)' --languageFiles 'locales/*.yml'",
|
||||
"precommit": "pnpm install --ignore-scripts && pnpm lint --fix && pnpm typecheck"
|
||||
},
|
||||
"dependencies": {
|
||||
"@chenfengyuan/vue-barcode": "^2.0.2",
|
||||
|
||||
@@ -142,10 +142,10 @@ const themeVars = useThemeVars();
|
||||
<div class="top-controls" mb-12px ml-12px>
|
||||
<c-button :disabled="isToggling" @click="toggleAllCategories">
|
||||
<span v-if="isToggling">
|
||||
{{ areAllCollapsed ? 'Expanding...' : 'Collapsing...' }}
|
||||
{{ areAllCollapsed ? $t('collapsibleToolMenu.text.expanding') : $t('collapsibleToolMenu.text.collapsing') }}
|
||||
</span>
|
||||
<span v-else>
|
||||
{{ areAllCollapsed ? 'Expand All Tools' : 'Collapse All Tools' }}
|
||||
{{ areAllCollapsed ? $t('collapsibleToolMenu.text.expand-all-tools') : $t('collapsibleToolMenu.text.collapse-all-tools') }}
|
||||
</span>
|
||||
</c-button>
|
||||
</div>
|
||||
|
||||
@@ -106,7 +106,7 @@ const linkTheme = useTheme();
|
||||
:options="{ linkify: true }"
|
||||
/>
|
||||
<template v-else>
|
||||
Runs entirely in your browser. No external requests.
|
||||
{{ $t('tools.tool.layout.text.runs-entirely-in-your-browser-no-external-requests') }}
|
||||
</template>
|
||||
</n-tooltip>
|
||||
</n-h1>
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
<script setup lang="ts">
|
||||
import { useHead } from '@vueuse/head';
|
||||
|
||||
useHead({ title: 'Page not found - IT Tools' });
|
||||
const { t } = useI18n();
|
||||
|
||||
useHead({ title: t('404.page.text.page-not-found-it-tools') });
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
||||
+2
-2
@@ -9,8 +9,8 @@ const { t } = useI18n();
|
||||
|
||||
const toolStore = useToolStore();
|
||||
|
||||
const desc = 'Collection of handy online tools for developers, with great UX. IT Tools is a free and open-source collection of handy online tools for developers & people working in IT.';
|
||||
const title = 'About - IT Tools';
|
||||
const desc = t('about.text.collection-of-handy-online-tools-for-developers-with-great-ux-it-tools-is-a-free-and-open-source-collection-of-handy-online-tools-for-developers-and-people-working-in-it');
|
||||
const title = t('about.text.about-it-tools');
|
||||
useHead({
|
||||
title,
|
||||
meta: [
|
||||
|
||||
@@ -20,9 +20,11 @@ fetch(`${base}home.custom.md`).then((r) => {
|
||||
}
|
||||
});
|
||||
|
||||
const { t } = useI18n();
|
||||
|
||||
const toolStore = useToolStore();
|
||||
const desc = 'Collection of handy online tools for developers, with great UX. IT Tools is a free and open-source collection of handy online tools for developers & people working in IT.';
|
||||
const title = 'IT Tools - Handy online tools for developers';
|
||||
const desc = t('home.page.text.collection-of-handy-online-tools-for-developers-with-great-ux-it-tools-is-a-free-and-open-source-collection-of-handy-online-tools-for-developers-and-people-working-in-it');
|
||||
const title = t('home.page.text.it-tools-handy-online-tools-for-developers');
|
||||
|
||||
useHead({
|
||||
title,
|
||||
@@ -57,7 +59,6 @@ useHead({
|
||||
},
|
||||
],
|
||||
});
|
||||
const { t } = useI18n();
|
||||
|
||||
const favoriteTools = computed(() => toolStore.favoriteTools);
|
||||
|
||||
|
||||
+41
-32
@@ -1,6 +1,9 @@
|
||||
<script setup lang="ts">
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import { bech32, bech32m } from 'bech32';
|
||||
|
||||
const { t } = useI18n();
|
||||
|
||||
// Shared state
|
||||
const encodingVariant = ref<'bech32' | 'bech32m'>('bech32');
|
||||
const autoDetect = ref(true);
|
||||
@@ -40,7 +43,7 @@ function wordsToHex(words: number[]): string {
|
||||
function hexToWords(hex: string): number[] {
|
||||
const clean = hex.toLowerCase();
|
||||
if (!/^[0-9a-f]+$/.test(clean) || clean.length % 2 !== 0) {
|
||||
throw new Error('Invalid hex payload');
|
||||
throw new Error(t('tools.bech32.texts.invalid-hex-payload'));
|
||||
}
|
||||
|
||||
return bech32.toWords(clean.match(/.{2}/g)!.map(b => Number.parseInt(b, 16)));
|
||||
@@ -155,7 +158,13 @@ function exportCsv() {
|
||||
return;
|
||||
}
|
||||
|
||||
const header = ['Input', 'HRP', 'Variant', 'Hex', 'Status'];
|
||||
const header = [
|
||||
t('tools.bech32.texts.input'),
|
||||
t('tools.bech32.texts.hrp'),
|
||||
t('tools.bech32.texts.variant'),
|
||||
t('tools.bech32.texts.hex'),
|
||||
t('tools.bech32.texts.status'),
|
||||
];
|
||||
const rows = batchRows.value.map(r => [
|
||||
r.input,
|
||||
r.hrp,
|
||||
@@ -185,41 +194,41 @@ function exportCsv() {
|
||||
<div>
|
||||
<n-tabs type="line" animated>
|
||||
<!-- DECODE TAB -->
|
||||
<n-tab-pane name="decode" tab="Decode">
|
||||
<n-tab-pane name="decode" :tab="t('tools.bech32.texts.tab-decode')">
|
||||
<c-input-text
|
||||
v-model:value="bechInput"
|
||||
label-position="left"
|
||||
label="Bech32(m) string:"
|
||||
placeholder="Bech32 / Bech32m string"
|
||||
:label="t('tools.bech32.texts.label-bech32-m-string')"
|
||||
:placeholder="t('tools.bech32.texts.placeholder-bech32-bech32m-string')"
|
||||
mb-1
|
||||
/>
|
||||
|
||||
<n-space justify="center" align="center" mb-1>
|
||||
<n-switch v-model:value="autoDetect">
|
||||
<template #checked>
|
||||
Auto-detect
|
||||
{{ t('tools.bech32.texts.tag-auto-detect') }}
|
||||
</template>
|
||||
<template #unchecked>
|
||||
Manual
|
||||
{{ t('tools.bech32.texts.tag-manual') }}
|
||||
</template>
|
||||
</n-switch>
|
||||
<c-select
|
||||
v-model:value="encodingVariant"
|
||||
label-position="left"
|
||||
label="Variant:"
|
||||
:label="t('tools.bech32.texts.label-variant')"
|
||||
:disabled="autoDetect"
|
||||
:options="[
|
||||
{ label: 'Bech32', value: 'bech32' },
|
||||
{ label: 'Bech32m', value: 'bech32m' },
|
||||
{ label: t('tools.bech32.texts.label-bech32'), value: 'bech32' },
|
||||
{ label: t('tools.bech32.texts.label-bech32m'), value: 'bech32m' },
|
||||
]"
|
||||
style="width: 160px"
|
||||
/>
|
||||
<n-switch v-model:value="checksumOnly">
|
||||
<template #checked>
|
||||
Checksum only
|
||||
{{ t('tools.bech32.texts.tag-checksum-only') }}
|
||||
</template>
|
||||
<template #unchecked>
|
||||
Full decode
|
||||
{{ t('tools.bech32.texts.tag-full-decode') }}
|
||||
</template>
|
||||
</n-switch>
|
||||
</n-space>
|
||||
@@ -234,10 +243,10 @@ function exportCsv() {
|
||||
</n-space>
|
||||
|
||||
<n-alert v-if="checksumValid === true" type="success" mb-2>
|
||||
Checksum valid
|
||||
{{ t('tools.bech32.texts.tag-checksum-valid') }}
|
||||
</n-alert>
|
||||
<n-alert v-if="checksumValid === false" type="error" mb-2>
|
||||
Checksum invalid
|
||||
{{ t('tools.bech32.texts.tag-checksum-invalid') }}
|
||||
</n-alert>
|
||||
|
||||
<c-alert v-if="decodeError">
|
||||
@@ -245,37 +254,37 @@ function exportCsv() {
|
||||
</c-alert>
|
||||
|
||||
<div v-if="decodedHex">
|
||||
<input-copyable v-model:value="decodedHrp" label-width="110px" label-position="left" label="HRP:" readonly placeholder="HRP" />
|
||||
<input-copyable v-model:value="decodedHex" label-width="110px" label-position="left" label="Payload:" readonly placeholder="Hex payload" />
|
||||
<input-copyable v-model:value="detectedVariant" label-width="110px" label-position="left" label="Variant:" readonly placeholder="Variant" />
|
||||
<input-copyable v-model:value="decodedHrp" label-width="110px" label-position="left" :label="t('tools.bech32.texts.label-hrp')" readonly :placeholder="t('tools.bech32.texts.placeholder-hrp')" />
|
||||
<input-copyable v-model:value="decodedHex" label-width="110px" label-position="left" :label="t('tools.bech32.texts.label-payload')" readonly :placeholder="t('tools.bech32.texts.placeholder-hex-payload')" />
|
||||
<input-copyable v-model:value="detectedVariant" label-width="110px" label-position="left" :label="t('tools.bech32.texts.label-variant')" readonly :placeholder="t('tools.bech32.texts.placeholder-variant')" />
|
||||
</div>
|
||||
</n-tab-pane>
|
||||
|
||||
<!-- ENCODE TAB -->
|
||||
<n-tab-pane name="encode" tab="Encode">
|
||||
<c-input-text v-model:value="hrp" label-position="left" label="HRP:" label-width="110px" placeholder="HRP" mb-1 />
|
||||
<n-tab-pane name="encode" :tab="t('tools.bech32.texts.tab-encode')">
|
||||
<c-input-text v-model:value="hrp" label-position="left" :label="t('tools.bech32.texts.label-hrp')" label-width="110px" :placeholder="t('tools.bech32.texts.placeholder-hrp')" mb-1 />
|
||||
<c-input-text
|
||||
v-model:value="hexPayload"
|
||||
label-position="left" label-width="110px"
|
||||
label="Payload:"
|
||||
placeholder="Hex payload"
|
||||
:label="t('tools.bech32.texts.label-payload')"
|
||||
:placeholder="t('tools.bech32.texts.placeholder-hex-payload')"
|
||||
mb-1
|
||||
/>
|
||||
|
||||
<c-select
|
||||
v-model:value="encodingVariant"
|
||||
label-position="left" label-width="110px"
|
||||
label="Variant:"
|
||||
:label="t('tools.bech32.texts.label-variant')"
|
||||
:options="[
|
||||
{ label: 'Bech32', value: 'bech32' },
|
||||
{ label: 'Bech32m', value: 'bech32m' },
|
||||
{ label: t('tools.bech32.texts.label-bech32'), value: 'bech32' },
|
||||
{ label: t('tools.bech32.texts.label-bech32m'), value: 'bech32m' },
|
||||
]"
|
||||
style="width: 160px"
|
||||
/>
|
||||
|
||||
<n-space justify="center">
|
||||
<n-button type="primary" @click="encode">
|
||||
Encode
|
||||
{{ t('tools.bech32.texts.tag-encode') }}
|
||||
</n-button>
|
||||
</n-space>
|
||||
|
||||
@@ -284,26 +293,26 @@ function exportCsv() {
|
||||
</c-alert>
|
||||
|
||||
<div v-else>
|
||||
<input-copyable v-model:value="bechOutput" label="Encoded bech32 string:" readonly placeholder="bech32 string" />
|
||||
<input-copyable v-model:value="bechOutput" :label="t('tools.bech32.texts.label-encoded-bech32-string')" readonly :placeholder="t('tools.bech32.texts.placeholder-bech32-string')" />
|
||||
</div>
|
||||
</n-tab-pane>
|
||||
|
||||
<!-- BATCH TAB -->
|
||||
<n-tab-pane name="batch" tab="Batch">
|
||||
<n-tab-pane name="batch" :tab="t('tools.bech32.texts.tab-batch')">
|
||||
<c-input-text
|
||||
v-model:value="batchInput"
|
||||
label="Bech32 strings (one per line):"
|
||||
:label="t('tools.bech32.texts.label-bech32-strings-one-per-line')"
|
||||
multiline
|
||||
rows="5"
|
||||
placeholder="One Bech32 string per line"
|
||||
:placeholder="t('tools.bech32.texts.placeholder-one-bech32-string-per-line')"
|
||||
mb-2
|
||||
/>
|
||||
<n-space justify="center" mb-2>
|
||||
<n-button type="primary" @click="batchConvert">
|
||||
Convert
|
||||
{{ t('tools.bech32.texts.tag-convert') }}
|
||||
</n-button>
|
||||
</n-space>
|
||||
<n-card v-if="batchRows.length" title="Results">
|
||||
<n-card v-if="batchRows.length" :title="t('tools.bech32.texts.title-results')">
|
||||
<n-data-table
|
||||
:columns="[
|
||||
{ title: 'Input', key: 'input' },
|
||||
@@ -319,7 +328,7 @@ function exportCsv() {
|
||||
/>
|
||||
<n-space justify="center">
|
||||
<n-button @click="exportCsv">
|
||||
Export CSV
|
||||
{{ t('tools.bech32.texts.tag-export-csv') }}
|
||||
</n-button>
|
||||
</n-space>
|
||||
</n-card>
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
import { translate as t } from '@/plugins/i18n.plugin';
|
||||
import { ZoomMoney } from '@vicons/tabler';
|
||||
import { defineTool } from '../tool';
|
||||
|
||||
export const tool = defineTool({
|
||||
name: 'Bech32 Encoder/Decoder',
|
||||
name: t('tools.bech32.title'),
|
||||
path: '/bech32',
|
||||
description: 'Encode/Decode/Validate betch32(m)',
|
||||
description: t('tools.bech32.description'),
|
||||
keywords: ['bech32', 'crypto', 'encode', 'decode', 'bitcoin', 'address', 'segwit'],
|
||||
component: () => import('./bech32.vue'),
|
||||
icon: ZoomMoney,
|
||||
|
||||
@@ -1,409 +1,412 @@
|
||||
<script setup lang="ts">
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import { CalendarConverter } from './calendar-converter.service';
|
||||
|
||||
const { t } = useI18n();
|
||||
|
||||
const converter = ref(new CalendarConverter());
|
||||
|
||||
const monthOptions = [
|
||||
{ label: 'January', value: 1 }, { label: 'February', value: 2 },
|
||||
{ label: 'March', value: 3 }, { label: 'April', value: 4 },
|
||||
{ label: 'May', value: 5 }, { label: 'June', value: 6 },
|
||||
{ label: 'July', value: 7 }, { label: 'August', value: 8 },
|
||||
{ label: 'September', value: 9 }, { label: 'October', value: 10 },
|
||||
{ label: 'November', value: 11 }, { label: 'December', value: 12 },
|
||||
{ label: t('tools.calendar-converter.texts.label-january'), value: 1 }, { label: t('tools.calendar-converter.texts.label-february'), value: 2 },
|
||||
{ label: t('tools.calendar-converter.texts.label-march'), value: 3 }, { label: t('tools.calendar-converter.texts.label-april'), value: 4 },
|
||||
{ label: t('tools.calendar-converter.texts.label-may'), value: 5 }, { label: t('tools.calendar-converter.texts.label-june'), value: 6 },
|
||||
{ label: t('tools.calendar-converter.texts.label-july'), value: 7 }, { label: t('tools.calendar-converter.texts.label-august'), value: 8 },
|
||||
{ label: t('tools.calendar-converter.texts.label-september'), value: 9 }, { label: t('tools.calendar-converter.texts.label-october'), value: 10 },
|
||||
{ label: t('tools.calendar-converter.texts.label-november'), value: 11 }, { label: t('tools.calendar-converter.texts.label-december'), value: 12 },
|
||||
];
|
||||
|
||||
const hebrewMonths = [
|
||||
{ label: 'Nisan (נִיסָן)', value: 1 },
|
||||
{ label: 'Iyyar (אִיָּר)', value: 2 },
|
||||
{ label: 'Sivan (סִיוָן)', value: 3 },
|
||||
{ label: 'Tammuz (תַּמּוּז)', value: 4 },
|
||||
{ label: 'Av (אָב)', value: 5 },
|
||||
{ label: 'Elul (אֱלוּל)', value: 6 },
|
||||
{ label: 'Tishri (תִּשְׁרֵי)', value: 7 },
|
||||
{ label: 'Heshvan (חֶשְׁוָן)', value: 8 },
|
||||
{ label: 'Kislev (כִּסְלֵו)', value: 9 },
|
||||
{ label: 'Teveth (טֵבֵת)', value: 10 },
|
||||
{ label: 'Shevat (שְׁבָט)', value: 11 },
|
||||
{ label: 'Adar/Adar I (אֲדָר)', value: 12 },
|
||||
{ label: 'Veadar/Adar II (אֲדָר שֵׁנִי)', value: 13 },
|
||||
{ label: t('tools.calendar-converter.texts.label-nisan-נִיסָן'), value: 1 },
|
||||
{ label: t('tools.calendar-converter.texts.label-iyyar-אִיָּר'), value: 2 },
|
||||
{ label: t('tools.calendar-converter.texts.label-sivan-סִיוָן'), value: 3 },
|
||||
{ label: t('tools.calendar-converter.texts.label-tammuz-תַּמּוּז'), value: 4 },
|
||||
{ label: t('tools.calendar-converter.texts.label-av-אָב'), value: 5 },
|
||||
{ label: t('tools.calendar-converter.texts.label-elul-אֱלוּל'), value: 6 },
|
||||
{ label: t('tools.calendar-converter.texts.label-tishri-תִּשְׁרֵי'), value: 7 },
|
||||
{ label: t('tools.calendar-converter.texts.label-heshvan-חֶשְׁוָן'), value: 8 },
|
||||
{ label: t('tools.calendar-converter.texts.label-kislev-כִּסְלֵו'), value: 9 },
|
||||
{ label: t('tools.calendar-converter.texts.label-teveth-טֵבֵת'), value: 10 },
|
||||
{ label: t('tools.calendar-converter.texts.label-shevat-שְׁבָט'), value: 11 },
|
||||
{ label: t('tools.calendar-converter.texts.label-adar-adar-i-אֲדָר'), value: 12 },
|
||||
{ label: t('tools.calendar-converter.texts.label-veadar-adar-ii-אֲדָר-שֵׁנִי'), value: 13 },
|
||||
];
|
||||
|
||||
const islamicMonths = [
|
||||
{ label: 'Muharram (مُحَرَّم)', value: 1 },
|
||||
{ label: 'Safar (صَفَر)', value: 2 },
|
||||
{ label: 'Rabiʿ al‑Awwal (رَبيع الأوّل)', value: 3 },
|
||||
{ label: 'Rabiʿ ath‑Thani (رَبيع الثاني)', value: 4 },
|
||||
{ label: 'Jumada al‑Ula (جُمادى الأولى)', value: 5 },
|
||||
{ label: 'Jumada ath‑Thania (جُمادى الآخرة)', value: 6 },
|
||||
{ label: 'Rajab (رَجَب)', value: 7 },
|
||||
{ label: 'Shaʿban (شَعْبان)', value: 8 },
|
||||
{ label: 'Ramadan (رَمَضان)', value: 9 },
|
||||
{ label: 'Shawwal (شَوّال)', value: 10 },
|
||||
{ label: 'Dhu al‑Qaʿda (ذو القَعْدة)', value: 11 },
|
||||
{ label: 'Dhu al‑Hijja (ذو الحِجّة)', value: 12 },
|
||||
{ label: t('tools.calendar-converter.texts.label-muharram-مُحَرَّم'), value: 1 },
|
||||
{ label: t('tools.calendar-converter.texts.label-safar-صَفَر'), value: 2 },
|
||||
{ label: t('tools.calendar-converter.texts.label-rabiʿ-al-awwal-رَبيع-الأوّل'), value: 3 },
|
||||
{ label: t('tools.calendar-converter.texts.label-rabiʿ-ath-thani-رَبيع-الثاني'), value: 4 },
|
||||
{ label: t('tools.calendar-converter.texts.label-jumada-al-ula-جُمادى-الأولى'), value: 5 },
|
||||
{ label: t('tools.calendar-converter.texts.label-jumada-ath-thania-جُمادى-الآخرة'), value: 6 },
|
||||
{ label: t('tools.calendar-converter.texts.label-rajab-رَجَب'), value: 7 },
|
||||
{ label: t('tools.calendar-converter.texts.label-shaʿban-شَعْبان'), value: 8 },
|
||||
{ label: t('tools.calendar-converter.texts.label-ramadan-رَمَضان'), value: 9 },
|
||||
{ label: t('tools.calendar-converter.texts.label-shawwal-شَوّال'), value: 10 },
|
||||
{ label: t('tools.calendar-converter.texts.label-dhu-al-qaʿda-ذو-القَعْدة'), value: 11 },
|
||||
{ label: t('tools.calendar-converter.texts.label-dhu-al-hijja-ذو-الحِجّة'), value: 12 },
|
||||
];
|
||||
|
||||
const persianMonths = [
|
||||
{ label: 'Farvardin (فروردین)', value: 1 },
|
||||
{ label: 'Ordibehesht (اردیبهشت)', value: 2 },
|
||||
{ label: 'Khordad (خرداد)', value: 3 },
|
||||
{ label: 'Tir (تیر)', value: 4 },
|
||||
{ label: 'Mordad (مرداد)', value: 5 },
|
||||
{ label: 'Shahrivar (شهریور)', value: 6 },
|
||||
{ label: 'Mehr (مهر)', value: 7 },
|
||||
{ label: 'Aban (آبان)', value: 8 },
|
||||
{ label: 'Azar (آذر)', value: 9 },
|
||||
{ label: 'Dey (دی)', value: 10 },
|
||||
{ label: 'Bahman (بهمن)', value: 11 },
|
||||
{ label: 'Esfand (اسفند)', value: 12 },
|
||||
{ label: t('tools.calendar-converter.texts.label-farvardin-فروردین'), value: 1 },
|
||||
{ label: t('tools.calendar-converter.texts.label-ordibehesht-اردیبهشت'), value: 2 },
|
||||
{ label: t('tools.calendar-converter.texts.label-khordad-خرداد'), value: 3 },
|
||||
{ label: t('tools.calendar-converter.texts.label-tir-تیر'), value: 4 },
|
||||
{ label: t('tools.calendar-converter.texts.label-mordad-مرداد'), value: 5 },
|
||||
{ label: t('tools.calendar-converter.texts.label-shahrivar-شهریور'), value: 6 },
|
||||
{ label: t('tools.calendar-converter.texts.label-mehr-مهر'), value: 7 },
|
||||
{ label: t('tools.calendar-converter.texts.label-aban-آبان'), value: 8 },
|
||||
{ label: t('tools.calendar-converter.texts.label-azar-آذر'), value: 9 },
|
||||
{ label: t('tools.calendar-converter.texts.label-dey-دی'), value: 10 },
|
||||
{ label: t('tools.calendar-converter.texts.label-bahman-بهمن'), value: 11 },
|
||||
{ label: t('tools.calendar-converter.texts.label-esfand-اسفند'), value: 12 },
|
||||
];
|
||||
|
||||
const indianMonths = [
|
||||
{ label: 'Caitra (चैत्र)', value: 1 },
|
||||
{ label: 'Vaisakha (वैशाख)', value: 2 },
|
||||
{ label: 'Jyaistha (ज्येष्ठ)', value: 3 },
|
||||
{ label: 'Asadha (आषाढ़)', value: 4 },
|
||||
{ label: 'Sravana (श्रावण)', value: 5 },
|
||||
{ label: 'Bhadra (भाद्रपद)', value: 6 },
|
||||
{ label: 'Asvina (आश्विन)', value: 7 },
|
||||
{ label: 'Kartika (कार्तिक)', value: 8 },
|
||||
{ label: 'Agrahayana (अग्रहायण)', value: 9 },
|
||||
{ label: 'Pausa (पौष)', value: 10 },
|
||||
{ label: 'Magha (माघ)', value: 11 },
|
||||
{ label: 'Phalguna (फाल्गुन)', value: 12 },
|
||||
{ label: t('tools.calendar-converter.texts.label-caitra-चैत्र'), value: 1 },
|
||||
{ label: t('tools.calendar-converter.texts.label-vaisakha-वैशाख'), value: 2 },
|
||||
{ label: t('tools.calendar-converter.texts.label-jyaistha-ज्येष्ठ'), value: 3 },
|
||||
{ label: t('tools.calendar-converter.texts.label-asadha-आषाढ़'), value: 4 },
|
||||
{ label: t('tools.calendar-converter.texts.label-sravana-श्रावण'), value: 5 },
|
||||
{ label: t('tools.calendar-converter.texts.label-bhadra-भाद्रपद'), value: 6 },
|
||||
{ label: t('tools.calendar-converter.texts.label-asvina-आश्विन'), value: 7 },
|
||||
{ label: t('tools.calendar-converter.texts.label-kartika-कार्तिक'), value: 8 },
|
||||
{ label: t('tools.calendar-converter.texts.label-agrahayana-अग्रहायण'), value: 9 },
|
||||
{ label: t('tools.calendar-converter.texts.label-pausa-पौष'), value: 10 },
|
||||
{ label: t('tools.calendar-converter.texts.label-magha-माघ'), value: 11 },
|
||||
{ label: t('tools.calendar-converter.texts.label-phalguna-फाल्गुन'), value: 12 },
|
||||
];
|
||||
|
||||
const frenchMonths = [
|
||||
{ label: 'Vendémiaire', value: 1 }, { label: 'Brumaire', value: 2 },
|
||||
{ label: 'Frimaire', value: 3 }, { label: 'Nivôse', value: 4 },
|
||||
{ label: 'Pluviôse', value: 5 }, { label: 'Ventôse', value: 6 },
|
||||
{ label: 'Germinal', value: 7 }, { label: 'Floréal', value: 8 },
|
||||
{ label: 'Prairial', value: 9 }, { label: 'Messidor', value: 10 },
|
||||
{ label: 'Thermidor', value: 11 }, { label: 'Fructidor', value: 12 },
|
||||
{ label: 'Sans‑culottides', value: 13 },
|
||||
{ label: t('tools.calendar-converter.texts.label-vendémiaire'), value: 1 }, { label: t('tools.calendar-converter.texts.label-brumaire'), value: 2 },
|
||||
{ label: t('tools.calendar-converter.texts.label-frimaire'), value: 3 }, { label: t('tools.calendar-converter.texts.label-nivôse'), value: 4 },
|
||||
{ label: t('tools.calendar-converter.texts.label-pluviôse'), value: 5 }, { label: t('tools.calendar-converter.texts.label-ventôse'), value: 6 },
|
||||
{ label: t('tools.calendar-converter.texts.label-germinal'), value: 7 }, { label: t('tools.calendar-converter.texts.label-floréal'), value: 8 },
|
||||
{ label: t('tools.calendar-converter.texts.label-prairial'), value: 9 }, { label: t('tools.calendar-converter.texts.label-messidor'), value: 10 },
|
||||
{ label: t('tools.calendar-converter.texts.label-thermidor'), value: 11 }, { label: t('tools.calendar-converter.texts.label-fructidor'), value: 12 },
|
||||
{ label: t('tools.calendar-converter.texts.label-sans-culottides'), value: 13 },
|
||||
];
|
||||
|
||||
const frenchDecades = [
|
||||
{ label: 'I', value: 1 },
|
||||
{ label: 'II', value: 2 },
|
||||
{ label: 'III', value: 3 },
|
||||
{ label: t('tools.calendar-converter.texts.label-i'), value: 1 },
|
||||
{ label: t('tools.calendar-converter.texts.label-ii'), value: 2 },
|
||||
{ label: t('tools.calendar-converter.texts.label-iii'), value: 3 },
|
||||
];
|
||||
|
||||
const frenchDays = [
|
||||
{ label: 'Primidi (1)', value: 1 }, { label: 'Duodi (2)', value: 2 },
|
||||
{ label: 'Tridi (3)', value: 3 }, { label: 'Quartidi (4)', value: 4 },
|
||||
{ label: 'Quintidi (5)', value: 5 }, { label: 'Sextidi (6)', value: 6 },
|
||||
{ label: 'Septidi (7)', value: 7 }, { label: 'Octidi (8)', value: 8 },
|
||||
{ label: 'Nonidi (9)', value: 9 }, { label: 'Décadi (10)', value: 10 },
|
||||
{ label: 'Vertu (1)', value: 12 }, { label: 'Génie (2)', value: 13 },
|
||||
{ label: 'Travail (3)', value: 14 }, { label: 'Opinion (4)', value: 15 },
|
||||
{ label: 'Récompenses (5)', value: 16 }, { label: 'Révolution (6)', value: 17 },
|
||||
{ label: t('tools.calendar-converter.texts.label-primidi-1'), value: 1 }, { label: t('tools.calendar-converter.texts.label-duodi-2'), value: 2 },
|
||||
{ label: t('tools.calendar-converter.texts.label-tridi-3'), value: 3 }, { label: t('tools.calendar-converter.texts.label-quartidi-4'), value: 4 },
|
||||
{ label: t('tools.calendar-converter.texts.label-quintidi-5'), value: 5 }, { label: t('tools.calendar-converter.texts.label-sextidi-6'), value: 6 },
|
||||
{ label: t('tools.calendar-converter.texts.label-septidi-7'), value: 7 }, { label: t('tools.calendar-converter.texts.label-octidi-8'), value: 8 },
|
||||
{ label: t('tools.calendar-converter.texts.label-nonidi-9'), value: 9 }, { label: t('tools.calendar-converter.texts.label-décadi-10'), value: 10 },
|
||||
{ label: t('tools.calendar-converter.texts.label-vertu-1'), value: 12 }, { label: t('tools.calendar-converter.texts.label-génie-2'), value: 13 },
|
||||
{ label: t('tools.calendar-converter.texts.label-travail-3'), value: 14 }, { label: t('tools.calendar-converter.texts.label-opinion-4'), value: 15 },
|
||||
{ label: t('tools.calendar-converter.texts.label-récompenses-5'), value: 16 }, { label: t('tools.calendar-converter.texts.label-révolution-6'), value: 17 },
|
||||
];
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div>
|
||||
<n-p>
|
||||
This is a port of wonderful <c-link target="_blank" href="https://www.fourmilab.ch/documents/calendar">
|
||||
Fourmilab.ch Calendar converter
|
||||
</c-link> by John Walker
|
||||
{{ t('tools.calendar-converter.texts.tag-this-is-a-port-of-wonderful') }}<c-link target="_blank" href="https://www.fourmilab.ch/documents/calendar">
|
||||
{{ t('tools.calendar-converter.texts.tag-fourmilab-ch-calendar-converter') }}
|
||||
</c-link>{{ t('tools.calendar-converter.texts.tag-by-john-walker') }}
|
||||
</n-p>
|
||||
<n-tabs type="line" animated>
|
||||
<!-- Gregorian -->
|
||||
<n-tab-pane name="gregorian" tab="Gregorian">
|
||||
<n-tab-pane name="gregorian" :tab="t('tools.calendar-converter.texts.tab-gregorian')">
|
||||
<n-form :model="converter.document.gregorian" label-placement="left">
|
||||
<n-form-item label="Date:">
|
||||
<n-form-item :label="t('tools.calendar-converter.texts.label-date')">
|
||||
<n-input-number v-model:value="converter.document.gregorian.day" style="width: 90px" mr-1 />
|
||||
<n-select v-model:value="converter.document.gregorian.month" :options="monthOptions" style="width: 160px; " mr-1 />
|
||||
<n-input-number v-model:value="converter.document.gregorian.year" style="width: 100px" />
|
||||
</n-form-item>
|
||||
|
||||
<n-form-item label="Leap:">
|
||||
<n-form-item :label="t('tools.calendar-converter.texts.label-leap')">
|
||||
<input-copyable v-model:value="converter.document.gregorian.leap" readonly />
|
||||
</n-form-item>
|
||||
|
||||
<n-form-item label="Time:">
|
||||
<n-form-item :label="t('tools.calendar-converter.texts.label-time')">
|
||||
<n-input-number v-model:value="converter.document.gregorian.hour" style="width: 90px" />
|
||||
<span> : </span>
|
||||
<span>{{ t('tools.calendar-converter.texts.tag-xa0-xa0') }}</span>
|
||||
<n-input-number v-model:value="converter.document.gregorian.min" style="width: 90px" />
|
||||
<span> : </span>
|
||||
<span>{{ t('tools.calendar-converter.texts.tag-xa0-xa0') }}</span>
|
||||
<n-input-number v-model:value="converter.document.gregorian.sec" style="width: 90px" />
|
||||
</n-form-item>
|
||||
|
||||
<n-form-item label="Weekday">
|
||||
<n-form-item :label="t('tools.calendar-converter.texts.label-weekday')">
|
||||
<input-copyable v-model:value="converter.document.gregorian.wday" readonly />
|
||||
</n-form-item>
|
||||
|
||||
<n-space justify="center">
|
||||
<n-button type="primary" mr-1 @click="() => converter.calcGregorian()">
|
||||
Update other calendars
|
||||
{{ t('tools.calendar-converter.texts.tag-update-other-calendars') }}
|
||||
</n-button>
|
||||
<n-button @click="() => { converter.setDateToToday(); converter.updateFromGregorian(); }">
|
||||
Today
|
||||
{{ t('tools.calendar-converter.texts.tag-today') }}
|
||||
</n-button>
|
||||
</n-space>
|
||||
</n-form>
|
||||
</n-tab-pane>
|
||||
|
||||
<!-- Julian Day -->
|
||||
<n-tab-pane name="julian-day" tab="Julian Day">
|
||||
<n-tab-pane name="julian-day" :tab="t('tools.calendar-converter.texts.tab-julian-day')">
|
||||
<n-form :model="converter.document.julianday" label-placement="left">
|
||||
<n-form-item label="Julian Day:">
|
||||
<n-form-item :label="t('tools.calendar-converter.texts.label-julian-day')">
|
||||
<n-input-number-i18n v-model:value="converter.document.julianday.day" />
|
||||
</n-form-item>
|
||||
<n-space justify="center">
|
||||
<n-button type="primary" @click="() => converter.calcJulian()">
|
||||
Update other calendars
|
||||
{{ t('tools.calendar-converter.texts.tag-update-other-calendars') }}
|
||||
</n-button>
|
||||
</n-space>
|
||||
</n-form>
|
||||
</n-tab-pane>
|
||||
|
||||
<!-- Modified Julian Day -->
|
||||
<n-tab-pane name="modified-julian" tab="Modified Julian">
|
||||
<n-tab-pane name="modified-julian" :tab="t('tools.calendar-converter.texts.tab-modified-julian')">
|
||||
<n-form :model="converter.document.modifiedjulianday" label-placement="left">
|
||||
<n-form-item label="Modified Julian Day:">
|
||||
<n-form-item :label="t('tools.calendar-converter.texts.label-modified-julian-day')">
|
||||
<n-input-number-i18n v-model:value="converter.document.modifiedjulianday.day" />
|
||||
</n-form-item>
|
||||
<n-space justify="center">
|
||||
<n-button type="primary" @click="() => converter.calcModifiedJulian()">
|
||||
Update other calendars
|
||||
{{ t('tools.calendar-converter.texts.tag-update-other-calendars') }}
|
||||
</n-button>
|
||||
</n-space>
|
||||
</n-form>
|
||||
</n-tab-pane>
|
||||
|
||||
<!-- Julian Calendar -->
|
||||
<n-tab-pane name="julian-calendar" tab="Julian Calendar">
|
||||
<n-tab-pane name="julian-calendar" :tab="t('tools.calendar-converter.texts.tab-julian-calendar')">
|
||||
<n-form :model="converter.document.juliancalendar" label-placement="left">
|
||||
<n-form-item label="Date:">
|
||||
<n-form-item :label="t('tools.calendar-converter.texts.label-date')">
|
||||
<n-input-number v-model:value="converter.document.juliancalendar.day" style="width: 90px" mr-1 />
|
||||
<n-select v-model:value="converter.document.juliancalendar.month" :options="monthOptions" style="width: 160px; " mr-1 />
|
||||
<n-input-number v-model:value="converter.document.juliancalendar.year" style="width: 100px" />
|
||||
</n-form-item>
|
||||
<n-form-item label="Leap:">
|
||||
<n-form-item :label="t('tools.calendar-converter.texts.label-leap')">
|
||||
<input-copyable v-model:value="converter.document.juliancalendar.leap" readonly />
|
||||
</n-form-item>
|
||||
<n-form-item label="Weekday:">
|
||||
<n-form-item :label="t('tools.calendar-converter.texts.label-weekday')">
|
||||
<input-copyable v-model:value="converter.document.juliancalendar.wday" readonly />
|
||||
</n-form-item>
|
||||
|
||||
<n-space justify="center">
|
||||
<n-button type="primary" @click="() => converter.calcJulianCalendar()">
|
||||
Update other calendars
|
||||
{{ t('tools.calendar-converter.texts.tag-update-other-calendars') }}
|
||||
</n-button>
|
||||
</n-space>
|
||||
</n-form>
|
||||
</n-tab-pane>
|
||||
|
||||
<!-- Gregorian Serial -->
|
||||
<n-tab-pane name="greg-serial" tab="Gregorian Serial">
|
||||
<n-tab-pane name="greg-serial" :tab="t('tools.calendar-converter.texts.tab-gregorian-serial')">
|
||||
<n-form :model="converter.document.gregserial" label-placement="left">
|
||||
<n-form-item label="Gregorian Serial Day:">
|
||||
<n-form-item :label="t('tools.calendar-converter.texts.label-gregorian-serial-day')">
|
||||
<n-input-number-i18n v-model:value="converter.document.gregserial.day" />
|
||||
</n-form-item>
|
||||
<n-space justify="center">
|
||||
<n-button type="primary" @click="() => converter.calcGregSerial()">
|
||||
Update other calendars
|
||||
{{ t('tools.calendar-converter.texts.tag-update-other-calendars') }}
|
||||
</n-button>
|
||||
</n-space>
|
||||
</n-form>
|
||||
</n-tab-pane>
|
||||
|
||||
<!-- Hebrew -->
|
||||
<n-tab-pane name="hebrew" tab="Hebrew">
|
||||
<n-tab-pane name="hebrew" :tab="t('tools.calendar-converter.texts.tab-hebrew')">
|
||||
<n-form :model="converter.document.hebrew" label-placement="left">
|
||||
<n-form-item label="Date">
|
||||
<n-form-item :label="t('tools.calendar-converter.texts.label-date')">
|
||||
<n-input-number v-model:value="converter.document.hebrew.day" style="width: 90px" mr-1 />
|
||||
<n-select v-model:value="converter.document.hebrew.month" :options="hebrewMonths" style="width: 220px; " mr-1 />
|
||||
<n-input-number v-model:value="converter.document.hebrew.year" style="width: 100px" />
|
||||
</n-form-item>
|
||||
|
||||
<n-form-item label="Leap:">
|
||||
<n-form-item :label="t('tools.calendar-converter.texts.label-leap')">
|
||||
<n-input v-model:value="converter.document.hebrew.leap" readonly />
|
||||
</n-form-item>
|
||||
|
||||
<n-space justify="center">
|
||||
<n-button type="primary" @click="() => converter.calcHebrew()">
|
||||
Update other calendars
|
||||
{{ t('tools.calendar-converter.texts.tag-update-other-calendars') }}
|
||||
</n-button>
|
||||
</n-space>
|
||||
</n-form>
|
||||
</n-tab-pane>
|
||||
|
||||
<!-- Islamic -->
|
||||
<n-tab-pane name="islamic" tab="Islamic">
|
||||
<n-tab-pane name="islamic" :tab="t('tools.calendar-converter.texts.tab-islamic')">
|
||||
<n-form :model="converter.document.islamic" label-placement="left">
|
||||
<n-form-item label="Date">
|
||||
<n-form-item :label="t('tools.calendar-converter.texts.label-date')">
|
||||
<n-input-number v-model:value="converter.document.islamic.day" style="width: 90px" mr-1 />
|
||||
<n-select v-model:value="converter.document.islamic.month" :options="islamicMonths" style="width: 250px; " mr-1 />
|
||||
<n-input-number v-model:value="converter.document.islamic.year" style="width: 100px" />
|
||||
</n-form-item>
|
||||
|
||||
<n-form-item label="Leap:">
|
||||
<n-form-item :label="t('tools.calendar-converter.texts.label-leap')">
|
||||
<n-input v-model:value="converter.document.islamic.leap" readonly />
|
||||
</n-form-item>
|
||||
|
||||
<n-form-item label="Weekday">
|
||||
<n-form-item :label="t('tools.calendar-converter.texts.label-weekday')">
|
||||
<n-input v-model:value="converter.document.islamic.wday" readonly />
|
||||
</n-form-item>
|
||||
|
||||
<n-space justify="center">
|
||||
<n-button type="primary" @click="() => converter.calcIslamic()">
|
||||
Update other calendars
|
||||
{{ t('tools.calendar-converter.texts.tag-update-other-calendars') }}
|
||||
</n-button>
|
||||
</n-space>
|
||||
</n-form>
|
||||
</n-tab-pane>
|
||||
|
||||
<!-- Persian -->
|
||||
<n-tab-pane name="persian" tab="Persian">
|
||||
<n-tab-pane name="persian" :tab="t('tools.calendar-converter.texts.tab-persian')">
|
||||
<n-form :model="converter.document.persian" label-placement="left">
|
||||
<n-form-item label="Date">
|
||||
<n-form-item :label="t('tools.calendar-converter.texts.label-date')">
|
||||
<n-input-number v-model:value="converter.document.persian.day" style="width: 90px" mr-1 />
|
||||
<n-select v-model:value="converter.document.persian.month" :options="persianMonths" style="width: 220px; " mr-1 />
|
||||
<n-input-number v-model:value="converter.document.persian.year" style="width: 100px" />
|
||||
</n-form-item>
|
||||
|
||||
<n-form-item label="Leap:">
|
||||
<n-form-item :label="t('tools.calendar-converter.texts.label-leap')">
|
||||
<n-input v-model:value="converter.document.persian.leap" readonly />
|
||||
</n-form-item>
|
||||
|
||||
<n-form-item label="Weekday:">
|
||||
<n-form-item :label="t('tools.calendar-converter.texts.label-weekday')">
|
||||
<n-input v-model:value="converter.document.persian.wday" readonly />
|
||||
</n-form-item>
|
||||
|
||||
<n-space justify="center">
|
||||
<n-button type="primary" @click="() => converter.calcPersian()">
|
||||
Update other calendars
|
||||
{{ t('tools.calendar-converter.texts.tag-update-other-calendars') }}
|
||||
</n-button>
|
||||
</n-space>
|
||||
</n-form>
|
||||
</n-tab-pane>
|
||||
|
||||
<!-- Persian Algorithmic -->
|
||||
<n-tab-pane name="persian-algo" tab="Persian Algorithmic">
|
||||
<n-tab-pane name="persian-algo" :tab="t('tools.calendar-converter.texts.tab-persian-algorithmic')">
|
||||
<n-form :model="converter.document.persiana" label-placement="left">
|
||||
<n-form-item label="Date:">
|
||||
<n-form-item :label="t('tools.calendar-converter.texts.label-date')">
|
||||
<n-input-number v-model:value="converter.document.persiana.day" style="width: 90px" mr-1 />
|
||||
<n-select v-model:value="converter.document.persiana.month" :options="persianMonths" style="width: 220px; " mr-1 />
|
||||
<n-input-number v-model:value="converter.document.persiana.year" style="width: 100px" />
|
||||
</n-form-item>
|
||||
|
||||
<n-form-item label="Leap:">
|
||||
<n-form-item :label="t('tools.calendar-converter.texts.label-leap')">
|
||||
<input-copyable v-model:value="converter.document.persiana.leap" readonly />
|
||||
</n-form-item>
|
||||
<n-form-item label="Weekday:">
|
||||
<n-form-item :label="t('tools.calendar-converter.texts.label-weekday')">
|
||||
<input-copyable v-model:value="converter.document.persiana.wday" readonly />
|
||||
</n-form-item>
|
||||
|
||||
<n-space justify="center">
|
||||
<n-button type="primary" @click="() => converter.calcPersiana()">
|
||||
Update other calendars
|
||||
{{ t('tools.calendar-converter.texts.tag-update-other-calendars') }}
|
||||
</n-button>
|
||||
</n-space>
|
||||
</n-form>
|
||||
</n-tab-pane>
|
||||
|
||||
<!-- Mayan -->
|
||||
<n-tab-pane name="mayan" tab="Mayan">
|
||||
<n-tab-pane name="mayan" :tab="t('tools.calendar-converter.texts.tab-mayan')">
|
||||
<n-form :model="converter.document.mayancount" label-placement="left">
|
||||
<n-form-item label="Long Count:">
|
||||
<n-form-item :label="t('tools.calendar-converter.texts.label-long-count')">
|
||||
<n-input-number v-model:value="converter.document.mayancount.baktun" style="width: 100px" />
|
||||
<span> . </span>
|
||||
<span>{{ t('tools.calendar-converter.texts.tag-xa0-xa0') }}</span>
|
||||
<n-input-number v-model:value="converter.document.mayancount.katun" style="width: 100px" />
|
||||
<span> . </span>
|
||||
<span>{{ t('tools.calendar-converter.texts.tag-xa0-xa0') }}</span>
|
||||
<n-input-number v-model:value="converter.document.mayancount.tun" style="width: 100px" />
|
||||
<span> . </span>
|
||||
<span>{{ t('tools.calendar-converter.texts.tag-xa0-xa0') }}</span>
|
||||
<n-input-number v-model:value="converter.document.mayancount.uinal" style="width: 100px" />
|
||||
<span> . </span>
|
||||
<span>{{ t('tools.calendar-converter.texts.tag-xa0-xa0') }}</span>
|
||||
<n-input-number v-model:value="converter.document.mayancount.kin" style="width: 100px" />
|
||||
</n-form-item>
|
||||
|
||||
<n-form-item label="Haab">
|
||||
<n-form-item :label="t('tools.calendar-converter.texts.label-haab')">
|
||||
<input-copyable v-model:value="converter.document.mayancount.haab" readonly />
|
||||
</n-form-item>
|
||||
|
||||
<n-form-item label="Tzolkin">
|
||||
<n-form-item :label="t('tools.calendar-converter.texts.label-tzolkin')">
|
||||
<input-copyable v-model:value="converter.document.mayancount.tzolkin" readonly />
|
||||
</n-form-item>
|
||||
|
||||
<n-space justify="center">
|
||||
<n-button type="primary" @click="() => converter.calcMayanCount()">
|
||||
Update other calendars
|
||||
{{ t('tools.calendar-converter.texts.tag-update-other-calendars') }}
|
||||
</n-button>
|
||||
</n-space>
|
||||
</n-form>
|
||||
</n-tab-pane>
|
||||
|
||||
<!-- Indian Civil -->
|
||||
<n-tab-pane name="indian" tab="Indian Civil">
|
||||
<n-tab-pane name="indian" :tab="t('tools.calendar-converter.texts.tab-indian-civil')">
|
||||
<n-form :model="converter.document.indiancivilcalendar" label-placement="left">
|
||||
<n-form-item label="Date">
|
||||
<n-form-item :label="t('tools.calendar-converter.texts.label-date')">
|
||||
<n-input-number v-model:value="converter.document.indiancivilcalendar.day" style="width: 90px" mr-1 />
|
||||
<n-select v-model:value="converter.document.indiancivilcalendar.month" :options="indianMonths" style="width: 220px;" mr-1 />
|
||||
<n-input-number v-model:value="converter.document.indiancivilcalendar.year" style="width: 100px" />
|
||||
</n-form-item>
|
||||
<n-form-item label="Leap:">
|
||||
<n-form-item :label="t('tools.calendar-converter.texts.label-leap')">
|
||||
<input-copyable v-model:value="converter.document.indiancivilcalendar.leap" readonly />
|
||||
</n-form-item>
|
||||
<n-form-item label="Weekday:">
|
||||
<n-form-item :label="t('tools.calendar-converter.texts.label-weekday')">
|
||||
<input-copyable v-model:value="converter.document.indiancivilcalendar.weekday" readonly />
|
||||
</n-form-item>
|
||||
|
||||
<n-space justify="center">
|
||||
<n-button type="primary" @click="() => converter.calcIndianCivilCalendar()">
|
||||
Update other calendars
|
||||
{{ t('tools.calendar-converter.texts.tag-update-other-calendars') }}
|
||||
</n-button>
|
||||
</n-space>
|
||||
</n-form>
|
||||
</n-tab-pane>
|
||||
|
||||
<!-- French Republican -->
|
||||
<n-tab-pane name="french" tab="French Republican">
|
||||
<n-tab-pane name="french" :tab="t('tools.calendar-converter.texts.tab-french-republican')">
|
||||
<n-form :model="converter.document.french" label-placement="left" label-width="100px">
|
||||
<n-form-item label="Day:">
|
||||
<n-form-item :label="t('tools.calendar-converter.texts.label-day')">
|
||||
<n-select v-model:value="converter.document.french.jour" :options="frenchDays" />
|
||||
</n-form-item>
|
||||
|
||||
<n-form-item label="Month:">
|
||||
<n-form-item :label="t('tools.calendar-converter.texts.label-month')">
|
||||
<n-select v-model:value="converter.document.french.mois" :options="frenchMonths" />
|
||||
</n-form-item>
|
||||
|
||||
<n-form-item label="Décade:">
|
||||
<n-form-item :label="t('tools.calendar-converter.texts.label-décade')">
|
||||
<n-select v-model:value="converter.document.french.decade" :options="frenchDecades" />
|
||||
</n-form-item>
|
||||
|
||||
<n-form-item label="Year:">
|
||||
<n-form-item :label="t('tools.calendar-converter.texts.label-year')">
|
||||
<n-input-number v-model:value="converter.document.french.an" />
|
||||
</n-form-item>
|
||||
|
||||
<n-space justify="center">
|
||||
<n-button type="primary" @click="() => converter.calcFrench()">
|
||||
Update other calendars
|
||||
{{ t('tools.calendar-converter.texts.tag-update-other-calendars') }}
|
||||
</n-button>
|
||||
</n-space>
|
||||
</n-form>
|
||||
</n-tab-pane>
|
||||
|
||||
<!-- ISO -->
|
||||
<n-tab-pane name="iso" tab="ISO‑8601">
|
||||
<n-tab-pane name="iso" :tab="t('tools.calendar-converter.texts.tab-iso-8601')">
|
||||
<n-form :model="converter.document.isoweek" label-placement="left" label-width="100px">
|
||||
<n-form-item label="Day of Week:">
|
||||
<n-form-item :label="t('tools.calendar-converter.texts.label-day-of-week')">
|
||||
<n-input-number v-model:value="converter.document.isoweek.day" />
|
||||
</n-form-item>
|
||||
|
||||
<n-form-item label="Week:">
|
||||
<n-form-item :label="t('tools.calendar-converter.texts.label-week')">
|
||||
<n-input-number v-model:value="converter.document.isoweek.week" />
|
||||
</n-form-item>
|
||||
|
||||
<n-form-item label="Year:">
|
||||
<n-form-item :label="t('tools.calendar-converter.texts.label-year')">
|
||||
<n-input-number v-model:value="converter.document.isoweek.year" />
|
||||
</n-form-item>
|
||||
|
||||
<n-space justify="center">
|
||||
<n-button type="primary" @click="() => converter.calcIsoWeek()">
|
||||
Update other calendars
|
||||
{{ t('tools.calendar-converter.texts.tag-update-other-calendars') }}
|
||||
</n-button>
|
||||
</n-space>
|
||||
</n-form>
|
||||
@@ -411,62 +414,62 @@ const frenchDays = [
|
||||
<n-divider />
|
||||
|
||||
<n-form :model="converter.document.isoday" label-placement="left" label-width="100px">
|
||||
<n-form-item label="Day of Year:">
|
||||
<n-form-item :label="t('tools.calendar-converter.texts.label-day-of-year')">
|
||||
<n-input-number v-model:value="converter.document.isoday.day" />
|
||||
</n-form-item>
|
||||
|
||||
<n-form-item label="Year:">
|
||||
<n-form-item :label="t('tools.calendar-converter.texts.label-year')">
|
||||
<n-input-number v-model:value="converter.document.isoday.year" />
|
||||
</n-form-item>
|
||||
|
||||
<n-space justify="center">
|
||||
<n-button type="primary" @click="() => converter.calcIsoDay()">
|
||||
Update other calendars
|
||||
{{ t('tools.calendar-converter.texts.tag-update-other-calendars') }}
|
||||
</n-button>
|
||||
</n-space>
|
||||
</n-form>
|
||||
</n-tab-pane>
|
||||
|
||||
<!-- Unix -->
|
||||
<n-tab-pane name="unix" tab="Unix time()">
|
||||
<n-tab-pane name="unix" :tab="t('tools.calendar-converter.texts.tab-unix-time')">
|
||||
<n-form :model="converter.document.unixtime" label-placement="left">
|
||||
<n-form-item label="Unix time():">
|
||||
<n-form-item :label="t('tools.calendar-converter.texts.label-unix-time')">
|
||||
<n-input-number v-model:value="converter.document.unixtime.time" />
|
||||
</n-form-item>
|
||||
|
||||
<n-space justify="center">
|
||||
<n-button type="primary" @click="() => converter.calcUnixTime()">
|
||||
Update other calendars
|
||||
{{ t('tools.calendar-converter.texts.tag-update-other-calendars') }}
|
||||
</n-button>
|
||||
</n-space>
|
||||
</n-form>
|
||||
</n-tab-pane>
|
||||
|
||||
<!-- Excel 1900 -->
|
||||
<n-tab-pane name="excel1900" tab="Excel 1900 (Windows)">
|
||||
<n-tab-pane name="excel1900" :tab="t('tools.calendar-converter.texts.tab-excel-1900-windows')">
|
||||
<n-form :model="converter.document.excelserial1900" label-placement="left">
|
||||
<n-form-item label="Excel Serial Day (1900):">
|
||||
<n-form-item :label="t('tools.calendar-converter.texts.label-excel-serial-day-1900')">
|
||||
<n-input-number v-model:value="converter.document.excelserial1900.day" />
|
||||
</n-form-item>
|
||||
|
||||
<n-space justify="center">
|
||||
<n-button type="primary" @click="() => converter.calcExcelSerial1900()">
|
||||
Update other calendars
|
||||
{{ t('tools.calendar-converter.texts.tag-update-other-calendars') }}
|
||||
</n-button>
|
||||
</n-space>
|
||||
</n-form>
|
||||
</n-tab-pane>
|
||||
|
||||
<!-- Excel 1904 -->
|
||||
<n-tab-pane name="excel1904" tab="Excel 1904 (Macintosh)">
|
||||
<n-tab-pane name="excel1904" :tab="t('tools.calendar-converter.texts.tab-excel-1904-macintosh')">
|
||||
<n-form :model="converter.document.excelserial1904" label-placement="left">
|
||||
<n-form-item label="Excel Serial Day (1904):">
|
||||
<n-form-item :label="t('tools.calendar-converter.texts.label-excel-serial-day-1904')">
|
||||
<n-input-number v-model:value="converter.document.excelserial1904.day" />
|
||||
</n-form-item>
|
||||
|
||||
<n-space justify="center">
|
||||
<n-button type="primary" @click="() => converter.calcExcelSerial1904()">
|
||||
Update other calendars
|
||||
{{ t('tools.calendar-converter.texts.tag-update-other-calendars') }}
|
||||
</n-button>
|
||||
</n-space>
|
||||
</n-form>
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
import { translate as t } from '@/plugins/i18n.plugin';
|
||||
import { Calendar } from '@vicons/tabler';
|
||||
import { defineTool } from '../tool';
|
||||
|
||||
export const tool = defineTool({
|
||||
name: 'Calendar Converter',
|
||||
name: t('tools.calendar-converter.title'),
|
||||
path: '/calendar-converter',
|
||||
description: 'Convert dates and times between Gregorian, Julian, Hebrew, Islamic, Persian, Mayan, Indian, French Republican, ISO‑8601, Unix time, and Excel serial formats',
|
||||
description: t('tools.calendar-converter.description'),
|
||||
keywords: ['calendar', 'gregorian', 'julian', 'hebrew', 'islamic', 'persian', 'mayan', 'indian', 'french', 'republican', 'iso-8601', 'unix', 'excel', 'converter'],
|
||||
component: () => import('./calendar-converter.vue'),
|
||||
icon: Calendar,
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
import { translate as t } from '@/plugins/i18n.plugin';
|
||||
|
||||
/**
|
||||
* Converts dBm to milliwatts (mW)
|
||||
* @param dbm - Power level in dBm
|
||||
@@ -14,7 +16,7 @@ export function dbmToMw(dbm: number): number {
|
||||
*/
|
||||
export function mwToDbm(mw: number): number {
|
||||
if (mw <= 0) {
|
||||
throw new Error('Power in milliwatts must be greater than 0');
|
||||
throw new Error(t('tools.dbm-mw-converter.service.texts.power-in-milliwatts-must-be-greater-than-0'));
|
||||
}
|
||||
return 10 * Math.log10(mw);
|
||||
}
|
||||
@@ -1,3 +1,5 @@
|
||||
import { translate as t } from '@/plugins/i18n.plugin';
|
||||
|
||||
const RAND_MAX = 2 ** 8;
|
||||
|
||||
const CHARS = 'abcdefghijklmnopqrstuvwxyz0123456789!@#$%^&*(-_=+)'.split('');
|
||||
@@ -5,7 +7,7 @@ const CHARS = 'abcdefghijklmnopqrstuvwxyz0123456789!@#$%^&*(-_=+)'.split('');
|
||||
export function generateRandomValue(min: number, max: number): number {
|
||||
const generatorMax = max - min;
|
||||
if (generatorMax > RAND_MAX) {
|
||||
throw new Error('Generating range is too large');
|
||||
throw new Error(t('tools.django-secret-generator.service.texts.generating-range-is-too-large'));
|
||||
}
|
||||
|
||||
let randomValue: number;
|
||||
|
||||
@@ -1,7 +1,10 @@
|
||||
<script setup lang="ts">
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import yaml from 'yaml';
|
||||
import { blueprintToLabels, extractPangolinLabelsFromCompose, pangolinLabelsToBlueprint } from './docker-pangolin-labels.service';
|
||||
|
||||
const { t } = useI18n();
|
||||
|
||||
const composeInput = ref('');
|
||||
const blueprintOutput = ref('');
|
||||
|
||||
@@ -41,7 +44,7 @@ function convertBlueprintToLabels() {
|
||||
try {
|
||||
const blueprint = yaml.parse(blueprintInput.value) as any;
|
||||
if (!blueprint || typeof blueprint !== 'object') {
|
||||
throw new Error('Invalid blueprint YAML');
|
||||
throw new Error(t('tools.docker-pangolin-labels.texts.invalid-blueprint-yaml'));
|
||||
}
|
||||
|
||||
const labels = blueprintToLabels(blueprint, labelsAsArray.value ? 'array' : 'object');
|
||||
@@ -58,19 +61,19 @@ function convertBlueprintToLabels() {
|
||||
<div>
|
||||
<n-tabs type="segment">
|
||||
<!-- COMPOSE → BLUEPRINT -->
|
||||
<n-tab-pane name="compose-to-blueprint" tab="Compose → Blueprint">
|
||||
<n-tab-pane name="compose-to-blueprint" :tab="t('tools.docker-pangolin-labels.texts.tab-compose-blueprint')">
|
||||
<c-input-text
|
||||
v-model:value="composeInput"
|
||||
label="Docker Compose YAML:"
|
||||
:label="t('tools.docker-pangolin-labels.texts.label-docker-compose-yaml')"
|
||||
multiline
|
||||
rows="10"
|
||||
placeholder="Paste full docker-compose.yml here…"
|
||||
:placeholder="t('tools.docker-pangolin-labels.texts.placeholder-paste-full-docker-compose-yml-here')"
|
||||
mb-2
|
||||
/>
|
||||
|
||||
<n-space justify="center" mb-2>
|
||||
<n-button type="primary" @click="convertComposeToBlueprint">
|
||||
Extract Pangolin Blueprint
|
||||
{{ t('tools.docker-pangolin-labels.texts.tag-extract-pangolin-blueprint') }}
|
||||
</n-button>
|
||||
</n-space>
|
||||
|
||||
@@ -81,48 +84,48 @@ function convertBlueprintToLabels() {
|
||||
<textarea-copyable
|
||||
v-if="blueprintOutput"
|
||||
v-model:value="blueprintOutput"
|
||||
label="Generated Blueprint:"
|
||||
:label="t('tools.docker-pangolin-labels.texts.label-generated-blueprint')"
|
||||
language="yaml"
|
||||
readonly
|
||||
placeholder="Blueprint YAML will appear here…"
|
||||
:placeholder="t('tools.docker-pangolin-labels.texts.placeholder-blueprint-yaml-will-appear-here')"
|
||||
/>
|
||||
</n-tab-pane>
|
||||
|
||||
<!-- BLUEPRINT → LABELS -->
|
||||
<n-tab-pane name="blueprint-to-labels" tab="Blueprint → Labels">
|
||||
<n-tab-pane name="blueprint-to-labels" :tab="t('tools.docker-pangolin-labels.texts.tab-blueprint-labels')">
|
||||
<c-input-text
|
||||
v-model:value="blueprintInput"
|
||||
label="Blueprint YAML:"
|
||||
:label="t('tools.docker-pangolin-labels.texts.label-blueprint-yaml')"
|
||||
multiline
|
||||
rows="5"
|
||||
placeholder="Paste Pangolin blueprint YAML here…"
|
||||
:placeholder="t('tools.docker-pangolin-labels.texts.placeholder-paste-pangolin-blueprint-yaml-here')"
|
||||
mb-2
|
||||
/>
|
||||
|
||||
<n-space justify="center" mb-2>
|
||||
<n-switch v-model:value="labelsAsArray">
|
||||
<template #checked>
|
||||
Array (- key=value)
|
||||
{{ t('tools.docker-pangolin-labels.texts.tag-array-key-value') }}
|
||||
</template>
|
||||
<template #unchecked>
|
||||
Object (key: value)
|
||||
{{ t('tools.docker-pangolin-labels.texts.tag-object-key-value') }}
|
||||
</template>
|
||||
</n-switch>
|
||||
</n-space>
|
||||
|
||||
<n-space justify="center" mb-2>
|
||||
<n-button type="primary" @click="convertBlueprintToLabels">
|
||||
Convert to Docker Labels
|
||||
{{ t('tools.docker-pangolin-labels.texts.tag-convert-to-docker-labels') }}
|
||||
</n-button>
|
||||
</n-space>
|
||||
|
||||
<textarea-copyable
|
||||
v-if="labelsOutput"
|
||||
v-model:value="labelsOutput"
|
||||
label="Generated Docker labels:"
|
||||
:label="t('tools.docker-pangolin-labels.texts.label-generated-docker-labels')"
|
||||
rows="16"
|
||||
language="yaml"
|
||||
placeholder="Docker labels will appear here..."
|
||||
:placeholder="t('tools.docker-pangolin-labels.texts.placeholder-docker-labels-will-appear-here')"
|
||||
/>
|
||||
</n-tab-pane>
|
||||
</n-tabs>
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
import { translate as t } from '@/plugins/i18n.plugin';
|
||||
import { NetworkCheckSharp } from '@vicons/material';
|
||||
import { defineTool } from '../tool';
|
||||
|
||||
export const tool = defineTool({
|
||||
name: 'Docker Pangolin Labels',
|
||||
name: t('tools.docker-pangolin-labels.title'),
|
||||
path: '/docker-pangolin-labels',
|
||||
description: 'Convert Docker Compose Pangolin labels to blueprints and vice versa',
|
||||
description: t('tools.docker-pangolin-labels.description'),
|
||||
keywords: ['docker', 'compose', 'pangolin', 'blueprint', 'labels'],
|
||||
component: () => import('./docker-pangolin-labels.vue'),
|
||||
icon: NetworkCheckSharp,
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
import JSON5 from 'json5';
|
||||
import { ethers } from 'ethers';
|
||||
|
||||
import { translate as t } from '@/plugins/i18n.plugin';
|
||||
|
||||
export function decodeTransaction(abiContract: string, transactionJson: string) {
|
||||
const abi = JSON5.parse(abiContract);
|
||||
const iface = new ethers.Interface(abi);
|
||||
@@ -9,7 +11,7 @@ export function decodeTransaction(abiContract: string, transactionJson: string)
|
||||
: JSON5.parse(transactionJson);
|
||||
|
||||
if (!tx.data || !tx.data.startsWith('0x')) {
|
||||
throw new Error('Transaction data must start with 0x');
|
||||
throw new Error(t('tools.eth-transaction-decoder.service.texts.transaction-data-must-start-with-0x'));
|
||||
}
|
||||
|
||||
const parsed = iface.parseTransaction({ data: tx.data });
|
||||
|
||||
@@ -17,7 +17,7 @@ async function generateIcon(file: File) {
|
||||
});
|
||||
|
||||
if (decodedImage == null) {
|
||||
throw new Error('Invalid PNG file!');
|
||||
throw new Error(t('tools.favicon-generator.texts.invalid-png-file'));
|
||||
};
|
||||
|
||||
return encodeIcoImages({
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
import { translate as t } from '@/plugins/i18n.plugin';
|
||||
|
||||
function chunkByFixedCount<T>(arr: T[], count: number): T[][] {
|
||||
const result: T[][] = [];
|
||||
for (let i = 0; i < arr.length; i += count) {
|
||||
@@ -163,5 +165,5 @@ export function splitContent(
|
||||
});
|
||||
}
|
||||
|
||||
throw new Error('Unsupported format or invalid content');
|
||||
throw new Error(t('tools.file-splitter.service.texts.unsupported-format-or-invalid-content'));
|
||||
}
|
||||
@@ -68,7 +68,7 @@ async function onFileUploaded(uploadedFile: File) {
|
||||
/>
|
||||
</c-card>
|
||||
<c-alert v-if="status === 'error'" type="error">
|
||||
An error occured processing {{ file?.name }}.
|
||||
{{ $t('tools.file-type.texts.an-error-occured-processing') }} <span>{{ file?.name }}</span>
|
||||
</c-alert>
|
||||
<n-spin
|
||||
v-if="status === 'processing'"
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
<script setup lang="ts">
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import {
|
||||
type ActivityLevel,
|
||||
type Gender,
|
||||
@@ -11,6 +12,8 @@ import {
|
||||
cmToInches, inchesToCm, kgToLbs, lbsToKg,
|
||||
} from '@finegym/fitness-calc';
|
||||
|
||||
const { t } = useI18n();
|
||||
|
||||
const unitSystem = ref<'metric' | 'us'>('metric');
|
||||
|
||||
const gender = ref<Gender>('male');
|
||||
@@ -42,13 +45,13 @@ watch(unitSystem, (newValue) => {
|
||||
const formula = ref<'bmr' | 'tdee' | 'bmi' | 'idealWeight' | 'bodyFatUS' | 'bodyFatBMI' | 'maxHR'>('bmr');
|
||||
|
||||
const formulaOptions = [
|
||||
{ label: 'BMR', value: 'bmr' },
|
||||
{ label: 'TDEE/Calories', value: 'tdee' },
|
||||
{ label: 'BMI', value: 'bmi' },
|
||||
{ label: 'Ideal Weight', value: 'idealWeight' },
|
||||
{ label: 'Body Fat (US Navy)', value: 'bodyFatUS' },
|
||||
{ label: 'Body Fat (BMI)', value: 'bodyFatBMI' },
|
||||
{ label: 'Max Heart Rate', value: 'maxHR' },
|
||||
{ label: t('tools.fitness-computer.texts.label-bmr'), value: 'bmr' },
|
||||
{ label: t('tools.fitness-computer.texts.label-tdee-calories'), value: 'tdee' },
|
||||
{ label: t('tools.fitness-computer.texts.label-bmi'), value: 'bmi' },
|
||||
{ label: t('tools.fitness-computer.texts.label-ideal-weight'), value: 'idealWeight' },
|
||||
{ label: t('tools.fitness-computer.texts.label-body-fat-us-navy'), value: 'bodyFatUS' },
|
||||
{ label: t('tools.fitness-computer.texts.label-body-fat-bmi'), value: 'bodyFatBMI' },
|
||||
{ label: t('tools.fitness-computer.texts.label-max-heart-rate'), value: 'maxHR' },
|
||||
];
|
||||
|
||||
const height = computed(() =>
|
||||
@@ -153,33 +156,33 @@ const maxHR = computed(() => calculateHeartRateZones(age.value));
|
||||
<template>
|
||||
<div>
|
||||
<n-form label-width="140px" label-placement="left">
|
||||
<n-form-item label="Units:">
|
||||
<n-form-item :label="t('tools.fitness-computer.texts.label-units')">
|
||||
<n-radio-group v-model:value="unitSystem">
|
||||
<n-radio value="metric">
|
||||
Metric (kg, cm)
|
||||
{{ t('tools.fitness-computer.texts.tag-metric-kg-cm') }}
|
||||
</n-radio>
|
||||
<n-radio value="us">
|
||||
US (lbs, inches)
|
||||
{{ t('tools.fitness-computer.texts.tag-us-lbs-inches') }}
|
||||
</n-radio>
|
||||
</n-radio-group>
|
||||
</n-form-item>
|
||||
|
||||
<n-form-item label="Formula:">
|
||||
<n-form-item :label="t('tools.fitness-computer.texts.label-formula')">
|
||||
<n-select v-model:value="formula" :options="formulaOptions" />
|
||||
</n-form-item>
|
||||
|
||||
<n-form-item label="Gender:">
|
||||
<n-form-item :label="t('tools.fitness-computer.texts.label-gender')">
|
||||
<n-radio-group v-model:value="gender">
|
||||
<n-radio value="male">
|
||||
Male
|
||||
{{ t('tools.fitness-computer.texts.tag-male') }}
|
||||
</n-radio>
|
||||
<n-radio value="female">
|
||||
Female
|
||||
{{ t('tools.fitness-computer.texts.tag-female') }}
|
||||
</n-radio>
|
||||
</n-radio-group>
|
||||
</n-form-item>
|
||||
|
||||
<n-form-item label="Age:">
|
||||
<n-form-item :label="t('tools.fitness-computer.texts.label-age')">
|
||||
<n-input-number v-model:value="age" :min="1" />
|
||||
</n-form-item>
|
||||
|
||||
@@ -197,7 +200,7 @@ const maxHR = computed(() => calculateHeartRateZones(age.value));
|
||||
/>
|
||||
</n-form-item>
|
||||
|
||||
<n-card v-if="formula === 'bodyFatUS' || formula === 'bodyFatBMI'" title="Body Measurements" mb-2>
|
||||
<n-card v-if="formula === 'bodyFatUS' || formula === 'bodyFatBMI'" :title="t('tools.fitness-computer.texts.title-body-measurements')" mb-2>
|
||||
<n-form-item :label="unitSystem === 'metric' ? 'Neck (cm):' : 'Neck (in):'" label-width="110px">
|
||||
<n-input-number
|
||||
v-model:value="neckInput"
|
||||
@@ -224,60 +227,60 @@ const maxHR = computed(() => calculateHeartRateZones(age.value));
|
||||
</n-card>
|
||||
|
||||
<template v-if="formula === 'tdee'">
|
||||
<n-form-item label="Activity Level:">
|
||||
<n-form-item :label="t('tools.fitness-computer.texts.label-activity-level')">
|
||||
<n-select
|
||||
v-model:value="activity"
|
||||
:options="[
|
||||
{ label: 'Sedentary: little or no exercise', value: 'sedentary' },
|
||||
{ label: 'Light: exercise 1-3 times/week', value: 'light' },
|
||||
{ label: 'Moderate: exercise 4-5 times/week', value: 'moderate' },
|
||||
{ label: 'Active: daily exercise or intense exercise 3-4 times/week', value: 'active' },
|
||||
{ label: 'Very Active: intense exercise 6-7 times/week', value: 'very_active' },
|
||||
{ label: 'Extra Active: very intense exercise daily, or physical job', value: 'extra_active' },
|
||||
{ label: t('tools.fitness-computer.texts.label-sedentary-little-or-no-exercise'), value: 'sedentary' },
|
||||
{ label: t('tools.fitness-computer.texts.label-light-exercise-1-3-times-week'), value: 'light' },
|
||||
{ label: t('tools.fitness-computer.texts.label-moderate-exercise-4-5-times-week'), value: 'moderate' },
|
||||
{ label: t('tools.fitness-computer.texts.label-active-daily-exercise-or-intense-exercise-3-4-times-week'), value: 'active' },
|
||||
{ label: t('tools.fitness-computer.texts.label-very-active-intense-exercise-6-7-times-week'), value: 'very_active' },
|
||||
{ label: t('tools.fitness-computer.texts.label-extra-active-very-intense-exercise-daily-or-physical-job'), value: 'extra_active' },
|
||||
]"
|
||||
/>
|
||||
</n-form-item>
|
||||
</template>
|
||||
</n-form>
|
||||
|
||||
<n-card title="Results">
|
||||
<n-card :title="t('tools.fitness-computer.texts.title-results')">
|
||||
<template v-if="formula === 'bmr'">
|
||||
<input-copyable :value="bmr.bmr" label="BMR (kcal/day):" label-position="left" mb-1 />
|
||||
<input-copyable :value="bmr.bmr" :label="t('tools.fitness-computer.texts.label-bmr-kcal-day')" label-position="left" mb-1 />
|
||||
</template>
|
||||
|
||||
<template v-if="formula === 'tdee'">
|
||||
<input-copyable :value="tdee.tdee" label="TDEE/Calories (kcal/day):" label-position="left" mb-1 />
|
||||
<input-copyable :value="tdee.tdee" :label="t('tools.fitness-computer.texts.label-tdee-calories-kcal-day')" label-position="left" mb-1 />
|
||||
</template>
|
||||
|
||||
<template v-if="formula === 'bmi'">
|
||||
<input-copyable :value="bmi.bmi.toFixed(2)" label="BMI:" label-position="left" label-width="150px" mb-1 />
|
||||
<input-copyable :value="bmi.category" label="BMI Category:" label-position="left" label-width="150px" mb-1 />
|
||||
<input-copyable :value="bmi.healthyWeightRange.min" label="Healthy Range (min):" label-position="left" label-width="150px" mb-1 />
|
||||
<input-copyable :value="bmi.healthyWeightRange.max" label="Healthy Range (max):" label-position="left" label-width="150px" mb-1 />
|
||||
<input-copyable :value="bmi.bmi.toFixed(2)" :label="t('tools.fitness-computer.texts.label-bmi')" label-position="left" label-width="150px" mb-1 />
|
||||
<input-copyable :value="bmi.category" :label="t('tools.fitness-computer.texts.label-bmi-category')" label-position="left" label-width="150px" mb-1 />
|
||||
<input-copyable :value="bmi.healthyWeightRange.min" :label="t('tools.fitness-computer.texts.label-healthy-range-min')" label-position="left" label-width="150px" mb-1 />
|
||||
<input-copyable :value="bmi.healthyWeightRange.max" :label="t('tools.fitness-computer.texts.label-healthy-range-max')" label-position="left" label-width="150px" mb-1 />
|
||||
</template>
|
||||
|
||||
<template v-if="formula === 'idealWeight'">
|
||||
<input-copyable :value="idealWeight.average.toFixed(1)" label="Ideal Weight:" label-position="left" label-width="140px" mb-1 />
|
||||
<input-copyable :value="idealWeight.devine.toFixed(1)" label="— (Devine 1974):" label-position="left" label-width="140px" mb-1 />
|
||||
<input-copyable :value="idealWeight.hamwi.toFixed(1)" label="— (Hamwi 1964):" label-position="left" label-width="140px" mb-1 />
|
||||
<input-copyable :value="idealWeight.miller.toFixed(1)" label="— (Miller 1983):" label-position="left" label-width="140px" mb-1 />
|
||||
<input-copyable :value="idealWeight.robinson.toFixed(1)" label="— (Robinson 1983):" label-position="left" label-width="140px" mb-1 />
|
||||
<input-copyable :value="idealWeight.average.toFixed(1)" :label="t('tools.fitness-computer.texts.label-ideal-weight')" label-position="left" label-width="140px" mb-1 />
|
||||
<input-copyable :value="idealWeight.devine.toFixed(1)" :label="t('tools.fitness-computer.texts.label-devine-1974')" label-position="left" label-width="140px" mb-1 />
|
||||
<input-copyable :value="idealWeight.hamwi.toFixed(1)" :label="t('tools.fitness-computer.texts.label-hamwi-1964')" label-position="left" label-width="140px" mb-1 />
|
||||
<input-copyable :value="idealWeight.miller.toFixed(1)" :label="t('tools.fitness-computer.texts.label-miller-1983')" label-position="left" label-width="140px" mb-1 />
|
||||
<input-copyable :value="idealWeight.robinson.toFixed(1)" :label="t('tools.fitness-computer.texts.label-robinson-1983')" label-position="left" label-width="140px" mb-1 />
|
||||
</template>
|
||||
|
||||
<template v-if="formula === 'bodyFatUS'">
|
||||
<input-copyable :value="bodyFatUSNavy.bodyFatPercentage.toFixed(1)" label="Body Fat (%):" label-position="left" label-width="120px" mb-1 />
|
||||
<input-copyable :value="bodyFatUSNavy.fatMass.toFixed(1)" label="Fat Mass:" label-position="left" label-width="120px" mb-1 />
|
||||
<input-copyable :value="bodyFatUSNavy.leanMass.toFixed(1)" label="Lean Mass:" label-position="left" label-width="120px" mb-1 />
|
||||
<input-copyable :value="bodyFatUSNavy.bodyFatPercentage.toFixed(1)" :label="t('tools.fitness-computer.texts.label-body-fat')" label-position="left" label-width="120px" mb-1 />
|
||||
<input-copyable :value="bodyFatUSNavy.fatMass.toFixed(1)" :label="t('tools.fitness-computer.texts.label-fat-mass')" label-position="left" label-width="120px" mb-1 />
|
||||
<input-copyable :value="bodyFatUSNavy.leanMass.toFixed(1)" :label="t('tools.fitness-computer.texts.label-lean-mass')" label-position="left" label-width="120px" mb-1 />
|
||||
</template>
|
||||
|
||||
<template v-if="formula === 'bodyFatBMI'">
|
||||
<input-copyable :value="bodyFatBMI.bodyFatPercentage.toFixed(1)" label="Body Fat (%):" label-position="left" label-width="120px" mb-1 />
|
||||
<input-copyable :value="bodyFatBMI.fatMass.toFixed(1)" label="Fat Mass:" label-position="left" label-width="120px" mb-1 />
|
||||
<input-copyable :value="bodyFatBMI.leanMass.toFixed(1)" label="Lean Mass:" label-position="left" label-width="120px" mb-1 />
|
||||
<input-copyable :value="bodyFatBMI.bodyFatPercentage.toFixed(1)" :label="t('tools.fitness-computer.texts.label-body-fat')" label-position="left" label-width="120px" mb-1 />
|
||||
<input-copyable :value="bodyFatBMI.fatMass.toFixed(1)" :label="t('tools.fitness-computer.texts.label-fat-mass')" label-position="left" label-width="120px" mb-1 />
|
||||
<input-copyable :value="bodyFatBMI.leanMass.toFixed(1)" :label="t('tools.fitness-computer.texts.label-lean-mass')" label-position="left" label-width="120px" mb-1 />
|
||||
</template>
|
||||
|
||||
<template v-if="formula === 'maxHR'">
|
||||
<input-copyable :value="maxHR.maxHeartRate" label="Max Heart Rate (bpm):" label-position="left" label-width="160px" mb-1 />
|
||||
<input-copyable :value="maxHR.maxHeartRate" :label="t('tools.fitness-computer.texts.label-max-heart-rate-bpm')" label-position="left" label-width="160px" mb-1 />
|
||||
<input-copyable v-for="(zone, index) in maxHR.zones" :key="index" :value="`${zone.min} - ${zone.max}: ${zone.description}`" :label="zone.name" label-position="left" label-width="160px" mb-1 />
|
||||
</template>
|
||||
</n-card>
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
import { translate as t } from '@/plugins/i18n.plugin';
|
||||
import { Pacman } from '@vicons/tabler';
|
||||
import { defineTool } from '../tool';
|
||||
|
||||
export const tool = defineTool({
|
||||
name: 'Fitness Computer',
|
||||
name: t('tools.fitness-computer.title'),
|
||||
path: '/fitness-computer',
|
||||
description: 'Compute BMR (Basal Metabolic Rate), TDEE / Calories (Total Daily Energy Expenditure), BMI (Body Mass Index), Ideal Weight (Ideal Body Weight), Body Fat (Body Fat Percentage), Max HR (Maximum Heart Rate): key metrics used to assess overall fitness and physiological health.',
|
||||
description: t('tools.fitness-computer.description'),
|
||||
keywords: ['fitness', 'calories', 'bmi', 'bmr', 'weight', 'fat', 'body', 'fat', 'mass', 'heart'],
|
||||
component: () => import('./fitness-computer.vue'),
|
||||
icon: Pacman,
|
||||
|
||||
@@ -175,7 +175,7 @@ interface UploadEvents {
|
||||
</details>
|
||||
|
||||
<NTabs v-model:value="activeTab" type="segment">
|
||||
<NTabPane name="fontname" tab="By Font Name">
|
||||
<NTabPane name="fontname" :tab="t('tools.font-compare.text.by-font-name')">
|
||||
<NGrid :cols="2" :x-gap="24">
|
||||
<NGi v-for="(font, index) in [fontA, fontB]" :key="index">
|
||||
<NSelect
|
||||
@@ -192,7 +192,7 @@ interface UploadEvents {
|
||||
</NGrid>
|
||||
</NTabPane>
|
||||
|
||||
<NTabPane name="fonturl" tab="By Font URL">
|
||||
<NTabPane name="fonturl" :tab="t('tools.font-compare.text.by-font-url')">
|
||||
<NGrid :cols="2" :x-gap="24">
|
||||
<NGi v-for="(font, index) in [fontA, fontB]" :key="index">
|
||||
<NInput
|
||||
@@ -209,7 +209,7 @@ interface UploadEvents {
|
||||
</NGrid>
|
||||
</NTabPane>
|
||||
|
||||
<NTabPane name="fontfile" tab="By Font File">
|
||||
<NTabPane name="fontfile" :tab="t('tools.font-compare.text.by-font-file')">
|
||||
<NGrid :cols="2" :x-gap="24">
|
||||
<NGi v-for="(font, index) in [fontA, fontB]" :key="index">
|
||||
<NUpload
|
||||
@@ -227,7 +227,7 @@ interface UploadEvents {
|
||||
</NGi>
|
||||
</NGrid>
|
||||
</NTabPane>
|
||||
<NTabPane name="inlinecss" tab="By Inline CSS">
|
||||
<NTabPane name="inlinecss" :tab="t('tools.font-compare.text.by-inline-css')">
|
||||
<NGrid :cols="2" :x-gap="24">
|
||||
<NGi v-for="(font, index) in [fontA, fontB]" :key="index">
|
||||
<NInput
|
||||
@@ -250,7 +250,7 @@ interface UploadEvents {
|
||||
</NGi>
|
||||
</NGrid>
|
||||
</NTabPane>
|
||||
<NTabPane name="cssurl" tab="By CSS URL">
|
||||
<NTabPane name="cssurl" :tab="t('tools.font-compare.text.by-css-url')">
|
||||
<NGrid :cols="2" :x-gap="24">
|
||||
<NGi v-for="(font, index) in [fontA, fontB]" :key="index">
|
||||
<NInput
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
import { translate as t } from '@/plugins/i18n.plugin';
|
||||
import { Crane } from '@vicons/tabler';
|
||||
import { defineTool } from '../tool';
|
||||
|
||||
export const tool = defineTool({
|
||||
name: 'Food Energy Converter',
|
||||
name: t('tools.food-energy-converter.title'),
|
||||
path: '/food-energy-converter',
|
||||
description: 'Convert between food (joule, calories)',
|
||||
description: t('tools.food-energy-converter.description'),
|
||||
keywords: ['food', 'energy', 'units', 'joule', 'calories'],
|
||||
component: () => import('./food-energy-converter.vue'),
|
||||
icon: Crane,
|
||||
|
||||
@@ -31,9 +31,9 @@ const resultsDisplay = computed(() => {
|
||||
});
|
||||
|
||||
const columns = [
|
||||
{ title: 'Coordinate System', key: 'system' },
|
||||
{ title: 'Decimal Format (lng, lat)', key: 'decimal' },
|
||||
{ title: 'DMS Format (lng, lat)', key: 'dms' },
|
||||
{ title: t('tools.geo-coordinates-converter.text.coordinate-system'), key: 'system' },
|
||||
{ title: t('tools.geo-coordinates-converter.text.decimal-format-lng-lat'), key: 'decimal' },
|
||||
{ title: t('tools.geo-coordinates-converter.text.dms-format-lng-lat'), key: 'dms' },
|
||||
];
|
||||
|
||||
function convertSingle() {
|
||||
@@ -112,7 +112,7 @@ function toDMS(deg: number) {
|
||||
</n-radio-group>
|
||||
|
||||
<n-tabs type="card" mb-1>
|
||||
<n-tab-pane name="single" tab="Single Lat/Lng Converter">
|
||||
<n-tab-pane name="single" :tab="t('tools.geo-coordinates-converter.text.single-lat-lng-converter')">
|
||||
<n-space justify="center">
|
||||
<n-form-item :label="t('tools.geo-coordinates-converter.texts.label-latitude')" label-placement="left">
|
||||
<n-input-number-i18n v-model:value="inputLatitude" />
|
||||
@@ -127,7 +127,7 @@ function toDMS(deg: number) {
|
||||
</n-button>
|
||||
</n-space>
|
||||
</n-tab-pane>
|
||||
<n-tab-pane name="batch" tab="Batch Lat/Lng Converter">
|
||||
<n-tab-pane name="batch" :tab="t('tools.geo-coordinates-converter.text.batch-lat-lng-converter')">
|
||||
<c-input-text
|
||||
v-model:value="inputCSV"
|
||||
:label="t('tools.geo-coordinates-converter.texts.label-csv-content-lng-lat')"
|
||||
@@ -157,7 +157,7 @@ function toDMS(deg: number) {
|
||||
:disabled="resultsData.length === 0"
|
||||
@click="downloadCsv"
|
||||
>
|
||||
Download {{ resultsData.length }} Results CSV
|
||||
{{ $t('tools.geo-coordinates-converter.text.download-results-csv') }}
|
||||
</n-button>
|
||||
</n-space>
|
||||
</c-card>
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import type { Tiktoken, TiktokenModel } from 'js-tiktoken';
|
||||
import { encodingForModel } from 'js-tiktoken';
|
||||
import { promptTokensEstimate } from 'openai-chat-tokens';
|
||||
import { translate as t } from '@/plugins/i18n.plugin';
|
||||
|
||||
interface MessageItem {
|
||||
name?: string
|
||||
@@ -48,11 +49,11 @@ export class GPTTokens {
|
||||
|
||||
private checkOptions() {
|
||||
if (!this.messages && !this.tools) {
|
||||
throw new Error('Must set one of messages | function');
|
||||
throw new Error(t('tools.gpt-tokens.service.texts.must-set-one-of-messages-or-function'));
|
||||
}
|
||||
|
||||
if (this.tools && !this.messages) {
|
||||
throw new Error('Function must set messages');
|
||||
throw new Error(t('tools.gpt-tokens.service.texts.function-must-set-messages'));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -80,7 +80,8 @@ async function onFileUploaded(uploadedFile: File) {
|
||||
|
||||
<div mt-3 flex justify-center>
|
||||
<c-alert v-if="status === 'error'" type="error">
|
||||
An error occured processing {{ fileName }}. HEIC/HEIF is invalid.
|
||||
{{ $t('tools.heic-converter.texts.an-error-occured-processing-heic-heif-is-invalid') }}
|
||||
<span>{{ fileName }}</span>
|
||||
</c-alert>
|
||||
<n-spin
|
||||
v-if="status === 'processing'"
|
||||
|
||||
@@ -32,7 +32,7 @@ async function onFileUploaded(uploadedFile: File) {
|
||||
largest: true,
|
||||
});
|
||||
if (decodedIco == null) {
|
||||
throw new Error('Invalid ICO file!');
|
||||
throw new Error(t('tools.ico-converter.texts.invalid-ico-file'));
|
||||
}
|
||||
const encodedPng = encodePng({
|
||||
image: decodedIco,
|
||||
@@ -46,7 +46,7 @@ async function onFileUploaded(uploadedFile: File) {
|
||||
});
|
||||
|
||||
if (decodedImage == null) {
|
||||
throw new Error('Invalid PNG file!');
|
||||
throw new Error(t('tools.ico-converter.texts.invalid-png-file'));
|
||||
};
|
||||
|
||||
const encodedICO = encodeIcoImages({
|
||||
@@ -84,7 +84,7 @@ async function onFileUploaded(uploadedFile: File) {
|
||||
|
||||
<div mt-3 flex justify-center>
|
||||
<c-alert v-if="status === 'error'" type="error">
|
||||
An error occured processing {{ fileName }}
|
||||
{{ $t('tools.ico-converter.texts.an-error-occured-processing') }} <span>{{ fileName }}</span>
|
||||
</c-alert>
|
||||
<n-spin
|
||||
v-if="status === 'processing'"
|
||||
|
||||
@@ -1,15 +1,17 @@
|
||||
import { translate as t } from '@/plugins/i18n.plugin';
|
||||
|
||||
export function invertImageFile(file: File): Promise<string> {
|
||||
return new Promise((resolve, reject) => {
|
||||
// Validate file type
|
||||
if (!file.type.startsWith('image/')) {
|
||||
reject(new Error('File must be an image'));
|
||||
reject(new Error(t('tools.image-color-inverter.service.texts.file-must-be-an-image')));
|
||||
return;
|
||||
}
|
||||
|
||||
// Check file size (limit to 10MB)
|
||||
const maxSize = 10 * 1024 * 1024; // 10MB
|
||||
if (file.size > maxSize) {
|
||||
reject(new Error('Image file size must be less than 10MB'));
|
||||
reject(new Error(t('tools.image-color-inverter.texts.error-image-file-size-must-be-less-than-10mb')));
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -25,7 +27,7 @@ export function invertImageFile(file: File): Promise<string> {
|
||||
const ctx = canvas.getContext('2d');
|
||||
|
||||
if (!ctx) {
|
||||
reject(new Error('Failed to get canvas context'));
|
||||
reject(new Error(t('tools.image-color-inverter.texts.error-failed-to-get-canvas-context')));
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -54,18 +56,18 @@ export function invertImageFile(file: File): Promise<string> {
|
||||
const invertedDataUrl = canvas.toDataURL('image/png');
|
||||
resolve(invertedDataUrl);
|
||||
}
|
||||
catch (err) {
|
||||
reject(new Error(`Failed to process image: ${err}`));
|
||||
catch (err: any) {
|
||||
reject(new Error(`${t('tools.image-color-inverter.service.texts.failed-to-process-image-err')} ${err.toString()}`));
|
||||
}
|
||||
};
|
||||
|
||||
img.onerror = () => {
|
||||
reject(new Error('Failed to load image'));
|
||||
reject(new Error(t('tools.image-color-inverter.texts.error-failed-to-load-image')));
|
||||
};
|
||||
};
|
||||
|
||||
reader.onerror = () => {
|
||||
reject(new Error('Failed to read file'));
|
||||
reject(new Error(t('tools.image-color-inverter.texts.error-failed-to-read-file')));
|
||||
};
|
||||
|
||||
reader.readAsDataURL(file);
|
||||
|
||||
@@ -55,7 +55,7 @@ function renderViewer() {
|
||||
<template>
|
||||
<NCard :title="t('tools.image-comparer.texts.title-image-compare-viewer')" style="max-width: 800px; margin: auto;">
|
||||
<NTabs type="segment">
|
||||
<NTabPane name="url" tab="Compare by URL">
|
||||
<NTabPane name="url" :tab="t('tools.image-comparer.text.compare-by-url')">
|
||||
<NForm label-placement="left" label-width="150px">
|
||||
<NFormItem :label="t('tools.image-comparer.texts.label-left-image-url')">
|
||||
<NInput v-model:value="leftUrl" :placeholder="t('tools.image-comparer.texts.placeholder-enter-left-image-url')" />
|
||||
@@ -71,7 +71,7 @@ function renderViewer() {
|
||||
</NForm>
|
||||
</NTabPane>
|
||||
|
||||
<NTabPane name="upload" tab="Compare by Upload">
|
||||
<NTabPane name="upload" :tab="t('tools.image-comparer.text.compare-by-upload')">
|
||||
<NForm label-placement="left">
|
||||
<n-space justify="space-evenly">
|
||||
<NFormItem :label="t('tools.image-comparer.texts.label-upload-left-image')">
|
||||
|
||||
@@ -116,7 +116,7 @@ async function onFileUploaded(uploadedFile: File) {
|
||||
});
|
||||
|
||||
if (decodedImage == null) {
|
||||
throw new Error('Invalid Image file!');
|
||||
throw new Error(t('tools.image-converter.texts.invalid-image-file'));
|
||||
};
|
||||
|
||||
const outConfig = outputFormats[outputFormatValue as (keyof typeof outputFormats)];
|
||||
@@ -173,7 +173,7 @@ async function onFileUploaded(uploadedFile: File) {
|
||||
|
||||
<div mt-3 flex justify-center>
|
||||
<c-alert v-if="status === 'error'" type="error">
|
||||
An error occured processing {{ fileName }}
|
||||
{{ $t('tools.image-converter.texts.an-error-occured-processing') }} <span>{{ fileName }}</span>
|
||||
</c-alert>
|
||||
<n-spin
|
||||
v-if="status === 'processing'"
|
||||
|
||||
@@ -257,7 +257,7 @@ onUnmounted(() => {
|
||||
<!-- Loading indicator when more results are coming -->
|
||||
<div v-if="visibleResultsCount < searchResult.length" mt-6 text-center>
|
||||
<div text-14px op-70>
|
||||
Loading more results... ({{ visibleSearchResults.length }}/{{ searchResult.length }})
|
||||
{{ t('tools.iso-3166-searcher.texts.loading-more-results') }} ({{ visibleSearchResults.length }}/{{ searchResult.length }})
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
import { translate as t } from '@/plugins/i18n.plugin';
|
||||
import { Language } from '@vicons/tabler';
|
||||
import { defineTool } from '../tool';
|
||||
|
||||
export const tool = defineTool({
|
||||
name: 'ISO 639 Searcher',
|
||||
name: t('tools.iso-639-searcher.title'),
|
||||
path: '/iso-639-searcher',
|
||||
description: 'Search in ISO 639-1/2T/2B/3 language codes',
|
||||
description: t('tools.iso-639-searcher.description'),
|
||||
keywords: ['iso639', 'language', 'langcode', 'searcher'],
|
||||
component: () => import('./iso-639-searcher.vue'),
|
||||
icon: Language,
|
||||
|
||||
@@ -1,9 +1,12 @@
|
||||
<script setup lang="ts">
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import { computed, nextTick, onUnmounted, ref } from 'vue';
|
||||
import { all as allCodes } from 'langs';
|
||||
import useDebouncedRef from '@/composable/debouncedref';
|
||||
import { useFlexSearch } from '@/composable/flexSearch';
|
||||
|
||||
const { t } = useI18n();
|
||||
|
||||
const searchQuery = useDebouncedRef('', 250);
|
||||
const langsSearchData = allCodes();
|
||||
const limit = ref(20);
|
||||
@@ -80,32 +83,32 @@ onUnmounted(() => {
|
||||
<template>
|
||||
<div mx-auto max-w-2400px important:flex-1>
|
||||
<div mx-auto max-w-600px flex justify-center gap-3>
|
||||
<c-input-text v-model:value="searchQuery" placeholder="Search iso-639 language code by iso-1, iso-2T/2B, iso-3, name...">
|
||||
<c-input-text v-model:value="searchQuery" :placeholder="t('tools.iso-639-searcher.texts.placeholder-search-iso-639-language-code-by-iso-1-iso-2t-2b-iso-3-name')">
|
||||
<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-form-item :label="t('tools.iso-639-searcher.texts.label-max-results')" label-placement="left">
|
||||
<n-input-number-i18n v-model:value="limit" :min="1" />
|
||||
</n-form-item>
|
||||
</div>
|
||||
|
||||
<div v-if="searchQuery.trim().length > 0">
|
||||
<div v-if="searchResult.length === 0" mt-4 text-20px font-bold>
|
||||
No results
|
||||
{{ t('tools.iso-639-searcher.texts.tag-no-results') }}
|
||||
</div>
|
||||
|
||||
<div v-else>
|
||||
<div mt-4 text-20px font-bold>
|
||||
Search Results
|
||||
{{ t('tools.iso-639-searcher.texts.tag-search-results') }}
|
||||
</div>
|
||||
|
||||
<n-table>
|
||||
<thead>
|
||||
<th>iso-639-1</th>
|
||||
<th>iso-639-2T/2B</th>
|
||||
<th>iso-639-3</th>
|
||||
<th>English and local name</th>
|
||||
<th>{{ t('tools.iso-639-searcher.texts.tag-iso-639-1') }}</th>
|
||||
<th>{{ t('tools.iso-639-searcher.texts.tag-iso-639-2t-2b') }}</th>
|
||||
<th>{{ t('tools.iso-639-searcher.texts.tag-iso-639-3') }}</th>
|
||||
<th>{{ t('tools.iso-639-searcher.texts.tag-english-and-local-name') }}</th>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr v-for="(result, ix) in visibleSearchResults" :key="ix">
|
||||
@@ -113,14 +116,14 @@ onUnmounted(() => {
|
||||
<input-copyable :value="result[1]" :readonly="true" />
|
||||
</td>
|
||||
<td>
|
||||
<input-copyable label-position="left" label="2B:" :value="result['2B']" :readonly="true" mb-1 />
|
||||
<input-copyable label-position="left" label="2T:" :value="result['2T']" :readonly="true" />
|
||||
<input-copyable label-position="left" :label="t('tools.iso-639-searcher.texts.label-2b')" :value="result['2B']" :readonly="true" mb-1 />
|
||||
<input-copyable label-position="left" :label="t('tools.iso-639-searcher.texts.label-2t')" :value="result['2T']" :readonly="true" />
|
||||
</td>
|
||||
<td>
|
||||
<input-copyable :value="result['3']" :readonly="true" />
|
||||
</td>
|
||||
<td>
|
||||
<input-copyable label-position="left" label="ENG:" :value="result.name" :readonly="true" mb-1 />
|
||||
<input-copyable label-position="left" :label="t('tools.iso-639-searcher.texts.label-eng')" :value="result.name" :readonly="true" mb-1 />
|
||||
<input-copyable :value="result.local" :readonly="true" />
|
||||
</td>
|
||||
</tr>
|
||||
@@ -130,7 +133,7 @@ onUnmounted(() => {
|
||||
<!-- Loading indicator when more results are coming -->
|
||||
<div v-if="visibleResultsCount < searchResult.length" mt-6 text-center>
|
||||
<div text-14px op-70>
|
||||
Loading more results... ({{ visibleSearchResults.length }}/{{ searchResult.length }})
|
||||
{{ $t('tools.iso-639-searcher.texts.loading-more-results') }} ({{ visibleSearchResults.length }}/{{ searchResult.length }})
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
import { translate as t } from '@/plugins/i18n.plugin';
|
||||
import { ShieldOff } from '@vicons/tabler';
|
||||
import { defineTool } from '../tool';
|
||||
|
||||
export const tool = defineTool({
|
||||
name: 'Jasypt String Encryption',
|
||||
name: t('tools.jasypt-string-encryption.title'),
|
||||
path: '/jasypt-string-encryption',
|
||||
description: 'Encrypt and decrypt strings using the Jasypt (Java Simplified Encryption) standard.',
|
||||
description: t('tools.jasypt-string-encryption.description'),
|
||||
keywords: ['jasypt', 'java', 'spring', 'boot', 'string', 'encryption'],
|
||||
component: () => import('./jasypt-string-encryption.vue'),
|
||||
icon: ShieldOff,
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
<script setup lang="ts">
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import Jasypt from 'jasypt';
|
||||
|
||||
const { t } = useI18n();
|
||||
|
||||
const mode = ref<'encrypt' | 'decrypt'>('encrypt');
|
||||
const password = ref('');
|
||||
const inputText = ref('');
|
||||
@@ -36,34 +39,34 @@ function run() {
|
||||
<template>
|
||||
<div>
|
||||
<NForm label-placement="left" label-width="160px">
|
||||
<NFormItem label="Mode:">
|
||||
<NFormItem :label="t('tools.jasypt-string-encryption.texts.label-mode')">
|
||||
<NRadioGroup v-model:value="mode" size="small">
|
||||
<NRadioButton value="encrypt">
|
||||
Encrypt
|
||||
{{ t('tools.jasypt-string-encryption.texts.tag-encrypt') }}
|
||||
</NRadioButton>
|
||||
<NRadioButton value="decrypt">
|
||||
Decrypt
|
||||
{{ t('tools.jasypt-string-encryption.texts.tag-decrypt') }}
|
||||
</NRadioButton>
|
||||
</NRadioGroup>
|
||||
</NFormItem>
|
||||
|
||||
<NFormItem label="Password (Secret Key):">
|
||||
<NFormItem :label="t('tools.jasypt-string-encryption.texts.label-password-secret-key')">
|
||||
<NInput
|
||||
v-model:value="password"
|
||||
type="password"
|
||||
show-password-on="click"
|
||||
placeholder="Enter Jasypt password (salt / secret key)"
|
||||
:placeholder="t('tools.jasypt-string-encryption.texts.placeholder-enter-jasypt-password-salt-secret-key')"
|
||||
/>
|
||||
</NFormItem>
|
||||
|
||||
<NFormItem :label="isEncryptMode ? 'Plain Text:' : 'Jasypt Encrypted String:'">
|
||||
<NFormItem :label="isEncryptMode ? t('tools.jasypt-string-encryption.texts.plain-text') : t('tools.jasypt-string-encryption.texts.jasypt-encrypted-string')">
|
||||
<NInput
|
||||
v-model:value="inputText"
|
||||
type="textarea"
|
||||
rows="6"
|
||||
:placeholder="isEncryptMode
|
||||
? 'Text to encrypt (e.g. DB password)'
|
||||
: 'Encrypted value (e.g. ENC(...)) or raw Jasypt string'"
|
||||
? t('tools.jasypt-string-encryption.texts.text-to-encrypt-e-g-db-password')
|
||||
: t('tools.jasypt-string-encryption.texts.encrypted-value-e-g-enc-or-raw-jasypt-string')"
|
||||
/>
|
||||
</NFormItem>
|
||||
|
||||
@@ -77,10 +80,10 @@ function run() {
|
||||
{{ error }}
|
||||
</c-alert>
|
||||
|
||||
<NCard v-if="outputRaw" title="Results">
|
||||
<input-copyable label="Decoded:" label-position="left" :value="outputRaw" mb-1 />
|
||||
<input-copyable v-if="isEncryptMode" label="Raw:" label-position="left" :value="outputRaw" mb-1 />
|
||||
<input-copyable v-if="isEncryptMode" label="ENC Form:" label-position="left" :value="outputEncSyntax" />
|
||||
<NCard v-if="outputRaw" :title="t('tools.jasypt-string-encryption.texts.title-results')">
|
||||
<input-copyable :label="t('tools.jasypt-string-encryption.texts.label-decoded')" label-position="left" :value="outputRaw" mb-1 />
|
||||
<input-copyable v-if="isEncryptMode" :label="t('tools.jasypt-string-encryption.texts.label-raw')" label-position="left" :value="outputRaw" mb-1 />
|
||||
<input-copyable v-if="isEncryptMode" :label="t('tools.jasypt-string-encryption.texts.label-enc-form')" label-position="left" :value="outputEncSyntax" />
|
||||
</NCard>
|
||||
</NForm>
|
||||
</div>
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
import { translate as t } from '@/plugins/i18n.plugin';
|
||||
import { ShieldChevron } from '@vicons/tabler';
|
||||
import { defineTool } from '../tool';
|
||||
|
||||
export const tool = defineTool({
|
||||
name: 'Kubernetes RBAC Generator',
|
||||
name: t('tools.k8s-rbac-generator.title'),
|
||||
path: '/k8s-rbac-generator',
|
||||
description: 'Generate k8s RBAC policy YAML',
|
||||
description: t('tools.k8s-rbac-generator.description'),
|
||||
keywords: ['k8s', 'kubernetes', 'rbac', 'policy', 'generator'],
|
||||
component: () => import('./k8s-rbac-generator.vue'),
|
||||
icon: ShieldChevron,
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
<script setup lang="ts">
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import YAML, { Scalar, YAMLSeq } from 'yaml';
|
||||
|
||||
const { t } = useI18n();
|
||||
|
||||
const RESOURCE_REGISTRY: Record<string, string> = {
|
||||
// core
|
||||
'pods': '',
|
||||
@@ -89,9 +92,9 @@ const subjects = reactive<
|
||||
]);
|
||||
|
||||
const subjectKinds = [
|
||||
{ label: 'User', value: 'User' },
|
||||
{ label: 'Group', value: 'Group' },
|
||||
{ label: 'ServiceAccount', value: 'ServiceAccount' },
|
||||
{ label: t('tools.k8s-rbac-generator.texts.label-user'), value: 'User' },
|
||||
{ label: t('tools.k8s-rbac-generator.texts.label-group'), value: 'Group' },
|
||||
{ label: t('tools.k8s-rbac-generator.texts.label-serviceaccount'), value: 'ServiceAccount' },
|
||||
];
|
||||
|
||||
function addRule() {
|
||||
@@ -235,30 +238,30 @@ const bindingYaml = computed(() => {
|
||||
<template>
|
||||
<div>
|
||||
<NForm label-placement="left" label-width="120px">
|
||||
<NFormItem label="Role Name:">
|
||||
<NFormItem :label="t('tools.k8s-rbac-generator.texts.label-role-name')">
|
||||
<NInput v-model:value="meta.roleName" />
|
||||
</NFormItem>
|
||||
|
||||
<NFormItem label="Role Type">
|
||||
<NFormItem :label="t('tools.k8s-rbac-generator.texts.label-role-type')">
|
||||
<NSwitch v-model:value="meta.clusterRole">
|
||||
<template #checked>
|
||||
ClusterRole (Global)
|
||||
{{ t('tools.k8s-rbac-generator.texts.tag-clusterrole-global') }}
|
||||
</template>
|
||||
<template #unchecked>
|
||||
Role (Namespaced)
|
||||
{{ t('tools.k8s-rbac-generator.texts.tag-role-namespaced') }}
|
||||
</template>
|
||||
</NSwitch>
|
||||
</NFormItem>
|
||||
|
||||
<NFormItem v-if="!meta.clusterRole" label="Namespace:">
|
||||
<NFormItem v-if="!meta.clusterRole" :label="t('tools.k8s-rbac-generator.texts.label-namespace')">
|
||||
<NInput v-model:value="meta.namespace" />
|
||||
</NFormItem>
|
||||
</NForm>
|
||||
|
||||
<NCard title="Rules" size="small" segmented mb-1>
|
||||
<NCard :title="t('tools.k8s-rbac-generator.texts.title-rules')" size="small" segmented mb-1>
|
||||
<NSpace vertical>
|
||||
<NButton tertiary type="primary" @click="addRule">
|
||||
+ Add Rule
|
||||
{{ t('tools.k8s-rbac-generator.texts.tag-add-rule') }}
|
||||
</NButton>
|
||||
|
||||
<NCard
|
||||
@@ -269,30 +272,30 @@ const bindingYaml = computed(() => {
|
||||
>
|
||||
<NSpace vertical>
|
||||
<NForm label-placement="left" label-width="120px">
|
||||
<NFormItem label="Resources">
|
||||
<NFormItem :label="t('tools.k8s-rbac-generator.texts.label-resources')">
|
||||
<NSelect
|
||||
v-model:value="rule.resources"
|
||||
:options="RESOURCE_OPTIONS"
|
||||
multiple
|
||||
placeholder="Select resources (supports *)"
|
||||
:placeholder="t('tools.k8s-rbac-generator.texts.placeholder-select-resources-supports')"
|
||||
@update:value="() => updateRule(idx)"
|
||||
/>
|
||||
</NFormItem>
|
||||
|
||||
<NFormItem label="Resource Names (optional)">
|
||||
<NFormItem :label="t('tools.k8s-rbac-generator.texts.label-resource-names-optional')">
|
||||
<NDynamicInput
|
||||
v-model:value="rule.resourceNames"
|
||||
placeholder="Specific Resources Names"
|
||||
:placeholder="t('tools.k8s-rbac-generator.texts.placeholder-specific-resources-names')"
|
||||
/>
|
||||
</NFormItem>
|
||||
|
||||
<NFormItem label="Verbs">
|
||||
<NFormItem :label="t('tools.k8s-rbac-generator.texts.label-verbs')">
|
||||
<NSelect
|
||||
v-model:value="rule.verbs"
|
||||
filterable
|
||||
multiple
|
||||
tag
|
||||
placeholder="Select verbs (supports *)"
|
||||
:placeholder="t('tools.k8s-rbac-generator.texts.placeholder-select-verbs-supports')"
|
||||
:options="VERB_OPTIONS"
|
||||
@update:value="() => updateRule(idx)"
|
||||
/>
|
||||
@@ -300,17 +303,17 @@ const bindingYaml = computed(() => {
|
||||
</NForm>
|
||||
|
||||
<NButton type="error" tertiary @click="removeRule(idx)">
|
||||
Remove Rule
|
||||
{{ t('tools.k8s-rbac-generator.texts.tag-remove-rule') }}
|
||||
</NButton>
|
||||
</NSpace>
|
||||
</NCard>
|
||||
</NSpace>
|
||||
</NCard>
|
||||
|
||||
<NCard title="Subjects" size="small" segmented>
|
||||
<NCard :title="t('tools.k8s-rbac-generator.texts.title-subjects')" size="small" segmented>
|
||||
<NSpace vertical>
|
||||
<NButton tertiary type="primary" @click="addSubject">
|
||||
+ Add Subject
|
||||
{{ t('tools.k8s-rbac-generator.texts.tag-add-subject') }}
|
||||
</NButton>
|
||||
|
||||
<NCard
|
||||
@@ -323,7 +326,7 @@ const bindingYaml = computed(() => {
|
||||
<NForm label-placement="top">
|
||||
<NGrid :cols="3" :x-gap="16">
|
||||
<NGi>
|
||||
<n-form-item label="Kind">
|
||||
<n-form-item :label="t('tools.k8s-rbac-generator.texts.label-kind')">
|
||||
<n-select
|
||||
v-model:value="sub.kind"
|
||||
:options="subjectKinds"
|
||||
@@ -332,13 +335,13 @@ const bindingYaml = computed(() => {
|
||||
</NGi>
|
||||
|
||||
<NGi>
|
||||
<n-form-item label="Name">
|
||||
<n-form-item :label="t('tools.k8s-rbac-generator.texts.label-name')">
|
||||
<n-input v-model:value="sub.name" />
|
||||
</n-form-item>
|
||||
</NGi>
|
||||
|
||||
<NGi v-if="sub.kind === 'ServiceAccount'">
|
||||
<n-form-item label="Namespace">
|
||||
<n-form-item :label="t('tools.k8s-rbac-generator.texts.label-namespace')">
|
||||
<n-input v-model:value="sub.namespace" />
|
||||
</n-form-item>
|
||||
</NGi>
|
||||
@@ -346,20 +349,20 @@ const bindingYaml = computed(() => {
|
||||
</NForm>
|
||||
|
||||
<NButton type="error" tertiary @click="removeSubject(idx)">
|
||||
Remove Subject
|
||||
{{ t('tools.k8s-rbac-generator.texts.tag-remove-subject') }}
|
||||
</NButton>
|
||||
</NSpace>
|
||||
</NCard>
|
||||
</NSpace>
|
||||
</NCard>
|
||||
|
||||
<NCard title="Output YAML">
|
||||
<NCard :title="t('tools.k8s-rbac-generator.texts.title-output-yaml')">
|
||||
<NTabs type="segment">
|
||||
<NTabPane name="role" tab="Role YAML">
|
||||
<NTabPane name="role" :tab="t('tools.k8s-rbac-generator.texts.tab-role-yaml')">
|
||||
<textarea-copyable :value="roleYaml" language="yaml" />
|
||||
</NTabPane>
|
||||
|
||||
<NTabPane name="binding" tab="RoleBinding YAML">
|
||||
<NTabPane name="binding" :tab="t('tools.k8s-rbac-generator.texts.tab-rolebinding-yaml')">
|
||||
<textarea-copyable :value="bindingYaml" language="yaml" />
|
||||
</NTabPane>
|
||||
</NTabs>
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
import { translate as t } from '@/plugins/i18n.plugin';
|
||||
|
||||
export interface EndianResult {
|
||||
bigEndian: string
|
||||
littleEndian: string
|
||||
@@ -11,17 +13,17 @@ export function convertEndian(
|
||||
const hex = hexInput.replace(/^0x/, '').toUpperCase();
|
||||
|
||||
if (!/^[0-9A-F]+$/.test(hex)) {
|
||||
throw new Error('Invalid hex input. Only 0-9 and A-F allowed.');
|
||||
throw new Error(t('tools.middle-endian-converter.service.texts.invalid-hex-input-only-0-9-and-a-f-allowed'));
|
||||
}
|
||||
|
||||
const byteCount = bitLength / 8;
|
||||
if (hex.length !== byteCount * 2) {
|
||||
throw new Error(`Input must be ${byteCount * 2} hex characters for ${bitLength}-bit.`);
|
||||
throw new Error(t('tools.middle-endian-converter.service.texts.input-must-be-bytecount-2-hex-characters-for-bitlength-bit', [byteCount * 2, bitLength]));
|
||||
}
|
||||
|
||||
const bytes = hex.match(/.{2}/g);
|
||||
if (!bytes) {
|
||||
throw new Error('Failed to parse bytes.');
|
||||
throw new Error(t('tools.middle-endian-converter.service.texts.failed-to-parse-bytes'));
|
||||
}
|
||||
|
||||
const reordered: string[] = [];
|
||||
@@ -37,7 +39,7 @@ export function convertEndian(
|
||||
}
|
||||
}
|
||||
else {
|
||||
throw new Error('Unsupported middle-endian format.');
|
||||
throw new Error(t('tools.middle-endian-converter.service.texts.unsupported-middle-endian-format'));
|
||||
}
|
||||
|
||||
return {
|
||||
@@ -63,9 +65,9 @@ export function formatInteger(hexInput: string): {
|
||||
}
|
||||
catch {
|
||||
return {
|
||||
decimal: 'Invalid',
|
||||
octal: 'Invalid',
|
||||
hexadecimal: 'Invalid',
|
||||
decimal: t('tools.middle-endian-converter.service.texts.invalid'),
|
||||
octal: t('tools.middle-endian-converter.service.texts.invalid-0'),
|
||||
hexadecimal: t('tools.middle-endian-converter.service.texts.invalid-1'),
|
||||
};
|
||||
}
|
||||
}
|
||||
@@ -1,10 +1,11 @@
|
||||
import { translate as t } from '@/plugins/i18n.plugin';
|
||||
import { Brackets } from '@vicons/tabler';
|
||||
import { defineTool } from '../tool';
|
||||
|
||||
export const tool = defineTool({
|
||||
name: 'ObjGen to HTML',
|
||||
name: t('tools.objgen-html.title'),
|
||||
path: '/objgen-html',
|
||||
description: 'Generate xomplex HTML from TOML like syntax',
|
||||
description: t('tools.objgen-html.description'),
|
||||
keywords: ['objgen', 'html', 'toml'],
|
||||
component: () => import('./objgen-html.vue'),
|
||||
icon: Brackets,
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
<script setup lang="ts">
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import { xHtml } from './objgen-html.service';
|
||||
|
||||
const { t } = useI18n();
|
||||
|
||||
const defaultValue = `// This is a comment!
|
||||
// HTML generator quick tips:
|
||||
// - Each line with content will generate a HTML element
|
||||
@@ -143,15 +146,15 @@ function transformer(value: string) {
|
||||
|
||||
<template>
|
||||
<details mb-1>
|
||||
<summary>Documentation</summary>
|
||||
<summary>{{ t('tools.objgen-html.texts.tag-documentation') }}</summary>
|
||||
<textarea-copyable :value="defaultValue" language="toml" />
|
||||
</details>
|
||||
|
||||
<format-transformer
|
||||
input-label="ObjGen HTML definition"
|
||||
:input-label="t('tools.objgen-html.texts.input-label-objgen-html-definition')"
|
||||
:input-default="defaultValue"
|
||||
input-placeholder="Put your ObjGen HTML definition here..."
|
||||
output-label="Generated HTML"
|
||||
:input-placeholder="t('tools.objgen-html.texts.input-placeholder-put-your-objgen-html-definition-here')"
|
||||
:output-label="t('tools.objgen-html.texts.output-label-generated-html')"
|
||||
output-language="html"
|
||||
:transformer="transformer"
|
||||
download-file-name="output.html"
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
import { translate as t } from '@/plugins/i18n.plugin';
|
||||
import { Braces } from '@vicons/tabler';
|
||||
import { defineTool } from '../tool';
|
||||
|
||||
export const tool = defineTool({
|
||||
name: 'ObjGen to JSON',
|
||||
name: t('tools.objgen-json.title'),
|
||||
path: '/objgen-json',
|
||||
description: 'Generate xomplex JSON from TOML like syntax',
|
||||
description: t('tools.objgen-json.description'),
|
||||
keywords: ['objgen', 'json', 'toml'],
|
||||
component: () => import('./objgen-json.vue'),
|
||||
icon: Braces,
|
||||
|
||||
@@ -1,7 +1,10 @@
|
||||
<script setup lang="ts">
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import { useQueryParamOrStorage } from '@/composable/queryParams';
|
||||
import { ObjGen2Json } from '@/utils/objgen';
|
||||
|
||||
const { t } = useI18n();
|
||||
|
||||
const defaultValue = `// Model & generate Live JSON data values
|
||||
// interactively using a simple syntax.
|
||||
// String is the default value type
|
||||
@@ -51,15 +54,15 @@ function transformer(value: string) {
|
||||
|
||||
<template>
|
||||
<details mb-1>
|
||||
<summary>Documentation</summary>
|
||||
<summary>{{ t('tools.objgen-json.texts.tag-documentation') }}</summary>
|
||||
<textarea-copyable :value="defaultValue" language="toml" />
|
||||
</details>
|
||||
|
||||
<format-transformer
|
||||
input-label="ObjGen JSON definition"
|
||||
:input-label="t('tools.objgen-json.texts.input-label-objgen-json-definition')"
|
||||
:input-default="defaultValue"
|
||||
input-placeholder="Put your ObjGen JSON definition here..."
|
||||
output-label="Generated JSON"
|
||||
:input-placeholder="t('tools.objgen-json.texts.input-placeholder-put-your-objgen-json-definition-here')"
|
||||
:output-label="t('tools.objgen-json.texts.output-label-generated-json')"
|
||||
output-language="json"
|
||||
:transformer="transformer"
|
||||
download-file-name="output.json"
|
||||
|
||||
@@ -86,7 +86,7 @@ async function callMainWithInOutPdf(data: ArrayBuffer, args: string[], expected_
|
||||
mod.FS.writeFile('in.pdf', new Uint8Array(data));
|
||||
const ret = mod.callMain(args);
|
||||
if (expected_exitcode !== ret) {
|
||||
throw new Error('Process run failed');
|
||||
throw new Error(t('tools.pdf-compressor.texts.process-run-failed'));
|
||||
}
|
||||
return mod.FS.readFile('out.pdf');
|
||||
}
|
||||
@@ -124,7 +124,7 @@ async function callMainWithInOutPdf(data: ArrayBuffer, args: string[], expected_
|
||||
|
||||
<div mt-3 flex justify-center>
|
||||
<c-alert v-if="status === 'error'" type="error">
|
||||
An error occured processing {{ fileName }}
|
||||
{{ $t('tools.pdf-compressor.texts.an-error-occured-processing') }} <span>{{ fileName }}</span>
|
||||
</c-alert>
|
||||
<n-spin
|
||||
v-if="status === 'processing'"
|
||||
|
||||
@@ -80,7 +80,7 @@ async function callMainWithManyInOutPdf(input_files: Array<ArrayBuffer>, args: s
|
||||
}
|
||||
const ret = mod.callMain(args);
|
||||
if (expected_exitcode !== ret) {
|
||||
throw new Error('Process run failed');
|
||||
throw new Error(t('tools.pdf-compressor.texts.process-run-failed'));
|
||||
}
|
||||
return mod.FS.readFile('out.pdf');
|
||||
}
|
||||
@@ -154,7 +154,7 @@ async function callMainWithManyInOutPdf(input_files: Array<ArrayBuffer>, args: s
|
||||
|
||||
<div mt-3 flex justify-center>
|
||||
<c-alert v-if="status === 'error'" type="error">
|
||||
An error occured processing {{ fileName }}
|
||||
{{ $t('tools.file-type.texts.an-error-occured-processing') }} <span>{{ fileName }}</span>
|
||||
</c-alert>
|
||||
<n-spin
|
||||
v-if="status === 'processing'"
|
||||
|
||||
@@ -95,7 +95,7 @@ async function callMainWithInOutPdf(data: ArrayBuffer, args: string[], expected_
|
||||
mod.FS.writeFile('in.pdf', new Uint8Array(data));
|
||||
const ret = mod.callMain(args);
|
||||
if (expected_exitcode !== ret) {
|
||||
throw new Error('Process run failed');
|
||||
throw new Error(t('tools.pdf-compressor.texts.process-run-failed'));
|
||||
}
|
||||
return mod.FS.readFile('out.pdf');
|
||||
}
|
||||
@@ -199,7 +199,7 @@ const modificationRestrictionOptions = [
|
||||
|
||||
<div mt-3 flex justify-center>
|
||||
<c-alert v-if="status === 'error'" type="error">
|
||||
An error occured processing {{ fileName }}
|
||||
{{ $t('tools.file-type.texts.an-error-occured-processing') }} <span>{{ fileName }}</span>
|
||||
</c-alert>
|
||||
<n-spin
|
||||
v-if="status === 'processing'"
|
||||
|
||||
@@ -70,7 +70,7 @@ async function callMainWithInOutPdf(data: ArrayBuffer, args: string[], expected_
|
||||
mod.FS.writeFile('in.pdf', new Uint8Array(data));
|
||||
const ret = mod.callMain(args);
|
||||
if (expected_exitcode !== ret) {
|
||||
throw new Error('Process run failed');
|
||||
throw new Error(t('tools.pdf-compressor.texts.process-run-failed'));
|
||||
}
|
||||
return mod.FS.readFile('out.pdf');
|
||||
}
|
||||
@@ -115,7 +115,7 @@ async function callMainWithInOutPdf(data: ArrayBuffer, args: string[], expected_
|
||||
|
||||
<div mt-3 flex justify-center>
|
||||
<c-alert v-if="status === 'error'" type="error">
|
||||
An error occured processing {{ fileName }}
|
||||
{{ $t('tools.file-type.texts.an-error-occured-processing') }} <span>{{ fileName }}</span>
|
||||
</c-alert>
|
||||
<n-spin
|
||||
v-if="status === 'processing'"
|
||||
|
||||
@@ -61,7 +61,7 @@ async function callMainWithInOutPdf(data: ArrayBuffer, args: string[], expected_
|
||||
mod.FS.writeFile('in.pdf', new Uint8Array(data));
|
||||
const ret = mod.callMain(args);
|
||||
if (expected_exitcode !== ret) {
|
||||
throw new Error('Process run failed');
|
||||
throw new Error(t('tools.pdf-compressor.texts.process-run-failed'));
|
||||
}
|
||||
return mod.FS.readFile('out.pdf');
|
||||
}
|
||||
@@ -77,7 +77,7 @@ async function callMainWithInOutPdf(data: ArrayBuffer, args: string[], expected_
|
||||
|
||||
<div mt-3 flex justify-center>
|
||||
<c-alert v-if="status === 'error'" type="error">
|
||||
An error occured processing {{ fileName }}
|
||||
{{ $t('tools.file-type.texts.an-error-occured-processing') }} <span>{{ fileName }}</span>
|
||||
</c-alert>
|
||||
<n-spin
|
||||
v-if="status === 'processing'"
|
||||
|
||||
@@ -78,7 +78,7 @@ async function callMainWithInOutPdf(data: ArrayBuffer, args: string[], expected_
|
||||
mod.FS.writeFile('in.pdf', new Uint8Array(data));
|
||||
const ret = mod.callMain(args);
|
||||
if (expected_exitcode !== ret) {
|
||||
throw new Error('Process run failed');
|
||||
throw new Error(t('tools.pdf-compressor.texts.process-run-failed'));
|
||||
}
|
||||
return mod.FS.readFile('out.pdf');
|
||||
}
|
||||
@@ -120,7 +120,7 @@ async function callMainWithInOutPdf(data: ArrayBuffer, args: string[], expected_
|
||||
|
||||
<div mt-3 flex justify-center>
|
||||
<c-alert v-if="status === 'error'" type="error">
|
||||
An error occured processing {{ fileName }}
|
||||
{{ $t('tools.file-type.texts.an-error-occured-processing') }} <span>{{ fileName }}</span>
|
||||
</c-alert>
|
||||
<n-spin
|
||||
v-if="status === 'processing'"
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
import { translate as t } from '@/plugins/i18n.plugin';
|
||||
import { CloudLock } from '@vicons/tabler';
|
||||
import { defineTool } from '../tool';
|
||||
|
||||
export const tool = defineTool({
|
||||
name: 'PGP File Encryption',
|
||||
name: t('tools.pgp-file-encryption.title'),
|
||||
path: '/pgp-file-encryption',
|
||||
description: 'Encrypt and decrypt files using PGP',
|
||||
description: t('tools.pgp-file-encryption.description'),
|
||||
keywords: ['pgp', 'file', 'encryption'],
|
||||
component: () => import('./pgp-file-encryption.vue'),
|
||||
icon: CloudLock,
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
<script setup lang="ts">
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import * as openpgp from 'openpgp';
|
||||
|
||||
const { t } = useI18n();
|
||||
|
||||
const message = useMessage();
|
||||
|
||||
const file = ref<File | null>(null);
|
||||
@@ -162,50 +165,50 @@ function downloadBlob(blob: Blob | null, filename: string) {
|
||||
|
||||
<template>
|
||||
<div>
|
||||
<NCard title="1. Select a file" mb-1>
|
||||
<NCard :title="t('tools.pgp-file-encryption.texts.title-1-select-a-file')" mb-1>
|
||||
<c-file-upload
|
||||
title="Drag and drop a file or click to select"
|
||||
:title="t('tools.pgp-file-encryption.texts.title-drag-and-drop-a-file-or-click-to-select')"
|
||||
mb-1
|
||||
@file-upload="onUpload"
|
||||
/>
|
||||
<NSpace v-if="file" justify="center">
|
||||
<NText>Selected file:</NText>
|
||||
<NText>{{ t('tools.pgp-file-encryption.texts.tag-selected-file') }}</NText>
|
||||
<NText strong>
|
||||
{{ file?.name }}
|
||||
</NText>
|
||||
</NSpace>
|
||||
</NCard>
|
||||
|
||||
<NCard title="2. Public key (for encryption)" mb-1>
|
||||
<NCard :title="t('tools.pgp-file-encryption.texts.title-2-public-key-for-encryption')" mb-1>
|
||||
<c-input-text v-model:value="publicKeyArmored" multiline rows="6" />
|
||||
</NCard>
|
||||
|
||||
<NCard title="3. Private key + passphrase (for decryption)">
|
||||
<NCard :title="t('tools.pgp-file-encryption.texts.title-3-private-key-passphrase-for-decryption')">
|
||||
<c-input-text v-model:value="privateKeyArmored" multiline rows="6" mb-1 />
|
||||
<NFormItem label="Passphrase:" label-placement="left">
|
||||
<NInput v-model:value="passphrase" type="password" show-password-on="click" placeholder="Passphrase" />
|
||||
<NFormItem :label="t('tools.pgp-file-encryption.texts.label-passphrase')" label-placement="left">
|
||||
<NInput v-model:value="passphrase" type="password" show-password-on="click" :placeholder="t('tools.pgp-file-encryption.texts.placeholder-passphrase')" />
|
||||
</NFormItem>
|
||||
</NCard>
|
||||
|
||||
<!-- Actions -->
|
||||
<NSpace justify="center" mb-1>
|
||||
<NButton :disabled="!file || !publicKeyArmored" type="primary" :loading="loadingEncrypt" mr-2 @click="encryptStream">
|
||||
Encrypt (stream)
|
||||
{{ t('tools.pgp-file-encryption.texts.tag-encrypt-stream') }}
|
||||
</NButton>
|
||||
|
||||
<NButton :disabled="!file || !privateKeyArmored" type="primary" :loading="loadingDecrypt" @click="decryptStream">
|
||||
Decrypt (stream)
|
||||
{{ t('tools.pgp-file-encryption.texts.tag-decrypt-stream') }}
|
||||
</NButton>
|
||||
</NSpace>
|
||||
|
||||
<!-- Progress -->
|
||||
<div v-if="loadingEncrypt" mb-1 text-center>
|
||||
<NText>Encrypting…</NText>
|
||||
<NText>{{ t('tools.pgp-file-encryption.texts.tag-encrypting') }}</NText>
|
||||
<NProgress type="line" :percentage="encryptProgress" />
|
||||
</div>
|
||||
|
||||
<div v-if="loadingDecrypt" mb-1 text-center>
|
||||
<NText>Decrypting…</NText>
|
||||
<NText>{{ t('tools.pgp-file-encryption.texts.tag-decrypting') }}</NText>
|
||||
<NProgress type="line" :percentage="decryptProgress" />
|
||||
</div>
|
||||
|
||||
@@ -215,22 +218,22 @@ function downloadBlob(blob: Blob | null, filename: string) {
|
||||
|
||||
<div v-if="encryptedBlob">
|
||||
<NAlert type="success" mb-1>
|
||||
Encrypted file ready.
|
||||
{{ t('tools.pgp-file-encryption.texts.tag-encrypted-file-ready') }}
|
||||
</NAlert>
|
||||
<NSpace justify="center">
|
||||
<NButton size="small" @click="downloadBlob(encryptedBlob, `${file?.name || 'file'}.pgp`)">
|
||||
Download encrypted
|
||||
{{ t('tools.pgp-file-encryption.texts.tag-download-encrypted') }}
|
||||
</NButton>
|
||||
</NSpace>
|
||||
</div>
|
||||
|
||||
<div v-if="decryptedBlob">
|
||||
<NAlert type="success" mb-1>
|
||||
Decrypted file ready.
|
||||
{{ t('tools.pgp-file-encryption.texts.tag-decrypted-file-ready') }}
|
||||
</NAlert>
|
||||
<NSpace justify="center">
|
||||
<NButton size="small" @click="downloadBlob(decryptedBlob, `decrypted-${((file?.name || 'file').replace(/\.pgp$/, ''))}`)">
|
||||
Download decrypted
|
||||
{{ t('tools.pgp-file-encryption.texts.tag-download-decrypted') }}
|
||||
</NButton>
|
||||
</NSpace>
|
||||
</div>
|
||||
|
||||
@@ -1,14 +1,15 @@
|
||||
import { translate as t } from '@/plugins/i18n.plugin';
|
||||
import { PictureInPictureOff } from '@vicons/tabler';
|
||||
import { defineTool } from '../tool';
|
||||
|
||||
export const tool = defineTool({
|
||||
name: 'Remove Image Background',
|
||||
name: t('tools.remove-background.title'),
|
||||
path: '/remove-background',
|
||||
description: 'Remove background from an image using AI',
|
||||
description: t('tools.remove-background.description'),
|
||||
keywords: ['remove', 'background', 'image', 'rmbg', 'modnet'],
|
||||
component: () => import('./remove-background.vue'),
|
||||
icon: PictureInPictureOff,
|
||||
createdAt: new Date('2026-03-15'),
|
||||
category: 'Images',
|
||||
externAccessDescription: 'Downloads Remove Background models from HuggingFace. Processing is done in your browser',
|
||||
externAccessDescription: t('tools.remove-background.externalAccess'),
|
||||
});
|
||||
@@ -1,9 +1,12 @@
|
||||
<script setup lang="ts">
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import { onMounted, ref } from 'vue';
|
||||
import type { BackgroundRemovalPipeline, ProgressInfo } from '@huggingface/transformers';
|
||||
import { RawImage, pipeline } from '@huggingface/transformers';
|
||||
import { useQueryParamOrStorage } from '@/composable/queryParams';
|
||||
|
||||
const { t } = useI18n();
|
||||
|
||||
const inputImage = ref<File | null>(null);
|
||||
const inputUrl = ref<string | null>(null);
|
||||
const outputUrl = ref<string | null>(null);
|
||||
@@ -14,25 +17,25 @@ const webgpuAvailable = ref(false);
|
||||
|
||||
const selectedModel = useQueryParamOrStorage({ name: 'model', storageName: 'rmbg:m', defaultValue: 'rmbg' });
|
||||
const modelOptions = [
|
||||
{ label: 'RMBG‑1.4 (CPU/WASM)', value: 'rmbg' },
|
||||
{ label: 'MODNet (WebGPU)', value: 'modnet' },
|
||||
{ label: t('tools.remove-background.texts.label-rmbg-1-4-cpu-wasm'), value: 'rmbg' },
|
||||
{ label: t('tools.remove-background.texts.label-modnet-webgpu'), value: 'modnet' },
|
||||
];
|
||||
|
||||
const backgroundMode = useQueryParamOrStorage({ name: 'bgmode', storageName: 'rmbg:bgm', defaultValue: 'transparent' });
|
||||
const backgroundOptions = [
|
||||
{ label: 'Transparent', value: 'transparent' },
|
||||
{ label: 'Solid Color', value: 'color' },
|
||||
{ label: 'Pattern', value: 'pattern' },
|
||||
{ label: 'Blurred Original', value: 'blur' },
|
||||
{ label: 'Adjust Contrast/Brightness', value: 'adjust' },
|
||||
{ label: t('tools.remove-background.texts.label-transparent'), value: 'transparent' },
|
||||
{ label: t('tools.remove-background.texts.label-solid-color'), value: 'color' },
|
||||
{ label: t('tools.remove-background.texts.label-pattern'), value: 'pattern' },
|
||||
{ label: t('tools.remove-background.texts.label-blurred-original'), value: 'blur' },
|
||||
{ label: t('tools.remove-background.texts.label-adjust-contrast-brightness'), value: 'adjust' },
|
||||
];
|
||||
|
||||
const backgroundColor = useQueryParamOrStorage({ name: 'model', storageName: 'rmbg:bg', defaultValue: '#ffffff' });
|
||||
const patternName = useQueryParamOrStorage({ name: 'pattern', storageName: 'rmbg:pa', defaultValue: 'stripes' });
|
||||
const patternOptions = [
|
||||
{ label: 'Diagonal Stripes', value: 'stripes' },
|
||||
{ label: 'Dots', value: 'dots' },
|
||||
{ label: 'Checkerboard', value: 'checker' },
|
||||
{ label: t('tools.remove-background.texts.label-diagonal-stripes'), value: 'stripes' },
|
||||
{ label: t('tools.remove-background.texts.label-dots'), value: 'dots' },
|
||||
{ label: t('tools.remove-background.texts.label-checkerboard'), value: 'checker' },
|
||||
];
|
||||
|
||||
const blurAmount = useQueryParamOrStorage({ name: 'blur', storageName: 'rmbg:bl', defaultValue: 12 });
|
||||
@@ -247,7 +250,7 @@ function downloadResult() {
|
||||
<template>
|
||||
<div>
|
||||
<c-file-upload
|
||||
title="Drag and drop an image or click to select"
|
||||
:title="t('tools.remove-background.texts.title-drag-and-drop-an-image-or-click-to-select')"
|
||||
paste-image
|
||||
accept="image/*"
|
||||
mb-3
|
||||
@@ -255,34 +258,34 @@ function downloadResult() {
|
||||
/>
|
||||
|
||||
<n-form label-placement="left">
|
||||
<n-form-item v-if="webgpuAvailable" label="Model:">
|
||||
<n-form-item v-if="webgpuAvailable" :label="t('tools.remove-background.texts.label-model')">
|
||||
<n-select
|
||||
v-model:value="selectedModel"
|
||||
:options="modelOptions"
|
||||
/>
|
||||
</n-form-item>
|
||||
|
||||
<n-form-item label="Model:">
|
||||
<n-form-item :label="t('tools.remove-background.texts.label-model')">
|
||||
<n-select
|
||||
v-model:value="backgroundMode"
|
||||
:options="backgroundOptions"
|
||||
/>
|
||||
</n-form-item>
|
||||
|
||||
<n-form-item v-if="backgroundMode === 'color'" label="Model:">
|
||||
<n-form-item v-if="backgroundMode === 'color'" :label="t('tools.remove-background.texts.label-model')">
|
||||
<n-color-picker
|
||||
v-model:value="backgroundColor"
|
||||
/>
|
||||
</n-form-item>
|
||||
|
||||
<n-form-item v-if="backgroundMode === 'pattern'" label="Pattern:">
|
||||
<n-form-item v-if="backgroundMode === 'pattern'" :label="t('tools.remove-background.texts.label-pattern')">
|
||||
<n-select
|
||||
v-model:value="patternName"
|
||||
:options="patternOptions"
|
||||
/>
|
||||
</n-form-item>
|
||||
|
||||
<n-form-item v-if="backgroundMode === 'blur'" label="Blur:">
|
||||
<n-form-item v-if="backgroundMode === 'blur'" :label="t('tools.remove-background.texts.label-blur')">
|
||||
<n-slider
|
||||
v-model:value="blurAmount"
|
||||
:min="0"
|
||||
@@ -291,11 +294,11 @@ function downloadResult() {
|
||||
</n-form-item>
|
||||
|
||||
<div v-if="backgroundMode === 'adjust'">
|
||||
<n-form-item label="Contrast:">
|
||||
<n-form-item :label="t('tools.remove-background.texts.label-contrast')">
|
||||
<n-slider v-model:value="contrast" :min="0.5" :max="2" :step="0.01" />
|
||||
</n-form-item>
|
||||
|
||||
<n-form-item label="Brightness:">
|
||||
<n-form-item :label="t('tools.remove-background.texts.label-brightness')">
|
||||
<n-slider v-model:value="brightness" :min="0.5" :max="2" :step="0.01" />
|
||||
</n-form-item>
|
||||
</div>
|
||||
@@ -316,7 +319,7 @@ function downloadResult() {
|
||||
:disabled="!inputImage"
|
||||
@click="removeBackground"
|
||||
>
|
||||
Apply Background
|
||||
{{ t('tools.remove-background.texts.tag-apply-background') }}
|
||||
</n-button>
|
||||
</n-spin>
|
||||
</n-space>
|
||||
@@ -327,16 +330,16 @@ function downloadResult() {
|
||||
|
||||
<n-space v-if="outputUrl" justify="center">
|
||||
<n-button @click="downloadResult">
|
||||
Download Result
|
||||
{{ t('tools.remove-background.texts.tag-download-result') }}
|
||||
</n-button>
|
||||
</n-space>
|
||||
|
||||
<n-space justify="center" mr-1>
|
||||
<NCard v-if="inputUrl" title="Original">
|
||||
<NCard v-if="inputUrl" :title="t('tools.remove-background.texts.title-original')">
|
||||
<n-image :src="inputUrl" width="260" />
|
||||
</NCard>
|
||||
|
||||
<NCard v-if="outputUrl" title="Result">
|
||||
<NCard v-if="outputUrl" :title="t('tools.remove-background.texts.title-result')">
|
||||
<n-image :src="outputUrl" width="260" />
|
||||
</NCard>
|
||||
</n-space>
|
||||
|
||||
@@ -60,7 +60,7 @@ async function onFileUploaded(uploadedFile: File) {
|
||||
|
||||
<div mt-3 flex justify-center>
|
||||
<c-alert v-if="status === 'error'" type="error">
|
||||
An error occured processing {{ fileName }}
|
||||
An error occured processing <span>{{ fileName }}</span>
|
||||
</c-alert>
|
||||
<n-spin
|
||||
v-if="status === 'processing'"
|
||||
|
||||
@@ -121,7 +121,7 @@ function getColorHex(color: string) {
|
||||
<n-card :title="t('tools.resistor-calculator.texts.title-resistor-converter')" style="max-width: 700px; margin: auto;">
|
||||
<n-tabs type="line" animated>
|
||||
<!-- Bands → Notation -->
|
||||
<n-tab-pane name="bands-to-notation" tab="Bands → Notation">
|
||||
<n-tab-pane name="bands-to-notation" :tab="t('tools.resistor-calculator.text.bands-notation')">
|
||||
<n-select v-model:value="bandCount" mb-1 :options="bandOptions" :label="t('tools.resistor-calculator.texts.label-band-count')" style="margin-bottom: 10px" />
|
||||
<n-input v-model:value="bandsInput" :placeholder="t('tools.resistor-calculator.texts.placeholder-e-g-red-violet-brown-gold')" />
|
||||
<n-p mb-2>
|
||||
@@ -186,7 +186,7 @@ function getColorHex(color: string) {
|
||||
</n-tab-pane>
|
||||
|
||||
<!-- Notation → Bands -->
|
||||
<n-tab-pane name="notation-to-bands" tab="Notation → Bands">
|
||||
<n-tab-pane name="notation-to-bands" :tab="t('tools.resistor-calculator.text.notation-bands')">
|
||||
<n-input v-model:value="notationInput" :placeholder="t('tools.resistor-calculator.texts.placeholder-e-g-2k7ω-5-or-2k7-5')" mb-2 />
|
||||
<n-select v-model:value="notationBandCount" mb-1 :options="bandOptions" :label="t('tools.resistor-calculator.texts.label-band-count')" style="margin-bottom: 10px" />
|
||||
<n-space justify="center" mb-1>
|
||||
@@ -248,7 +248,7 @@ function getColorHex(color: string) {
|
||||
</n-tab-pane>
|
||||
|
||||
<!-- Number → Notation -->
|
||||
<n-tab-pane name="number-to-notation" tab="Number → Notation">
|
||||
<n-tab-pane name="number-to-notation" :tab="t('tools.resistor-calculator.text.number-notation')">
|
||||
<n-input-number v-model:value="numberInput" :placeholder="t('tools.resistor-calculator.texts.placeholder-e-g-2700')" mb-1 />
|
||||
<n-select v-model:value="tolerance" :options="toleranceOptions" :label="t('tools.resistor-calculator.texts.label-tolerance')" mb-1 />
|
||||
<n-space justify="center" mb-1>
|
||||
@@ -263,7 +263,7 @@ function getColorHex(color: string) {
|
||||
</n-tab-pane>
|
||||
|
||||
<!-- Notation → Number -->
|
||||
<n-tab-pane name="notation-to-number" tab="Notation → Number">
|
||||
<n-tab-pane name="notation-to-number" :tab="t('tools.resistor-calculator.text.notation-number')">
|
||||
<n-input v-model:value="notationToNumberInput" :placeholder="t('tools.resistor-calculator.texts.placeholder-e-g-2k7ω-5-or-2k7-5')" />
|
||||
<n-space justify="center" mb-1>
|
||||
<n-button @click="convertNotationToNumber">
|
||||
|
||||
@@ -33,7 +33,7 @@ const { attrs: bitsValidationAttrs } = useValidation({
|
||||
source: bits,
|
||||
rules: [
|
||||
{
|
||||
message: 'Bits should be 256 <= bits <= 16384 and be a multiple of 8',
|
||||
message: t('tools.rsa-key-pair-generator.text.bits-should-be-256-less-than-bits-less-than-16384-and-be-a-multiple-of-8'),
|
||||
validator: value => value >= 256 && value <= 16384 && value % 8 === 0,
|
||||
},
|
||||
],
|
||||
|
||||
@@ -76,7 +76,7 @@ function computeDelayForWord(word: string): number {
|
||||
|
||||
function start() {
|
||||
if (!words.value.length) {
|
||||
message.warning('Please provide some text first.');
|
||||
message.warning(t('tools.rsvp-reader.text.please-provide-some-text-first'));
|
||||
return;
|
||||
}
|
||||
isPlaying.value = true;
|
||||
@@ -162,7 +162,7 @@ async function onUpload(file: File) {
|
||||
return;
|
||||
}
|
||||
|
||||
message.error('Unsupported file type.');
|
||||
message.error(t('tools.rsvp-reader.text.unsupported-file-type'));
|
||||
}
|
||||
catch (err) {
|
||||
message.error(`Failed to parse file: ${err}`);
|
||||
@@ -254,7 +254,7 @@ onBeforeUnmount(() => {
|
||||
<template>
|
||||
<div>
|
||||
<n-tabs type="line" animated>
|
||||
<n-tab-pane name="display" tab="Display">
|
||||
<n-tab-pane name="display" :tab="t('tools.rsvp-reader.text.display')">
|
||||
<NAlert v-if="!words.length" type="warning">
|
||||
{{ t('tools.rsvp-reader.texts.tag-no-text-to-read-please-input-some-text-in-text-tab') }}
|
||||
</NAlert>
|
||||
@@ -299,16 +299,16 @@ onBeforeUnmount(() => {
|
||||
letterSpacing: '0.05em',
|
||||
}"
|
||||
>
|
||||
{{ currentChunk || 'Ready' }}
|
||||
{{ currentChunk || t('tools.rsvp-reader.text.ready') }}
|
||||
</div>
|
||||
</NCard>
|
||||
<n-space justify="center" mt-1>
|
||||
<NText>{{ currentIndex + 1 }} / {{ words.length }} words</NText>{{ t('tools.rsvp-reader.texts.tag-') }}<NText>{{ wpm }} WPM</NText>
|
||||
<NText>{{ currentIndex + 1 }} / {{ words.length }} {{ t('tools.rsvp-reader.text.words') }}</NText> - <NText>{{ wpm }} {{ t('tools.rsvp-reader.text.wpm') }}</NText>
|
||||
</n-space>
|
||||
</div>
|
||||
</n-tab-pane>
|
||||
|
||||
<n-tab-pane name="text" tab="Text">
|
||||
<n-tab-pane name="text" :tab="t('tools.rsvp-reader.text.text')">
|
||||
<c-input-text
|
||||
v-model:value="rawText"
|
||||
:label="t('tools.rsvp-reader.texts.label-text-to-read')"
|
||||
@@ -330,7 +330,7 @@ onBeforeUnmount(() => {
|
||||
/>
|
||||
</n-tab-pane>
|
||||
|
||||
<n-tab-pane name="settings" tab="Settings">
|
||||
<n-tab-pane name="settings" :tab="t('tools.rsvp-reader.text.settings')">
|
||||
<NForm label-placement="left" label-width="150px">
|
||||
<NFormItem :label="t('tools.rsvp-reader.texts.label-word-per-minute')">
|
||||
<NInputNumber v-model:value="wpm" :min="50" :max="2000" mr-1 />
|
||||
@@ -373,7 +373,7 @@ onBeforeUnmount(() => {
|
||||
</NForm>
|
||||
</n-tab-pane>
|
||||
|
||||
<n-tab-pane name="keyboard" tab="Keyboard Shortcuts">
|
||||
<n-tab-pane name="keyboard" :tab="t('tools.rsvp-reader.text.keyboard-shortcuts')">
|
||||
<n-space vertical size="medium">
|
||||
<n-text depth="3">
|
||||
{{ t('tools.rsvp-reader.texts.tag-control-playback-and-navigation-without-touching-the-mouse') }}
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
import { translate as t } from '@/plugins/i18n.plugin';
|
||||
import { Terminal2 } from '@vicons/tabler';
|
||||
import { defineTool } from '../tool';
|
||||
|
||||
export const tool = defineTool({
|
||||
name: 'Shell Commands Formatter',
|
||||
name: t('tools.shell-formatter.title'),
|
||||
path: '/shell-formatter',
|
||||
description: 'Format shell commands as multiline shell commands split on arguments',
|
||||
description: t('tools.shell-formatter.description'),
|
||||
keywords: ['shell', 'multiline', 'formatter'],
|
||||
component: () => import('./shell-formatter.vue'),
|
||||
icon: Terminal2,
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
<script setup lang="ts">
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import { formatShellCommand } from '@/utils/shell-formatter';
|
||||
|
||||
const { t } = useI18n();
|
||||
|
||||
const defaultValue = 'docker run -p 80:80 -v /var/run/docker.sock:/tmp/docker.sock:ro --restart always --log-opt max-size=1g nginx';
|
||||
|
||||
function transformer(value: string) {
|
||||
@@ -15,10 +18,10 @@ function transformer(value: string) {
|
||||
|
||||
<template>
|
||||
<format-transformer
|
||||
input-label="Shell commands to format"
|
||||
:input-label="t('tools.shell-formatter.texts.input-label-shell-commands-to-format')"
|
||||
:input-default="defaultValue"
|
||||
input-placeholder="Put your shell commands to format here..."
|
||||
output-label="Formatted shell commands"
|
||||
:input-placeholder="t('tools.shell-formatter.texts.input-placeholder-put-your-shell-commands-to-format-here')"
|
||||
:output-label="t('tools.shell-formatter.texts.output-label-formatted-shell-commands')"
|
||||
output-language="bash"
|
||||
:transformer="transformer"
|
||||
/>
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
import { translate as t } from '@/plugins/i18n.plugin';
|
||||
import { Terminal2 } from '@vicons/tabler';
|
||||
import { defineTool } from '../tool';
|
||||
|
||||
export const tool = defineTool({
|
||||
name: 'Shell Commands Linearizer',
|
||||
name: t('tools.shell-linearizer.title'),
|
||||
path: '/shell-linearizer',
|
||||
description: 'Linearize multiline shell commands',
|
||||
description: t('tools.shell-linearizer.description'),
|
||||
keywords: ['shell', 'multiline', 'linearizer'],
|
||||
component: () => import('./shell-linearizer.vue'),
|
||||
icon: Terminal2,
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
<script setup lang="ts">
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import { collapseBackslashLines } from '@/utils/shell-formatter';
|
||||
|
||||
const { t } = useI18n();
|
||||
|
||||
const defaultValue = 'docker run -p 80:80 -v /var/run/docker.sock:/tmp/docker.sock:ro --restart always --log-opt max-size=1g nginx';
|
||||
|
||||
function transformer(value: string) {
|
||||
@@ -15,10 +18,10 @@ function transformer(value: string) {
|
||||
|
||||
<template>
|
||||
<format-transformer
|
||||
input-label="Shell commands to linearize"
|
||||
:input-label="t('tools.shell-linearizer.texts.input-label-shell-commands-to-linearize')"
|
||||
:input-default="defaultValue"
|
||||
input-placeholder="Put your shell commands to linearize here..."
|
||||
output-label="Linearized shell commands"
|
||||
:input-placeholder="t('tools.shell-linearizer.texts.input-placeholder-put-your-shell-commands-to-linearize-here')"
|
||||
:output-label="t('tools.shell-linearizer.texts.output-label-linearized-shell-commands')"
|
||||
output-language="bash"
|
||||
:transformer="transformer"
|
||||
/>
|
||||
|
||||
@@ -23,7 +23,7 @@ const hexPayload = useQueryParamOrStorage({ name: 'hex', storageName: 'tcp-udp-p
|
||||
|
||||
function connect() {
|
||||
if (socket.value && isConnected.value) {
|
||||
addLog('⚠️ Already connected');
|
||||
addLog(t('tools.tcp-udp-port-tester.texts.already-connected'));
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -32,28 +32,28 @@ function connect() {
|
||||
|
||||
socket.value.onopen = () => {
|
||||
isConnected.value = true;
|
||||
addLog('✅ Connected to WebSocket bridge');
|
||||
addLog(t('tools.tcp-udp-port-tester.texts.connected-to-websocket-bridge'));
|
||||
};
|
||||
|
||||
socket.value.onmessage = (event) => {
|
||||
try {
|
||||
const json = JSON.parse(event.data);
|
||||
if (json.error) {
|
||||
addLog(`❌ Error: ${json.error}`);
|
||||
addLog(`${t('tools.tcp-udp-port-tester.texts.error')} ${json.error}`);
|
||||
}
|
||||
else if (json.end) {
|
||||
addLog(`🛑 End: ${json.end}`);
|
||||
addLog(`${t('tools.tcp-udp-port-tester.texts.end')} ${json.end}`);
|
||||
}
|
||||
}
|
||||
catch {
|
||||
if (typeof event.data === 'string') {
|
||||
addLog(`📩 Text: ${event.data}`);
|
||||
addLog(`${t('tools.tcp-udp-port-tester.texts.text')} ${event.data}`);
|
||||
}
|
||||
else {
|
||||
const buffer = new Uint8Array(event.data);
|
||||
addLog(`📩 Binary: ${Array.from(buffer).map(b => b.toString(16).padStart(2, '0')).join(' ')}`);
|
||||
addLog(`${t('tools.tcp-udp-port-tester.texts.binary')} ${Array.from(buffer).map(b => b.toString(16).padStart(2, '0')).join(' ')}`);
|
||||
try {
|
||||
addLog(`📩 Text: ${new TextDecoder().decode(buffer)}`);
|
||||
addLog(`${t('tools.tcp-udp-port-tester.texts.text')} ${new TextDecoder().decode(buffer)}`);
|
||||
}
|
||||
catch {}
|
||||
}
|
||||
@@ -62,17 +62,17 @@ function connect() {
|
||||
|
||||
socket.value.onclose = () => {
|
||||
isConnected.value = false;
|
||||
addLog('🔌 Disconnected');
|
||||
addLog(t('tools.tcp-udp-port-tester.texts.disconnected'));
|
||||
};
|
||||
}
|
||||
|
||||
function disconnect() {
|
||||
if (!socket.value) {
|
||||
addLog('⚠️ No active connection');
|
||||
addLog(t('tools.tcp-udp-port-tester.texts.no-active-connection'));
|
||||
return;
|
||||
}
|
||||
|
||||
addLog('🔻 Disconnecting...');
|
||||
addLog(t('tools.tcp-udp-port-tester.texts.disconnecting'));
|
||||
socket.value.close();
|
||||
socket.value = null;
|
||||
isConnected.value = false;
|
||||
@@ -87,14 +87,14 @@ function configureTarget() {
|
||||
port: targetPort.value,
|
||||
};
|
||||
socket.value.send(JSON.stringify(config));
|
||||
addLog(`⚙️ Configured ${protocol.value.toUpperCase()} → ${targetHost.value}:${targetPort.value}`);
|
||||
addLog(`${t('tools.tcp-udp-port-tester.texts.configured')} ${protocol.value.toUpperCase()} → ${targetHost.value}:${targetPort.value}`);
|
||||
}
|
||||
}
|
||||
|
||||
function sendText() {
|
||||
if (socket.value && isConnected.value && textPayload.value.trim() !== '') {
|
||||
socket.value.send(JSON.stringify({ type: 'send', payload: textPayload.value.replace(/\\n/g, '\n').replace(/\\r/g, '\r') }));
|
||||
addLog(`➡️ Sent text: ${textPayload.value}`);
|
||||
addLog(`${t('tools.tcp-udp-port-tester.texts.sent-text')} ${textPayload.value}`);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -102,7 +102,7 @@ function sendHex() {
|
||||
if (socket.value && isConnected.value) {
|
||||
const buffer = hexStringToBytes(hexPayload.value);
|
||||
socket.value.send(JSON.stringify({ type: 'send', payload: buffer }));
|
||||
addLog(`➡️ Sent hex: ${hexPayload.value}`);
|
||||
addLog(`${t('tools.tcp-udp-port-tester.texts.sent-hex')} ${hexPayload.value}`);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -159,7 +159,7 @@ onBeforeUnmount(() => {
|
||||
|
||||
<n-space justify="center">
|
||||
<n-tag :type="isConnected ? 'success' : 'error'">
|
||||
{{ isConnected ? "Connected" : "Disconnected" }}
|
||||
{{ isConnected ? t('tools.tcp-udp-port-tester.text.connected') : t('tools.tcp-udp-port-tester.text.disconnected') }}
|
||||
</n-tag>
|
||||
</n-space>
|
||||
</div>
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
import { translate as t } from '@/plugins/i18n.plugin';
|
||||
import { Firetruck } from '@vicons/tabler';
|
||||
import { defineTool } from '../tool';
|
||||
|
||||
export const tool = defineTool({
|
||||
name: 'UFW Command Generator',
|
||||
name: t('tools.ufw-generator.title'),
|
||||
path: '/ufw-generator',
|
||||
description: 'Generate UFW command lines',
|
||||
description: t('tools.ufw-generator.description'),
|
||||
keywords: ['ufw', 'firewall', 'generator'],
|
||||
component: () => import('./ufw-generator.vue'),
|
||||
icon: Firetruck,
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
<script setup lang="ts">
|
||||
import { useI18n } from 'vue-i18n';
|
||||
|
||||
const { t } = useI18n();
|
||||
const state = reactive({
|
||||
action: 'allow',
|
||||
direction: 'in',
|
||||
@@ -13,21 +16,21 @@ const state = reactive({
|
||||
});
|
||||
|
||||
const actionOptions = [
|
||||
{ label: 'Allow', value: 'allow' },
|
||||
{ label: 'Deny', value: 'deny' },
|
||||
{ label: 'Reject', value: 'reject' },
|
||||
{ label: 'Limit', value: 'limit' },
|
||||
{ label: t('tools.ufw-generator.texts.label-allow'), value: 'allow' },
|
||||
{ label: t('tools.ufw-generator.texts.label-deny'), value: 'deny' },
|
||||
{ label: t('tools.ufw-generator.texts.label-reject'), value: 'reject' },
|
||||
{ label: t('tools.ufw-generator.texts.label-limit'), value: 'limit' },
|
||||
];
|
||||
|
||||
const directionOptions = [
|
||||
{ label: 'Incoming', value: 'in' },
|
||||
{ label: 'Outgoing', value: 'out' },
|
||||
{ label: t('tools.ufw-generator.texts.label-incoming'), value: 'in' },
|
||||
{ label: t('tools.ufw-generator.texts.label-outgoing'), value: 'out' },
|
||||
];
|
||||
|
||||
const protocolOptions = [
|
||||
{ label: 'TCP', value: 'tcp' },
|
||||
{ label: 'UDP', value: 'udp' },
|
||||
{ label: 'Any', value: 'any' },
|
||||
{ label: t('tools.ufw-generator.texts.label-tcp'), value: 'tcp' },
|
||||
{ label: t('tools.ufw-generator.texts.label-udp'), value: 'udp' },
|
||||
{ label: t('tools.ufw-generator.texts.label-any'), value: 'any' },
|
||||
];
|
||||
|
||||
const ufwCommand = computed(() => {
|
||||
@@ -50,7 +53,7 @@ const ufwCommand = computed(() => {
|
||||
parts.push(state.port);
|
||||
}
|
||||
else {
|
||||
throw new Error('Missing port');
|
||||
throw new Error(t('tools.ufw-generator.texts.missing-port'));
|
||||
}
|
||||
|
||||
// protocol
|
||||
@@ -94,48 +97,48 @@ const ufwCommand = computed(() => {
|
||||
<template>
|
||||
<div>
|
||||
<NForm label-placement="left" label-width="120">
|
||||
<NFormItem label="Action:">
|
||||
<NFormItem :label="t('tools.ufw-generator.texts.label-action')">
|
||||
<NSelect v-model:value="state.action" :options="actionOptions" />
|
||||
</NFormItem>
|
||||
|
||||
<NFormItem label="Direction:">
|
||||
<NFormItem :label="t('tools.ufw-generator.texts.label-direction')">
|
||||
<NSelect v-model:value="state.direction" :options="directionOptions" />
|
||||
</NFormItem>
|
||||
|
||||
<NFormItem label="Protocol:">
|
||||
<NFormItem :label="t('tools.ufw-generator.texts.label-protocol')">
|
||||
<NSelect v-model:value="state.protocol" :options="protocolOptions" />
|
||||
</NFormItem>
|
||||
|
||||
<NFormItem label="Port:">
|
||||
<NInput v-model:value="state.port" placeholder="80" />
|
||||
<NFormItem :label="t('tools.ufw-generator.texts.label-port')">
|
||||
<NInput v-model:value="state.port" :placeholder="t('tools.ufw-generator.texts.placeholder-80')" />
|
||||
</NFormItem>
|
||||
|
||||
<NFormItem label="Port to (range):">
|
||||
<NInput v-model:value="state.portTo" placeholder="443" />
|
||||
<NFormItem :label="t('tools.ufw-generator.texts.label-port-to-range')">
|
||||
<NInput v-model:value="state.portTo" :placeholder="t('tools.ufw-generator.texts.placeholder-443')" />
|
||||
</NFormItem>
|
||||
|
||||
<NFormItem label="From IP:">
|
||||
<NInput v-model:value="state.fromIp" placeholder="192.168.1.10" />
|
||||
<NFormItem :label="t('tools.ufw-generator.texts.label-from-ip')">
|
||||
<NInput v-model:value="state.fromIp" :placeholder="t('tools.ufw-generator.texts.placeholder-192-168-1-10')" />
|
||||
</NFormItem>
|
||||
|
||||
<NFormItem label="To IP:">
|
||||
<NInput v-model:value="state.toIp" placeholder="10.0.0.5" />
|
||||
<NFormItem :label="t('tools.ufw-generator.texts.label-to-ip')">
|
||||
<NInput v-model:value="state.toIp" :placeholder="t('tools.ufw-generator.texts.placeholder-10-0-0-5')" />
|
||||
</NFormItem>
|
||||
|
||||
<NFormItem label="Interface:">
|
||||
<NInput v-model:value="state.interface" placeholder="eth0" />
|
||||
<NFormItem :label="t('tools.ufw-generator.texts.label-interface')">
|
||||
<NInput v-model:value="state.interface" :placeholder="t('tools.ufw-generator.texts.placeholder-eth0')" />
|
||||
</NFormItem>
|
||||
|
||||
<NFormItem label="Logging:">
|
||||
<NFormItem :label="t('tools.ufw-generator.texts.label-logging')">
|
||||
<NSwitch v-model:value="state.log" />
|
||||
</NFormItem>
|
||||
|
||||
<NFormItem label="Comment:">
|
||||
<NInput v-model:value="state.comment" placeholder="Optional comment" />
|
||||
<NFormItem :label="t('tools.ufw-generator.texts.label-comment')">
|
||||
<NInput v-model:value="state.comment" :placeholder="t('tools.ufw-generator.texts.placeholder-optional-comment')" />
|
||||
</NFormItem>
|
||||
</NForm>
|
||||
|
||||
<n-card v-if="ufwCommand" title="Generated Command">
|
||||
<n-card v-if="ufwCommand" :title="t('tools.ufw-generator.texts.title-generated-command')">
|
||||
<textarea-copyable :value="ufwCommand" />
|
||||
</n-card>
|
||||
</div>
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
import { translate as t } from '@/plugins/i18n.plugin';
|
||||
import { WorldUpload } from '@vicons/tabler';
|
||||
import { defineTool } from '../tool';
|
||||
|
||||
export const tool = defineTool({
|
||||
name: 'Visual Subnet Calculator',
|
||||
name: t('tools.visual-subnet-calculator.title'),
|
||||
path: '/visual-subnet-calculator',
|
||||
description: 'A tool for quickly designing networks and collaborating on that design with others. It focuses on expediting the work of network administrators, not academic subnetting math.',
|
||||
description: t('tools.visual-subnet-calculator.description'),
|
||||
keywords: ['visual', 'subnet', 'network', 'calculator'],
|
||||
component: () => import('./visual-subnet-calculator.vue'),
|
||||
icon: WorldUpload,
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
import { translate as t } from '@/plugins/i18n.plugin';
|
||||
import { Artboard } from '@vicons/tabler';
|
||||
import { defineTool } from '../tool';
|
||||
|
||||
export const tool = defineTool({
|
||||
name: 'Zalgo Generator/Banner',
|
||||
name: t('tools.zalgo.title'),
|
||||
path: '/zalgo',
|
||||
description: 'Generate Zalgo text and clean zalgo generated text',
|
||||
description: t('tools.zalgo.description'),
|
||||
keywords: ['zalgo', 'text', 'generation'],
|
||||
component: () => import('./zalgo.vue'),
|
||||
icon: Artboard,
|
||||
|
||||
+17
-14
@@ -1,8 +1,11 @@
|
||||
<script setup lang="ts">
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import { useCopy } from '@/composable/copy';
|
||||
import { useQueryParamOrStorage } from '@/composable/queryParams';
|
||||
import { lunicode } from '@/utils/lunicode';
|
||||
|
||||
const { t } = useI18n();
|
||||
|
||||
const textInput = ref('');
|
||||
const intensity = useQueryParamOrStorage({ name: 'intensity', storageName: 'zalgo:i', defaultValue: 8 });
|
||||
watch(intensity, () => {
|
||||
@@ -15,7 +18,7 @@ function doZalgo() {
|
||||
lunicode.tools.creepify.options.maxHeight = intensity.value;
|
||||
zalgoOutput.value = lunicode.tools.creepify.encode(textInput.value);
|
||||
}
|
||||
const { copy: copyZalgoOutput } = useCopy({ source: zalgoOutput, text: 'Zalgo text copied!' });
|
||||
const { copy: copyZalgoOutput } = useCopy({ source: zalgoOutput, text: t('tools.zalgo.texts.text-zalgo-text-copied') });
|
||||
|
||||
const zalgoInput = ref('');
|
||||
const textOutput = ref('');
|
||||
@@ -25,18 +28,18 @@ function unZalgo() {
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<c-card title="Zalgo Text Generation">
|
||||
<c-card :title="t('tools.zalgo.texts.title-zalgo-text-generation')">
|
||||
<c-input-text
|
||||
v-model:value="textInput"
|
||||
multiline
|
||||
placeholder="Put your string here..."
|
||||
:placeholder="t('tools.zalgo.texts.placeholder-put-your-string-here')"
|
||||
rows="5"
|
||||
label="Text to decorate with Zalgo"
|
||||
:label="t('tools.zalgo.texts.label-text-to-decorate-with-zalgo')"
|
||||
raw-text
|
||||
mb-2
|
||||
/>
|
||||
|
||||
<n-form-item label="Intensity:" label-placement="left" mb-3>
|
||||
<n-form-item :label="t('tools.zalgo.texts.label-intensity')" label-placement="left" mb-3>
|
||||
<NSlider v-model:value="intensity" :min="1" :max="300" :step="1" />
|
||||
</n-form-item>
|
||||
|
||||
@@ -45,12 +48,12 @@ function unZalgo() {
|
||||
type="primary"
|
||||
@click="doZalgo"
|
||||
>
|
||||
Generate
|
||||
{{ t('tools.zalgo.texts.tag-generate') }}
|
||||
</n-button>
|
||||
</n-space>
|
||||
|
||||
<div v-if="zalgoOutput">
|
||||
<n-card title="Zalgo text" mb-2>
|
||||
<n-card :title="t('tools.zalgo.texts.title-zalgo-text')" mb-2>
|
||||
<div :style="{ lineHeight: intensity / 3, textAlign: 'center' }">
|
||||
{{ zalgoOutput }}
|
||||
</div>
|
||||
@@ -58,19 +61,19 @@ function unZalgo() {
|
||||
|
||||
<div flex justify-center>
|
||||
<c-button @click="copyZalgoOutput()">
|
||||
Copy
|
||||
{{ t('tools.zalgo.texts.tag-copy') }}
|
||||
</c-button>
|
||||
</div>
|
||||
</div>
|
||||
</c-card>
|
||||
|
||||
<c-card title="Zalgo cleaner">
|
||||
<c-card :title="t('tools.zalgo.texts.title-zalgo-cleaner')">
|
||||
<c-input-text
|
||||
v-model:value="zalgoInput"
|
||||
multiline
|
||||
placeholder="Put zalgo text to clean here..."
|
||||
:placeholder="t('tools.zalgo.texts.placeholder-put-zalgo-text-to-clean-here')"
|
||||
rows="5"
|
||||
label="Zalgo text to clean"
|
||||
:label="t('tools.zalgo.texts.label-zalgo-text-to-clean')"
|
||||
mb-5
|
||||
/>
|
||||
|
||||
@@ -79,15 +82,15 @@ function unZalgo() {
|
||||
type="primary"
|
||||
@click="unZalgo"
|
||||
>
|
||||
Clean
|
||||
{{ t('tools.zalgo.texts.tag-clean') }}
|
||||
</n-button>
|
||||
</n-space>
|
||||
|
||||
<TextareaCopyable
|
||||
v-if="textOutput"
|
||||
v-model:value="textOutput"
|
||||
label="Cleaned text"
|
||||
placeholder="Clean zalgo text will appear here..."
|
||||
:label="t('tools.zalgo.texts.label-cleaned-text')"
|
||||
:placeholder="t('tools.zalgo.texts.placeholder-clean-zalgo-text-will-appear-here')"
|
||||
mb-5
|
||||
/>
|
||||
</c-card>
|
||||
|
||||
Reference in new issue
Block a user