From b3f5dac7d265be3034675e33cb067ec3ee598f7f Mon Sep 17 00:00:00 2001 From: bryzZz Date: Wed, 6 Mar 2024 19:25:02 +0800 Subject: [PATCH 1/6] start --- resources/tutorial.json | 9 ++ src/renderer/index.html | 4 + .../components/ComponentFormFieldLabel.tsx | 2 +- .../MainContainer/MainContainer.tsx | 20 ++++ .../Sidebar/Explorer/ComponentsList.tsx | 30 +++-- .../components/Sidebar/Explorer/Explorer.tsx | 27 +++-- src/renderer/src/components/Sidebar/Menus.tsx | 2 +- src/renderer/src/components/TutorialItem.tsx | 104 ++++++++++++++++++ src/renderer/src/components/UI/WithHint.tsx | 50 +++++---- src/renderer/src/components/index.ts | 1 + src/renderer/src/hooks/index.ts | 1 + .../src/hooks/useIsVisibleFloating.ts | 76 +++++++++++++ src/renderer/src/store/useTutorial.ts | 44 ++++++++ 13 files changed, 328 insertions(+), 42 deletions(-) create mode 100644 resources/tutorial.json create mode 100644 src/renderer/src/components/TutorialItem.tsx create mode 100644 src/renderer/src/hooks/useIsVisibleFloating.ts create mode 100644 src/renderer/src/store/useTutorial.ts diff --git a/resources/tutorial.json b/resources/tutorial.json new file mode 100644 index 000000000..9ca1c8dff --- /dev/null +++ b/resources/tutorial.json @@ -0,0 +1,9 @@ +{ + "items": [ + { + "id": "1", + "title": "Пример", + "content": "Попробуй добавить новый компонент" + } + ] +} diff --git a/src/renderer/index.html b/src/renderer/index.html index c5b6d542d..0b3abaa1b 100644 --- a/src/renderer/index.html +++ b/src/renderer/index.html @@ -13,12 +13,16 @@
+ +
+
🐾
+ diff --git a/src/renderer/src/components/ComponentFormFieldLabel.tsx b/src/renderer/src/components/ComponentFormFieldLabel.tsx index 051f1cb82..2b7e5db56 100644 --- a/src/renderer/src/components/ComponentFormFieldLabel.tsx +++ b/src/renderer/src/components/ComponentFormFieldLabel.tsx @@ -22,7 +22,7 @@ export const ComponentFormFieldLabel: React.FC = ( return (