From eceabf9e7116d08d2ec816423e97f8a39b5cbc99 Mon Sep 17 00:00:00 2001 From: alex <48489896+devnaumov@users.noreply.github.com> Date: Wed, 11 Jan 2023 07:51:47 +0100 Subject: [PATCH] CB-2851 change footer design for the blob types (#1390) --- .../packages/core-localization/src/locales/en.ts | 1 + .../packages/core-localization/src/locales/it.ts | 1 + .../packages/core-localization/src/locales/ru.ts | 1 + .../packages/core-localization/src/locales/zh.ts | 1 + .../DataGridContextMenuSaveContentService.ts | 4 ++-- .../ImageValue/ImageValuePresentation.tsx | 15 ++++----------- .../TextValue/TextValuePresentation.tsx | 15 ++++----------- .../ValuePanelTools/VALUE_PANEL_TOOLS_STYLES.ts | 2 +- 8 files changed, 15 insertions(+), 25 deletions(-) diff --git a/webapp/packages/core-localization/src/locales/en.ts b/webapp/packages/core-localization/src/locales/en.ts index 29ff0d1184..b8f8e21165 100644 --- a/webapp/packages/core-localization/src/locales/en.ts +++ b/webapp/packages/core-localization/src/locales/en.ts @@ -84,6 +84,7 @@ export const defaultENLocale = [ ['ui_close_all_to_the_left', 'Close all to the Left'], ['ui_or', 'Or'], ['ui_download', 'Download'], + ['ui_view', 'View'], ['ui_limit', 'Limit'], ['ui_file_size', 'File size'], ['ui_processing_synchronization', 'Synchronization...'], diff --git a/webapp/packages/core-localization/src/locales/it.ts b/webapp/packages/core-localization/src/locales/it.ts index b96cc08c92..3c3d1b51b5 100644 --- a/webapp/packages/core-localization/src/locales/it.ts +++ b/webapp/packages/core-localization/src/locales/it.ts @@ -71,6 +71,7 @@ export const defaultITLocale = [ ['ui_close_all_to_the_left', 'Close all to the Left'], ['ui_or', 'Or'], ['ui_download', 'Download'], + ['ui_view', 'View'], ['ui_limit', 'Limit'], ['ui_file_size', 'File size'], ['ui_processing_synchronization', 'Synchronization...'], diff --git a/webapp/packages/core-localization/src/locales/ru.ts b/webapp/packages/core-localization/src/locales/ru.ts index 0343c57c63..dca509d2bf 100644 --- a/webapp/packages/core-localization/src/locales/ru.ts +++ b/webapp/packages/core-localization/src/locales/ru.ts @@ -82,6 +82,7 @@ export const defaultRULocale = [ ['ui_close_all_to_the_left', 'Закрыть все слева'], ['ui_or', 'Или'], ['ui_download', 'Загрузить'], + ['ui_view', 'Смотреть'], ['ui_limit', 'Лимит'], ['ui_file_size', 'Размер файла'], ['ui_processing_synchronization', 'Синхронизация...'], diff --git a/webapp/packages/core-localization/src/locales/zh.ts b/webapp/packages/core-localization/src/locales/zh.ts index eb8ccc06d3..d6a2fdcce2 100644 --- a/webapp/packages/core-localization/src/locales/zh.ts +++ b/webapp/packages/core-localization/src/locales/zh.ts @@ -84,6 +84,7 @@ export const defaultZHLocale = [ ['ui_close_all_to_the_left', 'Close all to the Left'], ['ui_or', 'Or'], ['ui_download', 'Download'], + ['ui_view', 'View'], ['ui_limit', 'Limit'], ['ui_file_size', 'File size'], ['ui_processing_synchronization', 'Synchronization...'], diff --git a/webapp/packages/plugin-data-spreadsheet-new/src/DataGrid/DataGridContextMenu/DataGridContextMenuSaveContentService.ts b/webapp/packages/plugin-data-spreadsheet-new/src/DataGrid/DataGridContextMenu/DataGridContextMenuSaveContentService.ts index 74f5062220..f14b8b80f1 100644 --- a/webapp/packages/plugin-data-spreadsheet-new/src/DataGrid/DataGridContextMenu/DataGridContextMenuSaveContentService.ts +++ b/webapp/packages/plugin-data-spreadsheet-new/src/DataGrid/DataGridContextMenu/DataGridContextMenuSaveContentService.ts @@ -31,8 +31,8 @@ export class DataGridContextMenuSaveContentService { { id: this.getMenuContentSaveToken(), order: 4, - title: 'ui_processing_save', - icon: '/icons/save.svg', + title: 'ui_download', + icon: '/icons/export.svg', isPresent(context) { return context.contextType === DataGridContextMenuService.cellContext; }, diff --git a/webapp/packages/plugin-data-viewer/src/ValuePanelPresentation/ImageValue/ImageValuePresentation.tsx b/webapp/packages/plugin-data-viewer/src/ValuePanelPresentation/ImageValue/ImageValuePresentation.tsx index 14f3a57a02..389c55c85d 100644 --- a/webapp/packages/plugin-data-viewer/src/ValuePanelPresentation/ImageValue/ImageValuePresentation.tsx +++ b/webapp/packages/plugin-data-viewer/src/ValuePanelPresentation/ImageValue/ImageValuePresentation.tsx @@ -67,16 +67,9 @@ const Tools = observer(function Tools({ loading, stretch, onToggleS return styled(VALUE_PANEL_TOOLS_STYLES)( {onSave && ( - - - - - + )} {onToggleStretch && ( @@ -204,7 +197,7 @@ export const ImageValuePresentation: TabContainerPanelComponent - {translate('ui_download')} + {translate('ui_view')} )} diff --git a/webapp/packages/plugin-data-viewer/src/ValuePanelPresentation/TextValue/TextValuePresentation.tsx b/webapp/packages/plugin-data-viewer/src/ValuePanelPresentation/TextValue/TextValuePresentation.tsx index 7e35e850ca..e290b87135 100644 --- a/webapp/packages/plugin-data-viewer/src/ValuePanelPresentation/TextValue/TextValuePresentation.tsx +++ b/webapp/packages/plugin-data-viewer/src/ValuePanelPresentation/TextValue/TextValuePresentation.tsx @@ -10,7 +10,7 @@ import { observable } from 'mobx'; import { observer } from 'mobx-react-lite'; import styled, { css } from 'reshadow'; -import { BASE_CONTAINERS_STYLES, IconOrImage, Textarea, useObservableRef, useStyles, useTranslate } from '@cloudbeaver/core-blocks'; +import { BASE_CONTAINERS_STYLES, Button, Textarea, useObservableRef, useStyles, useTranslate } from '@cloudbeaver/core-blocks'; import { useService } from '@cloudbeaver/core-di'; import { NotificationService } from '@cloudbeaver/core-events'; import { QuotasService } from '@cloudbeaver/core-root'; @@ -215,16 +215,9 @@ export const TextValuePresentation: TabContainerPanelComponent} {canSave && ( - - - - - + )} diff --git a/webapp/packages/plugin-data-viewer/src/ValuePanelPresentation/ValuePanelTools/VALUE_PANEL_TOOLS_STYLES.ts b/webapp/packages/plugin-data-viewer/src/ValuePanelPresentation/ValuePanelTools/VALUE_PANEL_TOOLS_STYLES.ts index 2fb1b0594b..12c35eb10e 100644 --- a/webapp/packages/plugin-data-viewer/src/ValuePanelPresentation/ValuePanelTools/VALUE_PANEL_TOOLS_STYLES.ts +++ b/webapp/packages/plugin-data-viewer/src/ValuePanelPresentation/ValuePanelTools/VALUE_PANEL_TOOLS_STYLES.ts @@ -11,7 +11,7 @@ import { css } from 'reshadow'; export const VALUE_PANEL_TOOLS_STYLES = css` tools-container { display: flex; - justify-content: flex-end; + justify-content: space-between; gap: 8px; } tools {