Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 26 additions & 26 deletions src/components/history/ItemMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -116,80 +116,80 @@ export function ItemMenu({ item, isOpen, onClose, onMouseEnter, onMouseLeave, an
switch (item.detectedFormat) {
case 'json':
return [
{ icon: Sparkles, label: 'Beautify', action: () => openTransform(item, 'Beautify JSON', transforms.beautifyJson(item.content)) },
{ icon: Minimize2, label: 'Minify', action: () => openTransform(item, 'Minify JSON', transforms.minifyJson(item.content)) },
{ icon: ArrowRightLeft, label: 'To YAML', action: () => openTransform(item, 'JSON → YAML', transforms.jsonToYaml(item.content)) },
{ icon: Sparkles, label: t('history.transform.beautify'), action: () => openTransform(item, 'Beautify JSON', transforms.beautifyJson(item.content)) },
{ icon: Minimize2, label: t('history.transform.minify'), action: () => openTransform(item, 'Minify JSON', transforms.minifyJson(item.content)) },
{ icon: ArrowRightLeft, label: t('history.transform.toYaml'), action: () => openTransform(item, 'JSON → YAML', transforms.jsonToYaml(item.content)) },
];
case 'jwt':
return [
{ icon: Unlock, label: 'Decode', action: () => {
{ icon: Unlock, label: t('history.transform.decode'), action: () => {
const decoded = transforms.decodeJwt(item.content);
openTransform(item, 'Decode JWT', decoded ? JSON.stringify(decoded, null, 2) : 'Invalid JWT');
}},
];
case 'base64':
return [
{ icon: Unlock, label: 'Decode', action: () => openTransform(item, 'Decode Base64', transforms.decodeBase64(item.content)) },
{ icon: Lock, label: 'Encode', action: () => openTransform(item, 'Encode Base64', transforms.encodeBase64(item.content)) },
{ icon: Unlock, label: t('history.transform.decode'), action: () => openTransform(item, 'Decode Base64', transforms.decodeBase64(item.content)) },
{ icon: Lock, label: t('history.transform.encode'), action: () => openTransform(item, 'Encode Base64', transforms.encodeBase64(item.content)) },
];
case 'url':
return [
{ icon: Unlock, label: 'Decode', action: () => openTransform(item, 'Decode URL', transforms.decodeUrl(item.content)) },
{ icon: Unlock, label: t('history.transform.decode'), action: () => openTransform(item, 'Decode URL', transforms.decodeUrl(item.content)) },
];
case 'url_encoded':
return [
{ icon: Unlock, label: 'Decode', action: () => openTransform(item, 'Decode URL', transforms.decodeUrl(item.content)) },
{ icon: Unlock, label: t('history.transform.decode'), action: () => openTransform(item, 'Decode URL', transforms.decodeUrl(item.content)) },
];
case 'sql':
return [
{ icon: Sparkles, label: 'Format', action: () => openTransform(item, 'Format SQL', transforms.formatSql(item.content)) },
{ icon: Sparkles, label: t('history.transform.format'), action: () => openTransform(item, 'Format SQL', transforms.formatSql(item.content)) },
];
case 'timestamp':
return [
{ icon: Sparkles, label: 'To Date', action: () => openTransform(item, 'Timestamp to Date', transforms.timestampToDate(item.content)) },
{ icon: Sparkles, label: t('history.transform.toDate'), action: () => openTransform(item, 'Timestamp to Date', transforms.timestampToDate(item.content)) },
];
case 'yaml':
return [
{ icon: Sparkles, label: 'Beautify', action: () => openTransform(item, 'Beautify YAML', transforms.beautifyYaml(item.content)) },
{ icon: ArrowRightLeft, label: 'To JSON', action: () => openTransform(item, 'YAML → JSON', transforms.yamlToJson(item.content)) },
{ icon: Info, label: 'Validate', action: () => {
{ icon: Sparkles, label: t('history.transform.beautify'), action: () => openTransform(item, 'Beautify YAML', transforms.beautifyYaml(item.content)) },
{ icon: ArrowRightLeft, label: t('history.transform.toJson'), action: () => openTransform(item, 'YAML → JSON', transforms.yamlToJson(item.content)) },
{ icon: Info, label: t('history.transform.validate'), action: () => {
const result = transforms.validateYaml(item.content);
openTransform(item, 'Validate YAML', result.valid ? '✓ Valid YAML' : `✗ Invalid: ${result.error}`);
}},
];
case 'color':
return [
{ icon: Palette, label: 'To HEX', action: () => openTransform(item, 'Color → HEX', transforms.colorToHex(item.content)) },
{ icon: Palette, label: 'To RGB', action: () => openTransform(item, 'Color → RGB', transforms.colorToRgb(item.content)) },
{ icon: Palette, label: 'To HSL', action: () => openTransform(item, 'Color → HSL', transforms.colorToHsl(item.content)) },
{ icon: Info, label: 'Color Info', action: () => openTransform(item, 'Color Info', transforms.colorInfo(item.content)) },
{ icon: Palette, label: t('history.transform.toHex'), action: () => openTransform(item, 'Color → HEX', transforms.colorToHex(item.content)) },
{ icon: Palette, label: t('history.transform.toRgb'), action: () => openTransform(item, 'Color → RGB', transforms.colorToRgb(item.content)) },
{ icon: Palette, label: t('history.transform.toHsl'), action: () => openTransform(item, 'Color → HSL', transforms.colorToHsl(item.content)) },
{ icon: Info, label: t('history.transform.colorInfo'), action: () => openTransform(item, 'Color Info', transforms.colorInfo(item.content)) },
];
case 'csv':
return [
{ icon: ArrowRightLeft, label: 'To JSON', action: () => openTransform(item, 'CSV → JSON', transforms.csvToJson(item.content)) },
{ icon: Info, label: 'CSV Info', action: () => openTransform(item, 'CSV Info', transforms.csvInfo(item.content)) },
{ icon: ArrowRightLeft, label: t('history.transform.toJson'), action: () => openTransform(item, 'CSV → JSON', transforms.csvToJson(item.content)) },
{ icon: Info, label: t('history.transform.csvInfo'), action: () => openTransform(item, 'CSV Info', transforms.csvInfo(item.content)) },
];
case 'regex':
return [
{ icon: Info, label: 'Regex Info', action: () => openTransform(item, 'Regex Info', transforms.regexInfo(item.content)) },
{ icon: Lock, label: 'Escape', action: () => openTransform(item, 'Escape Regex', transforms.escapeRegex(item.content)) },
{ icon: Info, label: t('history.transform.regexInfo'), action: () => openTransform(item, 'Regex Info', transforms.regexInfo(item.content)) },
{ icon: Lock, label: t('history.transform.escape'), action: () => openTransform(item, 'Escape Regex', transforms.escapeRegex(item.content)) },
];
case 'hex':
return [
{ icon: Hash, label: 'To Text', action: () => openTransform(item, 'Hex → Text', transforms.hexToText(item.content)) },
{ icon: Binary, label: 'To Decimal', action: () => openTransform(item, 'Hex → Decimal', transforms.hexToDecimal(item.content)) },
{ icon: Binary, label: 'To Binary', action: () => openTransform(item, 'Hex → Binary', transforms.hexToBinary(item.content)) },
{ icon: Hash, label: t('history.transform.toText'), action: () => openTransform(item, 'Hex → Text', transforms.hexToText(item.content)) },
{ icon: Binary, label: t('history.transform.toDecimal'), action: () => openTransform(item, 'Hex → Decimal', transforms.hexToDecimal(item.content)) },
{ icon: Binary, label: t('history.transform.toBinary'), action: () => openTransform(item, 'Hex → Binary', transforms.hexToBinary(item.content)) },
];
case 'code_js':
return [
{ icon: Sparkles, label: 'Beautify', action: async () => {
{ icon: Sparkles, label: t('history.transform.beautify'), action: async () => {
const formatted = await transforms.beautifyJavaScript(item.content);
openTransform(item, 'Beautify JavaScript', formatted);
}},
];
case 'code_ts':
return [
{ icon: Sparkles, label: 'Beautify', action: async () => {
{ icon: Sparkles, label: t('history.transform.beautify'), action: async () => {
const formatted = await transforms.beautifyTypeScript(item.content);
openTransform(item, 'Beautify TypeScript', formatted);
}},
Expand Down
21 changes: 20 additions & 1 deletion src/i18n/locales/ar.json
Original file line number Diff line number Diff line change
Expand Up @@ -412,5 +412,24 @@
"history.tags.deleteTitle": "حذف الوسم",
"history.tags.deleteMessage": "إزالة \"{{name}}\" من كل نسخة؟ لا يمكن التراجع عن هذا.",
"settings.historyLimit.items": "{{num}} عنصر",
"onboarding.hint.summon": "افتحه من أي مكان بـ"
"onboarding.hint.summon": "افتحه من أي مكان بـ",
"history.transform.beautify": "تجميل",
"history.transform.minify": "تصغير",
"history.transform.decode": "فك التشفير",
"history.transform.encode": "ترميز",
"history.transform.format": "تنسيق",
"history.transform.validate": "تحقق",
"history.transform.escape": "تجاوز",
"history.transform.toYaml": "إلى YAML",
"history.transform.toJson": "إلى JSON",
"history.transform.toDate": "إلى تاريخ",
"history.transform.toHex": "إلى HEX",
"history.transform.toRgb": "إلى RGB",
"history.transform.toHsl": "إلى HSL",
"history.transform.toText": "إلى نص",
"history.transform.toDecimal": "إلى عشري",
"history.transform.toBinary": "إلى ثنائي",
"history.transform.colorInfo": "معلومات اللون",
"history.transform.csvInfo": "معلومات CSV",
"history.transform.regexInfo": "معلومات Regex"
}
21 changes: 20 additions & 1 deletion src/i18n/locales/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -412,5 +412,24 @@
"history.tags.deleteTitle": "Tag löschen",
"history.tags.deleteMessage": "\"{{name}}\" von allen Clips entfernen? Das kann nicht rückgängig gemacht werden.",
"settings.historyLimit.items": "{{num}} Einträge",
"onboarding.hint.summon": "Von überall öffnen mit"
"onboarding.hint.summon": "Von überall öffnen mit",
"history.transform.beautify": "Verschönern",
"history.transform.minify": "Verkleinern",
"history.transform.decode": "Dekodieren",
"history.transform.encode": "Kodieren",
"history.transform.format": "Formatieren",
"history.transform.validate": "Validieren",
"history.transform.escape": "Escapen",
"history.transform.toYaml": "Zu YAML",
"history.transform.toJson": "Zu JSON",
"history.transform.toDate": "Zu Datum",
"history.transform.toHex": "Zu HEX",
"history.transform.toRgb": "Zu RGB",
"history.transform.toHsl": "Zu HSL",
"history.transform.toText": "Zu Text",
"history.transform.toDecimal": "Zu Dezimal",
"history.transform.toBinary": "Zu Binär",
"history.transform.colorInfo": "Farbinfo",
"history.transform.csvInfo": "CSV-Info",
"history.transform.regexInfo": "Regex-Info"
}
21 changes: 20 additions & 1 deletion src/i18n/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -412,5 +412,24 @@
"history.tags.deleteTitle": "Delete tag",
"history.tags.deleteMessage": "Remove \"{{name}}\" from every clip? This can't be undone.",
"settings.historyLimit.items": "{{num}} items",
"onboarding.hint.summon": "Open from anywhere with"
"onboarding.hint.summon": "Open from anywhere with",
"history.transform.beautify": "Beautify",
"history.transform.minify": "Minify",
"history.transform.decode": "Decode",
"history.transform.encode": "Encode",
"history.transform.format": "Format",
"history.transform.validate": "Validate",
"history.transform.escape": "Escape",
"history.transform.toYaml": "To YAML",
"history.transform.toJson": "To JSON",
"history.transform.toDate": "To Date",
"history.transform.toHex": "To HEX",
"history.transform.toRgb": "To RGB",
"history.transform.toHsl": "To HSL",
"history.transform.toText": "To Text",
"history.transform.toDecimal": "To Decimal",
"history.transform.toBinary": "To Binary",
"history.transform.colorInfo": "Color info",
"history.transform.csvInfo": "CSV info",
"history.transform.regexInfo": "Regex info"
}
21 changes: 20 additions & 1 deletion src/i18n/locales/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -412,5 +412,24 @@
"history.tags.deleteTitle": "Eliminar etiqueta",
"history.tags.deleteMessage": "¿Quitar \"{{name}}\" de todos los elementos? Esto no se puede deshacer.",
"settings.historyLimit.items": "{{num}} elementos",
"onboarding.hint.summon": "Ábrelo desde cualquier lugar con"
"onboarding.hint.summon": "Ábrelo desde cualquier lugar con",
"history.transform.beautify": "Embellecer",
"history.transform.minify": "Minificar",
"history.transform.decode": "Decodificar",
"history.transform.encode": "Codificar",
"history.transform.format": "Formatear",
"history.transform.validate": "Validar",
"history.transform.escape": "Escapar",
"history.transform.toYaml": "A YAML",
"history.transform.toJson": "A JSON",
"history.transform.toDate": "A fecha",
"history.transform.toHex": "A HEX",
"history.transform.toRgb": "A RGB",
"history.transform.toHsl": "A HSL",
"history.transform.toText": "A texto",
"history.transform.toDecimal": "A decimal",
"history.transform.toBinary": "A binario",
"history.transform.colorInfo": "Info de color",
"history.transform.csvInfo": "Info de CSV",
"history.transform.regexInfo": "Info de regex"
}
21 changes: 20 additions & 1 deletion src/i18n/locales/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -412,5 +412,24 @@
"history.tags.deleteTitle": "Supprimer l'étiquette",
"history.tags.deleteMessage": "Retirer « {{name}} » de tous les extraits ? Action irréversible.",
"settings.historyLimit.items": "{{num}} éléments",
"onboarding.hint.summon": "Ouvrir depuis partout avec"
"onboarding.hint.summon": "Ouvrir depuis partout avec",
"history.transform.beautify": "Embellir",
"history.transform.minify": "Minifier",
"history.transform.decode": "Décoder",
"history.transform.encode": "Encoder",
"history.transform.format": "Formater",
"history.transform.validate": "Valider",
"history.transform.escape": "Échapper",
"history.transform.toYaml": "Vers YAML",
"history.transform.toJson": "Vers JSON",
"history.transform.toDate": "Vers date",
"history.transform.toHex": "Vers HEX",
"history.transform.toRgb": "Vers RGB",
"history.transform.toHsl": "Vers HSL",
"history.transform.toText": "Vers texte",
"history.transform.toDecimal": "Vers décimal",
"history.transform.toBinary": "Vers binaire",
"history.transform.colorInfo": "Infos couleur",
"history.transform.csvInfo": "Infos CSV",
"history.transform.regexInfo": "Infos regex"
}
21 changes: 20 additions & 1 deletion src/i18n/locales/hi.json
Original file line number Diff line number Diff line change
Expand Up @@ -412,5 +412,24 @@
"history.tags.deleteTitle": "टैग हटाएं",
"history.tags.deleteMessage": "हर क्लिप से \"{{name}}\" हटाएं? इसे पूर्ववत नहीं किया जा सकता।",
"settings.historyLimit.items": "{{num}} आइटम",
"onboarding.hint.summon": "कहीं से भी खोलें:"
"onboarding.hint.summon": "कहीं से भी खोलें:",
"history.transform.beautify": "सुंदर बनाएं",
"history.transform.minify": "छोटा करें",
"history.transform.decode": "डिकोड",
"history.transform.encode": "एन्कोड",
"history.transform.format": "फ़ॉर्मैट",
"history.transform.validate": "सत्यापित करें",
"history.transform.escape": "एस्केप",
"history.transform.toYaml": "YAML में",
"history.transform.toJson": "JSON में",
"history.transform.toDate": "तारीख़ में",
"history.transform.toHex": "HEX में",
"history.transform.toRgb": "RGB में",
"history.transform.toHsl": "HSL में",
"history.transform.toText": "टेक्स्ट में",
"history.transform.toDecimal": "दशमलव में",
"history.transform.toBinary": "बाइनरी में",
"history.transform.colorInfo": "रंग जानकारी",
"history.transform.csvInfo": "CSV जानकारी",
"history.transform.regexInfo": "Regex जानकारी"
}
21 changes: 20 additions & 1 deletion src/i18n/locales/it.json
Original file line number Diff line number Diff line change
Expand Up @@ -412,5 +412,24 @@
"history.tags.deleteTitle": "Elimina tag",
"history.tags.deleteMessage": "Rimuovere \"{{name}}\" da tutti gli elementi? Operazione irreversibile.",
"settings.historyLimit.items": "{{num}} elementi",
"onboarding.hint.summon": "Aprilo da ovunque con"
"onboarding.hint.summon": "Aprilo da ovunque con",
"history.transform.beautify": "Abbellisci",
"history.transform.minify": "Minimizza",
"history.transform.decode": "Decodifica",
"history.transform.encode": "Codifica",
"history.transform.format": "Formatta",
"history.transform.validate": "Convalida",
"history.transform.escape": "Escape",
"history.transform.toYaml": "In YAML",
"history.transform.toJson": "In JSON",
"history.transform.toDate": "In data",
"history.transform.toHex": "In HEX",
"history.transform.toRgb": "In RGB",
"history.transform.toHsl": "In HSL",
"history.transform.toText": "In testo",
"history.transform.toDecimal": "In decimale",
"history.transform.toBinary": "In binario",
"history.transform.colorInfo": "Info colore",
"history.transform.csvInfo": "Info CSV",
"history.transform.regexInfo": "Info regex"
}
21 changes: 20 additions & 1 deletion src/i18n/locales/ja.json
Original file line number Diff line number Diff line change
Expand Up @@ -412,5 +412,24 @@
"history.tags.deleteTitle": "タグを削除",
"history.tags.deleteMessage": "すべてのクリップから「{{name}}」を削除しますか?元に戻せません。",
"settings.historyLimit.items": "{{num}} 件",
"onboarding.hint.summon": "どこからでも開く:"
"onboarding.hint.summon": "どこからでも開く:",
"history.transform.beautify": "整形",
"history.transform.minify": "圧縮",
"history.transform.decode": "デコード",
"history.transform.encode": "エンコード",
"history.transform.format": "書式設定",
"history.transform.validate": "検証",
"history.transform.escape": "エスケープ",
"history.transform.toYaml": "YAML へ",
"history.transform.toJson": "JSON へ",
"history.transform.toDate": "日付へ",
"history.transform.toHex": "HEX へ",
"history.transform.toRgb": "RGB へ",
"history.transform.toHsl": "HSL へ",
"history.transform.toText": "テキストへ",
"history.transform.toDecimal": "10進数へ",
"history.transform.toBinary": "2進数へ",
"history.transform.colorInfo": "色情報",
"history.transform.csvInfo": "CSV 情報",
"history.transform.regexInfo": "正規表現情報"
}
21 changes: 20 additions & 1 deletion src/i18n/locales/ko.json
Original file line number Diff line number Diff line change
Expand Up @@ -412,5 +412,24 @@
"history.tags.deleteTitle": "태그 삭제",
"history.tags.deleteMessage": "모든 클립에서 \"{{name}}\"을(를) 제거하시겠습니까? 되돌릴 수 없습니다.",
"settings.historyLimit.items": "{{num}}개",
"onboarding.hint.summon": "어디서나 열기:"
"onboarding.hint.summon": "어디서나 열기:",
"history.transform.beautify": "정리",
"history.transform.minify": "압축",
"history.transform.decode": "디코드",
"history.transform.encode": "인코드",
"history.transform.format": "서식",
"history.transform.validate": "검증",
"history.transform.escape": "이스케이프",
"history.transform.toYaml": "YAML로",
"history.transform.toJson": "JSON으로",
"history.transform.toDate": "날짜로",
"history.transform.toHex": "HEX로",
"history.transform.toRgb": "RGB로",
"history.transform.toHsl": "HSL로",
"history.transform.toText": "텍스트로",
"history.transform.toDecimal": "10진수로",
"history.transform.toBinary": "2진수로",
"history.transform.colorInfo": "색상 정보",
"history.transform.csvInfo": "CSV 정보",
"history.transform.regexInfo": "정규식 정보"
}
Loading
Loading