mirror of
https://github.com/sharevb/it-tools.git
synced 2026-11-20 21:23:08 +03:00
feat: fix typescript issue and translate all remaining tools
This commit is contained in:
1 parent
6682517544
commit
14dd110bfe
101 files changed
+1968
-840
No files matched your search
Vendored
+54
@@ -56,6 +56,7 @@ declare module '@vue/runtime-core' {
|
||||
CertificateKeyParser: typeof import('./src/tools/certificate-key-parser/certificate-key-parser.vue')['default']
|
||||
CFileUpload: typeof import('./src/ui/c-file-upload/c-file-upload.vue')['default']
|
||||
'CFileUpload.demo': typeof import('./src/ui/c-file-upload/c-file-upload.demo.vue')['default']
|
||||
CharsetDetector: typeof import('./src/tools/charset-detector/charset-detector.vue')['default']
|
||||
ChmodCalculator: typeof import('./src/tools/chmod-calculator/chmod-calculator.vue')['default']
|
||||
Chronometer: typeof import('./src/tools/chronometer/chronometer.vue')['default']
|
||||
CidrInCidr: typeof import('./src/tools/cidr-in-cidr/cidr-in-cidr.vue')['default']
|
||||
@@ -122,20 +123,29 @@ declare module '@vue/runtime-core' {
|
||||
DiceRoller: typeof import('./src/tools/dice-roller/dice-roller.vue')['default']
|
||||
DiffViewer: typeof import('./src/tools/json-diff/diff-viewer/diff-viewer.vue')['default']
|
||||
DistinctWords: typeof import('./src/tools/distinct-words/distinct-words.vue')['default']
|
||||
DjangoSecretGenerator: typeof import('./src/tools/django-secret-generator/django-secret-generator.vue')['default']
|
||||
DkimDnsGenerator: typeof import('./src/tools/dkim-dns-generator/dkim-dns-generator.vue')['default']
|
||||
DmarcDnsGenerator: typeof import('./src/tools/dmarc-dns-generator/dmarc-dns-generator.vue')['default']
|
||||
DmarcReportAnalyzer: typeof import('./src/tools/dmarc-report-analyzer/dmarc-report-analyzer.vue')['default']
|
||||
DnsblChecker: typeof import('./src/tools/dnsbl-checker/dnsbl-checker.vue')['default']
|
||||
DnsQueries: typeof import('./src/tools/dns-queries/dns-queries.vue')['default']
|
||||
Docker: typeof import('./src/tools/docker-memo/docker.md')['default']
|
||||
DockerCompose: typeof import('./src/tools/docker-compose-memo/docker-compose.md')['default']
|
||||
DockerComposeConverter: typeof import('./src/tools/docker-compose-converter/docker-compose-converter.vue')['default']
|
||||
DockerComposeMemo: typeof import('./src/tools/docker-compose-memo/docker-compose-memo.vue')['default']
|
||||
DockerComposeToDockerRunConverter: typeof import('./src/tools/docker-compose-to-docker-run-converter/docker-compose-to-docker-run-converter.vue')['default']
|
||||
DockerComposeToKubernetes: typeof import('./src/tools/docker-compose-to-kubernetes/docker-compose-to-kubernetes.vue')['default']
|
||||
DockerComposeToQuadlets: typeof import('./src/tools/docker-compose-to-quadlets/docker-compose-to-quadlets.vue')['default']
|
||||
DockerComposeValidator: typeof import('./src/tools/docker-compose-validator/docker-compose-validator.vue')['default']
|
||||
Dockerfile: typeof import('./src/tools/dockerfile-memo/dockerfile.md')['default']
|
||||
DockerfileMemo: typeof import('./src/tools/dockerfile-memo/dockerfile-memo.vue')['default']
|
||||
DockerInspectToDockerRun: typeof import('./src/tools/docker-inspect-to-docker-run/docker-inspect-to-docker-run.vue')['default']
|
||||
DockerMemo: typeof import('./src/tools/docker-memo/docker-memo.vue')['default']
|
||||
DockerRunToDockerComposeConverter: typeof import('./src/tools/docker-run-to-docker-compose-converter/docker-run-to-docker-compose-converter.vue')['default']
|
||||
DockerRunToKubernetes: typeof import('./src/tools/docker-run-to-kubernetes/docker-run-to-kubernetes.vue')['default']
|
||||
DockerRunToQuadlets: typeof import('./src/tools/docker-run-to-quadlets/docker-run-to-quadlets.vue')['default']
|
||||
DockerSwarm: typeof import('./src/tools/docker-swarm-memo/docker-swarm.md')['default']
|
||||
DockerSwarmMemo: typeof import('./src/tools/docker-swarm-memo/docker-swarm-memo.vue')['default']
|
||||
DuplicateLineFinder: typeof import('./src/tools/duplicate-line-finder/duplicate-line-finder.vue')['default']
|
||||
DurationCalculator: typeof import('./src/tools/duration-calculator/duration-calculator.vue')['default']
|
||||
DynamicValues: typeof import('./src/tools/benchmark-builder/dynamic-values.vue')['default']
|
||||
@@ -150,9 +160,11 @@ declare module '@vue/runtime-core' {
|
||||
Encryption: typeof import('./src/tools/encryption/encryption.vue')['default']
|
||||
EnergyComputer: typeof import('./src/tools/energy-computer/energy-computer.vue')['default']
|
||||
EnergyConverter: typeof import('./src/tools/energy-converter/energy-converter.vue')['default']
|
||||
EnvVariablesConverter: typeof import('./src/tools/env-variables-converter/env-variables-converter.vue')['default']
|
||||
EtaCalculator: typeof import('./src/tools/eta-calculator/eta-calculator.vue')['default']
|
||||
ExcelToData: typeof import('./src/tools/excel-to-data/excel-to-data.vue')['default']
|
||||
ExtractTextFromHtml: typeof import('./src/tools/extract-text-from-html/extract-text-from-html.vue')['default']
|
||||
FaviconGenerator: typeof import('./src/tools/favicon-generator/favicon-generator.vue')['default']
|
||||
FavoriteButton: typeof import('./src/components/FavoriteButton.vue')['default']
|
||||
FileHasher: typeof import('./src/tools/file-hasher/file-hasher.vue')['default']
|
||||
FileType: typeof import('./src/tools/file-type/file-type.vue')['default']
|
||||
@@ -160,6 +172,8 @@ declare module '@vue/runtime-core' {
|
||||
FirewalldGenerator: typeof import('./src/tools/firewalld-generator/firewalld-generator.vue')['default']
|
||||
FloatingPointNumberConverter: typeof import('./src/tools/floating-point-number-converter/floating-point-number-converter.vue')['default']
|
||||
FolderStructureDiagram: typeof import('./src/tools/folder-structure-diagram/folder-structure-diagram.vue')['default']
|
||||
FontCompare: typeof import('./src/tools/font-compare/font-compare.vue')['default']
|
||||
FontControls: typeof import('./src/tools/font-compare/font-controls.vue')['default']
|
||||
Footer: typeof import('./src/tools/pomodoro-timer/app/components/Footer.vue')['default']
|
||||
ForceConverter: typeof import('./src/tools/force-converter/force-converter.vue')['default']
|
||||
FormatTransformer: typeof import('./src/components/FormatTransformer.vue')['default']
|
||||
@@ -170,6 +184,7 @@ declare module '@vue/runtime-core' {
|
||||
'GitMemo.content': typeof import('./src/tools/git-memo/git-memo.content.md')['default']
|
||||
'GitSem.memo': typeof import('./src/tools/git-semantic-commit-memo/git-sem.memo.md')['default']
|
||||
GitSemanticCommitMemo: typeof import('./src/tools/git-semantic-commit-memo/git-semantic-commit-memo.vue')['default']
|
||||
GptTokenEncoder: typeof import('./src/tools/gpt-token-encoder/gpt-token-encoder.vue')['default']
|
||||
GptTokenEstimator: typeof import('./src/tools/gpt-token-estimator/gpt-token-estimator.vue')['default']
|
||||
GzipConverter: typeof import('./src/tools/gzip-converter/gzip-converter.vue')['default']
|
||||
HarSanitizer: typeof import('./src/tools/har-sanitizer/har-sanitizer.vue')['default']
|
||||
@@ -216,6 +231,7 @@ declare module '@vue/runtime-core' {
|
||||
IconTablerDownload: typeof import('~icons/tabler/download')['default']
|
||||
IesLightingGuidelines: typeof import('./src/tools/ies-lighting-guidelines/ies-lighting-guidelines.vue')['default']
|
||||
IlluminanceConverter: typeof import('./src/tools/illuminance-converter/illuminance-converter.vue')['default']
|
||||
ImageComparer: typeof import('./src/tools/image-comparer/image-comparer.vue')['default']
|
||||
ImageConverter: typeof import('./src/tools/image-converter/image-converter.vue')['default']
|
||||
ImageExifReader: typeof import('./src/tools/image-exif-reader/image-exif-reader.vue')['default']
|
||||
ImageResizer: typeof import('./src/tools/image-resizer/image-resizer.vue')['default']
|
||||
@@ -244,6 +260,7 @@ declare module '@vue/runtime-core' {
|
||||
JqTester: typeof import('./src/tools/jq-tester/jq-tester.vue')['default']
|
||||
JsonDiff: typeof import('./src/tools/json-diff/json-diff.vue')['default']
|
||||
JsonEditor: typeof import('./src/tools/json-editor/json-editor.vue')['default']
|
||||
JsonEditorFromSchema: typeof import('./src/tools/json-editor-from-schema/json-editor-from-schema.vue')['default']
|
||||
JsonEscaper: typeof import('./src/tools/json-escaper/json-escaper.vue')['default']
|
||||
JsonFlattenNestify: typeof import('./src/tools/json-flatten-nestify/json-flatten-nestify.vue')['default']
|
||||
JsonLinter: typeof import('./src/tools/json-linter/json-linter.vue')['default']
|
||||
@@ -257,6 +274,7 @@ declare module '@vue/runtime-core' {
|
||||
JsonStringConverter: typeof import('./src/tools/json-string-converter/json-string-converter.vue')['default']
|
||||
JsonToCsharp: typeof import('./src/tools/json-to-csharp/json-to-csharp.vue')['default']
|
||||
JsonToCsv: typeof import('./src/tools/json-to-csv/json-to-csv.vue')['default']
|
||||
JsonToData: typeof import('./src/tools/json-to-data/json-to-data.vue')['default']
|
||||
JsonToGo: typeof import('./src/tools/json-to-go/json-to-go.vue')['default']
|
||||
JsonToJava: typeof import('./src/tools/json-to-java/json-to-java.vue')['default']
|
||||
JsonToJavascript: typeof import('./src/tools/json-to-javascript/json-to-javascript.vue')['default']
|
||||
@@ -285,15 +303,19 @@ declare module '@vue/runtime-core' {
|
||||
ListComparer: typeof import('./src/tools/list-comparer/list-comparer.vue')['default']
|
||||
ListConverter: typeof import('./src/tools/list-converter/list-converter.vue')['default']
|
||||
LocaleSelector: typeof import('./src/modules/i18n/components/locale-selector.vue')['default']
|
||||
LogrotateGenerator: typeof import('./src/tools/logrotate-generator/logrotate-generator.vue')['default']
|
||||
LoremIpsumGenerator: typeof import('./src/tools/lorem-ipsum-generator/lorem-ipsum-generator.vue')['default']
|
||||
LuhnValidator: typeof import('./src/tools/luhn-validator/luhn-validator.vue')['default']
|
||||
MacAddressConverter: typeof import('./src/tools/mac-address-converter/mac-address-converter.vue')['default']
|
||||
MacAddressGenerator: typeof import('./src/tools/mac-address-generator/mac-address-generator.vue')['default']
|
||||
MacAddressLookup: typeof import('./src/tools/mac-address-lookup/mac-address-lookup.vue')['default']
|
||||
MailtoGenerator: typeof import('./src/tools/mailto-generator/mailto-generator.vue')['default']
|
||||
ManyUnitsConverter: typeof import('./src/tools/many-units-converter/many-units-converter.vue')['default']
|
||||
MarkdownCheatsheet: typeof import('./src/tools/markdown-cheatsheet/markdown-cheatsheet.vue')['default']
|
||||
MarkdownEditor: typeof import('./src/tools/markdown-editor/markdown-editor.vue')['default']
|
||||
MarkdownTablePrettifier: typeof import('./src/tools/markdown-table-prettifier/markdown-table-prettifier.vue')['default']
|
||||
MarkdownTocGenerator: typeof import('./src/tools/markdown-toc-generator/markdown-toc-generator.vue')['default']
|
||||
MarkdownToDocx: typeof import('./src/tools/markdown-to-docx/markdown-to-docx.vue')['default']
|
||||
MarkdownToHtml: typeof import('./src/tools/markdown-to-html/markdown-to-html.vue')['default']
|
||||
MassConverter: typeof import('./src/tools/mass-converter/mass-converter.vue')['default']
|
||||
MathEvaluator: typeof import('./src/tools/math-evaluator/math-evaluator.vue')['default']
|
||||
@@ -308,14 +330,17 @@ declare module '@vue/runtime-core' {
|
||||
MermaidExporter: typeof import('./src/tools/mermaid-exporter/mermaid-exporter.vue')['default']
|
||||
MetaTagGenerator: typeof import('./src/tools/meta-tag-generator/meta-tag-generator.vue')['default']
|
||||
MicTester: typeof import('./src/tools/mic-tester/mic-tester.vue')['default']
|
||||
MiddleEndianConverter: typeof import('./src/tools/middle-endian-converter/middle-endian-converter.vue')['default']
|
||||
MimeConverter: typeof import('./src/tools/mime-converter/mime-converter.vue')['default']
|
||||
MimeTypes: typeof import('./src/tools/mime-types/mime-types.vue')['default']
|
||||
ModeIconBar: typeof import('./src/tools/pomodoro-timer/app/components/ModeIconBar.vue')['default']
|
||||
MongoObjectidConverter: typeof import('./src/tools/mongo-objectid-converter/mongo-objectid-converter.vue')['default']
|
||||
MorseConverter: typeof import('./src/tools/morse-converter/morse-converter.vue')['default']
|
||||
MttdlCalculator: typeof import('./src/tools/mttdl-calculator/mttdl-calculator.vue')['default']
|
||||
MultiLinkDownloader: typeof import('./src/tools/multi-link-downloader/multi-link-downloader.vue')['default']
|
||||
MyIp: typeof import('./src/tools/my-ip/my-ip.vue')['default']
|
||||
NA: typeof import('naive-ui')['NA']
|
||||
NAlert: typeof import('naive-ui')['NAlert']
|
||||
NanoidGenerator: typeof import('./src/tools/nanoid-generator/nanoid-generator.vue')['default']
|
||||
NanoMemo: typeof import('./src/tools/nano-memo/nano-memo.vue')['default']
|
||||
'NanoMemo.content': typeof import('./src/tools/nano-memo/nano-memo.content.md')['default']
|
||||
@@ -326,6 +351,7 @@ declare module '@vue/runtime-core' {
|
||||
NCode: typeof import('naive-ui')['NCode']
|
||||
NColorPicker: typeof import('naive-ui')['NColorPicker']
|
||||
NConfigProvider: typeof import('naive-ui')['NConfigProvider']
|
||||
NDataTable: typeof import('naive-ui')['NDataTable']
|
||||
NDivider: typeof import('naive-ui')['NDivider']
|
||||
NEllipsis: typeof import('naive-ui')['NEllipsis']
|
||||
NForm: typeof import('naive-ui')['NForm']
|
||||
@@ -339,9 +365,12 @@ declare module '@vue/runtime-core' {
|
||||
NH3: typeof import('naive-ui')['NH3']
|
||||
NIcon: typeof import('naive-ui')['NIcon']
|
||||
NImage: typeof import('naive-ui')['NImage']
|
||||
NInput: typeof import('naive-ui')['NInput']
|
||||
NInputGroup: typeof import('naive-ui')['NInputGroup']
|
||||
NInputGroupLabel: typeof import('naive-ui')['NInputGroupLabel']
|
||||
NInputNumber: typeof import('naive-ui')['NInputNumber']
|
||||
NInputNumberI18n: typeof import('./src/ui/n-input-number-i18n/n-input-number-i18n.vue')['default']
|
||||
'NInputNumberI18n.demo': typeof import('./src/ui/n-input-number-i18n/n-input-number-i18n.demo.vue')['default']
|
||||
NLayout: typeof import('naive-ui')['NLayout']
|
||||
NLayoutSider: typeof import('naive-ui')['NLayoutSider']
|
||||
NMenu: typeof import('naive-ui')['NMenu']
|
||||
@@ -349,14 +378,20 @@ declare module '@vue/runtime-core' {
|
||||
NP: typeof import('naive-ui')['NP']
|
||||
NScrollbar: typeof import('naive-ui')['NScrollbar']
|
||||
NSelect: typeof import('naive-ui')['NSelect']
|
||||
NSpace: typeof import('naive-ui')['NSpace']
|
||||
NSwitch: typeof import('naive-ui')['NSwitch']
|
||||
NTable: typeof import('naive-ui')['NTable']
|
||||
NTabPane: typeof import('naive-ui')['NTabPane']
|
||||
NTabs: typeof import('naive-ui')['NTabs']
|
||||
NTooltip: typeof import('naive-ui')['NTooltip']
|
||||
NumberInput: typeof import('./src/tools/pomodoro-timer/app/components/NumberInput.vue')['default']
|
||||
NumeronymGenerator: typeof import('./src/tools/numeronym-generator/numeronym-generator.vue')['default']
|
||||
NUpload: typeof import('naive-ui')['NUpload']
|
||||
OcrImage: typeof import('./src/tools/ocr-image/ocr-image.vue')['default']
|
||||
Option43Generator: typeof import('./src/tools/option43-generator/option43-generator.vue')['default']
|
||||
OtpCodeGeneratorAndValidator: typeof import('./src/tools/otp-code-generator-and-validator/otp-code-generator-and-validator.vue')['default']
|
||||
OutlookParser: typeof import('./src/tools/outlook-parser/outlook-parser.vue')['default']
|
||||
PackFilesForAi: typeof import('./src/tools/pack-files-for-ai/pack-files-for-ai.vue')['default']
|
||||
ParquetsReader: typeof import('./src/tools/parquets-reader/parquets-reader.vue')['default']
|
||||
PasetoEncryption: typeof import('./src/tools/paseto-encryption/paseto-encryption.vue')['default']
|
||||
PasetoSigning: typeof import('./src/tools/paseto-signing/paseto-signing.vue')['default']
|
||||
@@ -393,6 +428,7 @@ declare module '@vue/runtime-core' {
|
||||
QrContactInfoGenerator: typeof import('./src/tools/qr-contact-info-generator/qr-contact-info-generator.vue')['default']
|
||||
QuoteConverter: typeof import('./src/tools/quote-converter/quote-converter.vue')['default']
|
||||
RaidCalculator: typeof import('./src/tools/raid-calculator/raid-calculator.vue')['default']
|
||||
RandomNumbersGenerator: typeof import('./src/tools/random-numbers-generator/random-numbers-generator.vue')['default']
|
||||
RandomPortGenerator: typeof import('./src/tools/random-port-generator/random-port-generator.vue')['default']
|
||||
RegexMemo: typeof import('./src/tools/regex-memo/regex-memo.vue')['default']
|
||||
'RegexMemo.content': typeof import('./src/tools/regex-memo/regex-memo.content.md')['default']
|
||||
@@ -400,6 +436,7 @@ declare module '@vue/runtime-core' {
|
||||
RemoveExif: typeof import('./src/tools/remove-exif/remove-exif.vue')['default']
|
||||
RemPxConverter: typeof import('./src/tools/rem-px-converter/rem-px-converter.vue')['default']
|
||||
ResetDropup: typeof import('./src/tools/pomodoro-timer/app/components/ResetDropup.vue')['default']
|
||||
ResistorCalculator: typeof import('./src/tools/resistor-calculator/resistor-calculator.vue')['default']
|
||||
ResultRow: typeof import('./src/tools/ipv4-range-expander/result-row.vue')['default']
|
||||
RmbNumbers: typeof import('./src/tools/rmb-numbers/rmb-numbers.vue')['default']
|
||||
RomanNumeralConverter: typeof import('./src/tools/roman-numeral-converter/roman-numeral-converter.vue')['default']
|
||||
@@ -411,6 +448,10 @@ declare module '@vue/runtime-core' {
|
||||
RsyncGenerator: typeof import('./src/tools/rsync-generator/rsync-generator.vue')['default']
|
||||
RuneConverter: typeof import('./src/tools/rune-converter/rune-converter.vue')['default']
|
||||
SafelinkDecoder: typeof import('./src/tools/safelink-decoder/safelink-decoder.vue')['default']
|
||||
ScalarOpenapiTester: typeof import('./src/tools/scalar-openapi-tester/scalar-openapi-tester.vue')['default']
|
||||
Sed: typeof import('./src/tools/sed-memo/sed.md')['default']
|
||||
SedCommandGenerator: typeof import('./src/tools/sed-command-generator/sed-command-generator.vue')['default']
|
||||
SedMemo: typeof import('./src/tools/sed-memo/sed-memo.vue')['default']
|
||||
SensitiveDataMasker: typeof import('./src/tools/sensitive-data-masker/sensitive-data-masker.vue')['default']
|
||||
Settings: typeof import('./src/tools/pomodoro-timer/app/views/Settings.vue')['default']
|
||||
SharepointDecoder: typeof import('./src/tools/sharepoint-decoder/sharepoint-decoder.vue')['default']
|
||||
@@ -420,16 +461,19 @@ declare module '@vue/runtime-core' {
|
||||
SmartRawConverter: typeof import('./src/tools/smart-raw-converter/smart-raw-converter.vue')['default']
|
||||
SmartTextReplacer: typeof import('./src/tools/smart-text-replacer/smart-text-replacer.vue')['default']
|
||||
SnowflakeIdExtractor: typeof import('./src/tools/snowflake-id-extractor/snowflake-id-extractor.vue')['default']
|
||||
SocialLinkSharer: typeof import('./src/tools/social-link-sharer/social-link-sharer.vue')['default']
|
||||
SoftwareLicenceCompatibility: typeof import('./src/tools/software-licence-compatibility/software-licence-compatibility.vue')['default']
|
||||
SpanCopyable: typeof import('./src/components/SpanCopyable.vue')['default']
|
||||
SpfDnsGenerator: typeof import('./src/tools/spf-dns-generator/spf-dns-generator.vue')['default']
|
||||
SplashScreen: typeof import('./src/tools/pomodoro-timer/app/views/SplashScreen.vue')['default']
|
||||
SqlMinifier: typeof import('./src/tools/sql-minifier/sql-minifier.vue')['default']
|
||||
SqlParameters: typeof import('./src/tools/sql-parameters/sql-parameters.vue')['default']
|
||||
SqlPrettify: typeof import('./src/tools/sql-prettify/sql-prettify.vue')['default']
|
||||
SslCertConverter: typeof import('./src/tools/ssl-cert-converter/ssl-cert-converter.vue')['default']
|
||||
StacktracePrettier: typeof import('./src/tools/stacktrace-prettier/stacktrace-prettier.vue')['default']
|
||||
StringEscaper: typeof import('./src/tools/string-escaper/string-escaper.vue')['default']
|
||||
StringObfuscator: typeof import('./src/tools/string-obfuscator/string-obfuscator.vue')['default']
|
||||
SvgLinter: typeof import('./src/tools/svg-linter/svg-linter.vue')['default']
|
||||
SvgPlaceholderGenerator: typeof import('./src/tools/svg-placeholder-generator/svg-placeholder-generator.vue')['default']
|
||||
SwaggerUiTester: typeof import('./src/tools/swagger-ui-tester/swagger-ui-tester.vue')['default']
|
||||
TcpdumpGenerator: typeof import('./src/tools/tcpdump-generator/tcpdump-generator.vue')['default']
|
||||
@@ -445,17 +489,20 @@ declare module '@vue/runtime-core' {
|
||||
TimezoneConverter: typeof import('./src/tools/timezone-converter/timezone-converter.vue')['default']
|
||||
TokenDisplay: typeof import('./src/tools/otp-code-generator-and-validator/token-display.vue')['default']
|
||||
'TokenGenerator.tool': typeof import('./src/tools/token-generator/token-generator.tool.vue')['default']
|
||||
TomlLinter: typeof import('./src/tools/toml-linter/toml-linter.vue')['default']
|
||||
TomlToJson: typeof import('./src/tools/toml-to-json/toml-to-json.vue')['default']
|
||||
TomlToYaml: typeof import('./src/tools/toml-to-yaml/toml-to-yaml.vue')['default']
|
||||
'Tool.layout': typeof import('./src/layouts/tool.layout.vue')['default']
|
||||
ToolCard: typeof import('./src/components/ToolCard.vue')['default']
|
||||
TorrentToMagnet: typeof import('./src/tools/torrent-to-magnet/torrent-to-magnet.vue')['default']
|
||||
TraefikComposeMaker: typeof import('./src/tools/traefik-compose-maker/traefik-compose-maker.vue')['default']
|
||||
Translator: typeof import('./src/tools/translator/translator.vue')['default']
|
||||
TtlCalculator: typeof import('./src/tools/ttl-calculator/ttl-calculator.vue')['default']
|
||||
UlidGenerator: typeof import('./src/tools/ulid-generator/ulid-generator.vue')['default']
|
||||
UnicodeCharactersToJavaEntities: typeof import('./src/tools/unicode-characters-to-java-entities-converter/unicode-characters-to-java-entities.vue')['default']
|
||||
UnicodeFormatter: typeof import('./src/tools/unicode-formatter/unicode-formatter.vue')['default']
|
||||
UnicodeSearch: typeof import('./src/tools/unicode-search/unicode-search.vue')['default']
|
||||
UnicodeToGsm7: typeof import('./src/tools/unicode-to-gsm7/unicode-to-gsm7.vue')['default']
|
||||
UnitsConverter: typeof import('./src/components/UnitsConverter.vue')['default']
|
||||
UrlCleaner: typeof import('./src/tools/url-cleaner/url-cleaner.vue')['default']
|
||||
UrlEncoder: typeof import('./src/tools/url-encoder/url-encoder.vue')['default']
|
||||
@@ -474,10 +521,13 @@ declare module '@vue/runtime-core' {
|
||||
Watermarker: typeof import('./src/tools/watermarker/watermarker.vue')['default']
|
||||
WebsocketTester: typeof import('./src/tools/websocket-tester/websocket-tester.vue')['default']
|
||||
WeekNumberConverter: typeof import('./src/tools/week-number-converter/week-number-converter.vue')['default']
|
||||
WhichDay: typeof import('./src/tools/which-day/which-day.vue')['default']
|
||||
WifiQrCodeGenerator: typeof import('./src/tools/wifi-qr-code-generator/wifi-qr-code-generator.vue')['default']
|
||||
WireguardConfigGenerator: typeof import('./src/tools/wireguard-config-generator/wireguard-config-generator.vue')['default']
|
||||
WpaPskGenerator: typeof import('./src/tools/wpa-psk-generator/wpa-psk-generator.vue')['default']
|
||||
X509CertificateGenerator: typeof import('./src/tools/x509-certificate-generator/x509-certificate-generator.vue')['default']
|
||||
XmlFormatter: typeof import('./src/tools/xml-formatter/xml-formatter.vue')['default']
|
||||
XmlLinter: typeof import('./src/tools/xml-linter/xml-linter.vue')['default']
|
||||
XmlToJson: typeof import('./src/tools/xml-to-json/xml-to-json.vue')['default']
|
||||
Xpath: typeof import('./src/tools/xpath-memo/xpath.md')['default']
|
||||
XpathMemo: typeof import('./src/tools/xpath-memo/xpath-memo.vue')['default']
|
||||
@@ -489,5 +539,9 @@ declare module '@vue/runtime-core' {
|
||||
YamlToJson: typeof import('./src/tools/yaml-to-json-converter/yaml-to-json.vue')['default']
|
||||
YamlToToml: typeof import('./src/tools/yaml-to-toml/yaml-to-toml.vue')['default']
|
||||
YamlViewer: typeof import('./src/tools/yaml-viewer/yaml-viewer.vue')['default']
|
||||
'Zpool.content': typeof import('./src/tools/zpool-memo/zpool.content.md')['default']
|
||||
ZpoolCalculator: typeof import('./src/tools/zpool-calculator/zpool-calculator.vue')['default']
|
||||
ZpoolMemo: typeof import('./src/tools/zpool-memo/zpool-memo.vue')['default']
|
||||
ZxcvbnPasswordStrength: typeof import('./src/tools/zxcvbn-password-strength/zxcvbn-password-strength.vue')['default']
|
||||
}
|
||||
}
|
||||
+913
-3
File diff suppressed because it is too large.
Load diff
Vendored
+4
@@ -51,3 +51,7 @@ interface JSON {
|
||||
interface Navigator {
|
||||
gpu?: any;
|
||||
}
|
||||
|
||||
interface FontFaceSet {
|
||||
add(fontFace: FontFace)
|
||||
}
|
||||
@@ -1,8 +1,11 @@
|
||||
<script setup lang="ts">
|
||||
import { Buffer } from 'node:buffer';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import chardet from 'chardet';
|
||||
import iconv from 'iconv-lite';
|
||||
|
||||
const { t } = useI18n();
|
||||
|
||||
const inputType = ref<'file' | 'content'>('file');
|
||||
const fileContent = ref('');
|
||||
const fileInput = ref() as Ref<File | null>;
|
||||
@@ -66,32 +69,32 @@ function onUpload(file: File) {
|
||||
|
||||
<template>
|
||||
<div style="max-width: 600px;">
|
||||
<c-card title="Input" mb-2>
|
||||
<c-card :title="t('tools.charset-detector.texts.title-input')" mb-2>
|
||||
<n-radio-group v-model:value="inputType" name="radiogroup" mb-2 flex justify-center>
|
||||
<n-space>
|
||||
<n-radio
|
||||
value="file"
|
||||
label="File"
|
||||
:label="t('tools.charset-detector.texts.label-file')"
|
||||
/>
|
||||
<n-radio
|
||||
value="content"
|
||||
label="Content"
|
||||
:label="t('tools.charset-detector.texts.label-content')"
|
||||
/>
|
||||
</n-space>
|
||||
</n-radio-group>
|
||||
|
||||
<c-file-upload
|
||||
v-if="inputType === 'file'"
|
||||
title="Drag and drop TXT file here, or click to select a file"
|
||||
:title="t('tools.charset-detector.texts.title-drag-and-drop-txt-file-here-or-click-to-select-a-file')"
|
||||
@file-upload="onUpload"
|
||||
/>
|
||||
|
||||
<c-input-text
|
||||
v-if="inputType === 'content'"
|
||||
v-model:value="fileContent"
|
||||
label="File Content"
|
||||
:label="t('tools.charset-detector.texts.label-file-content')"
|
||||
multiline
|
||||
placeholder="Put your text content here..."
|
||||
:placeholder="t('tools.charset-detector.texts.placeholder-put-your-text-content-here')"
|
||||
rows="15"
|
||||
mb-2
|
||||
/>
|
||||
@@ -101,18 +104,18 @@ function onUpload(file: File) {
|
||||
{{ error }}
|
||||
</c-alert>
|
||||
|
||||
<c-card v-if="!error && encodings" title="Possible encodings">
|
||||
<c-card v-if="!error && encodings" :title="t('tools.charset-detector.texts.title-possible-encodings')">
|
||||
<n-table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col">
|
||||
Confidence
|
||||
{{ t('tools.charset-detector.texts.tag-confidence') }}
|
||||
</th>
|
||||
<th scope="col">
|
||||
Name
|
||||
{{ t('tools.charset-detector.texts.tag-name') }}
|
||||
</th>
|
||||
<th scope="col">
|
||||
Lang
|
||||
{{ t('tools.charset-detector.texts.tag-lang') }}
|
||||
</th>
|
||||
<th />
|
||||
</tr>
|
||||
@@ -133,14 +136,14 @@ function onUpload(file: File) {
|
||||
</td>
|
||||
<td>
|
||||
<n-button @click="generateEncodedOutput(enc.name.toLocaleLowerCase())">
|
||||
Decode
|
||||
{{ t('tools.charset-detector.texts.tag-decode') }}
|
||||
</n-button>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</n-table>
|
||||
|
||||
<n-card v-if="contentDecoded" title="Decoded text" mb-1>
|
||||
<n-card v-if="contentDecoded" :title="t('tools.charset-detector.texts.title-decoded-text')" mb-1>
|
||||
<textarea-copyable :value="contentDecoded" />
|
||||
</n-card>
|
||||
</c-card>
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
import { FileText } from '@vicons/tabler';
|
||||
import { defineTool } from '../tool';
|
||||
import { translate as t } from '@/plugins/i18n.plugin';
|
||||
|
||||
export const tool = defineTool({
|
||||
name: 'Text Charset Detector/Decoder',
|
||||
name: t('tools.charset-detector.title'),
|
||||
path: '/charset-detector',
|
||||
description: 'Detect text possible charsets and allow to decode using each detected encoding',
|
||||
description: t('tools.charset-detector.description'),
|
||||
keywords: ['charset', 'ascii', 'iso', 'utf8', 'unicode', 'encoding', 'decode', 'text', 'detector'],
|
||||
component: () => import('./charset-detector.vue'),
|
||||
icon: FileText,
|
||||
|
||||
@@ -31,9 +31,9 @@ const rules: UseValidationRule<string>[] = [
|
||||
<n-checkbox v-model:checked="typedValues" />
|
||||
</n-form-item>
|
||||
<FormatTransformer
|
||||
:input-label="t('tools.csv-to-json.texts.input-label-your-raw-csv')"
|
||||
:input-placeholder="t('tools.csv-to-json.texts.input-placeholder-paste-your-raw-csv-here')"
|
||||
:output-label="t('tools.csv-to-json.texts.output-label-json-version-of-your-csv')"
|
||||
:input-:label="t('tools.csv-to-json.texts.label-t-tools-csv-to-json-texts-input-label-your-raw-csv')"
|
||||
:input-:placeholder="t('tools.csv-to-json.texts.placeholder-t-tools-csv-to-json-texts-input-placeholder-paste-your-raw-csv-here')"
|
||||
:output-:label="t('tools.csv-to-json.texts.label-t-tools-csv-to-json-texts-output-label-json-version-of-your-csv')"
|
||||
:input-validation-rules="rules"
|
||||
:transformer="transformer"
|
||||
/>
|
||||
|
||||
@@ -1,13 +1,16 @@
|
||||
<script setup lang="ts">
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import { getSecretKey } from './django-secret-generator.service';
|
||||
import { useCopy } from '@/composable/copy';
|
||||
import { computedRefreshable } from '@/composable/computedRefreshable';
|
||||
|
||||
const { t } = useI18n();
|
||||
|
||||
const [tokens, refreshTokens] = computedRefreshable(() =>
|
||||
getSecretKey(),
|
||||
);
|
||||
|
||||
const { copy } = useCopy({ source: tokens, text: 'Django secret key copied to clipboard' });
|
||||
const { copy } = useCopy({ source: tokens, text: t('tools.django-secret-generator.texts.text-django-secret-key-copied-to-clipboard') });
|
||||
</script>
|
||||
|
||||
<template>
|
||||
@@ -15,7 +18,7 @@ const { copy } = useCopy({ source: tokens, text: 'Django secret key copied to cl
|
||||
<c-card>
|
||||
<c-input-text
|
||||
v-model:value="tokens"
|
||||
label="Django secret key:"
|
||||
:label="t('tools.django-secret-generator.texts.label-django-secret-key')"
|
||||
label-position="left"
|
||||
readonly
|
||||
class="token-display"
|
||||
@@ -23,10 +26,10 @@ const { copy } = useCopy({ source: tokens, text: 'Django secret key copied to cl
|
||||
|
||||
<div mt-5 flex justify-center gap-3>
|
||||
<c-button @click="copy()">
|
||||
Copy
|
||||
{{ t('tools.django-secret-generator.texts.tag-copy') }}
|
||||
</c-button>
|
||||
<c-button @click="refreshTokens">
|
||||
Regenerate
|
||||
{{ t('tools.django-secret-generator.texts.tag-regenerate') }}
|
||||
</c-button>
|
||||
</div>
|
||||
</c-card>
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
import { BrandPython } from '@vicons/tabler';
|
||||
import { defineTool } from '../tool';
|
||||
import { translate as t } from '@/plugins/i18n.plugin';
|
||||
|
||||
export const tool = defineTool({
|
||||
name: 'Django Secret Generator',
|
||||
name: t('tools.django-secret-generator.title'),
|
||||
path: '/django-secret-generator',
|
||||
description: 'Generate a Django secret key',
|
||||
description: t('tools.django-secret-generator.description'),
|
||||
keywords: ['django', 'secret', 'generator'],
|
||||
component: () => import('./django-secret-generator.vue'),
|
||||
icon: BrandPython,
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
<script setup lang="ts">
|
||||
import { useI18n } from 'vue-i18n';
|
||||
|
||||
const { t } = useI18n();
|
||||
const query = ref('');
|
||||
const resolvedIp = ref('');
|
||||
const loading = ref(false);
|
||||
@@ -152,23 +155,23 @@ function getRowClass(row: { listed: boolean }) {
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<NCard title="DNSBL Multi-Checker">
|
||||
<NInput v-model:value="query" placeholder="Enter IP or domain" clearable mb-2 />
|
||||
<NCard :title="t('tools.dnsbl-checker.texts.title-dnsbl-multi-checker')">
|
||||
<NInput v-model:value="query" :placeholder="t('tools.dnsbl-checker.texts.placeholder-enter-ip-or-domain')" clearable mb-2 />
|
||||
<NSpace justify="center">
|
||||
<NButton type="primary" :loading="loading" @click="checkAllDnsbls">
|
||||
Check All
|
||||
{{ t('tools.dnsbl-checker.texts.tag-check-all') }}
|
||||
</NButton>
|
||||
<n-form-item label="Show Listed Only" label-placement="left">
|
||||
<n-form-item :label="t('tools.dnsbl-checker.texts.label-show-listed-only')" label-placement="left">
|
||||
<NSwitch v-model:value="showListedOnly" />
|
||||
</n-form-item>
|
||||
</NSpace>
|
||||
|
||||
<NDivider />
|
||||
|
||||
<input-copyable label="Resolved IP:" label-position="left" :value="resolvedIp" mb-1 />
|
||||
<input-copyable :label="t('tools.dnsbl-checker.texts.label-resolved-ip')" label-position="left" :value="resolvedIp" mb-1 />
|
||||
<n-p>
|
||||
<span>Want to understand why an IP might be blacklisted? Check out </span>
|
||||
<a href="https://letsextract.com/fr/dnsbl-checker/" target="_blank">this DNSBL explanation and removal guide</a>.
|
||||
<span>{{ t('tools.dnsbl-checker.texts.tag-want-to-understand-why-an-ip-might-be-blacklisted-check-out') }}</span>
|
||||
<a href="https://letsextract.com/fr/dnsbl-checker/" target="_blank">{{ t('tools.dnsbl-checker.texts.tag-this-dnsbl-explanation-and-removal-guide') }}</a>{{ t('tools.dnsbl-checker.texts.tag-') }}
|
||||
</n-p>
|
||||
|
||||
<NDivider />
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
import { MailForward } from '@vicons/tabler';
|
||||
import { defineTool } from '../tool';
|
||||
import { translate as t } from '@/plugins/i18n.plugin';
|
||||
|
||||
export const tool = defineTool({
|
||||
name: 'DNSBL Checker',
|
||||
name: t('tools.dnsbl-checker.title'),
|
||||
path: '/dnsbl-checker',
|
||||
description: 'Check if a given IP is in any of known DNS Blacklist servers (spam block)',
|
||||
description: t('tools.dnsbl-checker.description'),
|
||||
keywords: ['dnsbl', 'block', 'dns', 'checker'],
|
||||
component: () => import('./dnsbl-checker.vue'),
|
||||
icon: MailForward,
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
import { BrandDocker } from '@vicons/tabler';
|
||||
import { defineTool } from '../tool';
|
||||
import { translate as t } from '@/plugins/i18n.plugin';
|
||||
|
||||
export const tool = defineTool({
|
||||
name: 'Docker Compose cheatsheet',
|
||||
name: t('tools.docker-compose-memo.title'),
|
||||
path: '/docker-compose-memo',
|
||||
description: 'Docker Compose format cheatsheet',
|
||||
description: t('tools.docker-compose-memo.description'),
|
||||
keywords: ['docker', 'compose', 'memo', 'cheatsheet'],
|
||||
component: () => import('./docker-compose-memo.vue'),
|
||||
icon: BrandDocker,
|
||||
|
||||
@@ -1,7 +1,10 @@
|
||||
<script setup lang="ts">
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import { parse } from 'rekcod';
|
||||
import TextareaCopyable from '@/components/TextareaCopyable.vue';
|
||||
|
||||
const { t } = useI18n();
|
||||
|
||||
const dockerInspect = ref('');
|
||||
|
||||
const conversionResult = computed(() => {
|
||||
@@ -29,7 +32,7 @@ const MONACO_EDITOR_OPTIONS = {
|
||||
|
||||
<template>
|
||||
<div>
|
||||
<c-label label="Paste your Docker Inspect JSON output:">
|
||||
<c-label :label="t('tools.docker-inspect-to-docker-run.texts.label-paste-your-docker-inspect-json-output')">
|
||||
<div relative w-full>
|
||||
<c-monaco-editor
|
||||
v-model:value="dockerInspect"
|
||||
@@ -42,7 +45,7 @@ const MONACO_EDITOR_OPTIONS = {
|
||||
</c-label>
|
||||
|
||||
<div v-if="errors.length > 0">
|
||||
<n-alert title="The following errors occured:" type="error" mt-5>
|
||||
<n-alert :title="t('tools.docker-inspect-to-docker-run.texts.title-the-following-errors-occured')" type="error" mt-5>
|
||||
<ul>
|
||||
<li v-for="(message, index) of errors" :key="index">
|
||||
{{ message }}
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
import { BrandDocker } from '@vicons/tabler';
|
||||
import { defineTool } from '../tool';
|
||||
import { translate as t } from '@/plugins/i18n.plugin';
|
||||
|
||||
export const tool = defineTool({
|
||||
name: 'Docker inspect to Docker run',
|
||||
name: t('tools.docker-inspect-to-docker-run.title'),
|
||||
path: '/docker-inspect-to-docker-run',
|
||||
description: 'Convert docker inspect command json result back to Docker run command',
|
||||
description: t('tools.docker-inspect-to-docker-run.description'),
|
||||
keywords: ['docker', 'inspect', 'run'],
|
||||
component: () => import('./docker-inspect-to-docker-run.vue'),
|
||||
icon: BrandDocker,
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
import { BrandDocker } from '@vicons/tabler';
|
||||
import { defineTool } from '../tool';
|
||||
import { translate as t } from '@/plugins/i18n.plugin';
|
||||
|
||||
export const tool = defineTool({
|
||||
name: 'Docker SWARM cheatsheet',
|
||||
name: t('tools.docker-swarm-memo.title'),
|
||||
path: '/docker-swarm-memo',
|
||||
description: 'Docker Swarm mode cheatsheet',
|
||||
description: t('tools.docker-swarm-memo.description'),
|
||||
keywords: ['docker', 'swarm', 'memo', 'cheatsheet'],
|
||||
component: () => import('./docker-swarm-memo.vue'),
|
||||
icon: BrandDocker,
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
import { BrandDocker } from '@vicons/tabler';
|
||||
import { defineTool } from '../tool';
|
||||
import { translate as t } from '@/plugins/i18n.plugin';
|
||||
|
||||
export const tool = defineTool({
|
||||
name: 'Dockerfile cheatsheet',
|
||||
name: t('tools.dockerfile-memo.title'),
|
||||
path: '/dockerfile-memo',
|
||||
description: 'Dockerfile syntax and build cheatsheet',
|
||||
description: t('tools.dockerfile-memo.description'),
|
||||
keywords: ['dockerfile', 'memo', 'cheatsheet'],
|
||||
component: () => import('./dockerfile-memo.vue'),
|
||||
icon: BrandDocker,
|
||||
|
||||
@@ -1,20 +1,23 @@
|
||||
<script setup>
|
||||
<script setup lang="ts">
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import { ref } from 'vue';
|
||||
import { NFormItem, NSelect } from 'naive-ui';
|
||||
import deflate from './lib/deflate';
|
||||
import inputHandler from './lib/inputHandler';
|
||||
import outputFormatter from './lib/outputFormatter';
|
||||
import { DefaultsMap, Formats, ModelType } from './lib/formats';
|
||||
import { DefaultsMap, Formats, FormatsDesc, ModelType } from './lib/formats';
|
||||
import { useQueryParamOrStorage } from '@/composable/queryParams';
|
||||
|
||||
const { t } = useI18n();
|
||||
|
||||
const defaultInputType = Formats.YAML;
|
||||
const inputText = ref(DefaultsMap.get(defaultInputType).inputValue);
|
||||
const inputText = ref(DefaultsMap.get(defaultInputType)!.inputValue);
|
||||
const inputType = useQueryParamOrStorage({ name: 'in', storageName: 'env-var-conv:i', defaultValue: defaultInputType });
|
||||
const outputType = useQueryParamOrStorage({ name: 'out', storageName: 'env-var-conv:o', defaultValue: DefaultsMap.get(defaultInputType).outputType });
|
||||
const outputType = useQueryParamOrStorage({ name: 'out', storageName: 'env-var-conv:o', defaultValue: DefaultsMap.get(defaultInputType)!.outputType });
|
||||
const alertText = ref('');
|
||||
|
||||
const inputOptions = Object.keys(Formats).map(key => ({ label: Formats[key], value: Formats[key] }));
|
||||
const outputOptions = ref([]);
|
||||
const inputOptions = Object.keys(Formats).map(key => ({ label: FormatsDesc[key], value: FormatsDesc[key] }));
|
||||
const outputOptions = ref<{ label: Formats; value: Formats }[]>([]);
|
||||
|
||||
function updateOutputOptions() {
|
||||
const regular = [Formats.SIMPLE, Formats.TERMINAL, Formats.KUBERNETES].filter(opt => opt !== inputType.value);
|
||||
@@ -29,14 +32,14 @@ const outputText = computed(() => {
|
||||
try {
|
||||
return outputFormatter(outputType.value, deflate(inputHandler(inputType.value, inputText.value)));
|
||||
}
|
||||
catch (error) {
|
||||
alertText.value = error.message;
|
||||
catch (error: any) {
|
||||
alertText.value = error.toString();
|
||||
return '';
|
||||
}
|
||||
});
|
||||
|
||||
function onChangeInputTypeHandler(value) {
|
||||
outputType.value = DefaultsMap.get(value).outputType;
|
||||
function onChangeInputTypeHandler(value: string) {
|
||||
outputType.value = DefaultsMap.get(value)!.outputType;
|
||||
updateOutputOptions();
|
||||
}
|
||||
|
||||
@@ -45,17 +48,17 @@ updateOutputOptions();
|
||||
|
||||
<template>
|
||||
<NForm>
|
||||
<NFormItem label="Input Type:">
|
||||
<NFormItem :label="t('tools.env-variables-converter.texts.label-input-type')">
|
||||
<NSelect v-model:value="inputType" :options="inputOptions" @update:value="onChangeInputTypeHandler" />
|
||||
</NFormItem>
|
||||
<c-input-text v-model:value="inputText" label="Input:" rows="10" multiline />
|
||||
<NFormItem label="Output Type:">
|
||||
<c-input-text v-model:value="inputText" :label="t('tools.env-variables-converter.texts.label-input')" rows="10" multiline />
|
||||
<NFormItem :label="t('tools.env-variables-converter.texts.label-output-type')">
|
||||
<NSelect v-model:value="outputType" :options="outputOptions" />
|
||||
</NFormItem>
|
||||
<c-alert v-if="alertText" type="error">
|
||||
{{ alertText }}
|
||||
</c-alert>
|
||||
<c-card title="Output">
|
||||
<c-card :title="t('tools.env-variables-converter.texts.title-output')">
|
||||
<textarea-copyable v-model:value="outputText" />
|
||||
</c-card>
|
||||
</NForm>
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
import { Terminal } from '@vicons/tabler';
|
||||
import { defineTool } from '../tool';
|
||||
import { translate as t } from '@/plugins/i18n.plugin';
|
||||
|
||||
export const tool = defineTool({
|
||||
name: 'Env Variables Format Converter',
|
||||
name: t('tools.env-variables-converter.title'),
|
||||
path: '/env-variables-converter',
|
||||
description: 'Convert between common env vars format and yaml',
|
||||
description: t('tools.env-variables-converter.description'),
|
||||
keywords: ['env', 'environment', 'variables', 'yaml', 'converter'],
|
||||
component: () => import('./env-variables-converter.vue'),
|
||||
icon: Terminal,
|
||||
|
||||
@@ -6,6 +6,14 @@ export enum Formats {
|
||||
KUBERNETES = 'Kubernetes Environment Variables',
|
||||
}
|
||||
|
||||
export const FormatsDesc: Record<string, string> = {
|
||||
YAML: 'Spring Boot YAML',
|
||||
PROPERTIES: 'Spring Boot Properties',
|
||||
SIMPLE: 'Simple Environment Variables',
|
||||
TERMINAL: 'Terminal Environment Variables',
|
||||
KUBERNETES: 'Kubernetes Environment Variables',
|
||||
};
|
||||
|
||||
export enum ModelType {
|
||||
ENV,
|
||||
FLAT,
|
||||
|
||||
@@ -25,9 +25,9 @@ const rules: UseValidationRule<string>[] = [
|
||||
|
||||
<template>
|
||||
<format-transformer
|
||||
:input-label="t('tools.extract-text-from-html.texts.input-label-your-raw-html')"
|
||||
:input-placeholder="t('tools.extract-text-from-html.texts.input-placeholder-paste-your-raw-html-here')"
|
||||
:output-label="t('tools.extract-text-from-html.texts.output-label-text-from-your-html')"
|
||||
:input-:label="t('tools.extract-text-from-html.texts.label-t-tools-extract-text-from-html-texts-input-label-your-raw-html')"
|
||||
:input-:placeholder="t('tools.extract-text-from-html.texts.placeholder-t-tools-extract-text-from-html-texts-input-placeholder-paste-your-raw-html-here')"
|
||||
:output-:label="t('tools.extract-text-from-html.texts.label-t-tools-extract-text-from-html-texts-output-label-text-from-your-html')"
|
||||
:input-validation-rules="rules"
|
||||
:transformer="transformer"
|
||||
/>
|
||||
|
||||
@@ -1,8 +1,11 @@
|
||||
<script setup lang="ts">
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import type { UploadFileInfo } from 'naive-ui';
|
||||
import JSZip from 'jszip';
|
||||
import { Transform, decodeImage, encodeIcoImages } from 'image-in-browser';
|
||||
|
||||
const { t } = useI18n();
|
||||
|
||||
const sizes = [16, 32, 48, 64, 180, 192, 512];
|
||||
const appleSizes = [180, 192, 512];
|
||||
|
||||
@@ -111,7 +114,7 @@ function downloadZip() {
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<NCard title="Favicon Pack Generator" style="max-width: 700px; margin: auto;">
|
||||
<NCard :title="t('tools.favicon-generator.texts.title-favicon-pack-generator')" style="max-width: 700px; margin: auto;">
|
||||
<n-space justify="center">
|
||||
<NUpload
|
||||
:show-file-list="false"
|
||||
@@ -119,12 +122,12 @@ function downloadZip() {
|
||||
:custom-request="handleUpload"
|
||||
>
|
||||
<NButton type="primary">
|
||||
Upload PNG Image
|
||||
{{ t('tools.favicon-generator.texts.tag-upload-png-image') }}
|
||||
</NButton>
|
||||
</NUpload>
|
||||
</n-space>
|
||||
|
||||
<n-card v-if="previews.length" title="🖼️ Previews" mt-2>
|
||||
<n-card v-if="previews.length" :title="t('tools.favicon-generator.texts.title-️-previews')" mt-2>
|
||||
<div style="display: flex; gap: 16px; flex-wrap: wrap;">
|
||||
<div v-for="icon in previews" :key="icon.size" style="text-align: center;">
|
||||
<img :src="icon.dataUrl" :alt="`Favicon ${icon.size}`" :width="icon.size" :height="icon.size">
|
||||
@@ -133,13 +136,13 @@ function downloadZip() {
|
||||
</div>
|
||||
</n-card>
|
||||
|
||||
<n-card v-if="headTags" title="📄 HTML Head Tags" mt-2>
|
||||
<n-card v-if="headTags" :title="t('tools.favicon-generator.texts.title-html-head-tags')" mt-2>
|
||||
<textarea-copyable :value="headTags" language="html" />
|
||||
</n-card>
|
||||
|
||||
<n-space justify="center" mt-2>
|
||||
<NButton v-if="canDownload" type="success" @click="downloadZip">
|
||||
📦 Download ZIP
|
||||
{{ t('tools.favicon-generator.texts.tag-download-zip') }}
|
||||
</NButton>
|
||||
</n-space>
|
||||
</NCard>
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
import { IconFavicon } from '@tabler/icons-vue';
|
||||
import { defineTool } from '../tool';
|
||||
import { translate as t } from '@/plugins/i18n.plugin';
|
||||
|
||||
export const tool = defineTool({
|
||||
name: 'Favicon Generator',
|
||||
name: t('tools.favicon-generator.title'),
|
||||
path: '/favicon-generator',
|
||||
description: 'Generate Favicon and corresponding header',
|
||||
description: t('tools.favicon-generator.description'),
|
||||
keywords: ['favicon', 'generator'],
|
||||
component: () => import('./favicon-generator.vue'),
|
||||
icon: IconFavicon,
|
||||
|
||||
@@ -1,69 +1,83 @@
|
||||
<script setup>
|
||||
import { NButton, NGi, NGrid, NInput, NSelect, NTabPane, NTabs, NUpload } from 'naive-ui';
|
||||
<script setup lang="ts">
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import { NButton, NGi, NGrid, NInput, NSelect, NTabPane, NTabs, NUpload, type UploadFileInfo } from 'naive-ui';
|
||||
|
||||
import FontControls from './font-controls.vue'; // Separate component for weight/style/fallback
|
||||
import { useITStorage } from '@/composable/queryParams';
|
||||
|
||||
const { t } = useI18n();
|
||||
|
||||
const defaultText = 'The quick brown fox jumps over the lazy dog.';
|
||||
const sampleText = useITStorage('font-comparer:txt', defaultText);
|
||||
const activeTab = useITStorage('font-comparer:tab', 'fontname');
|
||||
|
||||
const fontOptions = [
|
||||
{ label: 'Arial', value: 'Arial' },
|
||||
{ label: 'Verdana', value: 'Verdana' },
|
||||
{ label: 'Helvetica', value: 'Helvetica' },
|
||||
{ label: 'Tahoma', value: 'Tahoma' },
|
||||
{ label: 'Trebuchet MS', value: 'Trebuchet MS' },
|
||||
{ label: 'Times New Roman', value: 'Times New Roman' },
|
||||
{ label: 'Georgia', value: 'Georgia' },
|
||||
{ label: 'Garamond', value: 'Garamond' },
|
||||
{ label: 'Courier New', value: 'Courier New' },
|
||||
{ label: 'Lucida Console', value: 'Lucida Console' },
|
||||
{ label: 'Lucida Sans Unicode', value: 'Lucida Sans Unicode' },
|
||||
{ label: 'Palatino Linotype', value: 'Palatino Linotype' },
|
||||
{ label: 'Segoe UI', value: 'Segoe UI' },
|
||||
{ label: 'Impact', value: 'Impact' },
|
||||
{ label: 'Comic Sans MS', value: 'Comic Sans MS' },
|
||||
{ label: 'Century Gothic', value: 'Century Gothic' },
|
||||
{ label: 'Franklin Gothic Medium', value: 'Franklin Gothic Medium' },
|
||||
{ label: 'Candara', value: 'Candara' },
|
||||
{ label: 'Calibri', value: 'Calibri' },
|
||||
{ label: 'Cambria', value: 'Cambria' },
|
||||
{ label: 'Constantia', value: 'Constantia' },
|
||||
{ label: 'Corbel', value: 'Corbel' },
|
||||
{ label: 'Book Antiqua', value: 'Book Antiqua' },
|
||||
{ label: 'Monaco', value: 'Monaco' },
|
||||
{ label: 'Andale Mono', value: 'Andale Mono' },
|
||||
{ label: 'Optima', value: 'Optima' },
|
||||
{ label: 'Futura', value: 'Futura' },
|
||||
{ label: 'Rockwell', value: 'Rockwell' },
|
||||
{ label: 'Baskerville', value: 'Baskerville' },
|
||||
{ label: 'Didot', value: 'Didot' },
|
||||
{ label: 'Geneva', value: 'Geneva' },
|
||||
{ label: 'Symbol', value: 'Symbol' },
|
||||
{ label: 'Webdings', value: 'Webdings' },
|
||||
{ label: 'Wingdings', value: 'Wingdings' },
|
||||
{ label: 'Roboto', value: 'Roboto' },
|
||||
{ label: 'Open Sans', value: 'Open Sans' },
|
||||
{ label: 'Lato', value: 'Lato' },
|
||||
{ label: 'Montserrat', value: 'Montserrat' },
|
||||
{ label: 'Oswald', value: 'Oswald' },
|
||||
{ label: 'Raleway', value: 'Raleway' },
|
||||
{ label: 'Poppins', value: 'Poppins' },
|
||||
{ label: 'Merriweather', value: 'Merriweather' },
|
||||
{ label: 'Inter', value: 'Inter' },
|
||||
{ label: 'Noto Sans', value: 'Noto Sans' },
|
||||
{ label: 'Playfair Display', value: 'Playfair Display' },
|
||||
{ label: 'Source Sans Pro', value: 'Source Sans Pro' },
|
||||
{ label: 'Ubuntu', value: 'Ubuntu' },
|
||||
{ label: 'Nunito', value: 'Nunito' },
|
||||
{ label: 'PT Sans', value: 'PT Sans' },
|
||||
{ label: 'Quicksand', value: 'Quicksand' },
|
||||
{ label: 'Work Sans', value: 'Work Sans' },
|
||||
{ label: 'Rubik', value: 'Rubik' },
|
||||
{ label: 'DM Sans', value: 'DM Sans' },
|
||||
{ label: t('tools.font-compare.texts.label-arial'), value: 'Arial' },
|
||||
{ label: t('tools.font-compare.texts.label-verdana'), value: 'Verdana' },
|
||||
{ label: t('tools.font-compare.texts.label-helvetica'), value: 'Helvetica' },
|
||||
{ label: t('tools.font-compare.texts.label-tahoma'), value: 'Tahoma' },
|
||||
{ label: t('tools.font-compare.texts.label-trebuchet-ms'), value: 'Trebuchet MS' },
|
||||
{ label: t('tools.font-compare.texts.label-times-new-roman'), value: 'Times New Roman' },
|
||||
{ label: t('tools.font-compare.texts.label-georgia'), value: 'Georgia' },
|
||||
{ label: t('tools.font-compare.texts.label-garamond'), value: 'Garamond' },
|
||||
{ label: t('tools.font-compare.texts.label-courier-new'), value: 'Courier New' },
|
||||
{ label: t('tools.font-compare.texts.label-lucida-console'), value: 'Lucida Console' },
|
||||
{ label: t('tools.font-compare.texts.label-lucida-sans-unicode'), value: 'Lucida Sans Unicode' },
|
||||
{ label: t('tools.font-compare.texts.label-palatino-linotype'), value: 'Palatino Linotype' },
|
||||
{ label: t('tools.font-compare.texts.label-segoe-ui'), value: 'Segoe UI' },
|
||||
{ label: t('tools.font-compare.texts.label-impact'), value: 'Impact' },
|
||||
{ label: t('tools.font-compare.texts.label-comic-sans-ms'), value: 'Comic Sans MS' },
|
||||
{ label: t('tools.font-compare.texts.label-century-gothic'), value: 'Century Gothic' },
|
||||
{ label: t('tools.font-compare.texts.label-franklin-gothic-medium'), value: 'Franklin Gothic Medium' },
|
||||
{ label: t('tools.font-compare.texts.label-candara'), value: 'Candara' },
|
||||
{ label: t('tools.font-compare.texts.label-calibri'), value: 'Calibri' },
|
||||
{ label: t('tools.font-compare.texts.label-cambria'), value: 'Cambria' },
|
||||
{ label: t('tools.font-compare.texts.label-constantia'), value: 'Constantia' },
|
||||
{ label: t('tools.font-compare.texts.label-corbel'), value: 'Corbel' },
|
||||
{ label: t('tools.font-compare.texts.label-book-antiqua'), value: 'Book Antiqua' },
|
||||
{ label: t('tools.font-compare.texts.label-monaco'), value: 'Monaco' },
|
||||
{ label: t('tools.font-compare.texts.label-andale-mono'), value: 'Andale Mono' },
|
||||
{ label: t('tools.font-compare.texts.label-optima'), value: 'Optima' },
|
||||
{ label: t('tools.font-compare.texts.label-futura'), value: 'Futura' },
|
||||
{ label: t('tools.font-compare.texts.label-rockwell'), value: 'Rockwell' },
|
||||
{ label: t('tools.font-compare.texts.label-baskerville'), value: 'Baskerville' },
|
||||
{ label: t('tools.font-compare.texts.label-didot'), value: 'Didot' },
|
||||
{ label: t('tools.font-compare.texts.label-geneva'), value: 'Geneva' },
|
||||
{ label: t('tools.font-compare.texts.label-symbol'), value: 'Symbol' },
|
||||
{ label: t('tools.font-compare.texts.label-webdings'), value: 'Webdings' },
|
||||
{ label: t('tools.font-compare.texts.label-wingdings'), value: 'Wingdings' },
|
||||
{ label: t('tools.font-compare.texts.label-roboto'), value: 'Roboto' },
|
||||
{ label: t('tools.font-compare.texts.label-open-sans'), value: 'Open Sans' },
|
||||
{ label: t('tools.font-compare.texts.label-lato'), value: 'Lato' },
|
||||
{ label: t('tools.font-compare.texts.label-montserrat'), value: 'Montserrat' },
|
||||
{ label: t('tools.font-compare.texts.label-oswald'), value: 'Oswald' },
|
||||
{ label: t('tools.font-compare.texts.label-raleway'), value: 'Raleway' },
|
||||
{ label: t('tools.font-compare.texts.label-poppins'), value: 'Poppins' },
|
||||
{ label: t('tools.font-compare.texts.label-merriweather'), value: 'Merriweather' },
|
||||
{ label: t('tools.font-compare.texts.label-inter'), value: 'Inter' },
|
||||
{ label: t('tools.font-compare.texts.label-noto-sans'), value: 'Noto Sans' },
|
||||
{ label: t('tools.font-compare.texts.label-playfair-display'), value: 'Playfair Display' },
|
||||
{ label: t('tools.font-compare.texts.label-source-sans-pro'), value: 'Source Sans Pro' },
|
||||
{ label: t('tools.font-compare.texts.label-ubuntu'), value: 'Ubuntu' },
|
||||
{ label: t('tools.font-compare.texts.label-nunito'), value: 'Nunito' },
|
||||
{ label: t('tools.font-compare.texts.label-pt-sans'), value: 'PT Sans' },
|
||||
{ label: t('tools.font-compare.texts.label-quicksand'), value: 'Quicksand' },
|
||||
{ label: t('tools.font-compare.texts.label-work-sans'), value: 'Work Sans' },
|
||||
{ label: t('tools.font-compare.texts.label-rubik'), value: 'Rubik' },
|
||||
{ label: t('tools.font-compare.texts.label-dm-sans'), value: 'DM Sans' },
|
||||
];
|
||||
|
||||
interface FontData {
|
||||
value: string
|
||||
url: string
|
||||
css: string
|
||||
cssUrl: string
|
||||
dynamicName: string
|
||||
weight: string
|
||||
style: string
|
||||
fallback: string
|
||||
}
|
||||
|
||||
const fontA = useITStorage('font-comparer:a', {
|
||||
value: 'Arial',
|
||||
url: '',
|
||||
@@ -86,7 +100,7 @@ const fontB = useITStorage('font-comparer:b', {
|
||||
fallback: 'serif',
|
||||
});
|
||||
|
||||
function fontStyle(font) {
|
||||
function fontStyle(font: FontData) {
|
||||
return {
|
||||
fontFamily: `${font.dynamicName || font.value}, ${font.fallback}`,
|
||||
fontWeight: font.weight,
|
||||
@@ -100,14 +114,14 @@ function fontStyle(font) {
|
||||
};
|
||||
}
|
||||
|
||||
function injectFontCSS(cssText) {
|
||||
function injectFontCSS(cssText: string) {
|
||||
const styleTag = document.createElement('style');
|
||||
styleTag.type = 'text/css';
|
||||
styleTag.textContent = cssText;
|
||||
document.head.appendChild(styleTag);
|
||||
}
|
||||
|
||||
async function loadCSSFromURL(url) {
|
||||
async function loadCSSFromURL(url: string) {
|
||||
try {
|
||||
const response = await fetch(url);
|
||||
const cssText = await response.text();
|
||||
@@ -120,7 +134,7 @@ async function loadCSSFromURL(url) {
|
||||
}
|
||||
}
|
||||
|
||||
function loadFontFromURL(url, index) {
|
||||
function loadFontFromURL(url: string, index: number) {
|
||||
const fontName = `CustomFont${index}`;
|
||||
const font = new FontFace(fontName, `url(${url})`);
|
||||
font.load().then((loadedFont) => {
|
||||
@@ -132,11 +146,11 @@ function loadFontFromURL(url, index) {
|
||||
}).catch(console.error);
|
||||
}
|
||||
|
||||
function handleFontUpload(file, index) {
|
||||
function handleFontUpload(file: UploadFileInfo, index: number) {
|
||||
const reader = new FileReader();
|
||||
reader.onload = () => {
|
||||
const fontName = `UploadedFont${index}`;
|
||||
const font = new FontFace(fontName, reader.result);
|
||||
const font = new FontFace(fontName, reader.result as ArrayBuffer);
|
||||
font.load().then((loadedFont) => {
|
||||
document.fonts.add(loadedFont);
|
||||
if (index === 0) {
|
||||
@@ -145,7 +159,11 @@ function handleFontUpload(file, index) {
|
||||
else { fontB.value.dynamicName = fontName; }
|
||||
}).catch(console.error);
|
||||
};
|
||||
reader.readAsArrayBuffer(file);
|
||||
reader.readAsArrayBuffer(file!.file!);
|
||||
}
|
||||
|
||||
interface UploadEvents {
|
||||
file: UploadFileInfo
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -153,7 +171,7 @@ function handleFontUpload(file, index) {
|
||||
<div>
|
||||
<details>
|
||||
<summary />
|
||||
<c-input-text v-model:value="sampleText" multiline rows="3" placeholder="Enter sample text..." mb-2 />
|
||||
<c-input-text v-model:value="sampleText" multiline rows="3" :placeholder="t('tools.font-compare.texts.placeholder-enter-sample-text')" mb-2 />
|
||||
</details>
|
||||
|
||||
<NTabs v-model:value="activeTab" type="segment">
|
||||
@@ -163,7 +181,7 @@ function handleFontUpload(file, index) {
|
||||
<NSelect
|
||||
v-model:value="font.value"
|
||||
:options="fontOptions"
|
||||
placeholder="Select font name"
|
||||
:placeholder="t('tools.font-compare.texts.placeholder-select-font-name')"
|
||||
mb-2
|
||||
/>
|
||||
<FontControls :font="font" />
|
||||
@@ -179,7 +197,7 @@ function handleFontUpload(file, index) {
|
||||
<NGi v-for="(font, index) in [fontA, fontB]" :key="index">
|
||||
<NInput
|
||||
v-model:value="font.url"
|
||||
placeholder="Enter font URL"
|
||||
:placeholder="t('tools.font-compare.texts.placeholder-enter-font-url')"
|
||||
mb-2
|
||||
@blur="loadFontFromURL(font.url, index)"
|
||||
/>
|
||||
@@ -197,10 +215,10 @@ function handleFontUpload(file, index) {
|
||||
<NUpload
|
||||
:show-file-list="false"
|
||||
accept=".ttf,.otf,.woff,.woff2"
|
||||
:custom-request="(options) => handleFontUpload(options.file, index)"
|
||||
:change="(e: UploadEvents) => handleFontUpload(e.file, index)"
|
||||
mb-2
|
||||
>
|
||||
<NButton>Upload Font File</NButton>
|
||||
<NButton>{{ t('tools.font-compare.texts.tag-upload-font-file') }}</NButton>
|
||||
</NUpload>
|
||||
<FontControls :font="font" />
|
||||
<div :style="fontStyle(font)" class="font-preview">
|
||||
@@ -215,14 +233,14 @@ function handleFontUpload(file, index) {
|
||||
<NInput
|
||||
v-model:value="font.css"
|
||||
type="textarea"
|
||||
placeholder="Paste @font-face CSS here"
|
||||
:placeholder="t('tools.font-compare.texts.placeholder-paste-font-face-css-here')"
|
||||
:autosize="{ minRows: 4, maxRows: 10 }"
|
||||
mb-1
|
||||
@blur="injectFontCSS(font.css)"
|
||||
/>
|
||||
<NInput
|
||||
v-model:value="font.dynamicName"
|
||||
placeholder="Font-family name from CSS"
|
||||
:placeholder="t('tools.font-compare.texts.placeholder-font-family-name-from-css')"
|
||||
mb-2
|
||||
/>
|
||||
<FontControls :font="font" />
|
||||
@@ -237,13 +255,13 @@ function handleFontUpload(file, index) {
|
||||
<NGi v-for="(font, index) in [fontA, fontB]" :key="index">
|
||||
<NInput
|
||||
v-model:value="font.cssUrl"
|
||||
placeholder="Enter CSS URL (e.g. https://example.com/fonts.css)"
|
||||
:placeholder="t('tools.font-compare.texts.placeholder-enter-css-url-e-g-https-example-com-fonts-css')"
|
||||
mb-1
|
||||
@blur="loadCSSFromURL(font.cssUrl)"
|
||||
/>
|
||||
<NInput
|
||||
v-model:value="font.dynamicName"
|
||||
placeholder="Font-family name from imported CSS"
|
||||
:placeholder="t('tools.font-compare.texts.placeholder-font-family-name-from-imported-css')"
|
||||
mb-2
|
||||
/>
|
||||
<FontControls :font="font" />
|
||||
|
||||
@@ -1,27 +1,31 @@
|
||||
<script setup lang="ts">
|
||||
import { useI18n } from 'vue-i18n';
|
||||
|
||||
defineProps<{ font: { weight: string; style: string; fallback: string } }>();
|
||||
|
||||
const { t } = useI18n();
|
||||
|
||||
const weightOptions = [
|
||||
{ label: 'Normal', value: 'normal' },
|
||||
{ label: 'Bold', value: 'bold' },
|
||||
{ label: 'Lighter', value: 'lighter' },
|
||||
{ label: '100', value: '100' },
|
||||
{ label: '400', value: '400' },
|
||||
{ label: '700', value: '700' },
|
||||
{ label: t('tools.font-compare.texts.label-normal'), value: 'normal' },
|
||||
{ label: t('tools.font-compare.texts.label-bold'), value: 'bold' },
|
||||
{ label: t('tools.font-compare.texts.label-lighter'), value: 'lighter' },
|
||||
{ label: t('tools.font-compare.texts.label-100'), value: '100' },
|
||||
{ label: t('tools.font-compare.texts.label-400'), value: '400' },
|
||||
{ label: t('tools.font-compare.texts.label-700'), value: '700' },
|
||||
];
|
||||
|
||||
const styleOptions = [
|
||||
{ label: 'Normal', value: 'normal' },
|
||||
{ label: 'Italic', value: 'italic' },
|
||||
{ label: 'Oblique', value: 'oblique' },
|
||||
{ label: t('tools.font-compare.texts.label-normal'), value: 'normal' },
|
||||
{ label: t('tools.font-compare.texts.label-italic'), value: 'italic' },
|
||||
{ label: t('tools.font-compare.texts.label-oblique'), value: 'oblique' },
|
||||
];
|
||||
|
||||
const fallbackOptions = [
|
||||
{ label: 'Sans-serif', value: 'sans-serif' },
|
||||
{ label: 'Serif', value: 'serif' },
|
||||
{ label: 'Monospace', value: 'monospace' },
|
||||
{ label: 'Cursive', value: 'cursive' },
|
||||
{ label: 'Fantasy', value: 'fantasy' },
|
||||
{ label: t('tools.font-compare.texts.label-sans-serif'), value: 'sans-serif' },
|
||||
{ label: t('tools.font-compare.texts.label-serif'), value: 'serif' },
|
||||
{ label: t('tools.font-compare.texts.label-monospace'), value: 'monospace' },
|
||||
{ label: t('tools.font-compare.texts.label-cursive'), value: 'cursive' },
|
||||
{ label: t('tools.font-compare.texts.label-fantasy'), value: 'fantasy' },
|
||||
];
|
||||
</script>
|
||||
|
||||
@@ -30,27 +34,27 @@ const fallbackOptions = [
|
||||
<n-space vertical>
|
||||
<c-select
|
||||
v-model:value="font.weight"
|
||||
label="Weight:"
|
||||
:label="t('tools.font-compare.texts.label-weight')"
|
||||
label-position="left"
|
||||
label-width="100px"
|
||||
:options="weightOptions"
|
||||
placeholder="Font Weight"
|
||||
:placeholder="t('tools.font-compare.texts.placeholder-font-weight')"
|
||||
/>
|
||||
<c-select
|
||||
v-model:value="font.style"
|
||||
label="Style:"
|
||||
:label="t('tools.font-compare.texts.label-style')"
|
||||
label-position="left"
|
||||
label-width="100px"
|
||||
:options="styleOptions"
|
||||
placeholder="Font Style"
|
||||
:placeholder="t('tools.font-compare.texts.placeholder-font-style')"
|
||||
/>
|
||||
<c-select
|
||||
v-model:value="font.fallback"
|
||||
label="Fallback:"
|
||||
:label="t('tools.font-compare.texts.label-fallback')"
|
||||
label-width="100px"
|
||||
label-position="left"
|
||||
:options="fallbackOptions"
|
||||
placeholder="Fallback Font"
|
||||
:placeholder="t('tools.font-compare.texts.placeholder-fallback-font')"
|
||||
/>
|
||||
</n-space>
|
||||
</template>
|
||||
@@ -1,10 +1,11 @@
|
||||
import { GitCompare } from '@vicons/tabler';
|
||||
import { defineTool } from '../tool';
|
||||
import { translate as t } from '@/plugins/i18n.plugin';
|
||||
|
||||
export const tool = defineTool({
|
||||
name: 'Font Compare',
|
||||
name: t('tools.font-compare.title'),
|
||||
path: '/font-compare',
|
||||
description: 'Compare to fonts on a given text',
|
||||
description: t('tools.font-compare.description'),
|
||||
keywords: ['font', 'ttf', 'otf', 'compare'],
|
||||
component: () => import('./font-compare.vue'),
|
||||
icon: GitCompare,
|
||||
|
||||
@@ -1,9 +1,12 @@
|
||||
<script setup lang="ts">
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import type { TiktokenModel } from 'js-tiktoken';
|
||||
import { GPTTokens } from '../gpt-token-estimator/gpt-tokens.service';
|
||||
import TextareaCopyable from '@/components/TextareaCopyable.vue';
|
||||
import { useQueryParamOrStorage } from '@/composable/queryParams';
|
||||
|
||||
const { t } = useI18n();
|
||||
|
||||
const models = GPTTokens.supportModels;
|
||||
const model = useQueryParamOrStorage({ name: 'model', storageName: 'gpt-token-encoder:model', defaultValue: 'gpt-3.5-turbo-1106' });
|
||||
|
||||
@@ -36,16 +39,16 @@ const decodedOutput = computed(
|
||||
<div max-w-600>
|
||||
<c-select
|
||||
v-model:value="model"
|
||||
label="GPT IA Model"
|
||||
:label="t('tools.gpt-token-encoder.texts.label-gpt-ia-model')"
|
||||
:options="models"
|
||||
mb-2
|
||||
/>
|
||||
|
||||
<c-card title="Encode text to GPT Tokens">
|
||||
<c-card :title="t('tools.gpt-token-encoder.texts.title-encode-text-to-gpt-tokens')">
|
||||
<c-input-text
|
||||
v-model:value="decodedInput"
|
||||
placeholder="Put your text to encode here..."
|
||||
label="Text to encode"
|
||||
:placeholder="t('tools.gpt-token-encoder.texts.placeholder-put-your-text-to-encode-here')"
|
||||
:label="t('tools.gpt-token-encoder.texts.label-text-to-encode')"
|
||||
raw-text
|
||||
multiline
|
||||
rows="5"
|
||||
@@ -55,7 +58,7 @@ const decodedOutput = computed(
|
||||
<n-divider />
|
||||
|
||||
<TextareaCopyable
|
||||
label="Encoded tokens"
|
||||
:label="t('tools.gpt-token-encoder.texts.label-encoded-tokens')"
|
||||
:value="encodedOutput"
|
||||
multiline
|
||||
readonly
|
||||
@@ -64,11 +67,11 @@ const decodedOutput = computed(
|
||||
/>
|
||||
</c-card>
|
||||
|
||||
<c-card title="Decode GPT Tokens to text" mt-5>
|
||||
<c-card :title="t('tools.gpt-token-encoder.texts.title-decode-gpt-tokens-to-text')" mt-5>
|
||||
<c-input-text
|
||||
v-model:value="encodedInput"
|
||||
placeholder="Put your encoded tokens here..."
|
||||
label="Tokens to decode"
|
||||
:placeholder="t('tools.gpt-token-encoder.texts.placeholder-put-your-encoded-tokens-here')"
|
||||
:label="t('tools.gpt-token-encoder.texts.label-tokens-to-decode')"
|
||||
raw-text
|
||||
multiline
|
||||
rows="5"
|
||||
@@ -78,7 +81,7 @@ const decodedOutput = computed(
|
||||
<n-divider />
|
||||
|
||||
<TextareaCopyable
|
||||
label="Decoded text"
|
||||
:label="t('tools.gpt-token-encoder.texts.label-decoded-text')"
|
||||
:value="decodedOutput"
|
||||
multiline
|
||||
readonly
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
import { FileText } from '@vicons/tabler';
|
||||
import { defineTool } from '../tool';
|
||||
import { translate as t } from '@/plugins/i18n.plugin';
|
||||
|
||||
export const tool = defineTool({
|
||||
name: 'GPT Token Encoder/Decoder',
|
||||
name: t('tools.gpt-token-encoder.title'),
|
||||
path: '/gpt-token-encoder',
|
||||
description: 'Encode text to GPT tokens and decode GPT tokens back to text',
|
||||
description: t('tools.gpt-token-encoder.description'),
|
||||
keywords: ['gpt', 'llm', 'openai', 'token', 'encode', 'decode'],
|
||||
component: () => import('./gpt-token-encoder.vue'),
|
||||
icon: FileText,
|
||||
|
||||
@@ -164,7 +164,7 @@ const outputTokenCosts = computed(() => {
|
||||
|
||||
<n-p mt-3>
|
||||
<n-a href="https://platform.openai.com/docs/pricing" target="_blank">
|
||||
See OpenAPI Pricings
|
||||
{{ t('tools.gpt-token-estimator.texts.tag-see-openapi-pricings') }}
|
||||
</n-a>
|
||||
</n-p>
|
||||
</div>
|
||||
|
||||
@@ -1,8 +1,11 @@
|
||||
<script setup lang="ts">
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import type { UploadFileInfo } from 'naive-ui';
|
||||
import ImageCompare from 'image-compare-viewer';
|
||||
import 'image-compare-viewer/dist/image-compare-viewer.min.css';
|
||||
|
||||
const { t } = useI18n();
|
||||
|
||||
const leftUrl = ref('');
|
||||
const rightUrl = ref('');
|
||||
const leftImage = ref<string | null>(null);
|
||||
@@ -50,19 +53,19 @@ function renderViewer() {
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<NCard title="Image Compare Viewer" style="max-width: 800px; margin: auto;">
|
||||
<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">
|
||||
<NForm label-placement="left" label-width="150px">
|
||||
<NFormItem label="Left Image URL:">
|
||||
<NInput v-model:value="leftUrl" placeholder="Enter left image URL" />
|
||||
<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')" />
|
||||
</NFormItem>
|
||||
<NFormItem label="Right Image URL:">
|
||||
<NInput v-model:value="rightUrl" placeholder="Enter right image URL" />
|
||||
<NFormItem :label="t('tools.image-comparer.texts.label-right-image-url')">
|
||||
<NInput v-model:value="rightUrl" :placeholder="t('tools.image-comparer.texts.placeholder-enter-right-image-url')" />
|
||||
</NFormItem>
|
||||
<n-space justify="center">
|
||||
<NButton type="primary" @click="loadFromUrl">
|
||||
Compare
|
||||
{{ t('tools.image-comparer.texts.tag-compare') }}
|
||||
</NButton>
|
||||
</n-space>
|
||||
</NForm>
|
||||
@@ -71,14 +74,14 @@ function renderViewer() {
|
||||
<NTabPane name="upload" tab="Compare by Upload">
|
||||
<NForm label-placement="left">
|
||||
<n-space justify="space-evenly">
|
||||
<NFormItem label="Upload Left Image:">
|
||||
<NFormItem :label="t('tools.image-comparer.texts.label-upload-left-image')">
|
||||
<NUpload :default-upload="false" accept="image/*" @change="handleLeftUpload">
|
||||
<NButton>Upload Left</NButton>
|
||||
<NButton>{{ t('tools.image-comparer.texts.tag-upload-left') }}</NButton>
|
||||
</NUpload>
|
||||
</NFormItem>
|
||||
<NFormItem label="Upload Right Image:">
|
||||
<NFormItem :label="t('tools.image-comparer.texts.label-upload-right-image')">
|
||||
<NUpload :default-upload="false" accept="image/*" @change="handleRightUpload">
|
||||
<NButton>Upload Right</NButton>
|
||||
<NButton>{{ t('tools.image-comparer.texts.tag-upload-right') }}</NButton>
|
||||
</NUpload>
|
||||
</NFormItem>
|
||||
</n-space>
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
import { GitCompare } from '@vicons/tabler';
|
||||
import { defineTool } from '../tool';
|
||||
import { translate as t } from '@/plugins/i18n.plugin';
|
||||
|
||||
export const tool = defineTool({
|
||||
name: 'Image Comparer',
|
||||
name: t('tools.image-comparer.title'),
|
||||
path: '/image-comparer',
|
||||
description: 'A tool to visualy compare images',
|
||||
description: t('tools.image-comparer.description'),
|
||||
keywords: ['image', 'comparer'],
|
||||
component: () => import('./image-comparer.vue'),
|
||||
icon: GitCompare,
|
||||
|
||||
@@ -37,9 +37,9 @@ const rules: UseValidationRule<string>[] = [
|
||||
</div>
|
||||
|
||||
<format-transformer
|
||||
:input-label="t('tools.javascript-to-json.texts.input-label-your-javascript-object')"
|
||||
:input-placeholder="t('tools.javascript-to-json.texts.input-placeholder-paste-your-js-object-here')"
|
||||
:output-label="t('tools.javascript-to-json.texts.output-label-json-from-your-javascript-object')"
|
||||
:input-:label="t('tools.javascript-to-json.texts.label-t-tools-javascript-to-json-texts-input-label-your-javascript-object')"
|
||||
:input-:placeholder="t('tools.javascript-to-json.texts.placeholder-t-tools-javascript-to-json-texts-input-placeholder-paste-your-js-object-here')"
|
||||
:output-:label="t('tools.javascript-to-json.texts.label-t-tools-javascript-to-json-texts-output-label-json-from-your-javascript-object')"
|
||||
output-language="json"
|
||||
:input-validation-rules="rules"
|
||||
:transformer="transformer"
|
||||
|
||||
@@ -48,10 +48,10 @@ const rules: UseValidationRule<string>[] = [
|
||||
</NSpace>
|
||||
|
||||
<format-transformer
|
||||
:input-label="t('tools.json-flatten-nestify.texts.input-label-your-json-content')"
|
||||
:input-:label="t('tools.json-flatten-nestify.texts.label-t-tools-json-flatten-nestify-texts-input-label-your-json-content')"
|
||||
:input-default="defaultValue"
|
||||
:input-placeholder="t('tools.json-flatten-nestify.texts.input-placeholder-paste-your-json-content-here')"
|
||||
:output-label="t('tools.json-flatten-nestify.texts.output-label-transformed-json')"
|
||||
:input-:placeholder="t('tools.json-flatten-nestify.texts.placeholder-t-tools-json-flatten-nestify-texts-input-placeholder-paste-your-json-content-here')"
|
||||
:output-:label="t('tools.json-flatten-nestify.texts.label-t-tools-json-flatten-nestify-texts-output-label-transformed-json')"
|
||||
output-language="json"
|
||||
:input-validation-rules="rules"
|
||||
:transformer="transformer"
|
||||
|
||||
@@ -50,12 +50,12 @@ const { schemas, errors: validationErrors } = useJsonSchemaValidation({ json: js
|
||||
</div>
|
||||
</c-label>
|
||||
|
||||
<n-form-item label="JSON schema:" label-placement="left" label-width="130px" label-align="right">
|
||||
<n-form-item :label="t('tools.json-linter.texts.label-json-schema')" label-placement="left" label-width="130px" label-align="right">
|
||||
<n-select
|
||||
v-model:value="schemaUrl"
|
||||
:options="[
|
||||
{ label: 'No validation', value: '' },
|
||||
{ label: 'Custom', value: 'custom' },
|
||||
{ label: t('tools.json-linter.texts.label-no-validation'), value: '' },
|
||||
{ label: t('tools.json-linter.texts.label-custom'), value: 'custom' },
|
||||
...schemas.map(s => ({ label: `${s.name} / ${s.description}`, value: s.url })),
|
||||
]"
|
||||
filterable mb-4
|
||||
@@ -65,7 +65,7 @@ const { schemas, errors: validationErrors } = useJsonSchemaValidation({ json: js
|
||||
v-if="schemaUrl === 'custom'"
|
||||
ref="jsonSchemaInputElement"
|
||||
v-model:value="schemaData"
|
||||
placeholder="Paste your JSON Schema here..."
|
||||
:placeholder="t('tools.json-linter.texts.placeholder-paste-your-json-schema-here')"
|
||||
rows="20"
|
||||
multiline
|
||||
autocomplete="off"
|
||||
@@ -76,7 +76,7 @@ const { schemas, errors: validationErrors } = useJsonSchemaValidation({ json: js
|
||||
/>
|
||||
|
||||
<div v-if="validationErrors.length > 0" mb-2 mt-2>
|
||||
<n-alert title="Schema Validation Errors" type="error">
|
||||
<n-alert :title="t('tools.json-linter.texts.title-schema-validation-errors')" type="error">
|
||||
<ul
|
||||
v-for="error in validationErrors"
|
||||
:key="error"
|
||||
|
||||
@@ -19,10 +19,10 @@ const rules: UseValidationRule<string>[] = [
|
||||
|
||||
<template>
|
||||
<format-transformer
|
||||
:input-label="t('tools.json-minify.texts.input-label-your-raw-json')"
|
||||
:input-:label="t('tools.json-minify.texts.label-t-tools-json-minify-texts-input-label-your-raw-json')"
|
||||
:input-default="defaultValue"
|
||||
:input-placeholder="t('tools.json-minify.texts.input-placeholder-paste-your-raw-json-here')"
|
||||
:output-label="t('tools.json-minify.texts.output-label-minified-version-of-your-json')"
|
||||
:input-:placeholder="t('tools.json-minify.texts.placeholder-t-tools-json-minify-texts-input-placeholder-paste-your-raw-json-here')"
|
||||
:output-:label="t('tools.json-minify.texts.label-t-tools-json-minify-texts-output-label-minified-version-of-your-json')"
|
||||
output-language="json"
|
||||
:input-validation-rules="rules"
|
||||
:transformer="transformer"
|
||||
|
||||
@@ -48,10 +48,10 @@ const dropdownOptions = computed(() => [
|
||||
</c-card>
|
||||
<div />
|
||||
<format-transformer
|
||||
:input-label="t('tools.json-string-converter.texts.input-label-your-text-json-string')"
|
||||
:input-:label="t('tools.json-string-converter.texts.label-t-tools-json-string-converter-texts-input-label-your-text-json-string')"
|
||||
:input-default="defaultValue"
|
||||
:input-placeholder="t('tools.json-string-converter.texts.input-placeholder-paste-your-text-here')"
|
||||
:output-label="t('tools.json-string-converter.texts.output-label-json-string-conversion-of-your-input')"
|
||||
:input-:placeholder="t('tools.json-string-converter.texts.placeholder-t-tools-json-string-converter-texts-input-placeholder-paste-your-text-here')"
|
||||
:output-:label="t('tools.json-string-converter.texts.label-t-tools-json-string-converter-texts-output-label-json-string-conversion-of-your-input')"
|
||||
output-language="string"
|
||||
:input-validation-rules="rules"
|
||||
:transformer="transformer"
|
||||
|
||||
@@ -28,10 +28,10 @@ const rules: UseValidationRule<string>[] = [
|
||||
|
||||
<template>
|
||||
<format-transformer
|
||||
:input-label="t('tools.json-to-csv.texts.input-label-your-raw-json')"
|
||||
:input-:label="t('tools.json-to-csv.texts.label-t-tools-json-to-csv-texts-input-label-your-raw-json')"
|
||||
:input-default="defaultValue"
|
||||
:input-placeholder="t('tools.json-to-csv.texts.input-placeholder-paste-your-raw-json-here')"
|
||||
:output-label="t('tools.json-to-csv.texts.output-label-csv-version-of-your-json')"
|
||||
:input-:placeholder="t('tools.json-to-csv.texts.placeholder-t-tools-json-to-csv-texts-input-placeholder-paste-your-raw-json-here')"
|
||||
:output-:label="t('tools.json-to-csv.texts.label-t-tools-json-to-csv-texts-output-label-csv-version-of-your-json')"
|
||||
:input-validation-rules="rules"
|
||||
:transformer="transformer"
|
||||
download-file-name="output.csv"
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
import { Braces } from '@vicons/tabler';
|
||||
import { defineTool } from '../tool';
|
||||
import { translate as t } from '@/plugins/i18n.plugin';
|
||||
|
||||
export const tool = defineTool({
|
||||
name: 'JSON to Data',
|
||||
name: t('tools.json-to-data.title'),
|
||||
path: '/json-to-data',
|
||||
description: 'Convert JSON to CSV, SQL Insert, YAML, Markdown, XML and XLSX',
|
||||
description: t('tools.json-to-data.description'),
|
||||
keywords: ['json', 'excel', 'csv', 'xlsx', 'sql', 'yaml', 'insert', 'markdown', 'md', 'tsv', 'xml'],
|
||||
component: () => import('./json-to-data.vue'),
|
||||
icon: Braces,
|
||||
|
||||
@@ -29,9 +29,9 @@ const rules: UseValidationRule<string>[] = [
|
||||
</div>
|
||||
|
||||
<format-transformer
|
||||
:input-label="t('tools.json-to-javascript.texts.input-label-your-json')"
|
||||
:input-placeholder="t('tools.json-to-javascript.texts.input-placeholder-paste-your-json-here')"
|
||||
:output-label="t('tools.json-to-javascript.texts.output-label-javascript-object-from-your-json')"
|
||||
:input-:label="t('tools.json-to-javascript.texts.label-t-tools-json-to-javascript-texts-input-label-your-json')"
|
||||
:input-:placeholder="t('tools.json-to-javascript.texts.placeholder-t-tools-json-to-javascript-texts-input-placeholder-paste-your-json-here')"
|
||||
:output-:label="t('tools.json-to-javascript.texts.label-t-tools-json-to-javascript-texts-output-label-javascript-object-from-your-json')"
|
||||
output-language="javascript"
|
||||
:input-validation-rules="rules"
|
||||
:transformer="transformer"
|
||||
|
||||
@@ -25,9 +25,9 @@ const rules: UseValidationRule<string>[] = [
|
||||
|
||||
<template>
|
||||
<format-transformer
|
||||
:input-label="t('tools.json-to-object.texts.input-label-your-json')"
|
||||
:input-placeholder="t('tools.json-to-object.texts.input-placeholder-paste-your-json-here')"
|
||||
:output-label="t('tools.json-to-object.texts.output-label-object-from-your-json')"
|
||||
:input-:label="t('tools.json-to-object.texts.label-t-tools-json-to-object-texts-input-label-your-json')"
|
||||
:input-:placeholder="t('tools.json-to-object.texts.placeholder-t-tools-json-to-object-texts-input-placeholder-paste-your-json-here')"
|
||||
:output-:label="t('tools.json-to-object.texts.label-t-tools-json-to-object-texts-output-label-object-from-your-json')"
|
||||
output-language="js"
|
||||
:input-validation-rules="rules"
|
||||
:transformer="transformer"
|
||||
|
||||
@@ -29,10 +29,10 @@ const rules: UseValidationRule<string>[] = [
|
||||
|
||||
<template>
|
||||
<format-transformer
|
||||
:input-label="t('tools.json-to-php-array.texts.input-label-your-json')"
|
||||
:input-:label="t('tools.json-to-php-array.texts.label-t-tools-json-to-php-array-texts-input-label-your-json')"
|
||||
:input-default="defaultValue"
|
||||
:input-placeholder="t('tools.json-to-php-array.texts.input-placeholder-paste-your-json-here')"
|
||||
:output-label="t('tools.json-to-php-array.texts.output-label-php-array-version')"
|
||||
:input-:placeholder="t('tools.json-to-php-array.texts.placeholder-t-tools-json-to-php-array-texts-input-placeholder-paste-your-json-here')"
|
||||
:output-:label="t('tools.json-to-php-array.texts.label-t-tools-json-to-php-array-texts-output-label-php-array-version')"
|
||||
:input-validation-rules="rules"
|
||||
:transformer="transformer"
|
||||
/>
|
||||
|
||||
@@ -33,9 +33,9 @@ const rules: UseValidationRule<string>[] = [
|
||||
<c-input-text v-model:value="rootName" :label="t('tools.json-to-protobuf.texts.label-root-name')" label-placement="left" />
|
||||
|
||||
<FormatTransformer
|
||||
:input-label="t('tools.json-to-protobuf.texts.input-label-your-json')"
|
||||
:input-placeholder="t('tools.json-to-protobuf.texts.input-placeholder-paste-your-json-here')"
|
||||
:output-label="t('tools.json-to-protobuf.texts.output-label-protobuf-version-of-your-json-objects')"
|
||||
:input-:label="t('tools.json-to-protobuf.texts.label-t-tools-json-to-protobuf-texts-input-label-your-json')"
|
||||
:input-:placeholder="t('tools.json-to-protobuf.texts.placeholder-t-tools-json-to-protobuf-texts-input-placeholder-paste-your-json-here')"
|
||||
:output-:label="t('tools.json-to-protobuf.texts.label-t-tools-json-to-protobuf-texts-output-label-protobuf-version-of-your-json-objects')"
|
||||
:input-validation-rules="rules"
|
||||
:transformer="transformer"
|
||||
output-language="protobuf"
|
||||
|
||||
@@ -78,9 +78,9 @@ const rules: UseValidationRule<string>[] = [
|
||||
<n-divider />
|
||||
|
||||
<format-transformer
|
||||
:input-label="t('tools.json-to-schema.texts.input-label-your-json')"
|
||||
:input-placeholder="t('tools.json-to-schema.texts.input-placeholder-paste-your-json-here')"
|
||||
:output-label="t('tools.json-to-schema.texts.output-label-your-schema')"
|
||||
:input-:label="t('tools.json-to-schema.texts.label-t-tools-json-to-schema-texts-input-label-your-json')"
|
||||
:input-:placeholder="t('tools.json-to-schema.texts.placeholder-t-tools-json-to-schema-texts-input-placeholder-paste-your-json-here')"
|
||||
:output-:label="t('tools.json-to-schema.texts.label-t-tools-json-to-schema-texts-output-label-your-schema')"
|
||||
:output-language="schemaLanguage"
|
||||
:input-validation-rules="rules"
|
||||
:transformer="transformer"
|
||||
|
||||
@@ -35,9 +35,9 @@ const rules: UseValidationRule<string>[] = [
|
||||
<n-divider />
|
||||
|
||||
<format-transformer
|
||||
:input-label="t('tools.json-to-sql-ddl.texts.input-label-your-json')"
|
||||
:input-placeholder="t('tools.json-to-sql-ddl.texts.input-placeholder-paste-your-json-here')"
|
||||
:output-label="t('tools.json-to-sql-ddl.texts.output-label-your-sql-ddl')"
|
||||
:input-:label="t('tools.json-to-sql-ddl.texts.label-t-tools-json-to-sql-ddl-texts-input-label-your-json')"
|
||||
:input-:placeholder="t('tools.json-to-sql-ddl.texts.placeholder-t-tools-json-to-sql-ddl-texts-input-placeholder-paste-your-json-here')"
|
||||
:output-:label="t('tools.json-to-sql-ddl.texts.label-t-tools-json-to-sql-ddl-texts-output-label-your-sql-ddl')"
|
||||
output-language="sql"
|
||||
:input-validation-rules="rules"
|
||||
:transformer="transformer"
|
||||
|
||||
@@ -22,9 +22,9 @@ const rules: UseValidationRule<string>[] = [
|
||||
|
||||
<template>
|
||||
<format-transformer
|
||||
:input-label="t('tools.json-to-toml.texts.input-label-your-json')"
|
||||
:input-placeholder="t('tools.json-to-toml.texts.input-placeholder-paste-your-json-here')"
|
||||
:output-label="t('tools.json-to-toml.texts.output-label-toml-from-your-json')"
|
||||
:input-:label="t('tools.json-to-toml.texts.label-t-tools-json-to-toml-texts-input-label-your-json')"
|
||||
:input-:placeholder="t('tools.json-to-toml.texts.placeholder-t-tools-json-to-toml-texts-input-placeholder-paste-your-json-here')"
|
||||
:output-:label="t('tools.json-to-toml.texts.label-t-tools-json-to-toml-texts-output-label-toml-from-your-json')"
|
||||
output-language="toml"
|
||||
:input-validation-rules="rules"
|
||||
:transformer="transformer"
|
||||
|
||||
@@ -25,9 +25,9 @@ const rules: UseValidationRule<string>[] = [
|
||||
|
||||
<template>
|
||||
<format-transformer
|
||||
:input-label="t('tools.json-to-ts.texts.input-label-your-json')"
|
||||
:input-placeholder="t('tools.json-to-ts.texts.input-placeholder-paste-your-json-here')"
|
||||
:output-label="t('tools.json-to-ts.texts.output-label-ts-from-your-json')"
|
||||
:input-:label="t('tools.json-to-ts.texts.label-t-tools-json-to-ts-texts-input-label-your-json')"
|
||||
:input-:placeholder="t('tools.json-to-ts.texts.placeholder-t-tools-json-to-ts-texts-input-placeholder-paste-your-json-here')"
|
||||
:output-:label="t('tools.json-to-ts.texts.label-t-tools-json-to-ts-texts-output-label-ts-from-your-json')"
|
||||
output-language="ts"
|
||||
:input-validation-rules="rules"
|
||||
:transformer="transformer"
|
||||
|
||||
@@ -20,9 +20,9 @@ const rules: UseValidationRule<string>[] = [
|
||||
|
||||
<template>
|
||||
<format-transformer
|
||||
:input-label="t('tools.json-to-yaml-converter.texts.input-label-your-json')"
|
||||
:input-placeholder="t('tools.json-to-yaml-converter.texts.input-placeholder-paste-your-json-here')"
|
||||
:output-label="t('tools.json-to-yaml-converter.texts.output-label-yaml-from-your-json')"
|
||||
:input-:label="t('tools.json-to-yaml-converter.texts.label-t-tools-json-to-yaml-converter-texts-input-label-your-json')"
|
||||
:input-:placeholder="t('tools.json-to-yaml-converter.texts.placeholder-t-tools-json-to-yaml-converter-texts-input-placeholder-paste-your-json-here')"
|
||||
:output-:label="t('tools.json-to-yaml-converter.texts.label-t-tools-json-to-yaml-converter-texts-output-label-yaml-from-your-json')"
|
||||
output-language="yaml"
|
||||
:input-validation-rules="rules"
|
||||
:transformer="transformer"
|
||||
|
||||
@@ -57,12 +57,12 @@ const { schemas, errors: validationErrors } = useJsonSchemaValidation({ json: ra
|
||||
</n-form-item>
|
||||
</n-space>
|
||||
|
||||
<n-form-item label="JSON schema:" label-placement="left" label-width="130px" label-align="right">
|
||||
<n-form-item :label="t('tools.json-viewer.texts.label-json-schema')" label-placement="left" label-width="130px" label-align="right">
|
||||
<n-select
|
||||
v-model:value="schemaUrl"
|
||||
:options="[
|
||||
{ label: 'No validation', value: '' },
|
||||
{ label: 'Custom', value: 'custom' },
|
||||
{ label: t('tools.json-viewer.texts.label-no-validation'), value: '' },
|
||||
{ label: t('tools.json-viewer.texts.label-custom'), value: 'custom' },
|
||||
...schemas.map(s => ({ label: `${s.name} / ${s.description}`, value: s.url })),
|
||||
]"
|
||||
filterable mb-4
|
||||
@@ -72,7 +72,7 @@ const { schemas, errors: validationErrors } = useJsonSchemaValidation({ json: ra
|
||||
v-if="schemaUrl === 'custom'"
|
||||
ref="jsonSchemaInputElement"
|
||||
v-model:value="schemaData"
|
||||
placeholder="Paste your JSON Schema here..."
|
||||
:placeholder="t('tools.json-viewer.texts.placeholder-paste-your-json-schema-here')"
|
||||
rows="20"
|
||||
multiline
|
||||
autocomplete="off"
|
||||
@@ -102,7 +102,7 @@ const { schemas, errors: validationErrors } = useJsonSchemaValidation({ json: ra
|
||||
</n-form-item>
|
||||
|
||||
<div v-if="validationErrors.length > 0" mb-2 mt-2>
|
||||
<n-alert title="Schema Validation Errors" type="error">
|
||||
<n-alert :title="t('tools.json-viewer.texts.title-schema-validation-errors')" type="error">
|
||||
<ul
|
||||
v-for="error in validationErrors"
|
||||
:key="error"
|
||||
|
||||
@@ -171,9 +171,9 @@ function transformer(value: string) {
|
||||
</div>
|
||||
</div>
|
||||
<format-transformer
|
||||
:input-label="t('tools.list-converter.texts.input-label-your-input-data')"
|
||||
:input-placeholder="t('tools.list-converter.texts.input-placeholder-paste-your-input-data-here')"
|
||||
:output-label="t('tools.list-converter.texts.output-label-your-transformed-data')"
|
||||
:input-:label="t('tools.list-converter.texts.label-t-tools-list-converter-texts-input-label-your-input-data')"
|
||||
:input-:placeholder="t('tools.list-converter.texts.placeholder-t-tools-list-converter-texts-input-placeholder-paste-your-input-data-here')"
|
||||
:output-:label="t('tools.list-converter.texts.label-t-tools-list-converter-texts-output-label-your-transformed-data')"
|
||||
:transformer="transformer"
|
||||
download-file-name="output.txt"
|
||||
/>
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
import { FileExport } from '@vicons/tabler';
|
||||
import { defineTool } from '../tool';
|
||||
import { translate as t } from '@/plugins/i18n.plugin';
|
||||
|
||||
export const tool = defineTool({
|
||||
name: 'Apache LogRotate Generator',
|
||||
name: t('tools.logrotate-generator.title'),
|
||||
path: '/logrotate-generator',
|
||||
description: 'Generate Apache .log rotation configuration',
|
||||
description: t('tools.logrotate-generator.description'),
|
||||
keywords: ['logrotate', 'apache', 'generator'],
|
||||
component: () => import('./logrotate-generator.vue'),
|
||||
icon: FileExport,
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
<script setup lang="ts">
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import { useITStorage } from '@/composable/queryParams';
|
||||
|
||||
const { t } = useI18n();
|
||||
|
||||
const config = useITStorage('logrotate:config', {
|
||||
path: '/var/log/apache2/*.log',
|
||||
rotateCount: 1,
|
||||
@@ -36,35 +39,35 @@ const config = useITStorage('logrotate:config', {
|
||||
const frequencyOptions = ['daily', 'weekly', 'monthly', 'yearly'];
|
||||
|
||||
const tooltips = {
|
||||
path: 'Glob pattern for log files to rotate.',
|
||||
rotateCount: 'Number of rotated log files to keep.',
|
||||
frequency: 'How often to rotate logs.',
|
||||
minSize: 'Minimum size before rotation is triggered.',
|
||||
size: 'Maximum size before rotation is triggered.',
|
||||
createFile: 'Create a new log file after rotation.',
|
||||
copy: 'Copy the log file instead of moving.',
|
||||
copyTruncate: 'Copy and truncate the original log file.',
|
||||
startNumber: 'Starting number for rotated files.',
|
||||
extension: 'File extension for rotated logs.',
|
||||
dateExt: 'Append date to rotated log filenames.',
|
||||
dateFormat: 'Format for the date extension.',
|
||||
missingOk: 'Ignore missing log files.',
|
||||
compress: 'Compress rotated logs.',
|
||||
delayCompress: 'Delay compression until next rotation.',
|
||||
compressExt: 'Extension for compressed files.',
|
||||
compressCmd: 'Command used to compress files.',
|
||||
compressOptions: 'Options passed to the compression command.',
|
||||
uncompressCmd: 'Command used to uncompress files.',
|
||||
oldDir: 'Directory to move old log files to.',
|
||||
mail: 'Email address to send rotated logs to.',
|
||||
mailFirst: 'Mail the first rotated file.',
|
||||
mailLast: 'Mail the last rotated file.',
|
||||
shred: 'Securely shred log files after rotation.',
|
||||
shredCycles: 'Number of shred cycles.',
|
||||
firstAction: 'Script to run before rotation begins.',
|
||||
preRotate: 'Script to run before rotating each file.',
|
||||
postRotate: 'Script to run after rotating each file.',
|
||||
lastAction: 'Script to run after rotation ends.',
|
||||
path: t('tools.logrotate-generator.texts.path'),
|
||||
rotateCount: t('tools.logrotate-generator.texts.rotateCount'),
|
||||
frequency: t('tools.logrotate-generator.texts.frequency'),
|
||||
minSize: t('tools.logrotate-generator.texts.minSize'),
|
||||
size: t('tools.logrotate-generator.texts.size'),
|
||||
createFile: t('tools.logrotate-generator.texts.createFile'),
|
||||
copy: t('tools.logrotate-generator.texts.copy'),
|
||||
copyTruncate: t('tools.logrotate-generator.texts.copyTruncate'),
|
||||
startNumber: t('tools.logrotate-generator.texts.startNumber'),
|
||||
extension: t('tools.logrotate-generator.texts.extension'),
|
||||
dateExt: t('tools.logrotate-generator.texts.dateExt'),
|
||||
dateFormat: t('tools.logrotate-generator.texts.dateFormat'),
|
||||
missingOk: t('tools.logrotate-generator.texts.missingOk'),
|
||||
compress: t('tools.logrotate-generator.texts.compress'),
|
||||
delayCompress: t('tools.logrotate-generator.texts.delayCompress'),
|
||||
compressExt: t('tools.logrotate-generator.texts.compressExt'),
|
||||
compressCmd: t('tools.logrotate-generator.texts.compressCmd'),
|
||||
compressOptions: t('tools.logrotate-generator.texts.compressOptions'),
|
||||
uncompressCmd: t('tools.logrotate-generator.texts.uncompressCmd'),
|
||||
oldDir: t('tools.logrotate-generator.texts.oldDir'),
|
||||
mail: t('tools.logrotate-generator.texts.mail'),
|
||||
mailFirst: t('tools.logrotate-generator.texts.mailFirst'),
|
||||
mailLast: t('tools.logrotate-generator.texts.mailLast'),
|
||||
shred: t('tools.logrotate-generator.texts.shred'),
|
||||
shredCycles: t('tools.logrotate-generator.texts.shredCycles'),
|
||||
firstAction: t('tools.logrotate-generator.texts.firstAction'),
|
||||
preRotate: t('tools.logrotate-generator.texts.preRotate'),
|
||||
postRotate: t('tools.logrotate-generator.texts.postRotate'),
|
||||
lastAction: t('tools.logrotate-generator.texts.lastAction'),
|
||||
};
|
||||
|
||||
const generatedConfig = computed(() => {
|
||||
@@ -105,16 +108,16 @@ ${config.value.path} {
|
||||
|
||||
<template>
|
||||
<NForm label-placement="left" label-width="180px">
|
||||
<n-form-item label="Path:">
|
||||
<n-form-item :label="t('tools.logrotate-generator.texts.label-path')">
|
||||
<n-tooltip trigger="hover">
|
||||
<template #trigger>
|
||||
<n-input v-model:value="config.path" placeholder="Enter log path or pattern..." />
|
||||
<n-input v-model:value="config.path" :placeholder="t('tools.logrotate-generator.texts.placeholder-enter-log-path-or-pattern')" />
|
||||
</template>
|
||||
{{ tooltips.path }}
|
||||
</n-tooltip>
|
||||
</n-form-item>
|
||||
|
||||
<n-form-item label="Rotate Count:">
|
||||
<n-form-item :label="t('tools.logrotate-generator.texts.label-rotate-count')">
|
||||
<n-tooltip trigger="hover">
|
||||
<template #trigger>
|
||||
<n-input-number-i18n v-model:value="config.rotateCount" />
|
||||
@@ -123,7 +126,7 @@ ${config.value.path} {
|
||||
</n-tooltip>
|
||||
</n-form-item>
|
||||
|
||||
<n-form-item label="Frequency:">
|
||||
<n-form-item :label="t('tools.logrotate-generator.texts.label-frequency')">
|
||||
<n-tooltip trigger="hover">
|
||||
<template #trigger>
|
||||
<n-select v-model:value="config.frequency" :options="frequencyOptions.map(f => ({ label: f, value: f }))" />
|
||||
@@ -132,25 +135,25 @@ ${config.value.path} {
|
||||
</n-tooltip>
|
||||
</n-form-item>
|
||||
|
||||
<n-form-item label="Min Size:">
|
||||
<n-form-item :label="t('tools.logrotate-generator.texts.label-min-size')">
|
||||
<n-tooltip trigger="hover">
|
||||
<template #trigger>
|
||||
<n-input v-model:value="config.minSize" placeholder="Enter min size and unit..." />
|
||||
<n-input v-model:value="config.minSize" :placeholder="t('tools.logrotate-generator.texts.placeholder-enter-min-size-and-unit')" />
|
||||
</template>
|
||||
{{ tooltips.minSize }}
|
||||
</n-tooltip>
|
||||
</n-form-item>
|
||||
|
||||
<n-form-item label="Size:">
|
||||
<n-form-item :label="t('tools.logrotate-generator.texts.label-size')">
|
||||
<n-tooltip trigger="hover">
|
||||
<template #trigger>
|
||||
<n-input v-model:value="config.size" placeholder="Enter size and unit..." />
|
||||
<n-input v-model:value="config.size" :placeholder="t('tools.logrotate-generator.texts.placeholder-enter-size-and-unit')" />
|
||||
</template>
|
||||
{{ tooltips.size }}
|
||||
</n-tooltip>
|
||||
</n-form-item>
|
||||
|
||||
<n-form-item label="Create File:">
|
||||
<n-form-item :label="t('tools.logrotate-generator.texts.label-create-file')">
|
||||
<n-tooltip trigger="hover">
|
||||
<template #trigger>
|
||||
<n-switch v-model:value="config.createFile" />
|
||||
@@ -159,7 +162,7 @@ ${config.value.path} {
|
||||
</n-tooltip>
|
||||
</n-form-item>
|
||||
|
||||
<n-form-item label="Copy:">
|
||||
<n-form-item :label="t('tools.logrotate-generator.texts.label-copy')">
|
||||
<n-tooltip trigger="hover">
|
||||
<template #trigger>
|
||||
<n-switch v-model:value="config.copy" />
|
||||
@@ -168,7 +171,7 @@ ${config.value.path} {
|
||||
</n-tooltip>
|
||||
</n-form-item>
|
||||
|
||||
<n-form-item label="Copy Truncate:">
|
||||
<n-form-item :label="t('tools.logrotate-generator.texts.label-copy-truncate')">
|
||||
<n-tooltip trigger="hover">
|
||||
<template #trigger>
|
||||
<n-switch v-model:value="config.copyTruncate" />
|
||||
@@ -177,7 +180,7 @@ ${config.value.path} {
|
||||
</n-tooltip>
|
||||
</n-form-item>
|
||||
|
||||
<n-form-item label="Start Number:">
|
||||
<n-form-item :label="t('tools.logrotate-generator.texts.label-start-number')">
|
||||
<n-tooltip trigger="hover">
|
||||
<template #trigger>
|
||||
<n-input-number-i18n v-model:value="config.startNumber" />
|
||||
@@ -186,16 +189,16 @@ ${config.value.path} {
|
||||
</n-tooltip>
|
||||
</n-form-item>
|
||||
|
||||
<n-form-item label="Extension:">
|
||||
<n-form-item :label="t('tools.logrotate-generator.texts.label-extension')">
|
||||
<n-tooltip trigger="hover">
|
||||
<template #trigger>
|
||||
<n-input v-model:value="config.extension" placeholder="Enter extension..." />
|
||||
<n-input v-model:value="config.extension" :placeholder="t('tools.logrotate-generator.texts.placeholder-enter-extension')" />
|
||||
</template>
|
||||
{{ tooltips.extension }}
|
||||
</n-tooltip>
|
||||
</n-form-item>
|
||||
|
||||
<n-form-item label="Date Ext:">
|
||||
<n-form-item :label="t('tools.logrotate-generator.texts.label-date-ext')">
|
||||
<n-tooltip trigger="hover">
|
||||
<template #trigger>
|
||||
<n-switch v-model:value="config.dateExt" />
|
||||
@@ -204,16 +207,16 @@ ${config.value.path} {
|
||||
</n-tooltip>
|
||||
</n-form-item>
|
||||
|
||||
<n-form-item label="Date Format:">
|
||||
<n-form-item :label="t('tools.logrotate-generator.texts.label-date-format')">
|
||||
<n-tooltip trigger="hover">
|
||||
<template #trigger>
|
||||
<n-input v-model:value="config.dateFormat" placeholder="Enter date format..." />
|
||||
<n-input v-model:value="config.dateFormat" :placeholder="t('tools.logrotate-generator.texts.placeholder-enter-date-format')" />
|
||||
</template>
|
||||
{{ tooltips.dateFormat }}
|
||||
</n-tooltip>
|
||||
</n-form-item>
|
||||
|
||||
<n-form-item label="Missing OK:">
|
||||
<n-form-item :label="t('tools.logrotate-generator.texts.label-missing-ok')">
|
||||
<n-tooltip trigger="hover">
|
||||
<template #trigger>
|
||||
<n-switch v-model:value="config.missingOk" />
|
||||
@@ -222,7 +225,7 @@ ${config.value.path} {
|
||||
</n-tooltip>
|
||||
</n-form-item>
|
||||
|
||||
<n-form-item label="Compress:">
|
||||
<n-form-item :label="t('tools.logrotate-generator.texts.label-compress')">
|
||||
<n-tooltip trigger="hover">
|
||||
<template #trigger>
|
||||
<n-switch v-model:value="config.compress" />
|
||||
@@ -231,7 +234,7 @@ ${config.value.path} {
|
||||
</n-tooltip>
|
||||
</n-form-item>
|
||||
|
||||
<n-form-item label="Delay Compress:">
|
||||
<n-form-item :label="t('tools.logrotate-generator.texts.label-delay-compress')">
|
||||
<n-tooltip trigger="hover">
|
||||
<template #trigger>
|
||||
<n-switch v-model:value="config.delayCompress" />
|
||||
@@ -240,61 +243,61 @@ ${config.value.path} {
|
||||
</n-tooltip>
|
||||
</n-form-item>
|
||||
|
||||
<n-form-item label="Compress Ext:">
|
||||
<n-form-item :label="t('tools.logrotate-generator.texts.label-compress-ext')">
|
||||
<n-tooltip trigger="hover">
|
||||
<template #trigger>
|
||||
<n-input v-model:value="config.compressExt" placeholder="Enter compression extension..." />
|
||||
<n-input v-model:value="config.compressExt" :placeholder="t('tools.logrotate-generator.texts.placeholder-enter-compression-extension')" />
|
||||
</template>
|
||||
{{ tooltips.compressExt }}
|
||||
</n-tooltip>
|
||||
</n-form-item>
|
||||
|
||||
<n-form-item label="Compress Cmd:">
|
||||
<n-form-item :label="t('tools.logrotate-generator.texts.label-compress-cmd')">
|
||||
<n-tooltip trigger="hover">
|
||||
<template #trigger>
|
||||
<n-input v-model:value="config.compressCmd" placeholder="Enter command..." />
|
||||
<n-input v-model:value="config.compressCmd" :placeholder="t('tools.logrotate-generator.texts.placeholder-enter-command')" />
|
||||
</template>
|
||||
{{ tooltips.compressCmd }}
|
||||
</n-tooltip>
|
||||
</n-form-item>
|
||||
|
||||
<n-form-item label="Compress Options:">
|
||||
<n-form-item :label="t('tools.logrotate-generator.texts.label-compress-options')">
|
||||
<n-tooltip trigger="hover">
|
||||
<template #trigger>
|
||||
<n-input v-model:value="config.compressOptions" placeholder="Enter compression options..." />
|
||||
<n-input v-model:value="config.compressOptions" :placeholder="t('tools.logrotate-generator.texts.placeholder-enter-compression-options')" />
|
||||
</template>
|
||||
{{ tooltips.compressOptions }}
|
||||
</n-tooltip>
|
||||
</n-form-item>
|
||||
|
||||
<n-form-item label="Uncompress Cmd:">
|
||||
<n-form-item :label="t('tools.logrotate-generator.texts.label-uncompress-cmd')">
|
||||
<n-tooltip trigger="hover">
|
||||
<template #trigger>
|
||||
<n-input v-model:value="config.uncompressCmd" placeholder="Enter command..." />
|
||||
<n-input v-model:value="config.uncompressCmd" :placeholder="t('tools.logrotate-generator.texts.placeholder-enter-command')" />
|
||||
</template>
|
||||
{{ tooltips.uncompressCmd }}
|
||||
</n-tooltip>
|
||||
</n-form-item>
|
||||
|
||||
<n-form-item label="Old Dir:">
|
||||
<n-form-item :label="t('tools.logrotate-generator.texts.label-old-dir')">
|
||||
<n-tooltip trigger="hover">
|
||||
<template #trigger>
|
||||
<n-input v-model:value="config.oldDir" placeholder="Enter old directory..." />
|
||||
<n-input v-model:value="config.oldDir" :placeholder="t('tools.logrotate-generator.texts.placeholder-enter-old-directory')" />
|
||||
</template>
|
||||
{{ tooltips.oldDir }}
|
||||
</n-tooltip>
|
||||
</n-form-item>
|
||||
|
||||
<n-form-item label="Mail:">
|
||||
<n-form-item :label="t('tools.logrotate-generator.texts.label-mail')">
|
||||
<n-tooltip trigger="hover">
|
||||
<template #trigger>
|
||||
<n-input v-model:value="config.mail" placeholder="Enter email..." />
|
||||
<n-input v-model:value="config.mail" :placeholder="t('tools.logrotate-generator.texts.placeholder-enter-email')" />
|
||||
</template>
|
||||
{{ tooltips.mail }}
|
||||
</n-tooltip>
|
||||
</n-form-item>
|
||||
|
||||
<n-form-item label="Mail First:">
|
||||
<n-form-item :label="t('tools.logrotate-generator.texts.label-mail-first')">
|
||||
<n-tooltip trigger="hover">
|
||||
<template #trigger>
|
||||
<n-switch v-model:value="config.mailFirst" />
|
||||
@@ -303,7 +306,7 @@ ${config.value.path} {
|
||||
</n-tooltip>
|
||||
</n-form-item>
|
||||
|
||||
<n-form-item label="Mail Last:">
|
||||
<n-form-item :label="t('tools.logrotate-generator.texts.label-mail-last')">
|
||||
<n-tooltip trigger="hover">
|
||||
<template #trigger>
|
||||
<n-switch v-model:value="config.mailLast" />
|
||||
@@ -312,7 +315,7 @@ ${config.value.path} {
|
||||
</n-tooltip>
|
||||
</n-form-item>
|
||||
|
||||
<n-form-item label="Shred:">
|
||||
<n-form-item :label="t('tools.logrotate-generator.texts.label-shred')">
|
||||
<n-tooltip trigger="hover">
|
||||
<template #trigger>
|
||||
<n-switch v-model:value="config.shred" />
|
||||
@@ -321,7 +324,7 @@ ${config.value.path} {
|
||||
</n-tooltip>
|
||||
</n-form-item>
|
||||
|
||||
<n-form-item label="Shred Cycles:">
|
||||
<n-form-item :label="t('tools.logrotate-generator.texts.label-shred-cycles')">
|
||||
<n-tooltip trigger="hover">
|
||||
<template #trigger>
|
||||
<n-input-number-i18n v-model:value="config.shredCycles" />
|
||||
@@ -330,37 +333,37 @@ ${config.value.path} {
|
||||
</n-tooltip>
|
||||
</n-form-item>
|
||||
|
||||
<n-form-item label="First Action:">
|
||||
<n-form-item :label="t('tools.logrotate-generator.texts.label-first-action')">
|
||||
<n-tooltip trigger="hover">
|
||||
<template #trigger>
|
||||
<n-input v-model:value="config.firstAction" placeholder="Enter command..." />
|
||||
<n-input v-model:value="config.firstAction" :placeholder="t('tools.logrotate-generator.texts.placeholder-enter-command')" />
|
||||
</template>
|
||||
{{ tooltips.firstAction }}
|
||||
</n-tooltip>
|
||||
</n-form-item>
|
||||
|
||||
<n-form-item label="Pre Rotate:">
|
||||
<n-form-item :label="t('tools.logrotate-generator.texts.label-pre-rotate')">
|
||||
<n-tooltip trigger="hover">
|
||||
<template #trigger>
|
||||
<n-input v-model:value="config.preRotate" placeholder="Enter command..." />
|
||||
<n-input v-model:value="config.preRotate" :placeholder="t('tools.logrotate-generator.texts.placeholder-enter-command')" />
|
||||
</template>
|
||||
{{ tooltips.preRotate }}
|
||||
</n-tooltip>
|
||||
</n-form-item>
|
||||
|
||||
<n-form-item label="Post Rotate:">
|
||||
<n-form-item :label="t('tools.logrotate-generator.texts.label-post-rotate')">
|
||||
<n-tooltip trigger="hover">
|
||||
<template #trigger>
|
||||
<n-input v-model:value="config.postRotate" placeholder="Enter command..." />
|
||||
<n-input v-model:value="config.postRotate" :placeholder="t('tools.logrotate-generator.texts.placeholder-enter-command')" />
|
||||
</template>
|
||||
{{ tooltips.postRotate }}
|
||||
</n-tooltip>
|
||||
</n-form-item>
|
||||
|
||||
<n-form-item label="Last Action:">
|
||||
<n-form-item :label="t('tools.logrotate-generator.texts.label-last-action')">
|
||||
<n-tooltip trigger="hover">
|
||||
<template #trigger>
|
||||
<n-input v-model:value="config.lastAction" placeholder="Enter command..." />
|
||||
<n-input v-model:value="config.lastAction" :placeholder="t('tools.logrotate-generator.texts.placeholder-enter-command')" />
|
||||
</template>
|
||||
{{ tooltips.lastAction }}
|
||||
</n-tooltip>
|
||||
@@ -368,7 +371,7 @@ ${config.value.path} {
|
||||
|
||||
<NDivider />
|
||||
|
||||
<NCard title="Generated Config">
|
||||
<NCard :title="t('tools.logrotate-generator.texts.title-generated-config')">
|
||||
<textarea-copyable :value="generatedConfig" />
|
||||
</NCard>
|
||||
</NForm>
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
import { Mail } from '@vicons/tabler';
|
||||
import { defineTool } from '../tool';
|
||||
import { translate as t } from '@/plugins/i18n.plugin';
|
||||
|
||||
export const tool = defineTool({
|
||||
name: 'Mailto Generator',
|
||||
name: t('tools.mailto-generator.title'),
|
||||
path: '/mailto-generator',
|
||||
description: 'Generate a mailto: link href',
|
||||
description: t('tools.mailto-generator.description'),
|
||||
keywords: ['mailto', 'generator', 'link'],
|
||||
component: () => import('./mailto-generator.vue'),
|
||||
icon: Mail,
|
||||
|
||||
@@ -1,7 +1,10 @@
|
||||
<script setup>
|
||||
<script setup lang="ts">
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import { computed, ref } from 'vue';
|
||||
import { NButton, NCard, NForm, NFormItem, NInput } from 'naive-ui';
|
||||
|
||||
const { t } = useI18n();
|
||||
|
||||
const form = ref({
|
||||
to: '',
|
||||
cc: '',
|
||||
@@ -38,33 +41,33 @@ function openMailto() {
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<NCard title="Mailto Link Generator">
|
||||
<NCard :title="t('tools.mailto-generator.texts.title-mailto-link-generator')">
|
||||
<NForm :model="form" label-placement="left">
|
||||
<NFormItem label="To:">
|
||||
<NInput v-model:value="form.to" placeholder="recipient@example.com" />
|
||||
<NFormItem :label="t('tools.mailto-generator.texts.label-to')">
|
||||
<NInput v-model:value="form.to" :placeholder="t('tools.mailto-generator.texts.placeholder-recipient-example-com')" />
|
||||
</NFormItem>
|
||||
<NFormItem label="CC:">
|
||||
<NInput v-model:value="form.cc" placeholder="cc@example.com" />
|
||||
<NFormItem :label="t('tools.mailto-generator.texts.label-cc')">
|
||||
<NInput v-model:value="form.cc" :placeholder="t('tools.mailto-generator.texts.placeholder-cc-example-com')" />
|
||||
</NFormItem>
|
||||
<NFormItem label="BCC:">
|
||||
<NInput v-model:value="form.bcc" placeholder="bcc@example.com" />
|
||||
<NFormItem :label="t('tools.mailto-generator.texts.label-bcc')">
|
||||
<NInput v-model:value="form.bcc" :placeholder="t('tools.mailto-generator.texts.placeholder-bcc-example-com')" />
|
||||
</NFormItem>
|
||||
<NFormItem label="Subject:">
|
||||
<NInput v-model:value="form.subject" placeholder="Email subject" />
|
||||
<NFormItem :label="t('tools.mailto-generator.texts.label-subject')">
|
||||
<NInput v-model:value="form.subject" :placeholder="t('tools.mailto-generator.texts.placeholder-email-subject')" />
|
||||
</NFormItem>
|
||||
<NFormItem label="Body:" label-placement="top">
|
||||
<NFormItem :label="t('tools.mailto-generator.texts.label-body')" label-placement="top">
|
||||
<NInput
|
||||
v-model:value="form.body"
|
||||
type="textarea"
|
||||
placeholder="Email body"
|
||||
:placeholder="t('tools.mailto-generator.texts.placeholder-email-body')"
|
||||
:autosize="{ minRows: 3, maxRows: 6 }"
|
||||
/>
|
||||
</NFormItem>
|
||||
<c-card v-if="mailtoLink" title="Generated Link">
|
||||
<c-card v-if="mailtoLink" :title="t('tools.mailto-generator.texts.title-generated-link')">
|
||||
<textarea-copyable :value="mailtoLink" />
|
||||
<n-space justify="center">
|
||||
<NButton type="primary" @click="openMailto">
|
||||
Open Mail Client
|
||||
{{ t('tools.mailto-generator.texts.tag-open-mail-client') }}
|
||||
</NButton>
|
||||
</n-space>
|
||||
</c-card>
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
import { Markdown } from '@vicons/tabler';
|
||||
import { defineTool } from '../tool';
|
||||
import { translate as t } from '@/plugins/i18n.plugin';
|
||||
|
||||
export const tool = defineTool({
|
||||
name: 'Markdown Table Prettifier',
|
||||
name: t('tools.markdown-table-prettifier.title'),
|
||||
path: '/markdown-table-prettifier',
|
||||
description: 'Prettify markdown tables',
|
||||
description: t('tools.markdown-table-prettifier.description'),
|
||||
keywords: ['markdown', 'table', 'prettifier'],
|
||||
component: () => import('./markdown-table-prettifier.vue'),
|
||||
icon: Markdown,
|
||||
|
||||
@@ -1,7 +1,10 @@
|
||||
<script setup lang="ts">
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import { CliPrettify } from 'markdown-table-prettify';
|
||||
import TextareaCopyable from '@/components/TextareaCopyable.vue';
|
||||
|
||||
const { t } = useI18n();
|
||||
|
||||
const inputMarkdown = ref('');
|
||||
const outputMarkdown = computed(() => {
|
||||
return CliPrettify.prettify(inputMarkdown.value);
|
||||
@@ -13,15 +16,15 @@ const outputMarkdown = computed(() => {
|
||||
<c-input-text
|
||||
v-model:value="inputMarkdown"
|
||||
multiline raw-text
|
||||
placeholder="Your Markdown table to prettify"
|
||||
:placeholder="t('tools.markdown-table-prettifier.texts.placeholder-your-markdown-table-to-prettify')"
|
||||
rows="8"
|
||||
autofocus
|
||||
label="Markdown table to prettify"
|
||||
:label="t('tools.markdown-table-prettifier.texts.label-markdown-table-to-prettify')"
|
||||
/>
|
||||
|
||||
<n-divider />
|
||||
|
||||
<n-form-item label="Prettified Markdown">
|
||||
<n-form-item :label="t('tools.markdown-table-prettifier.texts.label-prettified-markdown')">
|
||||
<TextareaCopyable :value="outputMarkdown" :word-wrap="true" language="markdown" />
|
||||
</n-form-item>
|
||||
</div>
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
import { Markdown } from '@vicons/tabler';
|
||||
import { defineTool } from '../tool';
|
||||
import { translate as t } from '@/plugins/i18n.plugin';
|
||||
|
||||
export const tool = defineTool({
|
||||
name: 'Markdown to DOCX',
|
||||
name: t('tools.markdown-to-docx.title'),
|
||||
path: '/markdown-to-docx',
|
||||
description: 'Convert Markdown documents to Word/DOCX document format with live preview and custom styling support.',
|
||||
description: t('tools.markdown-to-docx.description'),
|
||||
keywords: ['markdown', 'word', 'docx'],
|
||||
component: () => import('./markdown-to-docx.vue'),
|
||||
icon: Markdown,
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
<script setup lang="ts">
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import markdownDocx, { Packer } from 'markdown-docx';
|
||||
|
||||
const { t } = useI18n();
|
||||
|
||||
const inputMarkdown = ref('');
|
||||
const dataUrl = ref('');
|
||||
const error = ref('');
|
||||
@@ -34,15 +37,15 @@ async function convertMarkdownToDocx() {
|
||||
<div>
|
||||
<c-input-text
|
||||
v-model:value="inputMarkdown"
|
||||
label="Your markdown to convert:"
|
||||
:label="t('tools.markdown-to-docx.texts.label-your-markdown-to-convert')"
|
||||
multiline
|
||||
placeholder="Put your markdown content here..."
|
||||
:placeholder="t('tools.markdown-to-docx.texts.placeholder-put-your-markdown-content-here')"
|
||||
rows="10"
|
||||
mb-2
|
||||
/>
|
||||
<n-space justify="center" mb-2>
|
||||
<c-button @click="convertMarkdownToDocx">
|
||||
Convert to DOCX/Word
|
||||
{{ t('tools.markdown-to-docx.texts.tag-convert-to-docx-word') }}
|
||||
</c-button>
|
||||
</n-space>
|
||||
<c-alert v-if="error">
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
import { Binary } from '@vicons/tabler';
|
||||
import { defineTool } from '../tool';
|
||||
import { translate as t } from '@/plugins/i18n.plugin';
|
||||
|
||||
export const tool = defineTool({
|
||||
name: 'Middle-Endian Converter',
|
||||
name: t('tools.middle-endian-converter.title'),
|
||||
path: '/middle-endian-converter',
|
||||
description: 'Convert bytes from Middle-Endian to Little/Big Endian for given bits precision and type of Middle Endian',
|
||||
description: t('tools.middle-endian-converter.description'),
|
||||
keywords: ['middle', 'endian', 'converter'],
|
||||
component: () => import('./middle-endian-converter.vue'),
|
||||
icon: Binary,
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
<script setup lang="ts">
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import { convertEndian, formatInteger } from './middle-endian-converter.service';
|
||||
|
||||
const { t } = useI18n();
|
||||
|
||||
const inputHex = ref('');
|
||||
const bitLength = ref(32);
|
||||
const middleEndianType = ref('byte-swapped');
|
||||
@@ -26,46 +29,46 @@ const result = computed(() => {
|
||||
});
|
||||
|
||||
const bitOptions = [
|
||||
{ label: '16-bit', value: 16 },
|
||||
{ label: '32-bit', value: 32 },
|
||||
{ label: '64-bit', value: 64 },
|
||||
{ label: t('tools.middle-endian-converter.texts.label-16-bit'), value: 16 },
|
||||
{ label: t('tools.middle-endian-converter.texts.label-32-bit'), value: 32 },
|
||||
{ label: t('tools.middle-endian-converter.texts.label-64-bit'), value: 64 },
|
||||
];
|
||||
|
||||
const middleEndianOptions = [
|
||||
{ label: 'Byte-Swapped', value: 'byte-swapped' },
|
||||
{ label: 'Word-Swapped', value: 'word-swapped' },
|
||||
{ label: t('tools.middle-endian-converter.texts.label-byte-swapped'), value: 'byte-swapped' },
|
||||
{ label: t('tools.middle-endian-converter.texts.label-word-swapped'), value: 'word-swapped' },
|
||||
];
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<n-card title="Endian Converter" style="max-width: 700px; margin: auto;">
|
||||
<n-card :title="t('tools.middle-endian-converter.texts.title-endian-converter')" style="max-width: 700px; margin: auto;">
|
||||
<n-space vertical>
|
||||
<n-input
|
||||
v-model:value="inputHex"
|
||||
placeholder="Enter hex (e.g., 3412ABCD)"
|
||||
:placeholder="t('tools.middle-endian-converter.texts.placeholder-enter-hex-e-g-3412abcd')"
|
||||
clearable
|
||||
/>
|
||||
<n-select
|
||||
v-model:value="bitLength"
|
||||
:options="bitOptions"
|
||||
label="Bit Length"
|
||||
placeholder="Select bit length"
|
||||
:label="t('tools.middle-endian-converter.texts.label-bit-length')"
|
||||
:placeholder="t('tools.middle-endian-converter.texts.placeholder-select-bit-length')"
|
||||
/>
|
||||
<n-select
|
||||
v-model:value="middleEndianType"
|
||||
:options="middleEndianOptions"
|
||||
label="Middle Endian Type"
|
||||
placeholder="Select middle-endian format"
|
||||
:label="t('tools.middle-endian-converter.texts.label-middle-endian-type')"
|
||||
:placeholder="t('tools.middle-endian-converter.texts.placeholder-select-middle-endian-format')"
|
||||
/>
|
||||
<c-alert v-if="inputHex && result.error">
|
||||
{{ result.error }}
|
||||
</c-alert>
|
||||
<n-card v-if="inputHex && !result.error" title="Conversion result">
|
||||
<input-copyable label="Big Endian:" label-width="120px" label-position="left" :value="result.bigEndian" />
|
||||
<input-copyable label="Little Endian:" label-width="120px" label-position="left" :value="result.littleEndian" />
|
||||
<input-copyable label="Decimal:" label-width="120px" label-position="left" :value="result.decimal" mt-2 />
|
||||
<input-copyable label="Octal:" label-width="120px" label-position="left" :value="result.octal" />
|
||||
<input-copyable label="Hexadecimal:" label-width="120px" label-position="left" :value="result.hexadecimal" />
|
||||
<n-card v-if="inputHex && !result.error" :title="t('tools.middle-endian-converter.texts.title-conversion-result')">
|
||||
<input-copyable :label="t('tools.middle-endian-converter.texts.label-big-endian')" label-width="120px" label-position="left" :value="result.bigEndian" />
|
||||
<input-copyable :label="t('tools.middle-endian-converter.texts.label-little-endian')" label-width="120px" label-position="left" :value="result.littleEndian" />
|
||||
<input-copyable :label="t('tools.middle-endian-converter.texts.label-decimal')" label-width="120px" label-position="left" :value="result.decimal" mt-2 />
|
||||
<input-copyable :label="t('tools.middle-endian-converter.texts.label-octal')" label-width="120px" label-position="left" :value="result.octal" />
|
||||
<input-copyable :label="t('tools.middle-endian-converter.texts.label-hexadecimal')" label-width="120px" label-position="left" :value="result.hexadecimal" />
|
||||
</n-card>
|
||||
</n-space>
|
||||
</n-card>
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
import { SpeedFilled } from '@vicons/material';
|
||||
import { defineTool } from '../tool';
|
||||
import { translate as t } from '@/plugins/i18n.plugin';
|
||||
|
||||
export const tool = defineTool({
|
||||
name: 'RAID Reliability Calculator',
|
||||
name: t('tools.mttdl-calculator.title'),
|
||||
path: '/mttdl-calculator',
|
||||
description: 'Computes storage system reliability using well-known MTTDL methodology',
|
||||
description: t('tools.mttdl-calculator.description'),
|
||||
keywords: ['mttdl', 'raid', 'reliability', 'calculator'],
|
||||
component: () => import('./mttdl-calculator.vue'),
|
||||
icon: SpeedFilled,
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
<script setup>
|
||||
<script setup lang="ts">
|
||||
import { useI18n } from 'vue-i18n';
|
||||
|
||||
const { t } = useI18n();
|
||||
const form = ref({
|
||||
raidLevel: 'RAID 5',
|
||||
numDrives: 6,
|
||||
@@ -10,18 +13,18 @@ const form = ref({
|
||||
});
|
||||
|
||||
const raidOptions = [
|
||||
{ label: 'RAID 0', value: 'RAID 0' },
|
||||
{ label: 'RAID 1', value: 'RAID 1' },
|
||||
{ label: 'RAID 5', value: 'RAID 5' },
|
||||
{ label: 'RAID 6', value: 'RAID 6' },
|
||||
{ label: 'RAID 10', value: 'RAID 10' },
|
||||
{ label: 'RAID-Z1', value: 'RAID-Z1' },
|
||||
{ label: 'RAID-Z2', value: 'RAID-Z2' },
|
||||
{ label: 'RAID-Z3', value: 'RAID-Z3' },
|
||||
{ label: 'RAID 50', value: 'RAID 50' },
|
||||
{ label: t('tools.mttdl-calculator.texts.label-raid-0'), value: 'RAID 0' },
|
||||
{ label: t('tools.mttdl-calculator.texts.label-raid-1'), value: 'RAID 1' },
|
||||
{ label: t('tools.mttdl-calculator.texts.label-raid-5'), value: 'RAID 5' },
|
||||
{ label: t('tools.mttdl-calculator.texts.label-raid-6'), value: 'RAID 6' },
|
||||
{ label: t('tools.mttdl-calculator.texts.label-raid-10'), value: 'RAID 10' },
|
||||
{ label: t('tools.mttdl-calculator.texts.label-raid-z1'), value: 'RAID-Z1' },
|
||||
{ label: t('tools.mttdl-calculator.texts.label-raid-z2'), value: 'RAID-Z2' },
|
||||
{ label: t('tools.mttdl-calculator.texts.label-raid-z3'), value: 'RAID-Z3' },
|
||||
{ label: t('tools.mttdl-calculator.texts.label-raid-50'), value: 'RAID 50' },
|
||||
];
|
||||
|
||||
function basicMTTDL(raidLevel, numDrives, mtbf, rebuildTime) {
|
||||
function basicMTTDL(raidLevel: string, numDrives: number, mtbf: number, rebuildTime: number) {
|
||||
const λ = 1 / mtbf;
|
||||
switch (raidLevel) {
|
||||
case 'RAID 0':
|
||||
@@ -39,7 +42,10 @@ function basicMTTDL(raidLevel, numDrives, mtbf, rebuildTime) {
|
||||
}
|
||||
}
|
||||
|
||||
function getMTTDL({ raidLevel, numDrives, mtbf, rebuildTime, ber, driveCapacityTB }) {
|
||||
function getMTTDL(
|
||||
{ raidLevel, numDrives, mtbf, rebuildTime, ber, driveCapacityTB }:
|
||||
{ raidLevel: string; numDrives: number; mtbf: number; rebuildTime: number; ber: number; driveCapacityTB: number },
|
||||
) {
|
||||
const λ = 1 / mtbf;
|
||||
const bitsPerDrive = driveCapacityTB * 1e12 * 8;
|
||||
const unrecoverableReadProb = 1 - (1 - 10 ** ber) ** bitsPerDrive;
|
||||
@@ -68,7 +74,7 @@ const computedMTTDL = computed(() => {
|
||||
};
|
||||
});
|
||||
|
||||
function simulateFailureProbability(mttdl, years) {
|
||||
function simulateFailureProbability(mttdl: number, years: number) {
|
||||
const hours = years * 365.25 * 24;
|
||||
return 1 - Math.exp(-hours / mttdl);
|
||||
}
|
||||
@@ -79,108 +85,108 @@ const failureProbability = computed(() =>
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<NCard title="MTTDL & Failure Probability Calculator" style="max-width: 600px; margin: auto;">
|
||||
<NCard :title="t('tools.mttdl-calculator.texts.title-mttdl-failure-probability-calculator')" style="max-width: 600px; margin: auto;">
|
||||
<NForm :model="form" label-width="190px" label-placement="left">
|
||||
<NFormItem label="RAID Level:">
|
||||
<NSelect v-model:value="form.raidLevel" :options="raidOptions" placeholder="Select RAID level" />
|
||||
<NFormItem :label="t('tools.mttdl-calculator.texts.label-raid-level')">
|
||||
<NSelect v-model:value="form.raidLevel" :options="raidOptions" :placeholder="t('tools.mttdl-calculator.texts.placeholder-select-raid-level')" />
|
||||
</NFormItem>
|
||||
<NFormItem label="Number of Drives:">
|
||||
<NFormItem :label="t('tools.mttdl-calculator.texts.label-number-of-drives')">
|
||||
<NInputNumber v-model:value="form.numDrives" :min="1" />
|
||||
</NFormItem>
|
||||
<NFormItem label="Drive MTBF (hours):">
|
||||
<NFormItem :label="t('tools.mttdl-calculator.texts.label-drive-mtbf-hours')">
|
||||
<NInputNumber v-model:value="form.mtbf" :min="1" />
|
||||
</NFormItem>
|
||||
<NFormItem label="Rebuild Time (hours):">
|
||||
<NFormItem :label="t('tools.mttdl-calculator.texts.label-rebuild-time-hours')">
|
||||
<NInputNumber v-model:value="form.rebuildTime" :min="1" />
|
||||
</NFormItem>
|
||||
<NFormItem label="Bit Error Rate (BER in 1eX):">
|
||||
<NFormItem :label="t('tools.mttdl-calculator.texts.label-bit-error-rate-ber-in-1ex')">
|
||||
<NInputNumber v-model:value="form.ber" :min="-18" :max="-6" />
|
||||
</NFormItem>
|
||||
<NFormItem label="Drive Capacity (TB):">
|
||||
<NFormItem :label="t('tools.mttdl-calculator.texts.label-drive-capacity-tb')">
|
||||
<NInputNumber v-model:value="form.driveCapacityTB" :min="1" />
|
||||
</NFormItem>
|
||||
<NFormItem label="Years for Failure probability:">
|
||||
<NFormItem :label="t('tools.mttdl-calculator.texts.label-years-for-failure-probability')">
|
||||
<NInputNumber v-model:value="form.yearsToSimulate" :min="1" />
|
||||
</NFormItem>
|
||||
|
||||
<NDivider />
|
||||
|
||||
<NFormItem label="MTTDL (hours):">
|
||||
<NFormItem :label="t('tools.mttdl-calculator.texts.label-mttdl-hours')">
|
||||
<input-copyable :value="computedMTTDL.hours.toFixed(2)" />
|
||||
</NFormItem>
|
||||
<NFormItem label="MTTDL (years):">
|
||||
<NFormItem :label="t('tools.mttdl-calculator.texts.label-mttdl-years')">
|
||||
<input-copyable :value="computedMTTDL.years.toFixed(2)" />
|
||||
</NFormItem>
|
||||
<NFormItem label="Failure Probability:">
|
||||
<NFormItem :label="t('tools.mttdl-calculator.texts.label-failure-probability')">
|
||||
<input-copyable :value="`${(failureProbability * 100).toFixed(4)}%`" />
|
||||
</NFormItem>
|
||||
|
||||
<NDivider />
|
||||
|
||||
<details>
|
||||
<summary>🧠 Key Terms Explained</summary>
|
||||
<summary>{{ t('tools.mttdl-calculator.texts.tag-key-terms-explained') }}</summary>
|
||||
|
||||
<h3>💾 RAID Level</h3>
|
||||
<p>RAID (Redundant Array of Independent Disks) is a method of combining multiple physical drives into one logical unit to improve performance, redundancy, or both.</p>
|
||||
<h3>{{ t('tools.mttdl-calculator.texts.tag-raid-level') }}</h3>
|
||||
<p>{{ t('tools.mttdl-calculator.texts.tag-raid-redundant-array-of-independent-disks-is-a-method-of-combining-multiple-physical-drives-into-one-logical-unit-to-improve-performance-redundancy-or-both') }}</p>
|
||||
<table border="1" cellpadding="8" cellspacing="0">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>RAID Level</th>
|
||||
<th>Description</th>
|
||||
<th>{{ t('tools.mttdl-calculator.texts.tag-raid-level') }}</th>
|
||||
<th>{{ t('tools.mttdl-calculator.texts.tag-description') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>RAID 0</td>
|
||||
<td>Striping only. No redundancy. Fast but risky—if one drive fails, all data is lost.</td>
|
||||
<td>{{ t('tools.mttdl-calculator.texts.tag-raid-0') }}</td>
|
||||
<td>{{ t('tools.mttdl-calculator.texts.tag-striping-only-no-redundancy-fast-but-risky-if-one-drive-fails-all-data-is-lost') }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>RAID 1</td>
|
||||
<td>Mirroring. Data is duplicated across drives. High redundancy, low capacity efficiency.</td>
|
||||
<td>{{ t('tools.mttdl-calculator.texts.tag-raid-1') }}</td>
|
||||
<td>{{ t('tools.mttdl-calculator.texts.tag-mirroring-data-is-duplicated-across-drives-high-redundancy-low-capacity-efficiency') }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>RAID 5</td>
|
||||
<td>Striping with parity. Can tolerate one drive failure. Balanced speed and redundancy.</td>
|
||||
<td>{{ t('tools.mttdl-calculator.texts.tag-raid-5') }}</td>
|
||||
<td>{{ t('tools.mttdl-calculator.texts.tag-striping-with-parity-can-tolerate-one-drive-failure-balanced-speed-and-redundancy') }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>RAID 6</td>
|
||||
<td>Double parity. Can survive two drive failures.</td>
|
||||
<td>{{ t('tools.mttdl-calculator.texts.tag-raid-6') }}</td>
|
||||
<td>{{ t('tools.mttdl-calculator.texts.tag-double-parity-can-survive-two-drive-failures') }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>RAID 10</td>
|
||||
<td>Mirrored pairs striped together. High performance and redundancy.</td>
|
||||
<td>{{ t('tools.mttdl-calculator.texts.tag-raid-10') }}</td>
|
||||
<td>{{ t('tools.mttdl-calculator.texts.tag-mirrored-pairs-striped-together-high-performance-and-redundancy') }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>RAID-Z1/Z2/Z3</td>
|
||||
<td>ZFS-based RAID levels with single, double, or triple parity. Designed for data integrity.</td>
|
||||
<td>{{ t('tools.mttdl-calculator.texts.tag-raid-z1-z2-z3') }}</td>
|
||||
<td>{{ t('tools.mttdl-calculator.texts.tag-zfs-based-raid-levels-with-single-double-or-triple-parity-designed-for-data-integrity') }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>RAID 50</td>
|
||||
<td>Stripe of RAID 5 arrays. Combines performance of RAID 0 with redundancy of RAID 5.</td>
|
||||
<td>{{ t('tools.mttdl-calculator.texts.tag-raid-50') }}</td>
|
||||
<td>{{ t('tools.mttdl-calculator.texts.tag-stripe-of-raid-5-arrays-combines-performance-of-raid-0-with-redundancy-of-raid-5') }}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<h3>⏱️ MTBF (Mean Time Between Failures)</h3>
|
||||
<p>The average time (in hours) a drive is expected to operate before failing. Higher MTBF means more reliable hardware.</p>
|
||||
<h3>{{ t('tools.mttdl-calculator.texts.tag-️-mtbf-mean-time-between-failures') }}</h3>
|
||||
<p>{{ t('tools.mttdl-calculator.texts.tag-the-average-time-in-hours-a-drive-is-expected-to-operate-before-failing-higher-mtbf-means-more-reliable-hardware') }}</p>
|
||||
|
||||
<h3>🔁 Rebuild Time</h3>
|
||||
<p>The time required to reconstruct data on a replacement drive after a failure. Longer rebuild times increase the risk of a second failure during recovery.</p>
|
||||
<h3>{{ t('tools.mttdl-calculator.texts.tag-rebuild-time') }}</h3>
|
||||
<p>{{ t('tools.mttdl-calculator.texts.tag-the-time-required-to-reconstruct-data-on-a-replacement-drive-after-a-failure-longer-rebuild-times-increase-the-risk-of-a-second-failure-during-recovery') }}</p>
|
||||
|
||||
<h3>📉 MTTDL (Mean Time To Data Loss)</h3>
|
||||
<p>A statistical estimate of how long a RAID system can operate before data loss occurs. It considers drive failures, rebuild time, and RAID redundancy. Higher MTTDL means a safer system.</p>
|
||||
<h3>{{ t('tools.mttdl-calculator.texts.tag-mttdl-mean-time-to-data-loss') }}</h3>
|
||||
<p>{{ t('tools.mttdl-calculator.texts.tag-a-statistical-estimate-of-how-long-a-raid-system-can-operate-before-data-loss-occurs-it-considers-drive-failures-rebuild-time-and-raid-redundancy-higher-mttdl-means-a-safer-system') }}</p>
|
||||
|
||||
<h3>🧮 Bit Error Rate (BER)</h3>
|
||||
<p>The probability that a bit read from a disk will be incorrect due to hardware limitations. Even tiny BERs (like 1 in a trillion) can cause issues during rebuilds, especially with large drives.</p>
|
||||
<h3>{{ t('tools.mttdl-calculator.texts.tag-bit-error-rate-ber') }}</h3>
|
||||
<p>{{ t('tools.mttdl-calculator.texts.tag-the-probability-that-a-bit-read-from-a-disk-will-be-incorrect-due-to-hardware-limitations-even-tiny-bers-like-1-in-a-trillion-can-cause-issues-during-rebuilds-especially-with-large-drives') }}</p>
|
||||
|
||||
<h3>🧠 Unrecoverable Read Error (URE)</h3>
|
||||
<p>Occurs when a drive fails to read a sector during rebuild. BER contributes to URE risk, which can compromise RAID recovery.</p>
|
||||
<h3>{{ t('tools.mttdl-calculator.texts.tag-unrecoverable-read-error-ure') }}</h3>
|
||||
<p>{{ t('tools.mttdl-calculator.texts.tag-occurs-when-a-drive-fails-to-read-a-sector-during-rebuild-ber-contributes-to-ure-risk-which-can-compromise-raid-recovery') }}</p>
|
||||
|
||||
<h3>📦 Drive Capacity (TB)</h3>
|
||||
<p>Total storage per drive. Larger drives take longer to rebuild and are more susceptible to BER-related errors.</p>
|
||||
<h3>{{ t('tools.mttdl-calculator.texts.tag-drive-capacity-tb') }}</h3>
|
||||
<p>{{ t('tools.mttdl-calculator.texts.tag-total-storage-per-drive-larger-drives-take-longer-to-rebuild-and-are-more-susceptible-to-ber-related-errors') }}</p>
|
||||
|
||||
<h3>📈 Failure Probability</h3>
|
||||
<p>The chance that the RAID system will experience data loss over a given time period (e.g., 5 years). Calculated using MTTDL and exponential failure models.</p>
|
||||
<h3>{{ t('tools.mttdl-calculator.texts.tag-failure-probability') }}</h3>
|
||||
<p>{{ t('tools.mttdl-calculator.texts.tag-the-chance-that-the-raid-system-will-experience-data-loss-over-a-given-time-period-e-g-5-years-calculated-using-mttdl-and-exponential-failure-models') }}</p>
|
||||
</details>
|
||||
</NForm>
|
||||
</NCard>
|
||||
|
||||
@@ -44,10 +44,10 @@ const rules: UseValidationRule<string>[] = [
|
||||
|
||||
<template>
|
||||
<format-transformer
|
||||
:input-label="t('tools.nginx-formatter.texts.input-label-your-nginx-config')"
|
||||
:input-:label="t('tools.nginx-formatter.texts.label-t-tools-nginx-formatter-texts-input-label-your-nginx-config')"
|
||||
:input-default="defaultValue"
|
||||
:input-placeholder="t('tools.nginx-formatter.texts.input-placeholder-paste-your-nginx-config-here')"
|
||||
:output-label="t('tools.nginx-formatter.texts.output-label-prettified-nginx-config')"
|
||||
:input-:placeholder="t('tools.nginx-formatter.texts.placeholder-t-tools-nginx-formatter-texts-input-placeholder-paste-your-nginx-config-here')"
|
||||
:output-:label="t('tools.nginx-formatter.texts.label-t-tools-nginx-formatter-texts-output-label-prettified-nginx-config')"
|
||||
:input-validation-rules="rules"
|
||||
:transformer="transformer"
|
||||
/>
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
import { BatteryCharging } from '@vicons/tabler';
|
||||
import { defineTool } from '../tool';
|
||||
import { translate as t } from '@/plugins/i18n.plugin';
|
||||
|
||||
export const tool = defineTool({
|
||||
name: 'Pack files for AI',
|
||||
name: t('tools.pack-files-for-ai.title'),
|
||||
path: '/pack-files-for-ai',
|
||||
description: 'Pack a directory of code source files to a single AI parsable form (like repomix)',
|
||||
description: t('tools.pack-files-for-ai.description'),
|
||||
keywords: ['pack', 'files', 'source', 'code', 'gpt', 'claude', 'repomix', 'ai'],
|
||||
component: () => import('./pack-files-for-ai.vue'),
|
||||
icon: BatteryCharging,
|
||||
|
||||
@@ -1,7 +1,10 @@
|
||||
<script setup lang="ts">
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import type { UploadFileInfo } from 'naive-ui';
|
||||
import { useQueryParamOrStorage } from '@/composable/queryParams';
|
||||
|
||||
const { t } = useI18n();
|
||||
|
||||
const files = ref<Array<UploadFileInfo>>([]);
|
||||
const treeData = ref<Array<FileDesc>>([]);
|
||||
const outputFormat = useQueryParamOrStorage({ name: 'fmt', storageName: 'pack-ai:f', defaultValue: 'markdown' });
|
||||
@@ -88,10 +91,7 @@ async function generateXML(fileList: Array<UploadFileInfo>) {
|
||||
This file is a merged representation of the entire codebase, combined into a single document by Repomix.
|
||||
The content has been processed where security check has been disabled.
|
||||
|
||||
<file_summary>
|
||||
This section contains a summary of this file.
|
||||
|
||||
<purpose>
|
||||
<file_summary>{{ t('tools.pack-files-for-ai.texts.tag-this-section-contains-a-summary-of-this-file') }}<purpose>
|
||||
This file contains a packed representation of the entire repository's contents.
|
||||
It is designed to be easily consumable by AI systems for analysis, code review,
|
||||
or other automated processes.
|
||||
@@ -256,7 +256,7 @@ function processSourceCode(
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<n-card title="Repomix like AI Pack Generator">
|
||||
<n-card :title="t('tools.pack-files-for-ai.texts.title-repomix-like-ai-pack-generator')">
|
||||
<n-upload
|
||||
multiple
|
||||
directory-dnd
|
||||
@@ -266,53 +266,53 @@ function processSourceCode(
|
||||
>
|
||||
<n-upload-dragger>
|
||||
<n-text style="font-size: 16px">
|
||||
Click or drag code source files or folder to this area to add to package
|
||||
{{ t('tools.pack-files-for-ai.texts.tag-click-or-drag-code-source-files-or-folder-to-this-area-to-add-to-package') }}
|
||||
</n-text>
|
||||
</n-upload-dragger>
|
||||
</n-upload>
|
||||
|
||||
<n-space justify="center" mb-2>
|
||||
<n-checkbox v-model:checked="showFiles">
|
||||
Show uploaded files
|
||||
{{ t('tools.pack-files-for-ai.texts.tag-show-uploaded-files') }}
|
||||
</n-checkbox>
|
||||
</n-space>
|
||||
|
||||
<n-form-item label="Directory Structure:">
|
||||
<n-form-item :label="t('tools.pack-files-for-ai.texts.label-directory-structure')">
|
||||
<n-tree :data="treeData" block-line />
|
||||
</n-form-item>
|
||||
|
||||
<n-form-item label="Include Files (RegExp):" label-placement="left">
|
||||
<n-input v-model:value="includePattern" placeholder="Include pattern (RegExp)" />
|
||||
<n-form-item :label="t('tools.pack-files-for-ai.texts.label-include-files-regexp')" label-placement="left">
|
||||
<n-input v-model:value="includePattern" :placeholder="t('tools.pack-files-for-ai.texts.placeholder-include-pattern-regexp')" />
|
||||
</n-form-item>
|
||||
<n-form-item label="Exclude Files (RegExp):" label-placement="left">
|
||||
<n-input v-model:value="excludePattern" placeholder="Exclude pattern (RegExp)" style="margin-top: 8px;" />
|
||||
<n-form-item :label="t('tools.pack-files-for-ai.texts.label-exclude-files-regexp')" label-placement="left">
|
||||
<n-input v-model:value="excludePattern" :placeholder="t('tools.pack-files-for-ai.texts.placeholder-exclude-pattern-regexp')" style="margin-top: 8px;" />
|
||||
</n-form-item>
|
||||
|
||||
<n-card title="Options" mb-2>
|
||||
<n-card :title="t('tools.pack-files-for-ai.texts.title-options')" mb-2>
|
||||
<n-space justify="space-evenly">
|
||||
<n-checkbox v-model:checked="fileSummary">
|
||||
Include file summary
|
||||
{{ t('tools.pack-files-for-ai.texts.tag-include-file-summary') }}
|
||||
</n-checkbox>
|
||||
<n-checkbox v-model:checked="directoryStructure">
|
||||
Include directory structure
|
||||
{{ t('tools.pack-files-for-ai.texts.tag-include-directory-structure') }}
|
||||
</n-checkbox>
|
||||
<n-checkbox v-model:checked="lineNumbers">
|
||||
Show line numbers
|
||||
{{ t('tools.pack-files-for-ai.texts.tag-show-line-numbers') }}
|
||||
</n-checkbox>
|
||||
<n-checkbox v-model:checked="removeEmptyLines">
|
||||
Remove Empty Lines
|
||||
{{ t('tools.pack-files-for-ai.texts.tag-remove-empty-lines') }}
|
||||
</n-checkbox>
|
||||
<n-checkbox v-model:checked="removeComments">
|
||||
Remove comments
|
||||
{{ t('tools.pack-files-for-ai.texts.tag-remove-comments') }}
|
||||
</n-checkbox>
|
||||
</n-space>
|
||||
</n-card>
|
||||
|
||||
<n-space justify="center">
|
||||
<n-form-item label="Output Format:" label-placement="left">
|
||||
<n-form-item :label="t('tools.pack-files-for-ai.texts.label-output-format')" label-placement="left">
|
||||
<n-radio-group v-model:value="outputFormat">
|
||||
<n-radio-button label="XML" value="xml" />
|
||||
<n-radio-button label="Markdown" value="markdown" />
|
||||
<n-radio-button :label="t('tools.pack-files-for-ai.texts.label-xml')" value="xml" />
|
||||
<n-radio-button :label="t('tools.pack-files-for-ai.texts.label-markdown')" value="markdown" />
|
||||
</n-radio-group>
|
||||
</n-form-item>
|
||||
</n-space>
|
||||
@@ -323,6 +323,6 @@ function processSourceCode(
|
||||
</n-button>
|
||||
</n-space>
|
||||
|
||||
<textarea-copyable label="Output Preview:" download :download-file-name="`output.${(outputFormat === 'xml' ? '.xml' : '.md')}`" :value="output" :language="outputFormat" />
|
||||
<textarea-copyable :label="t('tools.pack-files-for-ai.texts.label-output-preview')" download :download-file-name="`output.${(outputFormat === 'xml' ? '.xml' : '.md')}`" :value="output" :language="outputFormat" />
|
||||
</n-card>
|
||||
</template>
|
||||
@@ -31,10 +31,10 @@ const rules: UseValidationRule<string>[] = [
|
||||
|
||||
<template>
|
||||
<format-transformer
|
||||
:input-label="t('tools.php-array-to-json.texts.input-label-your-php-array')"
|
||||
:input-:label="t('tools.php-array-to-json.texts.label-t-tools-php-array-to-json-texts-input-label-your-php-array')"
|
||||
:input-default="defaultValue"
|
||||
:input-placeholder="t('tools.php-array-to-json.texts.input-placeholder-paste-your-php-array-here')"
|
||||
:output-label="t('tools.php-array-to-json.texts.output-label-json-version')"
|
||||
:input-:placeholder="t('tools.php-array-to-json.texts.placeholder-t-tools-php-array-to-json-texts-input-placeholder-paste-your-php-array-here')"
|
||||
:output-:label="t('tools.php-array-to-json.texts.label-t-tools-php-array-to-json-texts-output-label-json-version')"
|
||||
output-language="json"
|
||||
:input-validation-rules="rules"
|
||||
:transformer="transformer"
|
||||
|
||||
@@ -44,20 +44,20 @@ function toProperties(value: string) {
|
||||
<template>
|
||||
<c-card :title="t('tools.properties-converter.texts.title-properties-to-yaml')">
|
||||
<format-transformer
|
||||
:input-label="t('tools.properties-converter.texts.input-label-your-properties-content')"
|
||||
:input-:label="t('tools.properties-converter.texts.label-t-tools-properties-converter-texts-input-label-your-properties-content')"
|
||||
:input-default="defaultPropertiesValue"
|
||||
:input-placeholder="t('tools.properties-converter.texts.input-placeholder-paste-your-properties-content-here')"
|
||||
:output-label="t('tools.properties-converter.texts.output-label-yaml-version')"
|
||||
:input-:placeholder="t('tools.properties-converter.texts.placeholder-t-tools-properties-converter-texts-input-placeholder-paste-your-properties-content-here')"
|
||||
:output-:label="t('tools.properties-converter.texts.label-t-tools-properties-converter-texts-output-label-yaml-version')"
|
||||
output-language="yaml"
|
||||
:transformer="fromProperties"
|
||||
/>
|
||||
</c-card>
|
||||
<c-card :title="t('tools.properties-converter.texts.title-yaml-to-properties')">
|
||||
<format-transformer
|
||||
:input-label="t('tools.properties-converter.texts.input-label-your-yaml-content')"
|
||||
:input-:label="t('tools.properties-converter.texts.label-t-tools-properties-converter-texts-input-label-your-yaml-content')"
|
||||
:input-default="defaultYamlValue"
|
||||
:input-placeholder="t('tools.properties-converter.texts.input-placeholder-paste-your-yaml-content-here')"
|
||||
:output-label="t('tools.properties-converter.texts.output-label-properties-version')"
|
||||
:input-:placeholder="t('tools.properties-converter.texts.placeholder-t-tools-properties-converter-texts-input-placeholder-paste-your-yaml-content-here')"
|
||||
:output-:label="t('tools.properties-converter.texts.label-t-tools-properties-converter-texts-output-label-properties-version')"
|
||||
output-language="ini"
|
||||
:transformer="toProperties"
|
||||
/>
|
||||
|
||||
@@ -10,18 +10,18 @@ const { t } = useI18n();
|
||||
<div>
|
||||
<c-card :title="t('tools.quote-converter.texts.title-single-quotes-to-double-quotes')" mb-2>
|
||||
<format-transformer
|
||||
:input-label="t('tools.quote-converter.texts.input-label-single-quoted-string')"
|
||||
:input-placeholder="t('tools.quote-converter.texts.input-placeholder-paste-your-single-quoted-string-here')"
|
||||
:output-label="t('tools.quote-converter.texts.output-label-double-quoted-string')"
|
||||
:input-:label="t('tools.quote-converter.texts.label-t-tools-quote-converter-texts-input-label-single-quoted-string')"
|
||||
:input-:placeholder="t('tools.quote-converter.texts.placeholder-t-tools-quote-converter-texts-input-placeholder-paste-your-single-quoted-string-here')"
|
||||
:output-:label="t('tools.quote-converter.texts.label-t-tools-quote-converter-texts-output-label-double-quoted-string')"
|
||||
:transformer="toDoubleQuotes"
|
||||
/>
|
||||
</c-card>
|
||||
|
||||
<c-card :title="t('tools.quote-converter.texts.title-double-quotes-to-single-quotes')">
|
||||
<format-transformer
|
||||
:input-label="t('tools.quote-converter.texts.input-label-double-quoted-string')"
|
||||
:input-placeholder="t('tools.quote-converter.texts.input-placeholder-paste-your-double-quoted-string-here')"
|
||||
:output-label="t('tools.quote-converter.texts.output-label-single-quoted-string')"
|
||||
:input-:label="t('tools.quote-converter.texts.label-t-tools-quote-converter-texts-input-label-double-quoted-string')"
|
||||
:input-:placeholder="t('tools.quote-converter.texts.placeholder-t-tools-quote-converter-texts-input-placeholder-paste-your-double-quoted-string-here')"
|
||||
:output-:label="t('tools.quote-converter.texts.label-t-tools-quote-converter-texts-output-label-single-quoted-string')"
|
||||
:transformer="toSingleQuotes"
|
||||
/>
|
||||
</c-card>
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
import { ArrowsShuffle } from '@vicons/tabler';
|
||||
import { defineTool } from '../tool';
|
||||
import { translate as t } from '@/plugins/i18n.plugin';
|
||||
|
||||
export const tool = defineTool({
|
||||
name: 'Random numbers generator',
|
||||
name: t('tools.random-numbers-generator.title'),
|
||||
path: '/random-numbers-generator',
|
||||
description: 'Generate random numbers (decimal, hexadecimal). With denied characters, you can generate other bases.',
|
||||
description: t('tools.random-numbers-generator.description'),
|
||||
keywords: ['random', 'numbers', 'decimal', 'hexadecimal', 'generator'],
|
||||
component: () => import('./random-numbers-generator.vue'),
|
||||
icon: ArrowsShuffle,
|
||||
|
||||
@@ -40,10 +40,10 @@ const { copy } = useCopy({ source: numbers, text: t('tools.random-numbers-genera
|
||||
<n-form-item label-placement="left">
|
||||
<n-radio-group v-model:value="numberMode">
|
||||
<n-radio value="hexa">
|
||||
Hexadecimal
|
||||
{{ t('tools.random-numbers-generator.texts.tag-hexadecimal') }}
|
||||
</n-radio>
|
||||
<n-radio value="dec">
|
||||
Decimal
|
||||
{{ t('tools.random-numbers-generator.texts.tag-decimal') }}
|
||||
</n-radio>
|
||||
</n-radio-group>
|
||||
</n-form-item>
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
import { Hammer } from '@vicons/tabler';
|
||||
import { defineTool } from '../tool';
|
||||
import { translate as t } from '@/plugins/i18n.plugin';
|
||||
|
||||
export const tool = defineTool({
|
||||
name: 'Resistor Calculator',
|
||||
name: t('tools.resistor-calculator.title'),
|
||||
path: '/resistor-calculator',
|
||||
description: 'Compute Resistor values from/to band colors',
|
||||
description: t('tools.resistor-calculator.description'),
|
||||
keywords: ['resistor', 'ohm', 'calculator'],
|
||||
component: () => import('./resistor-calculator.vue'),
|
||||
icon: Hammer,
|
||||
|
||||
@@ -1,16 +1,19 @@
|
||||
<script setup lang="ts">
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import { ref } from 'vue';
|
||||
import { bandsToNotation, notationToBands, notationToValue, valueToNotation } from 'resistor-data';
|
||||
|
||||
const { t } = useI18n();
|
||||
|
||||
const bandsInput = ref('');
|
||||
const bandsResult = ref('');
|
||||
const bandPreview = ref<string[]>([]);
|
||||
const bandsError = ref('');
|
||||
const bandCount = ref(4);
|
||||
const bandOptions = [
|
||||
{ label: '4-band', value: 4 },
|
||||
{ label: '5-band', value: 5 },
|
||||
{ label: '6-band', value: 6 },
|
||||
{ label: t('tools.resistor-calculator.texts.label-4-band'), value: 4 },
|
||||
{ label: t('tools.resistor-calculator.texts.label-5-band'), value: 5 },
|
||||
{ label: t('tools.resistor-calculator.texts.label-6-band'), value: 6 },
|
||||
];
|
||||
|
||||
const layout = ref('axial');
|
||||
@@ -25,10 +28,10 @@ const numberNotationResult = ref('');
|
||||
const numberError = ref('');
|
||||
const tolerance = ref(5);
|
||||
const toleranceOptions = [
|
||||
{ label: '±1%', value: 1 },
|
||||
{ label: '±2%', value: 2 },
|
||||
{ label: '±5%', value: 5 },
|
||||
{ label: '±10%', value: 10 },
|
||||
{ label: t('tools.resistor-calculator.texts.label-1'), value: 1 },
|
||||
{ label: t('tools.resistor-calculator.texts.label-2'), value: 2 },
|
||||
{ label: t('tools.resistor-calculator.texts.label-5'), value: 5 },
|
||||
{ label: t('tools.resistor-calculator.texts.label-10'), value: 10 },
|
||||
];
|
||||
|
||||
const notationToNumberInput = ref('');
|
||||
@@ -115,24 +118,24 @@ function getColorHex(color: string) {
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<n-card title="Resistor Converter" style="max-width: 700px; margin: auto;">
|
||||
<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-select v-model:value="bandCount" mb-1 :options="bandOptions" label="Band Count" style="margin-bottom: 10px" />
|
||||
<n-input v-model:value="bandsInput" placeholder="e.g. red, violet, brown, gold" />
|
||||
<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>
|
||||
Valid colors: {{ validColors.join(', ') }}
|
||||
</n-p>
|
||||
<n-space justify="center" mb-2>
|
||||
<n-button @click="convertBandsToNotation">
|
||||
Convert
|
||||
{{ t('tools.resistor-calculator.texts.tag-convert') }}
|
||||
</n-button>
|
||||
</n-space>
|
||||
<n-alert v-if="bandsError" type="error">
|
||||
{{ bandsError }}
|
||||
</n-alert>
|
||||
<n-result v-if="bandsResult" mb-2 status="success" title="Standard Notation" :description="bandsResult" />
|
||||
<n-result v-if="bandsResult" mb-2 status="success" :title="t('tools.resistor-calculator.texts.title-standard-notation')" :description="bandsResult" />
|
||||
<n-space v-if="bandPreview.length" justify="center" mb-2>
|
||||
<n-tag v-for="(color, index) in bandPreview" :key="index" :style="{ 'background-color': getColorHex(color) }" round>
|
||||
{{ color }}
|
||||
@@ -141,10 +144,10 @@ function getColorHex(color: string) {
|
||||
<n-space justify="center" mb-1>
|
||||
<n-radio-group v-model:value="layout">
|
||||
<n-radio-button value="axial">
|
||||
Axial
|
||||
{{ t('tools.resistor-calculator.texts.tag-axial') }}
|
||||
</n-radio-button>
|
||||
<n-radio-button value="radial">
|
||||
Radial
|
||||
{{ t('tools.resistor-calculator.texts.tag-radial') }}
|
||||
</n-radio-button>
|
||||
</n-radio-group>
|
||||
</n-space>
|
||||
@@ -184,17 +187,17 @@ function getColorHex(color: string) {
|
||||
|
||||
<!-- Notation → Bands -->
|
||||
<n-tab-pane name="notation-to-bands" tab="Notation → Bands">
|
||||
<n-input v-model:value="notationInput" placeholder="e.g. 2k7Ω ±5% or 2k7 5%" mb-2 />
|
||||
<n-select v-model:value="notationBandCount" mb-1 :options="bandOptions" label="Band Count" style="margin-bottom: 10px" />
|
||||
<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>
|
||||
<n-button @click="convertNotationToBands">
|
||||
Convert
|
||||
{{ t('tools.resistor-calculator.texts.tag-convert') }}
|
||||
</n-button>
|
||||
</n-space>
|
||||
<n-alert v-if="notationError" type="error" mb-1>
|
||||
{{ notationError }}
|
||||
</n-alert>
|
||||
<n-result v-if="notationBandsResult.length" mb-1 status="success" title="Resistor Bands" :description="`Result: ${notationBandsResult.join(', ')}`" />
|
||||
<n-result v-if="notationBandsResult.length" mb-1 status="success" :title="t('tools.resistor-calculator.texts.title-resistor-bands')" :description="`Result: ${notationBandsResult.join(', ')}`" />
|
||||
<n-space v-if="notationBandsResult.length" justify="center" mb-3>
|
||||
<n-tag v-for="(color, index) in notationBandsResult" :key="index" :style="{ 'background-color': getColorHex(color) }" round>
|
||||
{{ color }}
|
||||
@@ -203,10 +206,10 @@ function getColorHex(color: string) {
|
||||
<n-space justify="center" mb-1>
|
||||
<n-radio-group v-model:value="layout">
|
||||
<n-radio-button value="axial">
|
||||
Axial
|
||||
{{ t('tools.resistor-calculator.texts.tag-axial') }}
|
||||
</n-radio-button>
|
||||
<n-radio-button value="radial">
|
||||
Radial
|
||||
{{ t('tools.resistor-calculator.texts.tag-radial') }}
|
||||
</n-radio-button>
|
||||
</n-radio-group>
|
||||
</n-space>
|
||||
@@ -246,31 +249,31 @@ function getColorHex(color: string) {
|
||||
|
||||
<!-- Number → Notation -->
|
||||
<n-tab-pane name="number-to-notation" tab="Number → Notation">
|
||||
<n-input-number v-model:value="numberInput" placeholder="e.g. 2700" mb-1 />
|
||||
<n-select v-model:value="tolerance" :options="toleranceOptions" label="Tolerance" mb-1 />
|
||||
<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>
|
||||
<n-button @click="convertNumberToNotation">
|
||||
Convert
|
||||
{{ t('tools.resistor-calculator.texts.tag-convert') }}
|
||||
</n-button>
|
||||
</n-space>
|
||||
<n-alert v-if="numberError" type="error">
|
||||
{{ numberError }}
|
||||
</n-alert>
|
||||
<n-result v-if="numberNotationResult" status="success" title="Standard Notation" :description="`Result: ${numberNotationResult}`" />
|
||||
<n-result v-if="numberNotationResult" status="success" :title="t('tools.resistor-calculator.texts.title-standard-notation')" :description="`Result: ${numberNotationResult}`" />
|
||||
</n-tab-pane>
|
||||
|
||||
<!-- Notation → Number -->
|
||||
<n-tab-pane name="notation-to-number" tab="Notation → Number">
|
||||
<n-input v-model:value="notationToNumberInput" placeholder="e.g. 2k7Ω ±5% or 2k7 5%" />
|
||||
<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">
|
||||
Convert
|
||||
{{ t('tools.resistor-calculator.texts.tag-convert') }}
|
||||
</n-button>
|
||||
</n-space>
|
||||
<n-alert v-if="notationToNumberError" type="error">
|
||||
{{ notationToNumberError }}
|
||||
</n-alert>
|
||||
<n-result v-if="notationToNumberResult !== null" status="success" title="Numeric Value" :description="`Result: ${notationToNumberResult}Ω`" />
|
||||
<n-result v-if="notationToNumberResult !== null" status="success" :title="t('tools.resistor-calculator.texts.title-numeric-value')" :description="`Result: ${notationToNumberResult}Ω`" />
|
||||
</n-tab-pane>
|
||||
</n-tabs>
|
||||
</n-card>
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
import { CursorText } from '@vicons/tabler';
|
||||
import { defineTool } from '../tool';
|
||||
import { translate as t } from '@/plugins/i18n.plugin';
|
||||
|
||||
export const tool = defineTool({
|
||||
name: 'Sed Command generator',
|
||||
name: t('tools.sed-command-generator.title'),
|
||||
path: '/sed-command-generator',
|
||||
description: 'Generate unix sed commands',
|
||||
description: t('tools.sed-command-generator.description'),
|
||||
keywords: ['sed', 'command', 'generator'],
|
||||
component: () => import('./sed-command-generator.vue'),
|
||||
icon: CursorText,
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
<script setup lang="ts">
|
||||
import { useI18n } from 'vue-i18n';
|
||||
|
||||
const { t } = useI18n();
|
||||
const form = ref({
|
||||
commandType: 'substitute', // substitute | delete | extract | number
|
||||
pattern: '',
|
||||
@@ -66,73 +69,73 @@ const sedCommand = computed(() => {
|
||||
<div>
|
||||
<n-space justify="center" mb-1 mt-1>
|
||||
<n-p>
|
||||
For more information about <code>sed</code> command, see <router-link target="_blank" to="/sed-memo">
|
||||
Sed Command Cheatsheet
|
||||
{{ t('tools.sed-command-generator.texts.tag-for-more-information-about') }}<code>{{ t('tools.sed-command-generator.texts.tag-sed') }}</code>{{ t('tools.sed-command-generator.texts.tag-command-see') }}<router-link target="_blank" to="/sed-memo">
|
||||
{{ t('tools.sed-command-generator.texts.tag-sed-command-cheatsheet') }}
|
||||
</router-link>
|
||||
</n-p>
|
||||
</n-space>
|
||||
|
||||
<n-form :model="form" label-placement="left" label-width="120px" mt-2>
|
||||
<n-space justify="center" mb-1 mt-1>
|
||||
<n-form-item label="Command Type:">
|
||||
<n-form-item :label="t('tools.sed-command-generator.texts.label-command-type')">
|
||||
<n-radio-group v-model:value="form.commandType" name="commandType">
|
||||
<n-radio-button value="substitute">
|
||||
Substitute
|
||||
{{ t('tools.sed-command-generator.texts.tag-substitute') }}
|
||||
</n-radio-button>
|
||||
<n-radio-button value="delete">
|
||||
Delete
|
||||
{{ t('tools.sed-command-generator.texts.tag-delete') }}
|
||||
</n-radio-button>
|
||||
<n-radio-button value="extract">
|
||||
Extract
|
||||
{{ t('tools.sed-command-generator.texts.tag-extract') }}
|
||||
</n-radio-button>
|
||||
<n-radio-button value="number">
|
||||
Number Lines
|
||||
{{ t('tools.sed-command-generator.texts.tag-number-lines') }}
|
||||
</n-radio-button>
|
||||
</n-radio-group>
|
||||
</n-form-item>
|
||||
</n-space>
|
||||
|
||||
<n-card v-if="form.commandType !== 'number'" title="Search Pattern:">
|
||||
<n-input v-model:value="form.pattern" placeholder="e.g., foo" />
|
||||
<n-card v-if="form.commandType !== 'number'" :title="t('tools.sed-command-generator.texts.title-search-pattern')">
|
||||
<n-input v-model:value="form.pattern" :placeholder="t('tools.sed-command-generator.texts.placeholder-e-g-foo')" />
|
||||
<router-link target="_blank" to="/regex-memo">
|
||||
See Regex Cheatsheet
|
||||
{{ t('tools.sed-command-generator.texts.tag-see-regex-cheatsheet') }}
|
||||
</router-link>
|
||||
</n-card>
|
||||
|
||||
<n-form-item v-if="form.commandType === 'substitute'" label="Replacement:" mt-3>
|
||||
<n-input v-model:value="form.replacement" placeholder="e.g., bar" />
|
||||
<n-form-item v-if="form.commandType === 'substitute'" :label="t('tools.sed-command-generator.texts.label-replacement')" mt-3>
|
||||
<n-input v-model:value="form.replacement" :placeholder="t('tools.sed-command-generator.texts.placeholder-e-g-bar')" />
|
||||
</n-form-item>
|
||||
|
||||
<n-form-item v-if="form.commandType === 'substitute'" label="Delimiter:">
|
||||
<n-input v-model:value="form.delimiter" placeholder="e.g., / or #" />
|
||||
<n-form-item v-if="form.commandType === 'substitute'" :label="t('tools.sed-command-generator.texts.label-delimiter')">
|
||||
<n-input v-model:value="form.delimiter" :placeholder="t('tools.sed-command-generator.texts.placeholder-e-g-or')" />
|
||||
</n-form-item>
|
||||
|
||||
<n-form-item v-if="form.commandType === 'substitute'" label="Flags:">
|
||||
<n-form-item v-if="form.commandType === 'substitute'" :label="t('tools.sed-command-generator.texts.label-flags')">
|
||||
<n-checkbox v-model:checked="form.global">
|
||||
Global (g)
|
||||
{{ t('tools.sed-command-generator.texts.tag-global-g') }}
|
||||
</n-checkbox>
|
||||
<n-checkbox v-model:checked="form.caseInsensitive">
|
||||
Case Insensitive (i)
|
||||
{{ t('tools.sed-command-generator.texts.tag-case-insensitive-i') }}
|
||||
</n-checkbox>
|
||||
</n-form-item>
|
||||
|
||||
<n-form-item label="Options:">
|
||||
<n-form-item :label="t('tools.sed-command-generator.texts.label-options')">
|
||||
<n-checkbox v-model:checked="form.inPlace">
|
||||
In-place Editing (-i)
|
||||
{{ t('tools.sed-command-generator.texts.tag-in-place-editing-i') }}
|
||||
</n-checkbox>
|
||||
<n-checkbox v-model:checked="form.extendedRegex">
|
||||
Extended Regex (-E)
|
||||
{{ t('tools.sed-command-generator.texts.tag-extended-regex-e') }}
|
||||
</n-checkbox>
|
||||
<n-checkbox v-model:checked="form.suppressPrint">
|
||||
Suppress Automatic Printing (-n)
|
||||
{{ t('tools.sed-command-generator.texts.tag-suppress-automatic-printing-n') }}
|
||||
</n-checkbox>
|
||||
</n-form-item>
|
||||
|
||||
<n-form-item label="Target File">
|
||||
<n-input v-model:value="form.targetFile" placeholder="e.g., file.txt" />
|
||||
<n-form-item :label="t('tools.sed-command-generator.texts.label-target-file')">
|
||||
<n-input v-model:value="form.targetFile" :placeholder="t('tools.sed-command-generator.texts.placeholder-e-g-file-txt')" />
|
||||
</n-form-item>
|
||||
|
||||
<c-card title="Generated Sed command:" mt-3>
|
||||
<c-card :title="t('tools.sed-command-generator.texts.title-generated-sed-command')" mt-3>
|
||||
<textarea-copyable :value="sedCommand" />
|
||||
</c-card>
|
||||
</n-form>
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
import { FileText } from '@vicons/tabler';
|
||||
import { defineTool } from '../tool';
|
||||
import { translate as t } from '@/plugins/i18n.plugin';
|
||||
|
||||
export const tool = defineTool({
|
||||
name: 'Sed cheatsheet',
|
||||
name: t('tools.sed-memo.title'),
|
||||
path: '/sed-memo',
|
||||
description: 'sed unix command cheatsheet',
|
||||
description: t('tools.sed-memo.description'),
|
||||
keywords: ['sed', 'memo', 'cheatsheet'],
|
||||
component: () => import('./sed-memo.vue'),
|
||||
icon: FileText,
|
||||
|
||||
@@ -58,10 +58,10 @@ function transformer(value: string) {
|
||||
/>
|
||||
|
||||
<format-transformer
|
||||
:input-label="t('tools.sensitive-data-masker.texts.input-label-your-log-textual-data')"
|
||||
:input-:label="t('tools.sensitive-data-masker.texts.label-t-tools-sensitive-data-masker-texts-input-label-your-log-textual-data')"
|
||||
:input-default="defaultValue"
|
||||
:input-placeholder="t('tools.sensitive-data-masker.texts.input-placeholder-paste-your-log-textual-data-here')"
|
||||
:output-label="t('tools.sensitive-data-masker.texts.output-label-cleaned-version')"
|
||||
:input-:placeholder="t('tools.sensitive-data-masker.texts.placeholder-t-tools-sensitive-data-masker-texts-input-placeholder-paste-your-log-textual-data-here')"
|
||||
:output-:label="t('tools.sensitive-data-masker.texts.label-t-tools-sensitive-data-masker-texts-output-label-cleaned-version')"
|
||||
:transformer="transformer"
|
||||
/>
|
||||
</div>
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
import { Share } from '@vicons/tabler';
|
||||
import { defineTool } from '../tool';
|
||||
import { translate as t } from '@/plugins/i18n.plugin';
|
||||
|
||||
export const tool = defineTool({
|
||||
name: 'Social Link Sharer',
|
||||
name: t('tools.social-link-sharer.title'),
|
||||
path: '/social-link-sharer',
|
||||
description: 'Generate share link href for common Social Networks',
|
||||
description: t('tools.social-link-sharer.description'),
|
||||
keywords: ['social', 'link', 'sharer'],
|
||||
component: () => import('./social-link-sharer.vue'),
|
||||
icon: Share,
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
<script setup>
|
||||
<script setup lang="ts">
|
||||
import { useI18n } from 'vue-i18n';
|
||||
|
||||
const { t } = useI18n();
|
||||
const form = reactive({
|
||||
pageUrl: 'https://example.com',
|
||||
pageTitle: 'Amazing Page Title',
|
||||
@@ -6,35 +9,41 @@ const form = reactive({
|
||||
selectedPlatform: 'Facebook',
|
||||
});
|
||||
|
||||
interface PageBuilder {
|
||||
pageUrl: string
|
||||
pageTitle?: string
|
||||
pageDescription?: string
|
||||
}
|
||||
|
||||
const platforms = {
|
||||
Facebook: ({ pageUrl }) =>
|
||||
Facebook: ({ pageUrl }: PageBuilder) =>
|
||||
`https://www.facebook.com/sharer/sharer.php?u=${encodeURIComponent(pageUrl)}`,
|
||||
Twitter: ({ pageUrl, pageTitle }) =>
|
||||
`https://twitter.com/intent/tweet?url=${encodeURIComponent(pageUrl)}&text=${encodeURIComponent(pageTitle)}`,
|
||||
LinkedIn: ({ pageUrl, pageTitle, pageDescription }) =>
|
||||
`https://www.linkedin.com/shareArticle?mini=true&url=${encodeURIComponent(pageUrl)}&title=${encodeURIComponent(pageTitle)}&summary=${encodeURIComponent(pageDescription)}`,
|
||||
Reddit: ({ pageUrl, pageTitle }) =>
|
||||
`https://www.reddit.com/submit?url=${encodeURIComponent(pageUrl)}&title=${encodeURIComponent(pageTitle)}`,
|
||||
WhatsApp: ({ pageUrl, pageTitle }) =>
|
||||
`https://api.whatsapp.com/send?text=${encodeURIComponent(pageTitle)}%20${encodeURIComponent(pageUrl)}`,
|
||||
Telegram: ({ pageUrl, pageTitle }) =>
|
||||
`https://t.me/share/url?url=${encodeURIComponent(pageUrl)}&text=${encodeURIComponent(pageTitle)}`,
|
||||
Email: ({ pageUrl, pageTitle, pageDescription }) =>
|
||||
`mailto:?subject=${encodeURIComponent(pageTitle)}&body=${encodeURIComponent(pageDescription)}%0A${encodeURIComponent(pageUrl)}`,
|
||||
Twitter: ({ pageUrl, pageTitle }: PageBuilder) =>
|
||||
`https://twitter.com/intent/tweet?url=${encodeURIComponent(pageUrl)}&text=${encodeURIComponent(pageTitle || '')}`,
|
||||
LinkedIn: ({ pageUrl, pageTitle, pageDescription }: PageBuilder) =>
|
||||
`https://www.linkedin.com/shareArticle?mini=true&url=${encodeURIComponent(pageUrl)}&title=${encodeURIComponent(pageTitle || '')}&summary=${encodeURIComponent(pageDescription || '')}`,
|
||||
Reddit: ({ pageUrl, pageTitle }: PageBuilder) =>
|
||||
`https://www.reddit.com/submit?url=${encodeURIComponent(pageUrl)}&title=${encodeURIComponent(pageTitle || '')}`,
|
||||
WhatsApp: ({ pageUrl, pageTitle }: PageBuilder) =>
|
||||
`https://api.whatsapp.com/send?text=${encodeURIComponent(pageTitle || '')}%20${encodeURIComponent(pageUrl)}`,
|
||||
Telegram: ({ pageUrl, pageTitle }: PageBuilder) =>
|
||||
`https://t.me/share/url?url=${encodeURIComponent(pageUrl)}&text=${encodeURIComponent(pageTitle || '')}`,
|
||||
Email: ({ pageUrl, pageTitle, pageDescription }: PageBuilder) =>
|
||||
`mailto:?subject=${encodeURIComponent(pageTitle || '')}&body=${encodeURIComponent(pageDescription || '')}%0A${encodeURIComponent(pageUrl)}`,
|
||||
};
|
||||
|
||||
const platformOptions = [
|
||||
{ label: 'Facebook', value: 'Facebook', icon: '📘' },
|
||||
{ label: 'Twitter', value: 'Twitter', icon: '🐦' },
|
||||
{ label: 'LinkedIn', value: 'LinkedIn', icon: '💼' },
|
||||
{ label: 'Reddit', value: 'Reddit', icon: '👽' },
|
||||
{ label: 'WhatsApp', value: 'WhatsApp', icon: '💬' },
|
||||
{ label: 'Telegram', value: 'Telegram', icon: '✈️' },
|
||||
{ label: 'Email', value: 'Email', icon: '📧' },
|
||||
{ label: t('tools.social-link-sharer.texts.label-facebook'), value: 'Facebook', icon: '📘' },
|
||||
{ label: t('tools.social-link-sharer.texts.label-twitter'), value: 'Twitter', icon: '🐦' },
|
||||
{ label: t('tools.social-link-sharer.texts.label-linkedin'), value: 'LinkedIn', icon: '💼' },
|
||||
{ label: t('tools.social-link-sharer.texts.label-reddit'), value: 'Reddit', icon: '👽' },
|
||||
{ label: t('tools.social-link-sharer.texts.label-whatsapp'), value: 'WhatsApp', icon: '💬' },
|
||||
{ label: t('tools.social-link-sharer.texts.label-telegram'), value: 'Telegram', icon: '✈️' },
|
||||
{ label: t('tools.social-link-sharer.texts.label-email'), value: 'Email', icon: '📧' },
|
||||
];
|
||||
|
||||
function generateLink(platform) {
|
||||
const builder = platforms[platform];
|
||||
function generateLink(platform: string) {
|
||||
const builder = (platforms as Record<string, CallableFunction>)[platform];
|
||||
return builder ? builder(form) : '';
|
||||
}
|
||||
|
||||
@@ -49,33 +58,33 @@ function copyAllLinks() {
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<n-card title="🔗 Share Link Generator">
|
||||
<n-card :title="t('tools.social-link-sharer.texts.title-share-link-generator')">
|
||||
<n-form :model="form" label-placement="top" size="medium">
|
||||
<n-form-item label="Page URL">
|
||||
<n-input v-model:value="form.pageUrl" placeholder="https://example.com" />
|
||||
<n-form-item :label="t('tools.social-link-sharer.texts.label-page-url')">
|
||||
<n-input v-model:value="form.pageUrl" :placeholder="t('tools.social-link-sharer.texts.placeholder-https-example-com')" />
|
||||
</n-form-item>
|
||||
<n-form-item label="Page Title">
|
||||
<n-input v-model:value="form.pageTitle" placeholder="Amazing Page Title" />
|
||||
<n-form-item :label="t('tools.social-link-sharer.texts.label-page-title')">
|
||||
<n-input v-model:value="form.pageTitle" :placeholder="t('tools.social-link-sharer.texts.placeholder-amazing-page-title')" />
|
||||
</n-form-item>
|
||||
<n-form-item label="Page Description">
|
||||
<n-input v-model:value="form.pageDescription" placeholder="Brief description of the page" />
|
||||
<n-form-item :label="t('tools.social-link-sharer.texts.label-page-description')">
|
||||
<n-input v-model:value="form.pageDescription" :placeholder="t('tools.social-link-sharer.texts.placeholder-brief-description-of-the-page')" />
|
||||
</n-form-item>
|
||||
<n-form-item label="Platform">
|
||||
<n-form-item :label="t('tools.social-link-sharer.texts.label-platform')">
|
||||
<n-select
|
||||
v-model:value="form.selectedPlatform"
|
||||
:options="platformOptions"
|
||||
placeholder="Choose a platform"
|
||||
:placeholder="t('tools.social-link-sharer.texts.placeholder-choose-a-platform')"
|
||||
/>
|
||||
</n-form-item>
|
||||
<input-copy label="Generated Share Link" :value="generatedLink" readonly />
|
||||
<input-copy :label="t('tools.social-link-sharer.texts.label-generated-share-link')" :value="generatedLink" readonly />
|
||||
<n-space justify="center">
|
||||
<n-button type="success" @click="copyAllLinks">
|
||||
📋 Copy All Links
|
||||
{{ t('tools.social-link-sharer.texts.tag-copy-all-links') }}
|
||||
</n-button>
|
||||
</n-space>
|
||||
</n-form>
|
||||
|
||||
<n-divider>🔗 All Platforms</n-divider>
|
||||
<n-divider>{{ t('tools.social-link-sharer.texts.tag-all-platforms') }}</n-divider>
|
||||
<div v-for="platform in platformOptions" :key="platform.value">
|
||||
<input-copyable label-position="left" label-width="110px" :label="`${platform.icon} ${platform.label}:`" :value="generateLink(platform.value)" readonly mb-1 />
|
||||
</div>
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
import { Database } from '@vicons/tabler';
|
||||
import { defineTool } from '../tool';
|
||||
import { translate as t } from '@/plugins/i18n.plugin';
|
||||
|
||||
export const tool = defineTool({
|
||||
name: 'SQL Parameters Generator',
|
||||
name: t('tools.sql-parameters.title'),
|
||||
path: '/sql-parameters',
|
||||
description: 'Prepare SQL statement from a given parametrized SQL query and parameters',
|
||||
description: t('tools.sql-parameters.description'),
|
||||
keywords: ['sql', 'select', 'insert', 'parameters'],
|
||||
component: () => import('./sql-parameters.vue'),
|
||||
icon: Database,
|
||||
|
||||
@@ -1,7 +1,10 @@
|
||||
<script setup lang="ts">
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import { generateSQLFromTemplate } from './sql-parameters.service';
|
||||
import { useQueryParamOrStorage } from '@/composable/queryParams';
|
||||
|
||||
const { t } = useI18n();
|
||||
|
||||
const sqlTemplate = useQueryParamOrStorage({ name: 'sql', storageName: 'sql-params:sql', defaultValue: '' });
|
||||
const parameters = ref([{ key: '', value: '' }]);
|
||||
|
||||
@@ -20,36 +23,36 @@ function generateSQL() {
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<NCard title="SQL Generator">
|
||||
<NCard :title="t('tools.sql-parameters.texts.title-sql-generator')">
|
||||
<NForm label-placement="top">
|
||||
<NFormItem label="Parameterized SQL statement:">
|
||||
<NFormItem :label="t('tools.sql-parameters.texts.label-parameterized-sql-statement')">
|
||||
<NInput
|
||||
v-model:value="sqlTemplate"
|
||||
type="textarea"
|
||||
placeholder="e.g. SELECT * FROM users WHERE name = :name AND age > ? AND type = @type"
|
||||
:placeholder="t('tools.sql-parameters.texts.placeholder-e-g-select-from-users-where-name-name-and-age-and-type-type')"
|
||||
:autosize="{ minRows: 3 }"
|
||||
/>
|
||||
</NFormItem>
|
||||
|
||||
<n-card title="Parameters">
|
||||
<n-p>For positional parameters, leave Name empty. For named parameters, enter name without '?' or '@' prefix</n-p>
|
||||
<n-card :title="t('tools.sql-parameters.texts.title-parameters')">
|
||||
<n-p>{{ t('tools.sql-parameters.texts.tag-for-positional-parameters-leave-name-empty-for-named-parameters-enter-name-without-or-prefix') }}</n-p>
|
||||
<NDynamicInput
|
||||
v-model:value="parameters"
|
||||
:min="1"
|
||||
preset="pair"
|
||||
show-sort-button
|
||||
key-placeholder="Name (e.g. name or type)"
|
||||
value-placeholder="Value (e.g. Alice or 42 or 1.3)"
|
||||
key-:placeholder="t('tools.sql-parameters.texts.placeholder-name-e-g-name-or-type')"
|
||||
value-:placeholder="t('tools.sql-parameters.texts.placeholder-value-e-g-alice-or-42-or-1-3')"
|
||||
/>
|
||||
</n-card>
|
||||
|
||||
<n-space justify="center">
|
||||
<NButton type="primary" @click="generateSQL">
|
||||
Generate SQL
|
||||
{{ t('tools.sql-parameters.texts.tag-generate-sql') }}
|
||||
</NButton>
|
||||
</n-space>
|
||||
|
||||
<NFormItem v-if="generatedSQL" label="Generated SQL:" mt-2>
|
||||
<NFormItem v-if="generatedSQL" :label="t('tools.sql-parameters.texts.label-generated-sql')" mt-2>
|
||||
<textarea-copyable :value="generatedSQL" />
|
||||
</NFormItem>
|
||||
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
import { defineTool } from '../tool';
|
||||
import { translate as t } from '@/plugins/i18n.plugin';
|
||||
import BracketIcon from '~icons/mdi/code-brackets';
|
||||
|
||||
export const tool = defineTool({
|
||||
name: 'TOML Linter',
|
||||
name: t('tools.toml-linter.title'),
|
||||
path: '/toml-linter',
|
||||
description: 'Lint and check TOML content',
|
||||
description: t('tools.toml-linter.description'),
|
||||
keywords: ['toml', 'linter'],
|
||||
component: () => import('./toml-linter.vue'),
|
||||
icon: BracketIcon,
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
<script setup lang="ts">
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import { parse as parseToml } from 'smol-toml';
|
||||
|
||||
const { t } = useI18n();
|
||||
|
||||
const tomlContent = ref('');
|
||||
const lintErrors = computed(() => {
|
||||
try {
|
||||
@@ -21,7 +24,7 @@ const MONACO_EDITOR_OPTIONS = {
|
||||
|
||||
<template>
|
||||
<div>
|
||||
<n-card title="Your TOML Content:" mb-2>
|
||||
<n-card :title="t('tools.toml-linter.texts.title-your-toml-content')" mb-2>
|
||||
<div relative w-full>
|
||||
<c-monaco-editor
|
||||
v-model:value="tomlContent"
|
||||
@@ -33,13 +36,13 @@ const MONACO_EDITOR_OPTIONS = {
|
||||
</n-card>
|
||||
|
||||
<div v-if="lintErrors">
|
||||
<n-alert type="error" title="Linting Error" :show-icon="true">
|
||||
<n-alert type="error" :title="t('tools.toml-linter.texts.title-linting-error')" :show-icon="true">
|
||||
<pre>{{ lintErrors }}</pre>
|
||||
</n-alert>
|
||||
</div>
|
||||
<div v-else-if="tomlContent">
|
||||
<n-alert type="success" title="Valid TOML" :show-icon="true">
|
||||
No errors found. Your TOML is valid!
|
||||
<n-alert type="success" :title="t('tools.toml-linter.texts.title-valid-toml')" :show-icon="true">
|
||||
{{ t('tools.toml-linter.texts.tag-no-errors-found-your-toml-is-valid') }}
|
||||
</n-alert>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -19,9 +19,9 @@ const rules: UseValidationRule<string>[] = [
|
||||
|
||||
<template>
|
||||
<format-transformer
|
||||
:input-label="t('tools.toml-to-json.texts.input-label-your-toml')"
|
||||
:input-placeholder="t('tools.toml-to-json.texts.input-placeholder-paste-your-toml-here')"
|
||||
:output-label="t('tools.toml-to-json.texts.output-label-json-from-your-toml')"
|
||||
:input-:label="t('tools.toml-to-json.texts.label-t-tools-toml-to-json-texts-input-label-your-toml')"
|
||||
:input-:placeholder="t('tools.toml-to-json.texts.placeholder-t-tools-toml-to-json-texts-input-placeholder-paste-your-toml-here')"
|
||||
:output-:label="t('tools.toml-to-json.texts.label-t-tools-toml-to-json-texts-output-label-json-from-your-toml')"
|
||||
output-language="json"
|
||||
:input-validation-rules="rules"
|
||||
:transformer="transformer"
|
||||
|
||||
@@ -20,9 +20,9 @@ const rules: UseValidationRule<string>[] = [
|
||||
|
||||
<template>
|
||||
<format-transformer
|
||||
:input-label="t('tools.toml-to-yaml.texts.input-label-your-toml')"
|
||||
:input-placeholder="t('tools.toml-to-yaml.texts.input-placeholder-paste-your-toml-here')"
|
||||
:output-label="t('tools.toml-to-yaml.texts.output-label-yaml-from-your-toml')"
|
||||
:input-:label="t('tools.toml-to-yaml.texts.label-t-tools-toml-to-yaml-texts-input-label-your-toml')"
|
||||
:input-:placeholder="t('tools.toml-to-yaml.texts.placeholder-t-tools-toml-to-yaml-texts-input-placeholder-paste-your-toml-here')"
|
||||
:output-:label="t('tools.toml-to-yaml.texts.label-t-tools-toml-to-yaml-texts-output-label-yaml-from-your-toml')"
|
||||
output-language="yaml"
|
||||
:input-validation-rules="rules"
|
||||
:transformer="transformer"
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
import { ArrowsShuffle } from '@vicons/tabler';
|
||||
import { defineTool } from '../tool';
|
||||
import { translate as t } from '@/plugins/i18n.plugin';
|
||||
|
||||
export const tool = defineTool({
|
||||
name: 'Text Translator',
|
||||
name: t('tools.translator.title'),
|
||||
path: '/translator',
|
||||
description: 'Translate text from one language to another (using opus-mt)',
|
||||
description: t('tools.translator.description'),
|
||||
keywords: ['translate', 'language'],
|
||||
component: () => import('./translator.vue'),
|
||||
icon: ArrowsShuffle,
|
||||
|
||||
@@ -1,8 +1,11 @@
|
||||
<script setup lang="ts">
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import type { TranslationPipeline, TranslationSingle } from '@huggingface/transformers';
|
||||
import { env, pipeline } from '@huggingface/transformers';
|
||||
import { useQueryParamOrStorage } from '@/composable/queryParams';
|
||||
|
||||
const { t } = useI18n();
|
||||
|
||||
env.useBrowserCache = true;
|
||||
env.allowRemoteModels = true;
|
||||
|
||||
@@ -17,62 +20,62 @@ const translating = ref(false);
|
||||
|
||||
// Language options
|
||||
const languageOptions = [
|
||||
{ label: 'Afrikaans', value: 'af' },
|
||||
{ label: 'Amharic', value: 'am' },
|
||||
{ label: 'Arabic', value: 'ar' },
|
||||
{ label: 'Azerbaijani', value: 'az' },
|
||||
{ label: 'Basque', value: 'eu' },
|
||||
{ label: 'Belarusian', value: 'be' },
|
||||
{ label: 'Bengali', value: 'bn' },
|
||||
{ label: 'Bulgarian', value: 'bg' },
|
||||
{ label: 'Catalan', value: 'ca' },
|
||||
{ label: 'Chinese', value: 'zh' },
|
||||
{ label: 'Croatian', value: 'hr' },
|
||||
{ label: 'Czech', value: 'cs' },
|
||||
{ label: 'Danish', value: 'da' },
|
||||
{ label: 'Dutch', value: 'nl' },
|
||||
{ label: 'English', value: 'en' },
|
||||
{ label: 'Estonian', value: 'et' },
|
||||
{ label: 'Finnish', value: 'fi' },
|
||||
{ label: 'French', value: 'fr' },
|
||||
{ label: 'Galician', value: 'gl' },
|
||||
{ label: 'Georgian', value: 'ka' },
|
||||
{ label: 'German', value: 'de' },
|
||||
{ label: 'Greek', value: 'el' },
|
||||
{ label: 'Hebrew', value: 'he' },
|
||||
{ label: 'Hindi', value: 'hi' },
|
||||
{ label: 'Hungarian', value: 'hu' },
|
||||
{ label: 'Icelandic', value: 'is' },
|
||||
{ label: 'Indonesian', value: 'id' },
|
||||
{ label: 'Irish', value: 'ga' },
|
||||
{ label: 'Italian', value: 'it' },
|
||||
{ label: 'Japanese', value: 'ja' },
|
||||
{ label: 'Kazakh', value: 'kk' },
|
||||
{ label: 'Korean', value: 'ko' },
|
||||
{ label: 'Latvian', value: 'lv' },
|
||||
{ label: 'Lithuanian', value: 'lt' },
|
||||
{ label: 'Macedonian', value: 'mk' },
|
||||
{ label: 'Malay', value: 'ms' },
|
||||
{ label: 'Norwegian', value: 'no' },
|
||||
{ label: 'Persian', value: 'fa' },
|
||||
{ label: 'Polish', value: 'pl' },
|
||||
{ label: 'Portuguese', value: 'pt' },
|
||||
{ label: 'Romanian', value: 'ro' },
|
||||
{ label: 'Russian', value: 'ru' },
|
||||
{ label: 'Serbian', value: 'sr' },
|
||||
{ label: 'Slovak', value: 'sk' },
|
||||
{ label: 'Slovenian', value: 'sl' },
|
||||
{ label: 'Spanish', value: 'es' },
|
||||
{ label: 'Swahili', value: 'sw' },
|
||||
{ label: 'Swedish', value: 'sv' },
|
||||
{ label: 'Tamil', value: 'ta' },
|
||||
{ label: 'Telugu', value: 'te' },
|
||||
{ label: 'Thai', value: 'th' },
|
||||
{ label: 'Turkish', value: 'tr' },
|
||||
{ label: 'Ukrainian', value: 'uk' },
|
||||
{ label: 'Urdu', value: 'ur' },
|
||||
{ label: 'Vietnamese', value: 'vi' },
|
||||
{ label: 'Welsh', value: 'cy' },
|
||||
{ label: t('tools.translator.texts.label-afrikaans'), value: 'af' },
|
||||
{ label: t('tools.translator.texts.label-amharic'), value: 'am' },
|
||||
{ label: t('tools.translator.texts.label-arabic'), value: 'ar' },
|
||||
{ label: t('tools.translator.texts.label-azerbaijani'), value: 'az' },
|
||||
{ label: t('tools.translator.texts.label-basque'), value: 'eu' },
|
||||
{ label: t('tools.translator.texts.label-belarusian'), value: 'be' },
|
||||
{ label: t('tools.translator.texts.label-bengali'), value: 'bn' },
|
||||
{ label: t('tools.translator.texts.label-bulgarian'), value: 'bg' },
|
||||
{ label: t('tools.translator.texts.label-catalan'), value: 'ca' },
|
||||
{ label: t('tools.translator.texts.label-chinese'), value: 'zh' },
|
||||
{ label: t('tools.translator.texts.label-croatian'), value: 'hr' },
|
||||
{ label: t('tools.translator.texts.label-czech'), value: 'cs' },
|
||||
{ label: t('tools.translator.texts.label-danish'), value: 'da' },
|
||||
{ label: t('tools.translator.texts.label-dutch'), value: 'nl' },
|
||||
{ label: t('tools.translator.texts.label-english'), value: 'en' },
|
||||
{ label: t('tools.translator.texts.label-estonian'), value: 'et' },
|
||||
{ label: t('tools.translator.texts.label-finnish'), value: 'fi' },
|
||||
{ label: t('tools.translator.texts.label-french'), value: 'fr' },
|
||||
{ label: t('tools.translator.texts.label-galician'), value: 'gl' },
|
||||
{ label: t('tools.translator.texts.label-georgian'), value: 'ka' },
|
||||
{ label: t('tools.translator.texts.label-german'), value: 'de' },
|
||||
{ label: t('tools.translator.texts.label-greek'), value: 'el' },
|
||||
{ label: t('tools.translator.texts.label-hebrew'), value: 'he' },
|
||||
{ label: t('tools.translator.texts.label-hindi'), value: 'hi' },
|
||||
{ label: t('tools.translator.texts.label-hungarian'), value: 'hu' },
|
||||
{ label: t('tools.translator.texts.label-icelandic'), value: 'is' },
|
||||
{ label: t('tools.translator.texts.label-indonesian'), value: 'id' },
|
||||
{ label: t('tools.translator.texts.label-irish'), value: 'ga' },
|
||||
{ label: t('tools.translator.texts.label-italian'), value: 'it' },
|
||||
{ label: t('tools.translator.texts.label-japanese'), value: 'ja' },
|
||||
{ label: t('tools.translator.texts.label-kazakh'), value: 'kk' },
|
||||
{ label: t('tools.translator.texts.label-korean'), value: 'ko' },
|
||||
{ label: t('tools.translator.texts.label-latvian'), value: 'lv' },
|
||||
{ label: t('tools.translator.texts.label-lithuanian'), value: 'lt' },
|
||||
{ label: t('tools.translator.texts.label-macedonian'), value: 'mk' },
|
||||
{ label: t('tools.translator.texts.label-malay'), value: 'ms' },
|
||||
{ label: t('tools.translator.texts.label-norwegian'), value: 'no' },
|
||||
{ label: t('tools.translator.texts.label-persian'), value: 'fa' },
|
||||
{ label: t('tools.translator.texts.label-polish'), value: 'pl' },
|
||||
{ label: t('tools.translator.texts.label-portuguese'), value: 'pt' },
|
||||
{ label: t('tools.translator.texts.label-romanian'), value: 'ro' },
|
||||
{ label: t('tools.translator.texts.label-russian'), value: 'ru' },
|
||||
{ label: t('tools.translator.texts.label-serbian'), value: 'sr' },
|
||||
{ label: t('tools.translator.texts.label-slovak'), value: 'sk' },
|
||||
{ label: t('tools.translator.texts.label-slovenian'), value: 'sl' },
|
||||
{ label: t('tools.translator.texts.label-spanish'), value: 'es' },
|
||||
{ label: t('tools.translator.texts.label-swahili'), value: 'sw' },
|
||||
{ label: t('tools.translator.texts.label-swedish'), value: 'sv' },
|
||||
{ label: t('tools.translator.texts.label-tamil'), value: 'ta' },
|
||||
{ label: t('tools.translator.texts.label-telugu'), value: 'te' },
|
||||
{ label: t('tools.translator.texts.label-thai'), value: 'th' },
|
||||
{ label: t('tools.translator.texts.label-turkish'), value: 'tr' },
|
||||
{ label: t('tools.translator.texts.label-ukrainian'), value: 'uk' },
|
||||
{ label: t('tools.translator.texts.label-urdu'), value: 'ur' },
|
||||
{ label: t('tools.translator.texts.label-vietnamese'), value: 'vi' },
|
||||
{ label: t('tools.translator.texts.label-welsh'), value: 'cy' },
|
||||
];
|
||||
|
||||
// Cache the loaded model
|
||||
@@ -122,15 +125,15 @@ async function translateText() {
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<NCard title="Text Translator" style="max-width: 600px; margin: auto;">
|
||||
<NInput v-model:value="inputText" type="textarea" placeholder="Enter text to translate..." mb-1 />
|
||||
<NCard :title="t('tools.translator.texts.title-text-translator')" style="max-width: 600px; margin: auto;">
|
||||
<NInput v-model:value="inputText" type="textarea" :placeholder="t('tools.translator.texts.placeholder-enter-text-to-translate')" mb-1 />
|
||||
|
||||
<c-select v-model:value="sourceLang" label="From:" label-position="left" label-width="70px" :options="languageOptions" placeholder="From" mb-1 />
|
||||
<c-select v-model:value="targetLang" label="To:" label-position="left" label-width="70px" :options="languageOptions" placeholder="To" mb-1 />
|
||||
<c-select v-model:value="sourceLang" :label="t('tools.translator.texts.label-from')" label-position="left" label-width="70px" :options="languageOptions" :placeholder="t('tools.translator.texts.placeholder-from')" mb-1 />
|
||||
<c-select v-model:value="targetLang" :label="t('tools.translator.texts.label-to')" label-position="left" label-width="70px" :options="languageOptions" :placeholder="t('tools.translator.texts.placeholder-to')" mb-1 />
|
||||
|
||||
<n-space justify="center" mb-2 mt-2>
|
||||
<NButton type="primary" :disabled="loadingModel || translating" @click="translateText">
|
||||
Translate
|
||||
{{ t('tools.translator.texts.tag-translate') }}
|
||||
</NButton>
|
||||
</n-space>
|
||||
|
||||
@@ -143,6 +146,6 @@ async function translateText() {
|
||||
{{ error }}
|
||||
</c-alert>
|
||||
|
||||
<textarea-copyable v-if="translatedText" v-model:value="translatedText" placeholder="Translation will appear here..." mb-2 />
|
||||
<textarea-copyable v-if="translatedText" v-model:value="translatedText" :placeholder="t('tools.translator.texts.placeholder-translation-will-appear-here')" mb-2 />
|
||||
</NCard>
|
||||
</template>
|
||||
@@ -1,10 +1,11 @@
|
||||
import { DeviceMobileMessage } from '@vicons/tabler';
|
||||
import { defineTool } from '../tool';
|
||||
import { translate as t } from '@/plugins/i18n.plugin';
|
||||
|
||||
export const tool = defineTool({
|
||||
name: 'Unicode to GSM-7',
|
||||
name: t('tools.unicode-to-gsm7.title'),
|
||||
path: '/unicode-to-gsm7',
|
||||
description: 'Encode unicode text to SMS GSM-7 encoding and display related SMS send info',
|
||||
description: t('tools.unicode-to-gsm7.description'),
|
||||
keywords: ['unicode', 'segment', 'sms', 'gsm7'],
|
||||
component: () => import('./unicode-to-gsm7.vue'),
|
||||
icon: DeviceMobileMessage,
|
||||
|
||||
@@ -1,7 +1,10 @@
|
||||
<script setup lang="ts">
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import { convertUnicodeToGSM7 } from '@skeepit/unicode-to-gsm7';
|
||||
import { SegmentedMessage } from 'sms-segments-calculator';
|
||||
|
||||
const { t } = useI18n();
|
||||
|
||||
const smsInfo = ref<SegmentedMessage | null>(null);
|
||||
|
||||
function transformer(value: string) {
|
||||
@@ -22,17 +25,17 @@ function transformer(value: string) {
|
||||
|
||||
<template>
|
||||
<format-transformer
|
||||
input-label="Your text to encode to GSM-7"
|
||||
input-placeholder="Put your text here..."
|
||||
output-label="GSM-7 encoded version:"
|
||||
:input-label="t('tools.unicode-to-gsm7.texts.input-label-your-text-to-encode-to-gsm-7')"
|
||||
:input-placeholder="t('tools.unicode-to-gsm7.texts.input-placeholder-put-your-text-here')"
|
||||
:output-label="t('tools.unicode-to-gsm7.texts.output-label-gsm-7-encoded-version')"
|
||||
:transformer="transformer"
|
||||
/>
|
||||
|
||||
<n-card v-if="smsInfo" title="SMS Info">
|
||||
<input-copyable label="Encoding:" label-position="left" :value="smsInfo.encodingName" mb-1 />
|
||||
<input-copyable label="Message size:" label-position="left" :value="smsInfo.messageSize" mb-1 />
|
||||
<input-copyable label="Total size:" label-position="left" :value="smsInfo.totalSize" mb-1 />
|
||||
<input-copyable label="Segments count:" label-position="left" :value="smsInfo.segmentsCount" mb-1 />
|
||||
<input-copyable label="Non GSM-7 characters:" label-position="left" :value="[...new Set(smsInfo.getNonGsmCharacters())].join(',')" />
|
||||
<n-card v-if="smsInfo" :title="t('tools.unicode-to-gsm7.texts.title-sms-info')">
|
||||
<input-copyable :label="t('tools.unicode-to-gsm7.texts.label-encoding')" label-position="left" :value="smsInfo.encodingName" mb-1 />
|
||||
<input-copyable :label="t('tools.unicode-to-gsm7.texts.label-message-size')" label-position="left" :value="smsInfo.messageSize" mb-1 />
|
||||
<input-copyable :label="t('tools.unicode-to-gsm7.texts.label-total-size')" label-position="left" :value="smsInfo.totalSize" mb-1 />
|
||||
<input-copyable :label="t('tools.unicode-to-gsm7.texts.label-segments-count')" label-position="left" :value="smsInfo.segmentsCount" mb-1 />
|
||||
<input-copyable :label="t('tools.unicode-to-gsm7.texts.label-non-gsm-7-characters')" label-position="left" :value="[...new Set(smsInfo.getNonGsmCharacters())].join(',')" />
|
||||
</n-card>
|
||||
</template>
|
||||
@@ -1,10 +1,11 @@
|
||||
import { CalendarStats } from '@vicons/tabler';
|
||||
import { defineTool } from '../tool';
|
||||
import { translate as t } from '@/plugins/i18n.plugin';
|
||||
|
||||
export const tool = defineTool({
|
||||
name: 'Which Day?',
|
||||
name: t('tools.which-day.title'),
|
||||
path: '/which-day',
|
||||
description: 'Given a day and month, and years range, list all day of week a given date is',
|
||||
description: t('tools.which-day.description'),
|
||||
keywords: ['which', 'weekday', 'date', 'year', 'day'],
|
||||
component: () => import('./which-day.vue'),
|
||||
icon: CalendarStats,
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
<script setup lang="ts">
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import { useQueryParamOrStorage } from '@/composable/queryParams';
|
||||
|
||||
const { t } = useI18n();
|
||||
|
||||
const currentYear = new Date().getFullYear();
|
||||
|
||||
const day = useQueryParamOrStorage({ name: 'day', storageName: 'which-day:d', defaultValue: 1 });
|
||||
@@ -10,12 +13,20 @@ const endYear = useQueryParamOrStorage({ name: 'end', storageName: 'which-day:ey
|
||||
const error = ref('');
|
||||
|
||||
const columns = [
|
||||
{ title: 'Year', key: 'year', align: 'center' },
|
||||
{ title: 'Weekday', key: 'weekday', align: 'center' },
|
||||
{ title: t('tools.which-day.text.year'), key: 'year', align: 'center' },
|
||||
{ title: t('tools.which-day.text.weekday'), key: 'weekday', align: 'center' },
|
||||
];
|
||||
|
||||
const results = computed(() => {
|
||||
const weekdays = ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'];
|
||||
const weekdays = [
|
||||
t('tools.which-day.text.sunday'),
|
||||
t('tools.which-day.text.monday'),
|
||||
t('tools.which-day.text.tuesday'),
|
||||
t('tools.which-day.text.wednesday'),
|
||||
t('tools.which-day.text.thursday'),
|
||||
t('tools.which-day.text.friday'),
|
||||
t('tools.which-day.text.saturday'),
|
||||
];
|
||||
const output: Array<{ year: number; weekday: string }> = [];
|
||||
|
||||
error.value = '';
|
||||
@@ -42,18 +53,18 @@ const results = computed(() => {
|
||||
<div style="max-width: 700px">
|
||||
<NForm label-placement="left">
|
||||
<n-space justify="center">
|
||||
<NFormItem label="Day in month:">
|
||||
<NFormItem :label="t('tools.which-day.texts.label-day-in-month')">
|
||||
<NInputNumber v-model:value="day" :min="1" :max="31" />
|
||||
</NFormItem>
|
||||
<NFormItem label="Month:">
|
||||
<NFormItem :label="t('tools.which-day.texts.label-month')">
|
||||
<NInputNumber v-model:value="month" :min="1" :max="12" />
|
||||
</NFormItem>
|
||||
</n-space>
|
||||
<n-space justify="center">
|
||||
<NFormItem label="Start Year">
|
||||
<NFormItem :label="t('tools.which-day.texts.label-start-year')">
|
||||
<NInputNumber v-model:value="startYear" />
|
||||
</NFormItem>
|
||||
<NFormItem label="End Year">
|
||||
<NFormItem :label="t('tools.which-day.texts.label-end-year')">
|
||||
<NInputNumber v-model:value="endYear" :min="startYear" />
|
||||
</NFormItem>
|
||||
</n-space>
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
import { Link } from '@vicons/tabler';
|
||||
import { defineTool } from '../tool';
|
||||
import { translate as t } from '@/plugins/i18n.plugin';
|
||||
|
||||
export const tool = defineTool({
|
||||
name: 'Wireguard Config Generator',
|
||||
name: t('tools.wireguard-config-generator.title'),
|
||||
path: '/wireguard-config-generator',
|
||||
description: 'Generate Wireguard Server and Clients configuration files',
|
||||
description: t('tools.wireguard-config-generator.description'),
|
||||
keywords: ['wireguard', 'config', 'generator'],
|
||||
component: () => import('./wireguard-config-generator.vue'),
|
||||
icon: Link,
|
||||
|
||||
@@ -1,10 +1,13 @@
|
||||
<script setup lang="ts">
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import { parseCidr } from 'cidr-tools';
|
||||
import { stringifyIp } from 'ip-bigint';
|
||||
import QRCodeVue3 from 'qrcode-vue3';
|
||||
import { WgConfig } from './lib/WgConfig';
|
||||
import { generateConfigString } from './lib/utils/configParser';
|
||||
|
||||
const { t } = useI18n();
|
||||
|
||||
const inputConfig = ref('');
|
||||
const inputConfigError = ref('');
|
||||
const config = ref(new WgConfig({
|
||||
@@ -155,10 +158,10 @@ function generatePeers() {
|
||||
<template>
|
||||
<div>
|
||||
<details mb-1>
|
||||
<summary>Input server configuration</summary>
|
||||
<summary>{{ t('tools.wireguard-config-generator.texts.tag-input-server-configuration') }}</summary>
|
||||
<c-input-text
|
||||
v-model:value="inputConfig"
|
||||
placeholder="Put your input configuration here..."
|
||||
:placeholder="t('tools.wireguard-config-generator.texts.placeholder-put-your-input-configuration-here')"
|
||||
rows="5"
|
||||
multiline
|
||||
mb-2
|
||||
@@ -167,81 +170,81 @@ function generatePeers() {
|
||||
{{ inputConfigError }}
|
||||
</c-alert>
|
||||
</details>
|
||||
<c-card title="Configuration" mb-1>
|
||||
<c-card :title="t('tools.wireguard-config-generator.texts.title-configuration')" mb-1>
|
||||
<n-space>
|
||||
<c-input-text
|
||||
v-model:value="server"
|
||||
label="Server Name:"
|
||||
placeholder="Server Name or FQDN"
|
||||
:label="t('tools.wireguard-config-generator.texts.label-server-name')"
|
||||
:placeholder="t('tools.wireguard-config-generator.texts.placeholder-server-name-or-fqdn')"
|
||||
label-position="left"
|
||||
style="min-width: 400px"
|
||||
mb-2
|
||||
/>
|
||||
<n-form-item label="Server Port:" label-placement="left">
|
||||
<n-form-item :label="t('tools.wireguard-config-generator.texts.label-server-port')" label-placement="left">
|
||||
<n-input-number v-model:value="serverPort" min="0" max="65535" />
|
||||
</n-form-item>
|
||||
</n-space>
|
||||
<c-input-text
|
||||
v-model:value="cidr"
|
||||
label="Server CIDR:"
|
||||
placeholder="Server CIDR"
|
||||
:label="t('tools.wireguard-config-generator.texts.label-server-cidr')"
|
||||
:placeholder="t('tools.wireguard-config-generator.texts.placeholder-server-cidr')"
|
||||
label-position="left"
|
||||
mb-2
|
||||
/>
|
||||
<n-space>
|
||||
<n-form-item label="Start IP number:" label-placement="left">
|
||||
<n-form-item :label="t('tools.wireguard-config-generator.texts.label-start-ip-number')" label-placement="left">
|
||||
<n-input-number v-model:value="startIP" min="2" />
|
||||
</n-form-item>
|
||||
<n-form-item label="Number of clients:" label-placement="left">
|
||||
<n-form-item :label="t('tools.wireguard-config-generator.texts.label-number-of-clients')" label-placement="left">
|
||||
<n-input-number v-model:value="numberOfClients" min="1" />
|
||||
</n-form-item>
|
||||
</n-space>
|
||||
<n-form-item label="Use Pre Shared Keys" label-placement="left">
|
||||
<n-form-item :label="t('tools.wireguard-config-generator.texts.label-use-pre-shared-keys')" label-placement="left">
|
||||
<n-checkbox v-model:value="usePreSharedKeys" />
|
||||
</n-form-item>
|
||||
<c-input-text
|
||||
v-model:value="clientAllowedIPs"
|
||||
label="Client Allowed IPs:"
|
||||
placeholder="Client Allowed IPs"
|
||||
:label="t('tools.wireguard-config-generator.texts.label-client-allowed-ips')"
|
||||
:placeholder="t('tools.wireguard-config-generator.texts.placeholder-client-allowed-ips')"
|
||||
label-position="left"
|
||||
mb-2
|
||||
/>
|
||||
<c-input-text
|
||||
v-model:value="endpoint"
|
||||
label="Endpoint (optional):"
|
||||
placeholder="Endpoint"
|
||||
:label="t('tools.wireguard-config-generator.texts.label-endpoint-optional')"
|
||||
:placeholder="t('tools.wireguard-config-generator.texts.placeholder-endpoint')"
|
||||
label-position="left"
|
||||
mb-2
|
||||
/>
|
||||
<c-input-text
|
||||
v-model:value="dns"
|
||||
label="DNS"
|
||||
placeholder="DNS servers:"
|
||||
:label="t('tools.wireguard-config-generator.texts.label-dns')"
|
||||
:placeholder="t('tools.wireguard-config-generator.texts.placeholder-dns-servers')"
|
||||
label-position="left"
|
||||
mb-2
|
||||
/>
|
||||
<c-input-text
|
||||
v-model:value="postUpRule"
|
||||
label="Post-Up rule:"
|
||||
placeholder="Post-Up rule"
|
||||
:label="t('tools.wireguard-config-generator.texts.label-post-up-rule')"
|
||||
:placeholder="t('tools.wireguard-config-generator.texts.placeholder-post-up-rule')"
|
||||
mb-2
|
||||
/>
|
||||
<c-input-text
|
||||
v-model:value="postDownRule"
|
||||
label="Post-Down rule:"
|
||||
placeholder="Post-Down rule"
|
||||
:label="t('tools.wireguard-config-generator.texts.label-post-down-rule')"
|
||||
:placeholder="t('tools.wireguard-config-generator.texts.placeholder-post-down-rule')"
|
||||
mb-2
|
||||
/>
|
||||
</c-card>
|
||||
|
||||
<n-space justify="center" mb-2 mt-1>
|
||||
<n-button @click="generatePeers">
|
||||
Generate Configurations
|
||||
{{ t('tools.wireguard-config-generator.texts.tag-generate-configurations') }}
|
||||
</n-button>
|
||||
</n-space>
|
||||
|
||||
<div v-if="generatedConfigs">
|
||||
<n-card title="Generated Server Config file:">
|
||||
<n-card :title="t('tools.wireguard-config-generator.texts.title-generated-server-config-file')">
|
||||
<textarea-copyable :value="generatedConfigs.server" />
|
||||
</n-card>
|
||||
|
||||
|
||||
@@ -39,9 +39,9 @@ const rules: UseValidationRule<string>[] = [
|
||||
</div>
|
||||
|
||||
<format-transformer
|
||||
:input-label="t('tools.xml-formatter.texts.input-label-your-xml')"
|
||||
:input-placeholder="t('tools.xml-formatter.texts.input-placeholder-paste-your-xml-here')"
|
||||
:output-label="t('tools.xml-formatter.texts.output-label-formatted-xml-from-your-xml')"
|
||||
:input-:label="t('tools.xml-formatter.texts.label-t-tools-xml-formatter-texts-input-label-your-xml')"
|
||||
:input-:placeholder="t('tools.xml-formatter.texts.placeholder-t-tools-xml-formatter-texts-input-placeholder-paste-your-xml-here')"
|
||||
:output-:label="t('tools.xml-formatter.texts.label-t-tools-xml-formatter-texts-output-label-formatted-xml-from-your-xml')"
|
||||
output-language="xml"
|
||||
:input-validation-rules="rules"
|
||||
:transformer="transformer"
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
import { Code } from '@vicons/tabler';
|
||||
import { defineTool } from '../tool';
|
||||
import { translate as t } from '@/plugins/i18n.plugin';
|
||||
|
||||
export const tool = defineTool({
|
||||
name: 'XML Linter',
|
||||
name: t('tools.xml-linter.title'),
|
||||
path: '/xml-linter',
|
||||
description: 'Lint XML content for syntax error',
|
||||
description: t('tools.xml-linter.description'),
|
||||
keywords: ['xml', 'linter'],
|
||||
component: () => import('./xml-linter.vue'),
|
||||
icon: Code,
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
<script setup lang="ts">
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import { XMLParser } from 'fast-xml-parser';
|
||||
|
||||
const { t } = useI18n();
|
||||
|
||||
const parser = new XMLParser();
|
||||
|
||||
const xmlContent = ref('');
|
||||
@@ -26,7 +29,7 @@ const MONACO_EDITOR_OPTIONS = {
|
||||
|
||||
<template>
|
||||
<div>
|
||||
<n-card title="Your XML Content:" mb-2>
|
||||
<n-card :title="t('tools.xml-linter.texts.title-your-xml-content')" mb-2>
|
||||
<div relative w-full>
|
||||
<c-monaco-editor
|
||||
v-model:value="xmlContent"
|
||||
@@ -39,13 +42,13 @@ const MONACO_EDITOR_OPTIONS = {
|
||||
</n-card>
|
||||
|
||||
<div v-if="lintErrors">
|
||||
<n-alert type="error" title="Linting Error" :show-icon="true">
|
||||
<n-alert type="error" :title="t('tools.xml-linter.texts.title-linting-error')" :show-icon="true">
|
||||
<pre>{{ lintErrors }}</pre>
|
||||
</n-alert>
|
||||
</div>
|
||||
<div v-else-if="xmlContent">
|
||||
<n-alert type="success" title="Valid XML" :show-icon="true">
|
||||
No errors found. Your XML is valid!
|
||||
<n-alert type="success" :title="t('tools.xml-linter.texts.title-valid-xml')" :show-icon="true">
|
||||
{{ t('tools.xml-linter.texts.tag-no-errors-found-your-xml-is-valid') }}
|
||||
</n-alert>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -49,10 +49,10 @@ const rules: UseValidationRule<string>[] = [
|
||||
</NSpace>
|
||||
|
||||
<format-transformer
|
||||
:input-label="t('tools.yaml-flatten-nestify.texts.input-label-your-yaml-content')"
|
||||
:input-:label="t('tools.yaml-flatten-nestify.texts.label-t-tools-yaml-flatten-nestify-texts-input-label-your-yaml-content')"
|
||||
:input-default="defaultValue"
|
||||
:input-placeholder="t('tools.yaml-flatten-nestify.texts.input-placeholder-paste-your-yaml-content-here')"
|
||||
:output-label="t('tools.yaml-flatten-nestify.texts.output-label-transformed-yaml')"
|
||||
:input-:placeholder="t('tools.yaml-flatten-nestify.texts.placeholder-t-tools-yaml-flatten-nestify-texts-input-placeholder-paste-your-yaml-content-here')"
|
||||
:output-:label="t('tools.yaml-flatten-nestify.texts.label-t-tools-yaml-flatten-nestify-texts-output-label-transformed-yaml')"
|
||||
output-language="yaml"
|
||||
:input-validation-rules="rules"
|
||||
:transformer="transformer"
|
||||
|
||||
@@ -35,15 +35,15 @@ const rules: UseValidationRule<string>[] = [
|
||||
|
||||
<template>
|
||||
<n-space justify="center">
|
||||
<n-form-item label="Nestify ('a.b.c' to nested objects)" label-placement="left">
|
||||
<n-form-item :label="t('tools.yaml-to-json-converter.texts.label-nestify-a-b-c-to-nested-objects')" label-placement="left">
|
||||
<n-checkbox v-model:checked="nestify" />
|
||||
</n-form-item>
|
||||
</n-space>
|
||||
|
||||
<format-transformer
|
||||
:input-label="t('tools.yaml-to-json-converter.texts.input-label-your-yaml')"
|
||||
:input-placeholder="t('tools.yaml-to-json-converter.texts.input-placeholder-paste-your-yaml-here')"
|
||||
:output-label="t('tools.yaml-to-json-converter.texts.output-label-json-from-your-yaml')"
|
||||
:input-:label="t('tools.yaml-to-json-converter.texts.label-t-tools-yaml-to-json-converter-texts-input-label-your-yaml')"
|
||||
:input-:placeholder="t('tools.yaml-to-json-converter.texts.placeholder-t-tools-yaml-to-json-converter-texts-input-placeholder-paste-your-yaml-here')"
|
||||
:output-:label="t('tools.yaml-to-json-converter.texts.label-t-tools-yaml-to-json-converter-texts-output-label-json-from-your-yaml')"
|
||||
output-language="json"
|
||||
:input-validation-rules="rules"
|
||||
:transformer="transformer"
|
||||
|
||||
@@ -21,9 +21,9 @@ const rules: UseValidationRule<string>[] = [
|
||||
|
||||
<template>
|
||||
<format-transformer
|
||||
:input-label="t('tools.yaml-to-toml.texts.input-label-your-yaml')"
|
||||
:input-placeholder="t('tools.yaml-to-toml.texts.input-placeholder-paste-your-yaml-here')"
|
||||
:output-label="t('tools.yaml-to-toml.texts.output-label-toml-from-your-yaml')"
|
||||
:input-:label="t('tools.yaml-to-toml.texts.label-t-tools-yaml-to-toml-texts-input-label-your-yaml')"
|
||||
:input-:placeholder="t('tools.yaml-to-toml.texts.placeholder-t-tools-yaml-to-toml-texts-input-placeholder-paste-your-yaml-here')"
|
||||
:output-:label="t('tools.yaml-to-toml.texts.label-t-tools-yaml-to-toml-texts-output-label-toml-from-your-yaml')"
|
||||
output-language="toml"
|
||||
:input-validation-rules="rules"
|
||||
:transformer="transformer"
|
||||
|
||||
@@ -48,12 +48,12 @@ const { schemas, errors: validationErrors } = useYamlSchemaValidation({ yaml: ra
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<n-form-item label="JSON schema:" label-placement="left" label-width="130px" label-align="right">
|
||||
<n-form-item :label="t('tools.yaml-viewer.texts.label-json-schema')" label-placement="left" label-width="130px" label-align="right">
|
||||
<n-select
|
||||
v-model:value="schemaUrl"
|
||||
:options="[
|
||||
{ label: 'No validation', value: '' },
|
||||
{ label: 'Custom', value: 'custom' },
|
||||
{ label: t('tools.yaml-viewer.texts.label-no-validation'), value: '' },
|
||||
{ label: t('tools.yaml-viewer.texts.label-custom'), value: 'custom' },
|
||||
...schemas.map(s => ({ label: `${s.name} / ${s.description}`, value: s.url })),
|
||||
]"
|
||||
filterable mb-4
|
||||
@@ -63,7 +63,7 @@ const { schemas, errors: validationErrors } = useYamlSchemaValidation({ yaml: ra
|
||||
v-if="schemaUrl === 'custom'"
|
||||
ref="jsonSchemaInputElement"
|
||||
v-model:value="schemaData"
|
||||
placeholder="Paste your JSON Schema here..."
|
||||
:placeholder="t('tools.yaml-viewer.texts.placeholder-paste-your-json-schema-here')"
|
||||
rows="20"
|
||||
multiline
|
||||
autocomplete="off"
|
||||
@@ -96,7 +96,7 @@ const { schemas, errors: validationErrors } = useYamlSchemaValidation({ yaml: ra
|
||||
</div>
|
||||
|
||||
<div v-if="validationErrors.length > 0" mb-2 mt-2>
|
||||
<n-alert title="Schema Validation Errors" type="error">
|
||||
<n-alert :title="t('tools.yaml-viewer.texts.title-schema-validation-errors')" type="error">
|
||||
<ul
|
||||
v-for="error in validationErrors"
|
||||
:key="error"
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
import { DeviceDesktop } from '@vicons/tabler';
|
||||
import { defineTool } from '../tool';
|
||||
import { translate as t } from '@/plugins/i18n.plugin';
|
||||
|
||||
export const tool = defineTool({
|
||||
name: 'ZPOOL RAID calculator',
|
||||
name: t('tools.zpool-calculator.title'),
|
||||
path: '/zpool-calculator',
|
||||
description: 'Determine the usable capacity and other metrics of a ZFS storage pool and compare layouts including stripe, mirror, RAIDZ1, RAIDZ2, RAIDZ3, and dRAID.',
|
||||
description: t('tools.zpool-calculator.description'),
|
||||
keywords: ['zpool', 'raid', 'calculator', 'zfs', 'openzfs'],
|
||||
component: () => import('./zpool-calculator.vue'),
|
||||
icon: DeviceDesktop,
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
<script setup lang="ts">
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import { useThemeVars } from 'naive-ui';
|
||||
|
||||
const { t } = useI18n();
|
||||
|
||||
const themeVars = useThemeVars();
|
||||
|
||||
const base = import.meta.env.BASE_URL ?? '/';
|
||||
@@ -17,57 +20,57 @@ await loadCapacity();
|
||||
<table class="inputs">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><label id="disks" class="tooltip">?</label><label for="disks">Total Disks in Pool:</label></td>
|
||||
<td><label id="disks" class="tooltip">{{ t('tools.zpool-calculator.texts.tag-') }}</label><label for="disks">{{ t('tools.zpool-calculator.texts.tag-total-disks-in-pool') }}</label></td>
|
||||
<td><input id="disks" class="monitor" type="text" name="disks" value="24"></td>
|
||||
|
||||
<td><label id="add_disk" for="add_disk">Add Disk (TB):</label></td>
|
||||
<td><label id="add_disk" for="add_disk">{{ t('tools.zpool-calculator.texts.tag-add-disk-tb') }}</label></td>
|
||||
<td><input id="add_disk" type="text" name="add_disk"></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td id="add_disk_buttons" colspan="2">
|
||||
<div class="rocker-button">
|
||||
<div id="plus_1" class="half up">
|
||||
<div id="plus_1" class="up half">
|
||||
<div class="arrow">
|
||||
+
|
||||
{{ t('tools.zpool-calculator.texts.tag-') }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="center-text">
|
||||
1
|
||||
{{ t('tools.zpool-calculator.texts.tag-1') }}
|
||||
</div>
|
||||
<div id="minus_1" class="half down">
|
||||
<div class="arrow">
|
||||
-
|
||||
{{ t('tools.zpool-calculator.texts.tag-') }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="rocker-button">
|
||||
<div id="plus_10" class="half up">
|
||||
<div class="arrow">
|
||||
+
|
||||
{{ t('tools.zpool-calculator.texts.tag-') }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="center-text">
|
||||
10
|
||||
{{ t('tools.zpool-calculator.texts.tag-10') }}
|
||||
</div>
|
||||
<div id="minus_10" class="half down">
|
||||
<div class="arrow">
|
||||
-
|
||||
{{ t('tools.zpool-calculator.texts.tag-') }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="rocker-button">
|
||||
<div id="plus_100" class="half up">
|
||||
<div class="arrow">
|
||||
+
|
||||
{{ t('tools.zpool-calculator.texts.tag-') }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="center-text">
|
||||
100
|
||||
{{ t('tools.zpool-calculator.texts.tag-100') }}
|
||||
</div>
|
||||
<div id="minus_100" class="half down">
|
||||
<div class="arrow">
|
||||
-
|
||||
{{ t('tools.zpool-calculator.texts.tag-') }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -75,60 +78,60 @@ await loadCapacity();
|
||||
<div class="rocker-button">
|
||||
<div id="plus_12" class="half up">
|
||||
<div class="arrow">
|
||||
+
|
||||
{{ t('tools.zpool-calculator.texts.tag-') }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="center-text">
|
||||
12
|
||||
{{ t('tools.zpool-calculator.texts.tag-12') }}
|
||||
</div>
|
||||
<div id="minus_12" class="half down">
|
||||
<div class="arrow">
|
||||
-
|
||||
{{ t('tools.zpool-calculator.texts.tag-') }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="rocker-button">
|
||||
<div id="plus_24" class="half up">
|
||||
<div class="arrow">
|
||||
+
|
||||
{{ t('tools.zpool-calculator.texts.tag-') }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="center-text">
|
||||
24
|
||||
{{ t('tools.zpool-calculator.texts.tag-24') }}
|
||||
</div>
|
||||
<div id="minus_24" class="half down">
|
||||
<div class="arrow">
|
||||
-
|
||||
{{ t('tools.zpool-calculator.texts.tag-') }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="rocker-button">
|
||||
<div id="plus_60" class="half up">
|
||||
<div class="arrow">
|
||||
+
|
||||
{{ t('tools.zpool-calculator.texts.tag-') }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="center-text">
|
||||
60
|
||||
{{ t('tools.zpool-calculator.texts.tag-60') }}
|
||||
</div>
|
||||
<div id="minus_60" class="half down">
|
||||
<div class="arrow">
|
||||
-
|
||||
{{ t('tools.zpool-calculator.texts.tag-') }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="rocker-button">
|
||||
<div id="plus_102" class="half up">
|
||||
<div class="arrow">
|
||||
+
|
||||
{{ t('tools.zpool-calculator.texts.tag-') }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="center-text">
|
||||
102
|
||||
{{ t('tools.zpool-calculator.texts.tag-102') }}
|
||||
</div>
|
||||
<div id="minus_102" class="half down">
|
||||
<div class="arrow">
|
||||
-
|
||||
{{ t('tools.zpool-calculator.texts.tag-') }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -136,118 +139,118 @@ await loadCapacity();
|
||||
|
||||
<td id="add_disk_button">
|
||||
<button id="add_disk" type="button">
|
||||
Add Disk
|
||||
{{ t('tools.zpool-calculator.texts.tag-add-disk') }}
|
||||
</button>
|
||||
</td>
|
||||
<td id="tb_gb_button">
|
||||
<button id="tb_gb" type="button">
|
||||
TB/GB
|
||||
{{ t('tools.zpool-calculator.texts.tag-tb-gb') }}
|
||||
</button>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td><label id="min_spares" class="tooltip">?</label><label for="min_spares">Minimum Spares:</label></td>
|
||||
<td><label id="min_spares" class="tooltip">{{ t('tools.zpool-calculator.texts.tag-') }}</label><label for="min_spares">{{ t('tools.zpool-calculator.texts.tag-minimum-spares') }}</label></td>
|
||||
<td><input id="min_spares" class="monitor" type="text" name="min_spares" value="0"></td>
|
||||
|
||||
<td><label id="add_vdev_type" for="add_vdev_type">New vdev Type:</label></td>
|
||||
<td><label id="add_vdev_type" for="add_vdev_type">{{ t('tools.zpool-calculator.texts.tag-new-vdev-type') }}</label></td>
|
||||
<td>
|
||||
<select id="add_vdev_type" name="add_vdev_type">
|
||||
<option value="mirror">
|
||||
Mirror
|
||||
{{ t('tools.zpool-calculator.texts.tag-mirror') }}
|
||||
</option>
|
||||
<option value="z1">
|
||||
RAIDZ1
|
||||
{{ t('tools.zpool-calculator.texts.tag-raidz1') }}
|
||||
</option>
|
||||
<option value="z2">
|
||||
RAIDZ2
|
||||
{{ t('tools.zpool-calculator.texts.tag-raidz2') }}
|
||||
</option>
|
||||
<option value="z3">
|
||||
RAIDZ3
|
||||
{{ t('tools.zpool-calculator.texts.tag-raidz3') }}
|
||||
</option>
|
||||
<option value="draid">
|
||||
dRAID
|
||||
{{ t('tools.zpool-calculator.texts.tag-draid') }}
|
||||
</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr id="new_vdev">
|
||||
<td><label id="use_new_slop" class="tooltip">?</label><label for="use_new_slop">OpenZFS 2.0.7 Slop:</label></td>
|
||||
<td><label id="use_new_slop" class="tooltip">{{ t('tools.zpool-calculator.texts.tag-') }}</label><label for="use_new_slop">{{ t('tools.zpool-calculator.texts.tag-openzfs-2-0-7-slop') }}</label></td>
|
||||
<td><input id="use_new_slop" class="monitor" type="checkbox" name="use_new_slop" checked></td>
|
||||
|
||||
<td><label id="add_vdev" for="add_vdev">New Vdev Width:</label></td>
|
||||
<td><label id="add_vdev" for="add_vdev">{{ t('tools.zpool-calculator.texts.tag-new-vdev-width') }}</label></td>
|
||||
<td><input id="add_vdev" type="text" name="add_vdev"></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td><label id="recordsize" class="tooltip">?</label><label for="recordsize">ZFS recordsize value:</label></td>
|
||||
<td><label id="recordsize" class="tooltip">{{ t('tools.zpool-calculator.texts.tag-') }}</label><label for="recordsize">{{ t('tools.zpool-calculator.texts.tag-zfs-recordsize-value') }}</label></td>
|
||||
<td>
|
||||
<select id="recordsize" class="monitor" name="recordsize">
|
||||
<option value="4">
|
||||
4 KiB
|
||||
{{ t('tools.zpool-calculator.texts.tag-4-kib') }}
|
||||
</option>
|
||||
<option value="8">
|
||||
8 KiB
|
||||
{{ t('tools.zpool-calculator.texts.tag-8-kib') }}
|
||||
</option>
|
||||
<option value="16">
|
||||
16 KiB
|
||||
{{ t('tools.zpool-calculator.texts.tag-16-kib') }}
|
||||
</option>
|
||||
<option value="32">
|
||||
32 KiB
|
||||
{{ t('tools.zpool-calculator.texts.tag-32-kib') }}
|
||||
</option>
|
||||
<option value="64">
|
||||
64 KiB
|
||||
{{ t('tools.zpool-calculator.texts.tag-64-kib') }}
|
||||
</option>
|
||||
<option value="128" selected>
|
||||
128 KiB
|
||||
{{ t('tools.zpool-calculator.texts.tag-128-kib') }}
|
||||
</option>
|
||||
<option value="256">
|
||||
256 KiB
|
||||
{{ t('tools.zpool-calculator.texts.tag-256-kib') }}
|
||||
</option>
|
||||
<option value="512">
|
||||
512 KiB
|
||||
{{ t('tools.zpool-calculator.texts.tag-512-kib') }}
|
||||
</option>
|
||||
<option value="1024">
|
||||
1 MiB
|
||||
{{ t('tools.zpool-calculator.texts.tag-1-mib') }}
|
||||
</option>
|
||||
<option value="2048">
|
||||
2 MiB
|
||||
{{ t('tools.zpool-calculator.texts.tag-2-mib') }}
|
||||
</option>
|
||||
<option value="4096">
|
||||
4 MiB
|
||||
{{ t('tools.zpool-calculator.texts.tag-4-mib') }}
|
||||
</option>
|
||||
<option value="8192">
|
||||
8 MiB
|
||||
{{ t('tools.zpool-calculator.texts.tag-8-mib') }}
|
||||
</option>
|
||||
<option value="16384">
|
||||
16 MiB
|
||||
{{ t('tools.zpool-calculator.texts.tag-16-mib') }}
|
||||
</option>
|
||||
</select>
|
||||
</td>
|
||||
|
||||
<td id="vdev_button" colspan="2">
|
||||
<button id="add_vdev" type="button">
|
||||
Add vdev Layout
|
||||
{{ t('tools.zpool-calculator.texts.tag-add-vdev-layout') }}
|
||||
</button>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td><label id="ashift" class="tooltip">?</label><label for="ashift">ZFS ashift value:</label></td>
|
||||
<td><label id="ashift" class="tooltip">{{ t('tools.zpool-calculator.texts.tag-') }}</label><label for="ashift">{{ t('tools.zpool-calculator.texts.tag-zfs-ashift-value') }}</label></td>
|
||||
<td>
|
||||
<select id="ashift" class="monitor" name="ashift">
|
||||
<option value="9">
|
||||
9
|
||||
{{ t('tools.zpool-calculator.texts.tag-9') }}
|
||||
</option>
|
||||
<option value="12" selected>
|
||||
12
|
||||
{{ t('tools.zpool-calculator.texts.tag-12') }}
|
||||
</option>
|
||||
<option value="13">
|
||||
13
|
||||
{{ t('tools.zpool-calculator.texts.tag-13') }}
|
||||
</option>
|
||||
<option value="14">
|
||||
14
|
||||
{{ t('tools.zpool-calculator.texts.tag-14') }}
|
||||
</option>
|
||||
</select>
|
||||
</td>
|
||||
@@ -256,70 +259,70 @@ await loadCapacity();
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td><label id="swap_size" class="tooltip">?</label><label for="swap_size">Disk Swap Size:</label></td>
|
||||
<td><label id="swap_size" class="tooltip">{{ t('tools.zpool-calculator.texts.tag-') }}</label><label for="swap_size">{{ t('tools.zpool-calculator.texts.tag-disk-swap-size') }}</label></td>
|
||||
<td>
|
||||
<select id="swap_size" class="monitor" name="swap_size">
|
||||
<option value="0" selected>
|
||||
0 GiB
|
||||
{{ t('tools.zpool-calculator.texts.tag-0-gib') }}
|
||||
</option>
|
||||
<option value="2">
|
||||
2 GiB
|
||||
{{ t('tools.zpool-calculator.texts.tag-2-gib') }}
|
||||
</option>
|
||||
<option value="4">
|
||||
4 GiB
|
||||
{{ t('tools.zpool-calculator.texts.tag-4-gib') }}
|
||||
</option>
|
||||
<option value="8">
|
||||
8 GiB
|
||||
{{ t('tools.zpool-calculator.texts.tag-8-gib') }}
|
||||
</option>
|
||||
</select>
|
||||
</td>
|
||||
|
||||
<td><label>Table Data:</label></td>
|
||||
<td><label>{{ t('tools.zpool-calculator.texts.tag-table-data') }}</label></td>
|
||||
<td>
|
||||
<input id="usable_cap_tib" class="monitor" type="radio" name="table_data" value="usable_cap_tib" checked>
|
||||
<label for="usable_cap_tib">Usable Capacity (TiB)</label><label id="usable_cap_tib" class="tooltip">?</label>
|
||||
<label for="usable_cap_tib">{{ t('tools.zpool-calculator.texts.tag-usable-capacity-tib') }}</label><label id="usable_cap_tib" class="tooltip">{{ t('tools.zpool-calculator.texts.tag-') }}</label>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td><label for="decimal_places">Decimal Places:</label></td>
|
||||
<td><label for="decimal_places">{{ t('tools.zpool-calculator.texts.tag-decimal-places') }}</label></td>
|
||||
<td>
|
||||
<select id="decimal_places" class="monitor" name="decimal_places">
|
||||
<option value="0">
|
||||
0
|
||||
{{ t('tools.zpool-calculator.texts.tag-0') }}
|
||||
</option>
|
||||
<option value="1">
|
||||
1
|
||||
{{ t('tools.zpool-calculator.texts.tag-1') }}
|
||||
</option>
|
||||
<option value="2">
|
||||
2
|
||||
{{ t('tools.zpool-calculator.texts.tag-2') }}
|
||||
</option>
|
||||
<option value="3" selected>
|
||||
3
|
||||
{{ t('tools.zpool-calculator.texts.tag-3') }}
|
||||
</option>
|
||||
<option value="4">
|
||||
4
|
||||
{{ t('tools.zpool-calculator.texts.tag-4') }}
|
||||
</option>
|
||||
<option value="5">
|
||||
5
|
||||
{{ t('tools.zpool-calculator.texts.tag-5') }}
|
||||
</option>
|
||||
<option value="6">
|
||||
6
|
||||
{{ t('tools.zpool-calculator.texts.tag-6') }}
|
||||
</option>
|
||||
<option value="7">
|
||||
7
|
||||
{{ t('tools.zpool-calculator.texts.tag-7') }}
|
||||
</option>
|
||||
<option value="8">
|
||||
8
|
||||
{{ t('tools.zpool-calculator.texts.tag-8') }}
|
||||
</option>
|
||||
<option value="9">
|
||||
9
|
||||
{{ t('tools.zpool-calculator.texts.tag-9') }}
|
||||
</option>
|
||||
<option value="10">
|
||||
10
|
||||
{{ t('tools.zpool-calculator.texts.tag-10') }}
|
||||
</option>
|
||||
<option value="bytes">
|
||||
bytes
|
||||
{{ t('tools.zpool-calculator.texts.tag-bytes') }}
|
||||
</option>
|
||||
</select>
|
||||
</td>
|
||||
@@ -327,49 +330,49 @@ await loadCapacity();
|
||||
<td />
|
||||
<td>
|
||||
<input id="usable_cap_tb" class="monitor" type="radio" name="table_data" value="usable_cap_tb">
|
||||
<label for="usable_cap_tb">Usable Capacity (TB)</label><label id="usable_cap_tb" class="tooltip">?</label>
|
||||
<label for="usable_cap_tb">{{ t('tools.zpool-calculator.texts.tag-usable-capacity-tb') }}</label><label id="usable_cap_tb" class="tooltip">{{ t('tools.zpool-calculator.texts.tag-') }}</label>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td><label id="show_deflate" class="tooltip">?</label><label for="show_deflate">Show Deflate Ratio:</label></td>
|
||||
<td><label id="show_deflate" class="tooltip">{{ t('tools.zpool-calculator.texts.tag-') }}</label><label for="show_deflate">{{ t('tools.zpool-calculator.texts.tag-show-deflate-ratio') }}</label></td>
|
||||
<td><input id="show_deflate" class="monitor" type="checkbox" name="show_deflate"></td>
|
||||
|
||||
<td />
|
||||
<td>
|
||||
<input id="efficiency" class="monitor" type="radio" name="table_data" value="efficiency">
|
||||
<label for="efficiency">Capacity Efficiency</label><label id="efficiency" class="tooltip">?</label>
|
||||
<label for="efficiency">{{ t('tools.zpool-calculator.texts.tag-capacity-efficiency') }}</label><label id="efficiency" class="tooltip">{{ t('tools.zpool-calculator.texts.tag-') }}</label>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td><label id="show_afr" class="tooltip">?</label><label for="show_afr">Show Pool AFR:</label></td>
|
||||
<td><label id="show_afr" class="tooltip">{{ t('tools.zpool-calculator.texts.tag-') }}</label><label for="show_afr">{{ t('tools.zpool-calculator.texts.tag-show-pool-afr') }}</label></td>
|
||||
<td><input id="show_afr" class="monitor" type="checkbox" name="show_afr"></td>
|
||||
|
||||
<td />
|
||||
<td>
|
||||
<input id="overhead" class="monitor" type="radio" name="table_data" value="overhead">
|
||||
<label for="overhead">ZFS Overhead</label><label id="overhead" class="tooltip">?</label>
|
||||
<label for="overhead">{{ t('tools.zpool-calculator.texts.tag-zfs-overhead') }}</label><label id="overhead" class="tooltip">{{ t('tools.zpool-calculator.texts.tag-') }}</label>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td><label id="disk_afr_label" for="disk_afr" style="color: grey;">Disk AFR (%):</label></td>
|
||||
<td><label id="disk_afr_label" for="disk_afr" style="color: grey;">{{ t('tools.zpool-calculator.texts.tag-disk-afr') }}</label></td>
|
||||
<td><input id="disk_afr" class="monitor" type="text" name="disk_afr" value="5" disabled></td>
|
||||
|
||||
<td />
|
||||
<td>
|
||||
<input id="cap_w_reserve" class="monitor" type="radio" name="table_data" value="cap_w_reserve">
|
||||
<label for="cap_w_reserve">Cap. w/ Reservation</label><label id="cap_w_reserve" class="tooltip">?</label>
|
||||
<label for="cap_w_reserve">{{ t('tools.zpool-calculator.texts.tag-cap-w-reservation') }}</label><label id="cap_w_reserve" class="tooltip">{{ t('tools.zpool-calculator.texts.tag-') }}</label>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td><label id="fast_draid" class="tooltip">?</label><label for="fast_draid">Fast dRAID Calculation:</label></td>
|
||||
<td><label id="fast_draid" class="tooltip">{{ t('tools.zpool-calculator.texts.tag-') }}</label><label for="fast_draid">{{ t('tools.zpool-calculator.texts.tag-fast-draid-calculation') }}</label></td>
|
||||
<td><input id="fast_draid" class="monitor" type="checkbox" name="fast_draid" checked></td>
|
||||
|
||||
<td id="res_label">
|
||||
<label id="reservation" for="reservation" style="color: grey;">Reservation (%):</label>
|
||||
<label id="reservation" for="reservation" style="color: grey;">{{ t('tools.zpool-calculator.texts.tag-reservation') }}</label>
|
||||
</td>
|
||||
<td id="res_input">
|
||||
<input id="reservation" class="monitor" type="text" name="reservation" value="20" disabled>
|
||||
@@ -377,33 +380,33 @@ await loadCapacity();
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td><label id="show" class="tooltip">?</label><label for="show">Show Only:</label></td>
|
||||
<td><label id="show" class="tooltip">{{ t('tools.zpool-calculator.texts.tag-') }}</label><label for="show">{{ t('tools.zpool-calculator.texts.tag-show-only') }}</label></td>
|
||||
<td>
|
||||
<select id="show" class="monitor" name="show">
|
||||
<option value="all" selected>
|
||||
All
|
||||
{{ t('tools.zpool-calculator.texts.tag-all') }}
|
||||
</option>
|
||||
<option value="stripes">
|
||||
Mirrors/Stripes
|
||||
{{ t('tools.zpool-calculator.texts.tag-mirrors-stripes') }}
|
||||
</option>
|
||||
<option value="raidz1">
|
||||
RAIDZ1
|
||||
{{ t('tools.zpool-calculator.texts.tag-raidz1') }}
|
||||
</option>
|
||||
<option value="raidz2">
|
||||
RAIDZ2
|
||||
{{ t('tools.zpool-calculator.texts.tag-raidz2') }}
|
||||
</option>
|
||||
<option value="raidz3">
|
||||
RAIDZ3
|
||||
{{ t('tools.zpool-calculator.texts.tag-raidz3') }}
|
||||
</option>
|
||||
<option value="draid">
|
||||
dRAID
|
||||
{{ t('tools.zpool-calculator.texts.tag-draid') }}
|
||||
</option>
|
||||
</select>
|
||||
</td>
|
||||
|
||||
<td id="reset_button" colspan="2">
|
||||
<button id="reset_button" type="button">
|
||||
Reset
|
||||
{{ t('tools.zpool-calculator.texts.tag-reset') }}
|
||||
</button>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -416,62 +419,62 @@ await loadCapacity();
|
||||
|
||||
<n-space justify="center">
|
||||
<router-link target="_blank" to="/zpool-memo" mb-1 mt-2>
|
||||
See Zpool/OpenZFS Cheatsheet
|
||||
{{ t('tools.zpool-calculator.texts.tag-see-zpool-openzfs-cheatsheet') }}
|
||||
</router-link>
|
||||
</n-space>
|
||||
|
||||
<p class="subsect_label">
|
||||
Click on the section titles to expand/collapse and view calculated data. Hovering over a table cell loads the relevant data into the Calculation Values section below. You can click table cells to freeze or unfreeze those values.
|
||||
{{ t('tools.zpool-calculator.texts.tag-click-on-the-section-titles-to-expand-collapse-and-view-calculated-data-hovering-over-a-table-cell-loads-the-relevant-data-into-the-calculation-values-section-below-you-can-click-table-cells-to-freeze-or-unfreeze-those-values') }}
|
||||
</p>
|
||||
|
||||
<details id="common" class="raid_results">
|
||||
<summary>Common Layouts</summary>
|
||||
<summary>{{ t('tools.zpool-calculator.texts.tag-common-layouts') }}</summary>
|
||||
<div id="common" class="results-container">
|
||||
<table id="common" class="results" />
|
||||
</div>
|
||||
</details>
|
||||
|
||||
<details id="stripes" class="raid_results">
|
||||
<summary>Raw, Stripes, & Mirrors</summary>
|
||||
<summary>{{ t('tools.zpool-calculator.texts.tag-raw-stripes-mirrors') }}</summary>
|
||||
<div id="stripes" class="results-container">
|
||||
<table id="stripes" class="results" />
|
||||
</div>
|
||||
</details>
|
||||
|
||||
<details id="raidz1" class="raid_results">
|
||||
<summary>RAIDZ1</summary>
|
||||
<summary>{{ t('tools.zpool-calculator.texts.tag-raidz1') }}</summary>
|
||||
<div id="raidz1" class="results-container">
|
||||
<table id="raidz1" class="results" />
|
||||
</div>
|
||||
</details>
|
||||
|
||||
<details id="raidz2" class="raid_results">
|
||||
<summary>RAIDZ2</summary>
|
||||
<summary>{{ t('tools.zpool-calculator.texts.tag-raidz2') }}</summary>
|
||||
<div id="raidz2" class="results-container">
|
||||
<table id="raidz2" class="results" />
|
||||
</div>
|
||||
</details>
|
||||
|
||||
<details id="raidz3" class="raid_results">
|
||||
<summary>RAIDZ3</summary>
|
||||
<summary>{{ t('tools.zpool-calculator.texts.tag-raidz3') }}</summary>
|
||||
<div id="raidz3" class="results-container">
|
||||
<table id="raidz3" class="results" />
|
||||
</div>
|
||||
</details>
|
||||
|
||||
<details id="draid" class="raid_results">
|
||||
<summary>dRAID</summary>
|
||||
<summary>{{ t('tools.zpool-calculator.texts.tag-draid') }}</summary>
|
||||
<div id="draid" class="results-container">
|
||||
<table id="draid" class="results" />
|
||||
</div>
|
||||
</details>
|
||||
|
||||
<h2 id="debug_vals" class="sect_labels">
|
||||
Calculation Values
|
||||
{{ t('tools.zpool-calculator.texts.tag-calculation-values') }}
|
||||
</h2>
|
||||
<div id="debug_vals">
|
||||
<p class="subsect_label">
|
||||
(Click table cells above to freeze/unfreeze)
|
||||
{{ t('tools.zpool-calculator.texts.tag-click-table-cells-above-to-freeze-unfreeze') }}
|
||||
</p>
|
||||
<table id="debug_vals" class="debug" />
|
||||
</div>
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
import { DeviceDesktop } from '@vicons/tabler';
|
||||
import { defineTool } from '../tool';
|
||||
import { translate as t } from '@/plugins/i18n.plugin';
|
||||
|
||||
export const tool = defineTool({
|
||||
name: 'ZPool Cheatsheet',
|
||||
name: t('tools.zpool-memo.title'),
|
||||
path: '/zpool-memo',
|
||||
description: 'OpenZFS/ZPool usage commands and info',
|
||||
description: t('tools.zpool-memo.description'),
|
||||
keywords: ['zpool', 'raid', 'cheatsheet', 'zfs', 'openzfs'],
|
||||
component: () => import('./zpool-memo.vue'),
|
||||
icon: DeviceDesktop,
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
import { defineTool } from '../tool';
|
||||
import { translate as t } from '@/plugins/i18n.plugin';
|
||||
import PasswordIcon from '~icons/mdi/form-textbox-password';
|
||||
|
||||
export const tool = defineTool({
|
||||
name: 'Zxcvbn Password Strength',
|
||||
name: t('tools.zxcvbn-password-strength.title'),
|
||||
path: '/zxcvbn-password-strength',
|
||||
description: 'Compute a given password strength using zxcvbn',
|
||||
description: t('tools.zxcvbn-password-strength.description'),
|
||||
keywords: ['zxcvbn', 'password', 'strength'],
|
||||
component: () => import('./zxcvbn-password-strength.vue'),
|
||||
icon: PasswordIcon,
|
||||
|
||||
Loaded 100 of 101 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user