Skip to content

Commit

Permalink
Merge branch 'devel' into fix/cb-5749/metadata-table-loading
Browse files Browse the repository at this point in the history
  • Loading branch information
Wroud authored Oct 11, 2024
2 parents d90bd77 + 3d8dc7d commit cd187eb
Show file tree
Hide file tree
Showing 10 changed files with 25 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,12 @@ import { ErrorModel, type IErrorInfo } from './ErrorModel.js';

function DisplayErrorInfo({ error }: { error: IErrorInfo }) {
const styles = useS(style);
const translate = useTranslate();

return (
<>
<div className={s(styles, { property: true })}>
{error.isHtml ? <Iframe srcDoc={error.message} /> : <div className={s(styles, { message: true })}>{error.message}</div>}
{error.isHtml ? <Iframe srcDoc={error.message} /> : <div className={s(styles, { message: true })}>{translate(error.message)}</div>}
</div>
{error.stackTrace && (
<div className={s(styles, { property: true })}>
Expand Down
5 changes: 4 additions & 1 deletion webapp/packages/core-blocks/src/StatusMessage.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,14 @@
.statusMessage {
overflow: hidden;
composes: theme-typography--caption from global;
height: 24px;
display: flex;
align-items: center;
gap: 8px;
}

.statusMessageExtended {
height: 24px;
}
.iconOrImage {
height: 24px;
width: 24px;
Expand Down
16 changes: 12 additions & 4 deletions webapp/packages/core-blocks/src/StatusMessage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,18 @@ interface Props {
type?: ENotificationType | null;
exception?: Error | null;
className?: string;
multipleRows?: boolean;
onShowDetails?: () => void;
}

export const StatusMessage = observer<Props>(function StatusMessage({ type, message, exception = null, className, onShowDetails }) {
export const StatusMessage = observer<Props>(function StatusMessage({
type,
multipleRows = false,
message,
exception = null,
className,
onShowDetails,
}) {
const styles = useS(style);
const translate = useTranslate();
const errorDetails = useErrorDetails(exception);
Expand All @@ -51,13 +59,13 @@ export const StatusMessage = observer<Props>(function StatusMessage({ type, mess
}

return (
<div className={s(styles, { statusMessage: true }, className)}>
<div className={s(styles, { statusMessage: true, statusMessageExtended: !multipleRows }, className)}>
{message && (
<>
<IconOrImage className={s(styles, { iconOrImage: true })} icon={icon} />
<div className={s(styles, { message: true })} title={message}>
<div className={s(styles, { message: !multipleRows })} title={message}>
{onShowDetails ? (
<Link className={s(styles, { link: true })} onClick={onShowDetails}>
<Link className={s(styles, { link: !multipleRows })} onClick={onShowDetails}>
{message}
</Link>
) : (
Expand Down
1 change: 1 addition & 0 deletions webapp/packages/core-blocks/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ export * from './CommonDialog/CommonDialog/CommonDialogFooter.js';
export * from './CommonDialog/CommonDialog/CommonDialogHeader.js';
export * from './CommonDialog/CommonDialog/CommonDialogWrapper.js';
export * from './CommonDialog/ConfirmationDialog.js';
export { default as ConfirmationDialogStyles } from './CommonDialog/ConfirmationDialog.module.css';
export * from './CommonDialog/ConfirmationDialogDelete.js';
export * from './CommonDialog/RenameDialog.js';
export * from './CommonDialog/DialogsPortal.js';
Expand Down
1 change: 1 addition & 0 deletions webapp/packages/core-localization/src/locales/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ export default [
['ui_errors_details', 'Details'],
['ui_search', 'Search...'],
['ui_delete', 'Delete'],
['ui_deleting', 'Deleting...'],
['ui_add', 'Add'],
['ui_revert', 'Revert'],
['ui_undo', 'Undo'],
Expand Down
1 change: 1 addition & 0 deletions webapp/packages/core-localization/src/locales/fr.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ export default [
['ui_errors_details', 'Détails'],
['ui_search', 'Rechercher...'],
['ui_delete', 'Supprimer'],
['ui_deleting', 'Deleting...'],
['ui_add', 'Ajouter'],
['ui_refresh', 'Actualiser'],
['ui_data_saving_error', 'Erreur de sauvegarde'],
Expand Down
1 change: 1 addition & 0 deletions webapp/packages/core-localization/src/locales/it.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ export default [
['ui_errors_details', 'Dettagli'],
['ui_search', 'Cerca...'],
['ui_delete', 'Elimina'],
['ui_deleting', 'Deleting...'],
['ui_add', 'Aggiungi'],
['ui_revert', 'Revert'],
['ui_undo', 'Undo'],
Expand Down
1 change: 1 addition & 0 deletions webapp/packages/core-localization/src/locales/ru.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ export default [
['ui_errors_details', 'Информация'],
['ui_search', 'Поиск...'],
['ui_delete', 'Удалить'],
['ui_deleting', 'Удаляется...'],
['ui_add', 'Добавить'],
['ui_revert', 'Отменить изменения'],
['ui_undo', 'Отменить'],
Expand Down
1 change: 1 addition & 0 deletions webapp/packages/core-localization/src/locales/zh.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ export default [
['ui_errors_details', '详情'],
['ui_search', '搜索...'],
['ui_delete', '删除'],
['ui_deleting', 'Deleting...'],
['ui_add', '添加'],
['ui_revert', '恢复'],
['ui_undo', '撤销'],
Expand Down
1 change: 1 addition & 0 deletions webapp/packages/core-website/src/WebsiteLinks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
* you may not use this file except in compliance with the License.
*/
export class WebsiteLinks {
static ROOT_PAGE = 'https://dbeaver.com/';
static DATA_EDITOR_DOCUMENTATION_PAGE = 'https://dbeaver.com/docs/cloudbeaver/Data-editor/';
static SQL_EDITOR_DOCUMENTATION_PAGE = 'https://dbeaver.com/docs/cloudbeaver/SQL-Editor/';
static SERVER_CONFIGURATION_RESOURCE_QUOTAS_PAGE = 'https://dbeaver.com/docs/cloudbeaver/Server-configuration/#resource-quotas';
Expand Down

0 comments on commit cd187eb

Please sign in to comment.