From 8c13f100832849bf3376fdb7ecfc7ca251082fae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20V=C3=A1clav=C3=ADk?= Date: Fri, 21 Feb 2025 00:03:18 +0100 Subject: [PATCH] PresetSearchBox: Add warning and different cursor --- .../FeatureEditSection/PresetSearchBox.tsx | 57 +++++++++++-------- src/locales/cs.js | 1 + src/locales/vocabulary.js | 2 + 3 files changed, 37 insertions(+), 23 deletions(-) diff --git a/src/components/FeaturePanel/EditDialog/EditContent/FeatureEditSection/PresetSearchBox.tsx b/src/components/FeaturePanel/EditDialog/EditContent/FeatureEditSection/PresetSearchBox.tsx index a76c083c..9bb302f6 100644 --- a/src/components/FeaturePanel/EditDialog/EditContent/FeatureEditSection/PresetSearchBox.tsx +++ b/src/components/FeaturePanel/EditDialog/EditContent/FeatureEditSection/PresetSearchBox.tsx @@ -6,6 +6,7 @@ import { ListSubheader, MenuItem, Select, + Tooltip, } from '@mui/material'; import SearchIcon from '@mui/icons-material/Search'; import styled from '@emotion/styled'; @@ -190,30 +191,40 @@ export const PresetSearchBox = ({ value, setValue, options }: Props) => { return ( <> - + + {!enabled && ( // TODO we may warn users that this is not usual operation, if this becomes an issue diff --git a/src/locales/cs.js b/src/locales/cs.js index 18d855d6..49f6c95e 100644 --- a/src/locales/cs.js +++ b/src/locales/cs.js @@ -231,6 +231,7 @@ export default { 'editdialog.preset_select.placeholder': 'Vyberte typ', 'editdialog.preset_select.search_placeholder': 'Zadejte hledaný výraz...', 'editdialog.preset_select.edit_button': 'Upravit', + 'editdialog.preset_select.change_type_warning': 'Změna typu není obvyklá operace. Pokud tato změna dává smysl, můžete změnit typ tlačítkem vpravo.', 'tags.name': 'Název', 'tags.description': 'Popis', diff --git a/src/locales/vocabulary.js b/src/locales/vocabulary.js index 0aabb0c0..33bf3739 100644 --- a/src/locales/vocabulary.js +++ b/src/locales/vocabulary.js @@ -272,6 +272,8 @@ export default { 'editdialog.preset_select.placeholder': 'Select the type', 'editdialog.preset_select.search_placeholder': 'Type to search...', 'editdialog.preset_select.edit_button': 'Edit', + 'editdialog.preset_select.change_type_warning': + 'Changing the type is not usual operation. Consider if this change makes sense and use button on the right to enable.', 'tags.name': 'Name', 'tags.description': 'Description',