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
1 change: 1 addition & 0 deletions languages/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
"general.close": "Schließen",
"general.retry": "Erneut versuchen",
"general.copy": "Kopieren",
"general.copyAll": "Alles kopieren",
"general.cut": "Ausschneiden",
"general.paste": "Einfügen",
"general.selectAll": "Alles auswählen",
Expand Down
1 change: 1 addition & 0 deletions src/main/shared/config/DefaultLanguage.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ const ENGLISH_STRINGS = {
'general.close': 'Close',
'general.retry': 'Retry',
'general.copy': 'Copy',
'general.copyAll': 'Copy All',
'general.cut': 'Cut',
'general.paste': 'Paste',
'general.selectAll': 'Select All',
Expand Down
3 changes: 3 additions & 0 deletions src/renderer/components/console/ConsoleTab.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import {
VscClose,
VscFolderOpened,
VscClearAll,
VscCopy,
} from 'react-icons/vsc';
import { ConsoleLine } from '../../../main/shared/types/Process.types';
import { hasJarConfigured } from '../../../main/shared/types/Profile.types';
Expand Down Expand Up @@ -237,10 +238,12 @@ export function ConsoleTab() {
? [
{
label: t('console.copyLine'),
icon: <VscCopy size={12} />,
onClick: () => navigator.clipboard.writeText(lineCtxMenu.text),
},
{
label: t('console.copyAll'),
icon: <VscCopy size={12} />,
onClick: () => navigator.clipboard.writeText(lines.map((l) => l.text).join('\n')),
},
]
Expand Down
6 changes: 4 additions & 2 deletions src/renderer/components/developer/DevApiExplorer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import React, { useState, useCallback } from 'react';
import { VscCheck, VscCopy, VscPlay, VscEdit, VscCode } from 'react-icons/vsc';
import { routeConfig, REST_API_CONFIG } from '../../../main/shared/config/API.config';
import { useApp } from '../../AppProvider';
import { useTranslation } from '../../i18n/I18nProvider';
import { Button } from '../common/Button';
import { ContextMenu, ContextMenuItem } from '../common/ContextMenu';
import { RouteDefinition } from '../../..//main/shared/types/RestAPI.types';
Expand Down Expand Up @@ -104,6 +105,7 @@ function JsonHighlight({ text }: { text: string }) {

export function DevApiExplorer() {
const { state } = useApp();
const { t } = useTranslation();
const [selected, setSelected] = useState<RouteDefinition | null>(null);
const [pathParams, setPathParams] = useState<Record<string, string>>({});
const [body, setBody] = useState('');
Expand Down Expand Up @@ -182,7 +184,7 @@ export function DevApiExplorer() {
y: e.clientY,
items: [
{
label: 'Copy',
label: t('general.copy'),
icon: <VscCopy size={12} />,
disabled: !sel,
onClick: () => navigator.clipboard.writeText(sel),
Expand All @@ -198,7 +200,7 @@ export function DevApiExplorer() {
? [
{ type: 'separator' },
{
label: 'Copy all',
label: t('general.copyAll'),
icon: <VscCopy size={12} />,
onClick: () => navigator.clipboard.writeText(response),
},
Expand Down
4 changes: 2 additions & 2 deletions src/renderer/components/profiles/LogsTab.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -215,14 +215,14 @@ export function LogsTab() {
onClose={() => setLogCtxMenu(null)}
items={[
{
label: 'Copy',
label: t('general.copy'),
icon: <VscCopy size={12} />,
disabled: !logCtxMenu.sel,
onClick: () => navigator.clipboard.writeText(logCtxMenu.sel),
},
{ type: 'separator' },
{
label: 'Copy all',
label: t('general.copyAll'),
icon: <VscCopy size={12} />,
onClick: () => navigator.clipboard.writeText(logContent),
},
Expand Down
22 changes: 14 additions & 8 deletions src/renderer/components/profiles/jar/StaticJarPicker.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import React from 'react';
import { Input } from '../../common/Input';
import { FolderBtn } from './FolderBtn';
import { useTranslation } from '../../../i18n/I18nProvider';
import { useInputContextMenu } from '../../../hooks/useInputContextMenu';

interface Props {
jarPath: string;
Expand All @@ -11,15 +12,20 @@ interface Props {

export function StaticJarPicker({ jarPath, onChange, onPick }: Props) {
const { t } = useTranslation();
const { onContextMenu, contextMenu } = useInputContextMenu();

return (
<Input
label={t('config.jarFile')}
value={jarPath}
onChange={(e) => onChange(e.target.value)}
placeholder={t('config.jarFilePlaceholder')}
hint={t('config.jarFileHint')}
rightElement={<FolderBtn onClick={onPick} />}
/>
<>
<Input
label={t('config.jarFile')}
value={jarPath}
onChange={(e) => onChange(e.target.value)}
onContextMenu={onContextMenu}
placeholder={t('config.jarFilePlaceholder')}
hint={t('config.jarFileHint')}
rightElement={<FolderBtn onClick={onPick} />}
/>
{contextMenu}
</>
);
}
Loading