diff --git a/index.html b/index.html index 93b49bc8..15162d79 100644 --- a/index.html +++ b/index.html @@ -9,6 +9,6 @@
- + diff --git a/locales/en.json b/locales/en.json index cb6d8229..1d6cc59b 100644 --- a/locales/en.json +++ b/locales/en.json @@ -1,5 +1,5 @@ { - "main_window": { + "main_page": { "translation": "Translation", "transcription_send": "Voice2Chatbox", "transcription_receive": "Speaker2Log", @@ -71,7 +71,7 @@ "display_duration": "Display duration", "fadeout_duration": "Fadeout duration" }, - "config_window": { + "config_page": { "config_title": "Settings", "compact_mode": "Compact Mode", "version": "version {{version}}", @@ -119,7 +119,7 @@ "ui_language": { "label": "UI Language" }, - "to_restore_main_window_geometry": { + "to_restore_main_page_geometry": { "label": "Remember The Main Window Position", "desc": "Restore the position and size of the previous window upon startup." }, diff --git a/locales/ja.json b/locales/ja.json index 8248e7d4..b98f5d06 100644 --- a/locales/ja.json +++ b/locales/ja.json @@ -1,5 +1,5 @@ { - "main_window": { + "main_page": { "translation": "翻訳", "transcription_send": "音声認識(マイク)", "transcription_receive": "音声認識(スピーカー)", @@ -69,7 +69,7 @@ "display_duration": "表示時間", "fadeout_duration": "フェードアウト時間" }, - "config_window": { + "config_page": { "config_title": "設定", "compact_mode": "コンパクトモード", "version": "バージョン {{version}}", @@ -114,7 +114,7 @@ "ui_language": { "label": "UIの言語 / UI Language" }, - "to_restore_main_window_geometry": { + "to_restore_main_page_geometry": { "label": "メイン画面の位置を記憶する", "desc": "起動時、前回の画面の位置とサイズを復元します。" }, diff --git a/locales/ko.json b/locales/ko.json index d81282af..76b1ee0b 100644 --- a/locales/ko.json +++ b/locales/ko.json @@ -1,5 +1,5 @@ { - "main_window": { + "main_page": { "translation": "번역", "transcription_send": "음성인식 (마이크)", "transcription_receive": "음성인식 (스피커)", @@ -54,7 +54,7 @@ "title_target_language": "상대방의 언어", "go_back_button": "돌아가기" }, - "config_window": { + "config_page": { "config_title": "설정", "compact_mode": "컴팩트 모드", "version": "버전 {{version}}", @@ -100,7 +100,7 @@ "ui_language": { "label": "UI 언어 / UI Language" }, - "to_restore_main_window_geometry": { + "to_restore_main_page_geometry": { "label": "메인 화면 위치 기억", "desc": "시작 시 이전 화면의 위치와 크기를 복원합니다." }, diff --git a/locales/zh-Hant.json b/locales/zh-Hant.json index c6425a03..37cbe706 100644 --- a/locales/zh-Hant.json +++ b/locales/zh-Hant.json @@ -1,5 +1,5 @@ { - "main_window": { + "main_page": { "translation": "翻譯", "transcription_send": "麥克風轉文字", "transcription_receive": "喇叭轉文字", @@ -70,7 +70,7 @@ "display_duration": "顯示持續時間", "fadeout_duration": "淡出持續時間" }, - "config_window": { + "config_page": { "config_title": "設定", "compact_mode": "精簡模式", "version": "版本 {{version}}", @@ -117,7 +117,7 @@ "ui_language": { "label": "介面語言" }, - "to_restore_main_window_geometry": { + "to_restore_main_page_geometry": { "label": "記住主視窗位置", "desc": "啟動時恢復上次視窗的位置和大小。" }, diff --git a/src-tauri/Cargo.toml b/src-tauri/Cargo.toml index 03bc654d..9c80759d 100644 --- a/src-tauri/Cargo.toml +++ b/src-tauri/Cargo.toml @@ -11,7 +11,7 @@ edition = "2021" tauri-build = { version = "1", features = [] } [dependencies] -tauri = { version = "1", features = [ "window-set-decorations", "window-set-always-on-top", "window-create", "window-close", "shell-sidecar", "shell-open", "devtools"] } +tauri = { version = "1", features = [ "window-set-decorations", "window-set-always-on-top", "shell-sidecar", "shell-open", "devtools"] } serde = { version = "1", features = ["derive"] } serde_json = "1" diff --git a/src-tauri/tauri.conf.json b/src-tauri/tauri.conf.json index 67a66e08..5f308373 100644 --- a/src-tauri/tauri.conf.json +++ b/src-tauri/tauri.conf.json @@ -13,8 +13,6 @@ "allowlist": { "all": false, "window": { - "create": true, - "close": true, "setAlwaysOnTop": true, "setDecorations": true }, diff --git a/src-ui/app/App.jsx b/src-ui/app/App.jsx new file mode 100644 index 00000000..7652a5dd --- /dev/null +++ b/src-ui/app/App.jsx @@ -0,0 +1,35 @@ +import { getCurrent } from "@tauri-apps/api/window"; +import { useEffect, useRef } from "react"; +import { useStartPython } from "@logics/useStartPython"; +import { useConfig } from "@logics/useConfig"; + +import { MainPage } from "./main_page/MainPage"; +import { ConfigPage } from "./config_page/ConfigPage"; + + +export const App = () => { + const { asyncStartPython } = useStartPython(); + const hasRunRef = useRef(false); + const main_page = getCurrent(); + + const { getSoftwareVersion } = useConfig(); + + useEffect(() => { + main_page.setDecorations(true); + if (!hasRunRef.current) { + asyncStartPython().then((result) => { + getSoftwareVersion(); + }).catch((err) => { + + }); + } + return () => hasRunRef.current = true; + }, []); + + return ( + <> + + + + ); +}; \ No newline at end of file diff --git a/src-ui/windows/config_window/ConfigWindow.jsx b/src-ui/app/config_page/ConfigPage.jsx similarity index 75% rename from src-ui/windows/config_window/ConfigWindow.jsx rename to src-ui/app/config_page/ConfigPage.jsx index 90aa96dd..992563df 100644 --- a/src-ui/windows/config_window/ConfigWindow.jsx +++ b/src-ui/app/config_page/ConfigPage.jsx @@ -1,14 +1,14 @@ -import styles from "./ConfigWindow.module.scss"; +import styles from "./ConfigPage.module.scss"; -import { Topbar } from "./topbar/Topbar"; -import { SidebarSection } from "./sidebar_section/SidebarSection"; +import { Topbar } from "./topbar/Topbar.jsx"; +import { SidebarSection } from "./sidebar_section/SidebarSection.jsx"; import { SettingSection } from "./setting_section/SettingSection.jsx"; import { useSoftwareVersion } from "@store"; import { useTranslation } from "react-i18next"; // import { useConfig } from "@logics/useConfig"; -export const ConfigWindow = () => { +export const ConfigPage = () => { const { currentSoftwareVersion, updateSoftwareVersion } = useSoftwareVersion(); const { t } = useTranslation(); @@ -21,7 +21,7 @@ export const ConfigWindow = () => {

{ - t("config_window.version", {version: currentSoftwareVersion}) + t("config_page.version", {version: currentSoftwareVersion}) }

diff --git a/src-ui/windows/config_window/ConfigWindow.module.scss b/src-ui/app/config_page/ConfigPage.module.scss similarity index 84% rename from src-ui/windows/config_window/ConfigWindow.module.scss rename to src-ui/app/config_page/ConfigPage.module.scss index fa78a8d7..0a930ad1 100644 --- a/src-ui/windows/config_window/ConfigWindow.module.scss +++ b/src-ui/app/config_page/ConfigPage.module.scss @@ -13,7 +13,7 @@ width: 100%; height: 100%; display: flex; - padding-top: var(--config_window_topbar_height); + padding-top: var(--config_page_topbar_height); } .software_version { diff --git a/src-ui/windows/config_window/setting_section/SettingSection.jsx b/src-ui/app/config_page/setting_section/SettingSection.jsx similarity index 100% rename from src-ui/windows/config_window/setting_section/SettingSection.jsx rename to src-ui/app/config_page/setting_section/SettingSection.jsx diff --git a/src-ui/windows/config_window/setting_section/SettingSection.module.scss b/src-ui/app/config_page/setting_section/SettingSection.module.scss similarity index 100% rename from src-ui/windows/config_window/setting_section/SettingSection.module.scss rename to src-ui/app/config_page/setting_section/SettingSection.module.scss diff --git a/src-ui/windows/config_window/setting_section/setting_box/SettingBox.jsx b/src-ui/app/config_page/setting_section/setting_box/SettingBox.jsx similarity index 100% rename from src-ui/windows/config_window/setting_section/setting_box/SettingBox.jsx rename to src-ui/app/config_page/setting_section/setting_box/SettingBox.jsx diff --git a/src-ui/windows/config_window/setting_section/setting_box/about_vrct/AboutVrct.jsx b/src-ui/app/config_page/setting_section/setting_box/about_vrct/AboutVrct.jsx similarity index 100% rename from src-ui/windows/config_window/setting_section/setting_box/about_vrct/AboutVrct.jsx rename to src-ui/app/config_page/setting_section/setting_box/about_vrct/AboutVrct.jsx diff --git a/src-ui/windows/config_window/setting_section/setting_box/about_vrct/AboutVrct.module.scss b/src-ui/app/config_page/setting_section/setting_box/about_vrct/AboutVrct.module.scss similarity index 100% rename from src-ui/windows/config_window/setting_section/setting_box/about_vrct/AboutVrct.module.scss rename to src-ui/app/config_page/setting_section/setting_box/about_vrct/AboutVrct.module.scss diff --git a/src-ui/windows/config_window/setting_section/setting_box/about_vrct/poster_showcase_contents/PosterShowcaseContents.jsx b/src-ui/app/config_page/setting_section/setting_box/about_vrct/poster_showcase_contents/PosterShowcaseContents.jsx similarity index 100% rename from src-ui/windows/config_window/setting_section/setting_box/about_vrct/poster_showcase_contents/PosterShowcaseContents.jsx rename to src-ui/app/config_page/setting_section/setting_box/about_vrct/poster_showcase_contents/PosterShowcaseContents.jsx diff --git a/src-ui/windows/config_window/setting_section/setting_box/about_vrct/poster_showcase_contents/PosterShowcaseContents.module.scss b/src-ui/app/config_page/setting_section/setting_box/about_vrct/poster_showcase_contents/PosterShowcaseContents.module.scss similarity index 100% rename from src-ui/windows/config_window/setting_section/setting_box/about_vrct/poster_showcase_contents/PosterShowcaseContents.module.scss rename to src-ui/app/config_page/setting_section/setting_box/about_vrct/poster_showcase_contents/PosterShowcaseContents.module.scss diff --git a/src-ui/windows/config_window/setting_section/setting_box/about_vrct/poster_showcase_contents/poster_showcase_worlds_contents/PosterShowcaseWorldsContents.jsx b/src-ui/app/config_page/setting_section/setting_box/about_vrct/poster_showcase_contents/poster_showcase_worlds_contents/PosterShowcaseWorldsContents.jsx similarity index 100% rename from src-ui/windows/config_window/setting_section/setting_box/about_vrct/poster_showcase_contents/poster_showcase_worlds_contents/PosterShowcaseWorldsContents.jsx rename to src-ui/app/config_page/setting_section/setting_box/about_vrct/poster_showcase_contents/poster_showcase_worlds_contents/PosterShowcaseWorldsContents.jsx diff --git a/src-ui/windows/config_window/setting_section/setting_box/about_vrct/poster_showcase_contents/poster_showcase_worlds_contents/PosterShowcaseWorldsContents.module.scss b/src-ui/app/config_page/setting_section/setting_box/about_vrct/poster_showcase_contents/poster_showcase_worlds_contents/PosterShowcaseWorldsContents.module.scss similarity index 100% rename from src-ui/windows/config_window/setting_section/setting_box/about_vrct/poster_showcase_contents/poster_showcase_worlds_contents/PosterShowcaseWorldsContents.module.scss rename to src-ui/app/config_page/setting_section/setting_box/about_vrct/poster_showcase_contents/poster_showcase_worlds_contents/PosterShowcaseWorldsContents.module.scss diff --git a/src-ui/windows/config_window/setting_section/setting_box/about_vrct/poster_showcase_contents/poster_showcase_worlds_contents/poster_showcase_worlds_settings.js b/src-ui/app/config_page/setting_section/setting_box/about_vrct/poster_showcase_contents/poster_showcase_worlds_contents/poster_showcase_worlds_settings.js similarity index 100% rename from src-ui/windows/config_window/setting_section/setting_box/about_vrct/poster_showcase_contents/poster_showcase_worlds_contents/poster_showcase_worlds_settings.js rename to src-ui/app/config_page/setting_section/setting_box/about_vrct/poster_showcase_contents/poster_showcase_worlds_contents/poster_showcase_worlds_settings.js diff --git a/src-ui/windows/config_window/setting_section/setting_box/about_vrct/poster_showcase_contents/posters_contents/PostersContents.jsx b/src-ui/app/config_page/setting_section/setting_box/about_vrct/poster_showcase_contents/posters_contents/PostersContents.jsx similarity index 100% rename from src-ui/windows/config_window/setting_section/setting_box/about_vrct/poster_showcase_contents/posters_contents/PostersContents.jsx rename to src-ui/app/config_page/setting_section/setting_box/about_vrct/poster_showcase_contents/posters_contents/PostersContents.jsx diff --git a/src-ui/windows/config_window/setting_section/setting_box/about_vrct/poster_showcase_contents/posters_contents/PostersContents.module.scss b/src-ui/app/config_page/setting_section/setting_box/about_vrct/poster_showcase_contents/posters_contents/PostersContents.module.scss similarity index 100% rename from src-ui/windows/config_window/setting_section/setting_box/about_vrct/poster_showcase_contents/posters_contents/PostersContents.module.scss rename to src-ui/app/config_page/setting_section/setting_box/about_vrct/poster_showcase_contents/posters_contents/PostersContents.module.scss diff --git a/src-ui/windows/config_window/setting_section/setting_box/appearance/Appearance.jsx b/src-ui/app/config_page/setting_section/setting_box/appearance/Appearance.jsx similarity index 66% rename from src-ui/windows/config_window/setting_section/setting_box/appearance/Appearance.jsx rename to src-ui/app/config_page/setting_section/setting_box/appearance/Appearance.jsx index de69b235..f15b05fb 100644 --- a/src-ui/windows/config_window/setting_section/setting_box/appearance/Appearance.jsx +++ b/src-ui/app/config_page/setting_section/setting_box/appearance/Appearance.jsx @@ -47,21 +47,21 @@ export const Appearance = () => { - + - + - + - + - + - + - {}}/> + {}}/> ); diff --git a/src-ui/windows/config_window/setting_section/setting_box/components/_atoms/_entry/_Entry.jsx b/src-ui/app/config_page/setting_section/setting_box/components/_atoms/_entry/_Entry.jsx similarity index 100% rename from src-ui/windows/config_window/setting_section/setting_box/components/_atoms/_entry/_Entry.jsx rename to src-ui/app/config_page/setting_section/setting_box/components/_atoms/_entry/_Entry.jsx diff --git a/src-ui/windows/config_window/setting_section/setting_box/components/_atoms/_entry/_Entry.module.scss b/src-ui/app/config_page/setting_section/setting_box/components/_atoms/_entry/_Entry.module.scss similarity index 100% rename from src-ui/windows/config_window/setting_section/setting_box/components/_atoms/_entry/_Entry.module.scss rename to src-ui/app/config_page/setting_section/setting_box/components/_atoms/_entry/_Entry.module.scss diff --git a/src-ui/windows/config_window/setting_section/setting_box/components/action_button/ActionButton.jsx b/src-ui/app/config_page/setting_section/setting_box/components/action_button/ActionButton.jsx similarity index 100% rename from src-ui/windows/config_window/setting_section/setting_box/components/action_button/ActionButton.jsx rename to src-ui/app/config_page/setting_section/setting_box/components/action_button/ActionButton.jsx diff --git a/src-ui/windows/config_window/setting_section/setting_box/components/action_button/ActionButton.module.scss b/src-ui/app/config_page/setting_section/setting_box/components/action_button/ActionButton.module.scss similarity index 100% rename from src-ui/windows/config_window/setting_section/setting_box/components/action_button/ActionButton.module.scss rename to src-ui/app/config_page/setting_section/setting_box/components/action_button/ActionButton.module.scss diff --git a/src-ui/windows/config_window/setting_section/setting_box/components/checkbox/Checkbox.jsx b/src-ui/app/config_page/setting_section/setting_box/components/checkbox/Checkbox.jsx similarity index 100% rename from src-ui/windows/config_window/setting_section/setting_box/components/checkbox/Checkbox.jsx rename to src-ui/app/config_page/setting_section/setting_box/components/checkbox/Checkbox.jsx diff --git a/src-ui/windows/config_window/setting_section/setting_box/components/checkbox/Checkbox.module.scss b/src-ui/app/config_page/setting_section/setting_box/components/checkbox/Checkbox.module.scss similarity index 100% rename from src-ui/windows/config_window/setting_section/setting_box/components/checkbox/Checkbox.module.scss rename to src-ui/app/config_page/setting_section/setting_box/components/checkbox/Checkbox.module.scss diff --git a/src-ui/windows/config_window/setting_section/setting_box/components/deepl_auth_key/DeeplAuthKey.jsx b/src-ui/app/config_page/setting_section/setting_box/components/deepl_auth_key/DeeplAuthKey.jsx similarity index 100% rename from src-ui/windows/config_window/setting_section/setting_box/components/deepl_auth_key/DeeplAuthKey.jsx rename to src-ui/app/config_page/setting_section/setting_box/components/deepl_auth_key/DeeplAuthKey.jsx diff --git a/src-ui/windows/config_window/setting_section/setting_box/components/deepl_auth_key/DeeplAuthKey.module.scss b/src-ui/app/config_page/setting_section/setting_box/components/deepl_auth_key/DeeplAuthKey.module.scss similarity index 100% rename from src-ui/windows/config_window/setting_section/setting_box/components/deepl_auth_key/DeeplAuthKey.module.scss rename to src-ui/app/config_page/setting_section/setting_box/components/deepl_auth_key/DeeplAuthKey.module.scss diff --git a/src-ui/windows/config_window/setting_section/setting_box/components/dropdown_menu/DropdownMenu.jsx b/src-ui/app/config_page/setting_section/setting_box/components/dropdown_menu/DropdownMenu.jsx similarity index 100% rename from src-ui/windows/config_window/setting_section/setting_box/components/dropdown_menu/DropdownMenu.jsx rename to src-ui/app/config_page/setting_section/setting_box/components/dropdown_menu/DropdownMenu.jsx diff --git a/src-ui/windows/config_window/setting_section/setting_box/components/dropdown_menu/DropdownMenu.module.scss b/src-ui/app/config_page/setting_section/setting_box/components/dropdown_menu/DropdownMenu.module.scss similarity index 100% rename from src-ui/windows/config_window/setting_section/setting_box/components/dropdown_menu/DropdownMenu.module.scss rename to src-ui/app/config_page/setting_section/setting_box/components/dropdown_menu/DropdownMenu.module.scss diff --git a/src-ui/windows/config_window/setting_section/setting_box/components/entry/Entry.jsx b/src-ui/app/config_page/setting_section/setting_box/components/entry/Entry.jsx similarity index 100% rename from src-ui/windows/config_window/setting_section/setting_box/components/entry/Entry.jsx rename to src-ui/app/config_page/setting_section/setting_box/components/entry/Entry.jsx diff --git a/src-ui/windows/config_window/setting_section/setting_box/components/entry/Entry.module.scss b/src-ui/app/config_page/setting_section/setting_box/components/entry/Entry.module.scss similarity index 100% rename from src-ui/windows/config_window/setting_section/setting_box/components/entry/Entry.module.scss rename to src-ui/app/config_page/setting_section/setting_box/components/entry/Entry.module.scss diff --git a/src-ui/windows/config_window/setting_section/setting_box/components/label_component/LabelComponent.jsx b/src-ui/app/config_page/setting_section/setting_box/components/label_component/LabelComponent.jsx similarity index 100% rename from src-ui/windows/config_window/setting_section/setting_box/components/label_component/LabelComponent.jsx rename to src-ui/app/config_page/setting_section/setting_box/components/label_component/LabelComponent.jsx diff --git a/src-ui/windows/config_window/setting_section/setting_box/components/label_component/LabelComponent.module.scss b/src-ui/app/config_page/setting_section/setting_box/components/label_component/LabelComponent.module.scss similarity index 100% rename from src-ui/windows/config_window/setting_section/setting_box/components/label_component/LabelComponent.module.scss rename to src-ui/app/config_page/setting_section/setting_box/components/label_component/LabelComponent.module.scss diff --git a/src-ui/windows/config_window/setting_section/setting_box/components/message_format/MessageFormat.jsx b/src-ui/app/config_page/setting_section/setting_box/components/message_format/MessageFormat.jsx similarity index 94% rename from src-ui/windows/config_window/setting_section/setting_box/components/message_format/MessageFormat.jsx rename to src-ui/app/config_page/setting_section/setting_box/components/message_format/MessageFormat.jsx index 55f55223..d3d38eca 100644 --- a/src-ui/windows/config_window/setting_section/setting_box/components/message_format/MessageFormat.jsx +++ b/src-ui/app/config_page/setting_section/setting_box/components/message_format/MessageFormat.jsx @@ -52,12 +52,12 @@ const ExampleComponent = ({ id, current_format }) => { const { currentUiLanguageStatus } = useUiLanguageStatus(); const createExampleMessage = () => { - const originalLangMessage = t("config_window.send_message_format.example_text"); + const originalLangMessage = t("config_page.send_message_format.example_text"); let format = current_format; if (["send_with_t", "received_with_t"].includes(id)) { const translationLocale = currentUiLanguageStatus === "en" ? "ja" : "en"; - const translatedLangMessage = t("config_window.send_message_format.example_text", { lng: translationLocale }); + const translatedLangMessage = t("config_page.send_message_format.example_text", { lng: translationLocale }); return format.is_message_first ? `${format.before}${originalLangMessage}${format.between}${translatedLangMessage}${format.after}` diff --git a/src-ui/windows/config_window/setting_section/setting_box/components/message_format/MessageFormat.module.scss b/src-ui/app/config_page/setting_section/setting_box/components/message_format/MessageFormat.module.scss similarity index 100% rename from src-ui/windows/config_window/setting_section/setting_box/components/message_format/MessageFormat.module.scss rename to src-ui/app/config_page/setting_section/setting_box/components/message_format/MessageFormat.module.scss diff --git a/src-ui/windows/config_window/setting_section/setting_box/components/radio_button/RadioButton.jsx b/src-ui/app/config_page/setting_section/setting_box/components/radio_button/RadioButton.jsx similarity index 100% rename from src-ui/windows/config_window/setting_section/setting_box/components/radio_button/RadioButton.jsx rename to src-ui/app/config_page/setting_section/setting_box/components/radio_button/RadioButton.jsx diff --git a/src-ui/windows/config_window/setting_section/setting_box/components/radio_button/RadioButton.module.scss b/src-ui/app/config_page/setting_section/setting_box/components/radio_button/RadioButton.module.scss similarity index 100% rename from src-ui/windows/config_window/setting_section/setting_box/components/radio_button/RadioButton.module.scss rename to src-ui/app/config_page/setting_section/setting_box/components/radio_button/RadioButton.module.scss diff --git a/src-ui/windows/config_window/setting_section/setting_box/components/slider/Slider.jsx b/src-ui/app/config_page/setting_section/setting_box/components/slider/Slider.jsx similarity index 100% rename from src-ui/windows/config_window/setting_section/setting_box/components/slider/Slider.jsx rename to src-ui/app/config_page/setting_section/setting_box/components/slider/Slider.jsx diff --git a/src-ui/windows/config_window/setting_section/setting_box/components/slider/Slider.module.scss b/src-ui/app/config_page/setting_section/setting_box/components/slider/Slider.module.scss similarity index 100% rename from src-ui/windows/config_window/setting_section/setting_box/components/slider/Slider.module.scss rename to src-ui/app/config_page/setting_section/setting_box/components/slider/Slider.module.scss diff --git a/src-ui/windows/config_window/setting_section/setting_box/components/switchbox/Switchbox.jsx b/src-ui/app/config_page/setting_section/setting_box/components/switchbox/Switchbox.jsx similarity index 100% rename from src-ui/windows/config_window/setting_section/setting_box/components/switchbox/Switchbox.jsx rename to src-ui/app/config_page/setting_section/setting_box/components/switchbox/Switchbox.jsx diff --git a/src-ui/windows/config_window/setting_section/setting_box/components/switchbox/Switchbox.module.scss b/src-ui/app/config_page/setting_section/setting_box/components/switchbox/Switchbox.module.scss similarity index 100% rename from src-ui/windows/config_window/setting_section/setting_box/components/switchbox/Switchbox.module.scss rename to src-ui/app/config_page/setting_section/setting_box/components/switchbox/Switchbox.module.scss diff --git a/src-ui/windows/config_window/setting_section/setting_box/components/threshold_component/ThresholdComponent.jsx b/src-ui/app/config_page/setting_section/setting_box/components/threshold_component/ThresholdComponent.jsx similarity index 100% rename from src-ui/windows/config_window/setting_section/setting_box/components/threshold_component/ThresholdComponent.jsx rename to src-ui/app/config_page/setting_section/setting_box/components/threshold_component/ThresholdComponent.jsx diff --git a/src-ui/windows/config_window/setting_section/setting_box/components/threshold_component/ThresholdComponent.module.scss b/src-ui/app/config_page/setting_section/setting_box/components/threshold_component/ThresholdComponent.module.scss similarity index 100% rename from src-ui/windows/config_window/setting_section/setting_box/components/threshold_component/ThresholdComponent.module.scss rename to src-ui/app/config_page/setting_section/setting_box/components/threshold_component/ThresholdComponent.module.scss diff --git a/src-ui/windows/config_window/setting_section/setting_box/components/threshold_component/slider_and_meter/SliderAndMeter.jsx b/src-ui/app/config_page/setting_section/setting_box/components/threshold_component/slider_and_meter/SliderAndMeter.jsx similarity index 100% rename from src-ui/windows/config_window/setting_section/setting_box/components/threshold_component/slider_and_meter/SliderAndMeter.jsx rename to src-ui/app/config_page/setting_section/setting_box/components/threshold_component/slider_and_meter/SliderAndMeter.jsx diff --git a/src-ui/windows/config_window/setting_section/setting_box/components/threshold_component/slider_and_meter/SliderAndMeter.module.scss b/src-ui/app/config_page/setting_section/setting_box/components/threshold_component/slider_and_meter/SliderAndMeter.module.scss similarity index 100% rename from src-ui/windows/config_window/setting_section/setting_box/components/threshold_component/slider_and_meter/SliderAndMeter.module.scss rename to src-ui/app/config_page/setting_section/setting_box/components/threshold_component/slider_and_meter/SliderAndMeter.module.scss diff --git a/src-ui/windows/config_window/setting_section/setting_box/components/threshold_component/threshold_entry/ThresholdEntry.jsx b/src-ui/app/config_page/setting_section/setting_box/components/threshold_component/threshold_entry/ThresholdEntry.jsx similarity index 100% rename from src-ui/windows/config_window/setting_section/setting_box/components/threshold_component/threshold_entry/ThresholdEntry.jsx rename to src-ui/app/config_page/setting_section/setting_box/components/threshold_component/threshold_entry/ThresholdEntry.jsx diff --git a/src-ui/windows/config_window/setting_section/setting_box/components/threshold_component/threshold_entry/ThresholdEntry.module.scss b/src-ui/app/config_page/setting_section/setting_box/components/threshold_component/threshold_entry/ThresholdEntry.module.scss similarity index 100% rename from src-ui/windows/config_window/setting_section/setting_box/components/threshold_component/threshold_entry/ThresholdEntry.module.scss rename to src-ui/app/config_page/setting_section/setting_box/components/threshold_component/threshold_entry/ThresholdEntry.module.scss diff --git a/src-ui/windows/config_window/setting_section/setting_box/components/threshold_component/volume_check_button/VolumeCheckButton.jsx b/src-ui/app/config_page/setting_section/setting_box/components/threshold_component/volume_check_button/VolumeCheckButton.jsx similarity index 100% rename from src-ui/windows/config_window/setting_section/setting_box/components/threshold_component/volume_check_button/VolumeCheckButton.jsx rename to src-ui/app/config_page/setting_section/setting_box/components/threshold_component/volume_check_button/VolumeCheckButton.jsx diff --git a/src-ui/windows/config_window/setting_section/setting_box/components/threshold_component/volume_check_button/VolumeCheckButton.module.scss b/src-ui/app/config_page/setting_section/setting_box/components/threshold_component/volume_check_button/VolumeCheckButton.module.scss similarity index 100% rename from src-ui/windows/config_window/setting_section/setting_box/components/threshold_component/volume_check_button/VolumeCheckButton.module.scss rename to src-ui/app/config_page/setting_section/setting_box/components/threshold_component/volume_check_button/VolumeCheckButton.module.scss diff --git a/src-ui/windows/config_window/setting_section/setting_box/components/useSettingBox.jsx b/src-ui/app/config_page/setting_section/setting_box/components/useSettingBox.jsx similarity index 100% rename from src-ui/windows/config_window/setting_section/setting_box/components/useSettingBox.jsx rename to src-ui/app/config_page/setting_section/setting_box/components/useSettingBox.jsx diff --git a/src-ui/windows/config_window/setting_section/setting_box/components/useSettingBox.module.scss b/src-ui/app/config_page/setting_section/setting_box/components/useSettingBox.module.scss similarity index 100% rename from src-ui/windows/config_window/setting_section/setting_box/components/useSettingBox.module.scss rename to src-ui/app/config_page/setting_section/setting_box/components/useSettingBox.module.scss diff --git a/src-ui/windows/config_window/setting_section/setting_box/components/word_filter/WordFilter.jsx b/src-ui/app/config_page/setting_section/setting_box/components/word_filter/WordFilter.jsx similarity index 94% rename from src-ui/windows/config_window/setting_section/setting_box/components/word_filter/WordFilter.jsx rename to src-ui/app/config_page/setting_section/setting_box/components/word_filter/WordFilter.jsx index 6cf67612..49b54c11 100644 --- a/src-ui/windows/config_window/setting_section/setting_box/components/word_filter/WordFilter.jsx +++ b/src-ui/app/config_page/setting_section/setting_box/components/word_filter/WordFilter.jsx @@ -130,7 +130,7 @@ export const WordFilterListToggleComponent = (props) => { return (
-

{t("config_window.mic_word_filter.count_desc", {count: word_filter_list_length} )}

+

{t("config_page.mic_word_filter.count_desc", {count: word_filter_list_length} )}

diff --git a/src-ui/windows/config_window/setting_section/setting_box/components/word_filter/WordFilter.module.scss b/src-ui/app/config_page/setting_section/setting_box/components/word_filter/WordFilter.module.scss similarity index 100% rename from src-ui/windows/config_window/setting_section/setting_box/components/word_filter/WordFilter.module.scss rename to src-ui/app/config_page/setting_section/setting_box/components/word_filter/WordFilter.module.scss diff --git a/src-ui/windows/config_window/sidebar_section/SidebarSection.jsx b/src-ui/app/config_page/sidebar_section/SidebarSection.jsx similarity index 91% rename from src-ui/windows/config_window/sidebar_section/SidebarSection.jsx rename to src-ui/app/config_page/sidebar_section/SidebarSection.jsx index 7b85cfd3..9891bb75 100644 --- a/src-ui/windows/config_window/sidebar_section/SidebarSection.jsx +++ b/src-ui/app/config_page/sidebar_section/SidebarSection.jsx @@ -39,7 +39,7 @@ const Tab = (props) => { return (
-

{t(`config_window.side_menu_labels.${props.tab_id}`)}

+

{t(`config_page.side_menu_labels.${props.tab_id}`)}

); diff --git a/src-ui/windows/config_window/sidebar_section/SidebarSection.module.scss b/src-ui/app/config_page/sidebar_section/SidebarSection.module.scss similarity index 91% rename from src-ui/windows/config_window/sidebar_section/SidebarSection.module.scss rename to src-ui/app/config_page/sidebar_section/SidebarSection.module.scss index fa0c7c49..38a16575 100644 --- a/src-ui/windows/config_window/sidebar_section/SidebarSection.module.scss +++ b/src-ui/app/config_page/sidebar_section/SidebarSection.module.scss @@ -1,5 +1,5 @@ .container { - width: var(--config_window_sidebar_width); + width: var(--config_page_sidebar_width); flex-shrink: 0; display: flex; flex-direction: column; diff --git a/src-ui/windows/config_window/topbar/Topbar.jsx b/src-ui/app/config_page/topbar/Topbar.jsx similarity index 100% rename from src-ui/windows/config_window/topbar/Topbar.jsx rename to src-ui/app/config_page/topbar/Topbar.jsx diff --git a/src-ui/windows/config_window/topbar/Topbar.module.scss b/src-ui/app/config_page/topbar/Topbar.module.scss similarity index 75% rename from src-ui/windows/config_window/topbar/Topbar.module.scss rename to src-ui/app/config_page/topbar/Topbar.module.scss index d0cd2c64..58bab324 100644 --- a/src-ui/windows/config_window/topbar/Topbar.module.scss +++ b/src-ui/app/config_page/topbar/Topbar.module.scss @@ -4,7 +4,7 @@ } .wrapper { - height: var(--config_window_topbar_height); + height: var(--config_page_topbar_height); background-color: var(--dark_850_color); display: flex; justify-content: space-between; diff --git a/src-ui/windows/config_window/topbar/compact_switch_box/CompactSwitchBox.jsx b/src-ui/app/config_page/topbar/compact_switch_box/CompactSwitchBox.jsx similarity index 80% rename from src-ui/windows/config_window/topbar/compact_switch_box/CompactSwitchBox.jsx rename to src-ui/app/config_page/topbar/compact_switch_box/CompactSwitchBox.jsx index 580e2276..4d36a1e5 100644 --- a/src-ui/windows/config_window/topbar/compact_switch_box/CompactSwitchBox.jsx +++ b/src-ui/app/config_page/topbar/compact_switch_box/CompactSwitchBox.jsx @@ -6,7 +6,7 @@ export const CompactSwitchBox = () => { const { t } = useTranslation(); return (
-

{t("config_window.compact_mode")}

+

{t("config_page.compact_mode")}

); }; \ No newline at end of file diff --git a/src-ui/windows/config_window/topbar/compact_switch_box/CompactSwitchBox.module.scss b/src-ui/app/config_page/topbar/compact_switch_box/CompactSwitchBox.module.scss similarity index 100% rename from src-ui/windows/config_window/topbar/compact_switch_box/CompactSwitchBox.module.scss rename to src-ui/app/config_page/topbar/compact_switch_box/CompactSwitchBox.module.scss diff --git a/src-ui/windows/config_window/topbar/section_title_box/SectionTitleBox.jsx b/src-ui/app/config_page/topbar/section_title_box/SectionTitleBox.jsx similarity index 75% rename from src-ui/windows/config_window/topbar/section_title_box/SectionTitleBox.jsx rename to src-ui/app/config_page/topbar/section_title_box/SectionTitleBox.jsx index a08cc9d5..7e313965 100644 --- a/src-ui/windows/config_window/topbar/section_title_box/SectionTitleBox.jsx +++ b/src-ui/app/config_page/topbar/section_title_box/SectionTitleBox.jsx @@ -7,7 +7,7 @@ export const SectionTitleBox = () => { const { currentSelectedConfigTabId } = useSelectedConfigTabId(); return (
-

{t(`config_window.side_menu_labels.${currentSelectedConfigTabId}`)}

+

{t(`config_page.side_menu_labels.${currentSelectedConfigTabId}`)}

); }; \ No newline at end of file diff --git a/src-ui/windows/config_window/topbar/section_title_box/SectionTitleBox.module.scss b/src-ui/app/config_page/topbar/section_title_box/SectionTitleBox.module.scss similarity index 100% rename from src-ui/windows/config_window/topbar/section_title_box/SectionTitleBox.module.scss rename to src-ui/app/config_page/topbar/section_title_box/SectionTitleBox.module.scss diff --git a/src-ui/windows/config_window/topbar/title_box/TitleBox.jsx b/src-ui/app/config_page/topbar/title_box/TitleBox.jsx similarity index 80% rename from src-ui/windows/config_window/topbar/title_box/TitleBox.jsx rename to src-ui/app/config_page/topbar/title_box/TitleBox.jsx index 32a1d5ad..c2bb2355 100644 --- a/src-ui/windows/config_window/topbar/title_box/TitleBox.jsx +++ b/src-ui/app/config_page/topbar/title_box/TitleBox.jsx @@ -8,7 +8,7 @@ export const TitleBox = () => { return (
VRCT logo chato -

{t("config_window.config_title")}

+

{t("config_page.config_title")}

); }; \ No newline at end of file diff --git a/src-ui/windows/config_window/topbar/title_box/TitleBox.module.scss b/src-ui/app/config_page/topbar/title_box/TitleBox.module.scss similarity index 79% rename from src-ui/windows/config_window/topbar/title_box/TitleBox.module.scss rename to src-ui/app/config_page/topbar/title_box/TitleBox.module.scss index 95151fcf..33d38361 100644 --- a/src-ui/windows/config_window/topbar/title_box/TitleBox.module.scss +++ b/src-ui/app/config_page/topbar/title_box/TitleBox.module.scss @@ -1,6 +1,6 @@ .container { // flex: 0; - width: var(--config_window_sidebar_width); + width: var(--config_page_sidebar_width); height: 100%; display: flex; justify-content: left; diff --git a/src-ui/windows/main_window/index.jsx b/src-ui/app/index.jsx similarity index 75% rename from src-ui/windows/main_window/index.jsx rename to src-ui/app/index.jsx index 8e698c78..ab108afa 100644 --- a/src-ui/windows/main_window/index.jsx +++ b/src-ui/app/index.jsx @@ -3,10 +3,10 @@ import ReactDOM from "react-dom/client"; import "@root/locales/config.js"; import "@utils/root.css"; -import { MainWindow } from "./MainWindow"; +import { App } from "./App"; ReactDOM.createRoot(document.getElementById("root")).render( - + , ); \ No newline at end of file diff --git a/src-ui/app/main_page/MainPage.jsx b/src-ui/app/main_page/MainPage.jsx new file mode 100644 index 00000000..e73788f2 --- /dev/null +++ b/src-ui/app/main_page/MainPage.jsx @@ -0,0 +1,39 @@ +import styles from "./MainPage.module.scss"; +import { SidebarSection } from "./sidebar_section/SidebarSection"; +import { MainSection } from "./main_section/MainSection"; + +export const MainPage = () => { + return ( +
+ + + {/* */} +
+ ); +}; + + +// import { useTranslation } from "react-i18next"; +// import { useIsOpenedConfigPage } from "@store"; +// import { useWindow } from "@logics/useWindow"; + +// export const MainPageCover = () => { +// const { t } = useTranslation(); +// const { currentIsOpenedConfigPage } = useIsOpenedConfigPage(); +// const { closeConfigPage } = useWindow(); +// if ( currentIsOpenedConfigPage === false) return null; + +// const closeSettingsWindow = () => closeConfigPage(); + +// return ( +//
+//

{t("main_page.cover_message")}

+// +//
+// ); +// }; \ No newline at end of file diff --git a/src-ui/windows/main_window/MainWindow.module.scss b/src-ui/app/main_page/MainPage.module.scss similarity index 93% rename from src-ui/windows/main_window/MainWindow.module.scss rename to src-ui/app/main_page/MainPage.module.scss index 7a8b0027..20dbe41c 100644 --- a/src-ui/windows/main_window/MainWindow.module.scss +++ b/src-ui/app/main_page/MainPage.module.scss @@ -8,7 +8,7 @@ position: relative; } -.main_window_cover { +.main_page_cover { position: absolute; top: 0; right: 0; diff --git a/src-ui/windows/main_window/main_section/MainSection.jsx b/src-ui/app/main_page/main_section/MainSection.jsx similarity index 100% rename from src-ui/windows/main_window/main_section/MainSection.jsx rename to src-ui/app/main_page/main_section/MainSection.jsx diff --git a/src-ui/windows/main_window/main_section/MainSection.module.scss b/src-ui/app/main_page/main_section/MainSection.module.scss similarity index 100% rename from src-ui/windows/main_window/main_section/MainSection.module.scss rename to src-ui/app/main_page/main_section/MainSection.module.scss diff --git a/src-ui/windows/main_window/main_section/language_selector/LanguageSelector.jsx b/src-ui/app/main_page/main_section/language_selector/LanguageSelector.jsx similarity index 100% rename from src-ui/windows/main_window/main_section/language_selector/LanguageSelector.jsx rename to src-ui/app/main_page/main_section/language_selector/LanguageSelector.jsx diff --git a/src-ui/windows/main_window/main_section/language_selector/LanguageSelector.module.scss b/src-ui/app/main_page/main_section/language_selector/LanguageSelector.module.scss similarity index 100% rename from src-ui/windows/main_window/main_section/language_selector/LanguageSelector.module.scss rename to src-ui/app/main_page/main_section/language_selector/LanguageSelector.module.scss diff --git a/src-ui/windows/main_window/main_section/language_selector/language_selector_top_bar/LanguageSelectorTopBar.jsx b/src-ui/app/main_page/main_section/language_selector/language_selector_top_bar/LanguageSelectorTopBar.jsx similarity index 100% rename from src-ui/windows/main_window/main_section/language_selector/language_selector_top_bar/LanguageSelectorTopBar.jsx rename to src-ui/app/main_page/main_section/language_selector/language_selector_top_bar/LanguageSelectorTopBar.jsx diff --git a/src-ui/windows/main_window/main_section/language_selector/language_selector_top_bar/LanguageSelectorTopBar.module.scss b/src-ui/app/main_page/main_section/language_selector/language_selector_top_bar/LanguageSelectorTopBar.module.scss similarity index 88% rename from src-ui/windows/main_window/main_section/language_selector/language_selector_top_bar/LanguageSelectorTopBar.module.scss rename to src-ui/app/main_page/main_section/language_selector/language_selector_top_bar/LanguageSelectorTopBar.module.scss index 1dc95be7..b2e7d219 100644 --- a/src-ui/windows/main_window/main_section/language_selector/language_selector_top_bar/LanguageSelectorTopBar.module.scss +++ b/src-ui/app/main_page/main_section/language_selector/language_selector_top_bar/LanguageSelectorTopBar.module.scss @@ -1,5 +1,5 @@ .container { - height: var(--main_window_topbar_height); + height: var(--main_page_topbar_height); background-color: var(--dark_850_color); display: flex; justify-content: center; diff --git a/src-ui/windows/main_window/main_section/message_container/MessageContainer.jsx b/src-ui/app/main_page/main_section/message_container/MessageContainer.jsx similarity index 100% rename from src-ui/windows/main_window/main_section/message_container/MessageContainer.jsx rename to src-ui/app/main_page/main_section/message_container/MessageContainer.jsx diff --git a/src-ui/windows/main_window/main_section/message_container/MessageContainer.module.scss b/src-ui/app/main_page/main_section/message_container/MessageContainer.module.scss similarity index 100% rename from src-ui/windows/main_window/main_section/message_container/MessageContainer.module.scss rename to src-ui/app/main_page/main_section/message_container/MessageContainer.module.scss diff --git a/src-ui/windows/main_window/main_section/message_container/log_box/LogBox.jsx b/src-ui/app/main_page/main_section/message_container/log_box/LogBox.jsx similarity index 100% rename from src-ui/windows/main_window/main_section/message_container/log_box/LogBox.jsx rename to src-ui/app/main_page/main_section/message_container/log_box/LogBox.jsx diff --git a/src-ui/windows/main_window/main_section/message_container/log_box/LogBox.module.scss b/src-ui/app/main_page/main_section/message_container/log_box/LogBox.module.scss similarity index 100% rename from src-ui/windows/main_window/main_section/message_container/log_box/LogBox.module.scss rename to src-ui/app/main_page/main_section/message_container/log_box/LogBox.module.scss diff --git a/src-ui/windows/main_window/main_section/message_container/log_box/message_container/MessageContainer.jsx b/src-ui/app/main_page/main_section/message_container/log_box/message_container/MessageContainer.jsx similarity index 90% rename from src-ui/windows/main_window/main_section/message_container/log_box/message_container/MessageContainer.jsx rename to src-ui/app/main_page/main_section/message_container/log_box/message_container/MessageContainer.jsx index 7ce032a7..7446823b 100644 --- a/src-ui/windows/main_window/main_section/message_container/log_box/message_container/MessageContainer.jsx +++ b/src-ui/app/main_page/main_section/message_container/log_box/message_container/MessageContainer.jsx @@ -8,7 +8,7 @@ export const MessageContainer = ({ messages, status, category, created_at }) => const is_translated_exist = messages.translated.length >= 1; const is_pending = status === "pending"; const is_sent_message = category === "sent"; - const category_text = is_sent_message ? t("main_window.textbox_tab_sent") : t("main_window.textbox_tab_received"); + const category_text = is_sent_message ? t("main_page.textbox_tab_sent") : t("main_page.textbox_tab_received"); const message_type_class_name = clsx({ [styles.sent_message]: is_sent_message, diff --git a/src-ui/windows/main_window/main_section/message_container/log_box/message_container/MessageContainer.module.scss b/src-ui/app/main_page/main_section/message_container/log_box/message_container/MessageContainer.module.scss similarity index 100% rename from src-ui/windows/main_window/main_section/message_container/log_box/message_container/MessageContainer.module.scss rename to src-ui/app/main_page/main_section/message_container/log_box/message_container/MessageContainer.module.scss diff --git a/src-ui/windows/main_window/main_section/message_container/message_input_box/MessageInputBox.jsx b/src-ui/app/main_page/main_section/message_container/message_input_box/MessageInputBox.jsx similarity index 100% rename from src-ui/windows/main_window/main_section/message_container/message_input_box/MessageInputBox.jsx rename to src-ui/app/main_page/main_section/message_container/message_input_box/MessageInputBox.jsx diff --git a/src-ui/windows/main_window/main_section/message_container/message_input_box/MessageInputBox.module.scss b/src-ui/app/main_page/main_section/message_container/message_input_box/MessageInputBox.module.scss similarity index 100% rename from src-ui/windows/main_window/main_section/message_container/message_input_box/MessageInputBox.module.scss rename to src-ui/app/main_page/main_section/message_container/message_input_box/MessageInputBox.module.scss diff --git a/src-ui/windows/main_window/main_section/top_bar/TopBar.jsx b/src-ui/app/main_page/main_section/top_bar/TopBar.jsx similarity index 100% rename from src-ui/windows/main_window/main_section/top_bar/TopBar.jsx rename to src-ui/app/main_page/main_section/top_bar/TopBar.jsx diff --git a/src-ui/windows/main_window/main_section/top_bar/TopBar.module.scss b/src-ui/app/main_page/main_section/top_bar/TopBar.module.scss similarity index 69% rename from src-ui/windows/main_window/main_section/top_bar/TopBar.module.scss rename to src-ui/app/main_page/main_section/top_bar/TopBar.module.scss index 0b6f0c09..a2196678 100644 --- a/src-ui/windows/main_window/main_section/top_bar/TopBar.module.scss +++ b/src-ui/app/main_page/main_section/top_bar/TopBar.module.scss @@ -1,5 +1,5 @@ .container { - height: var(--main_window_topbar_height); + height: var(--main_page_topbar_height); display: flex; justify-content: space-between; align-items: center; diff --git a/src-ui/windows/main_window/main_section/top_bar/right_side_components/RightSideComponents.jsx b/src-ui/app/main_page/main_section/top_bar/right_side_components/RightSideComponents.jsx similarity index 100% rename from src-ui/windows/main_window/main_section/top_bar/right_side_components/RightSideComponents.jsx rename to src-ui/app/main_page/main_section/top_bar/right_side_components/RightSideComponents.jsx diff --git a/src-ui/windows/main_window/main_section/top_bar/right_side_components/RightSideComponents.module.scss b/src-ui/app/main_page/main_section/top_bar/right_side_components/RightSideComponents.module.scss similarity index 100% rename from src-ui/windows/main_window/main_section/top_bar/right_side_components/RightSideComponents.module.scss rename to src-ui/app/main_page/main_section/top_bar/right_side_components/RightSideComponents.module.scss diff --git a/src-ui/windows/main_window/main_section/top_bar/sidebar_compact_mode_button/SidebarCompactModeButton.jsx b/src-ui/app/main_page/main_section/top_bar/sidebar_compact_mode_button/SidebarCompactModeButton.jsx similarity index 59% rename from src-ui/windows/main_window/main_section/top_bar/sidebar_compact_mode_button/SidebarCompactModeButton.jsx rename to src-ui/app/main_page/main_section/top_bar/sidebar_compact_mode_button/SidebarCompactModeButton.jsx index 929d6c1e..889a0e6e 100644 --- a/src-ui/windows/main_window/main_section/top_bar/sidebar_compact_mode_button/SidebarCompactModeButton.jsx +++ b/src-ui/app/main_page/main_section/top_bar/sidebar_compact_mode_button/SidebarCompactModeButton.jsx @@ -1,18 +1,18 @@ import clsx from "clsx"; import styles from "./SidebarCompactModeButton.module.scss"; -import { useMainWindowCompactModeStatus } from "@store"; +import { useMainPageCompactModeStatus } from "@store"; import ArrowLeftSvg from "@images/arrow_left.svg?react"; export const SidebarCompactModeButton = () => { - const { updateMainWindowCompactModeStatus, currentMainWindowCompactModeStatus } = useMainWindowCompactModeStatus(); + const { updateMainPageCompactModeStatus, currentMainPageCompactModeStatus } = useMainPageCompactModeStatus(); const toggleCompactMode = () => { - updateMainWindowCompactModeStatus(!currentMainWindowCompactModeStatus); + updateMainPageCompactModeStatus(!currentMainPageCompactModeStatus); }; const class_names = clsx(styles["arrow_left_svg"], { - [styles["reverse"]]: currentMainWindowCompactModeStatus + [styles["reverse"]]: currentMainPageCompactModeStatus }); return ( diff --git a/src-ui/windows/main_window/main_section/top_bar/sidebar_compact_mode_button/SidebarCompactModeButton.module.scss b/src-ui/app/main_page/main_section/top_bar/sidebar_compact_mode_button/SidebarCompactModeButton.module.scss similarity index 100% rename from src-ui/windows/main_window/main_section/top_bar/sidebar_compact_mode_button/SidebarCompactModeButton.module.scss rename to src-ui/app/main_page/main_section/top_bar/sidebar_compact_mode_button/SidebarCompactModeButton.module.scss diff --git a/src-ui/windows/main_window/sidebar_section/SidebarSection.jsx b/src-ui/app/main_page/sidebar_section/SidebarSection.jsx similarity index 66% rename from src-ui/windows/main_window/sidebar_section/SidebarSection.jsx rename to src-ui/app/main_page/sidebar_section/SidebarSection.jsx index 00bc2842..71d5ea4d 100644 --- a/src-ui/windows/main_window/sidebar_section/SidebarSection.jsx +++ b/src-ui/app/main_page/sidebar_section/SidebarSection.jsx @@ -1,7 +1,7 @@ import clsx from "clsx"; import styles from "./SidebarSection.module.scss"; -import { useMainWindowCompactModeStatus } from "@store"; +import { useMainPageCompactModeStatus } from "@store"; import { Logo } from "./logo/Logo"; import { MainFunctionSwitch } from "./main_function_switch/MainFunctionSwitch"; @@ -9,16 +9,16 @@ import { LanguageSettings } from "./language_settings/LanguageSettings"; import { OpenSettings } from "./open_settings/OpenSettings"; export const SidebarSection = () => { - const { currentMainWindowCompactModeStatus } = useMainWindowCompactModeStatus(); + const { currentMainPageCompactModeStatus } = useMainPageCompactModeStatus(); const container_class_name = clsx(styles["container"], { - [styles["is_compact_mode"]]: currentMainWindowCompactModeStatus + [styles["is_compact_mode"]]: currentMainPageCompactModeStatus }); return (
- {!currentMainWindowCompactModeStatus && } + {!currentMainPageCompactModeStatus && }
); diff --git a/src-ui/windows/main_window/sidebar_section/SidebarSection.module.scss b/src-ui/app/main_page/sidebar_section/SidebarSection.module.scss similarity index 100% rename from src-ui/windows/main_window/sidebar_section/SidebarSection.module.scss rename to src-ui/app/main_page/sidebar_section/SidebarSection.module.scss diff --git a/src-ui/windows/main_window/sidebar_section/language_settings/LanguageSettings.jsx b/src-ui/app/main_page/sidebar_section/language_settings/LanguageSettings.jsx similarity index 94% rename from src-ui/windows/main_window/sidebar_section/language_settings/LanguageSettings.jsx rename to src-ui/app/main_page/sidebar_section/language_settings/LanguageSettings.jsx index 3347eba4..18539e60 100644 --- a/src-ui/windows/main_window/sidebar_section/language_settings/LanguageSettings.jsx +++ b/src-ui/app/main_page/sidebar_section/language_settings/LanguageSettings.jsx @@ -75,7 +75,7 @@ const PresetContainer = () => { }; const your_language_settings = { - title: t("main_window.your_language"), + title: t("main_page.your_language"), is_opened: currentIsOpenedLanguageSelector.your_language, onClickFunction: () => handleLanguageSelectorClick("your_language"), TurnedOnSvgComponent: , @@ -83,7 +83,7 @@ const PresetContainer = () => { }; const target_language_settings = { - title: t("main_window.target_language"), + title: t("main_page.target_language"), is_opened: currentIsOpenedLanguageSelector.target_language, onClickFunction: () => handleLanguageSelectorClick("target_language"), TurnedOnSvgComponent: , diff --git a/src-ui/windows/main_window/sidebar_section/language_settings/LanguageSettings.module.scss b/src-ui/app/main_page/sidebar_section/language_settings/LanguageSettings.module.scss similarity index 100% rename from src-ui/windows/main_window/sidebar_section/language_settings/LanguageSettings.module.scss rename to src-ui/app/main_page/sidebar_section/language_settings/LanguageSettings.module.scss diff --git a/src-ui/windows/main_window/sidebar_section/language_settings/language_selector_open_button/LanguageSelectorOpenButton.jsx b/src-ui/app/main_page/sidebar_section/language_settings/language_selector_open_button/LanguageSelectorOpenButton.jsx similarity index 100% rename from src-ui/windows/main_window/sidebar_section/language_settings/language_selector_open_button/LanguageSelectorOpenButton.jsx rename to src-ui/app/main_page/sidebar_section/language_settings/language_selector_open_button/LanguageSelectorOpenButton.jsx diff --git a/src-ui/windows/main_window/sidebar_section/language_settings/language_selector_open_button/LanguageSelectorOpenButton.module.scss b/src-ui/app/main_page/sidebar_section/language_settings/language_selector_open_button/LanguageSelectorOpenButton.module.scss similarity index 100% rename from src-ui/windows/main_window/sidebar_section/language_settings/language_selector_open_button/LanguageSelectorOpenButton.module.scss rename to src-ui/app/main_page/sidebar_section/language_settings/language_selector_open_button/LanguageSelectorOpenButton.module.scss diff --git a/src-ui/windows/main_window/sidebar_section/language_settings/language_swap_button/LanguageSwapButton.jsx b/src-ui/app/main_page/sidebar_section/language_settings/language_swap_button/LanguageSwapButton.jsx similarity index 89% rename from src-ui/windows/main_window/sidebar_section/language_settings/language_swap_button/LanguageSwapButton.jsx rename to src-ui/app/main_page/sidebar_section/language_settings/language_swap_button/LanguageSwapButton.jsx index 0f91b73e..8174cea4 100644 --- a/src-ui/windows/main_window/sidebar_section/language_settings/language_swap_button/LanguageSwapButton.jsx +++ b/src-ui/app/main_page/sidebar_section/language_settings/language_swap_button/LanguageSwapButton.jsx @@ -11,8 +11,8 @@ export const LanguageSwapButton = () => { const { t } = useTranslation(); const label = isHovered - ? t("main_window.swap_button_label") - : t("main_window.translate_each_other_label"); + ? t("main_page.swap_button_label") + : t("main_page.translate_each_other_label"); const labelClassName = clsx(styles["label"], { [styles["is_hovered"]]: isHovered diff --git a/src-ui/windows/main_window/sidebar_section/language_settings/language_swap_button/LanguageSwapButton.module.scss b/src-ui/app/main_page/sidebar_section/language_settings/language_swap_button/LanguageSwapButton.module.scss similarity index 100% rename from src-ui/windows/main_window/sidebar_section/language_settings/language_swap_button/LanguageSwapButton.module.scss rename to src-ui/app/main_page/sidebar_section/language_settings/language_swap_button/LanguageSwapButton.module.scss diff --git a/src-ui/windows/main_window/sidebar_section/language_settings/preset_tab_selector/PresetTabSelector.jsx b/src-ui/app/main_page/sidebar_section/language_settings/preset_tab_selector/PresetTabSelector.jsx similarity index 100% rename from src-ui/windows/main_window/sidebar_section/language_settings/preset_tab_selector/PresetTabSelector.jsx rename to src-ui/app/main_page/sidebar_section/language_settings/preset_tab_selector/PresetTabSelector.jsx diff --git a/src-ui/windows/main_window/sidebar_section/language_settings/preset_tab_selector/PresetTabSelector.module.scss b/src-ui/app/main_page/sidebar_section/language_settings/preset_tab_selector/PresetTabSelector.module.scss similarity index 100% rename from src-ui/windows/main_window/sidebar_section/language_settings/preset_tab_selector/PresetTabSelector.module.scss rename to src-ui/app/main_page/sidebar_section/language_settings/preset_tab_selector/PresetTabSelector.module.scss diff --git a/src-ui/windows/main_window/sidebar_section/language_settings/translator_selector_open_button/TranslatorSelectorOpenButton.jsx b/src-ui/app/main_page/sidebar_section/language_settings/translator_selector_open_button/TranslatorSelectorOpenButton.jsx similarity index 92% rename from src-ui/windows/main_window/sidebar_section/language_settings/translator_selector_open_button/TranslatorSelectorOpenButton.jsx rename to src-ui/app/main_page/sidebar_section/language_settings/translator_selector_open_button/TranslatorSelectorOpenButton.jsx index a85d5696..2be44a04 100644 --- a/src-ui/windows/main_window/sidebar_section/language_settings/translator_selector_open_button/TranslatorSelectorOpenButton.jsx +++ b/src-ui/app/main_page/sidebar_section/language_settings/translator_selector_open_button/TranslatorSelectorOpenButton.jsx @@ -19,7 +19,7 @@ export const TranslatorSelectorOpenButton = () => { return (
-

{t("main_window.translator")}

+

{t("main_page.translator")}

{currentTranslator?.translator_name}

{currentIsOpenedTranslatorSelector && } diff --git a/src-ui/windows/main_window/sidebar_section/language_settings/translator_selector_open_button/TranslatorSelectorOpenButton.module.scss b/src-ui/app/main_page/sidebar_section/language_settings/translator_selector_open_button/TranslatorSelectorOpenButton.module.scss similarity index 100% rename from src-ui/windows/main_window/sidebar_section/language_settings/translator_selector_open_button/TranslatorSelectorOpenButton.module.scss rename to src-ui/app/main_page/sidebar_section/language_settings/translator_selector_open_button/TranslatorSelectorOpenButton.module.scss diff --git a/src-ui/windows/main_window/sidebar_section/language_settings/translator_selector_open_button/translator_selector/TranslatorSelector.jsx b/src-ui/app/main_page/sidebar_section/language_settings/translator_selector_open_button/translator_selector/TranslatorSelector.jsx similarity index 100% rename from src-ui/windows/main_window/sidebar_section/language_settings/translator_selector_open_button/translator_selector/TranslatorSelector.jsx rename to src-ui/app/main_page/sidebar_section/language_settings/translator_selector_open_button/translator_selector/TranslatorSelector.jsx diff --git a/src-ui/windows/main_window/sidebar_section/language_settings/translator_selector_open_button/translator_selector/TranslatorSelector.module.scss b/src-ui/app/main_page/sidebar_section/language_settings/translator_selector_open_button/translator_selector/TranslatorSelector.module.scss similarity index 100% rename from src-ui/windows/main_window/sidebar_section/language_settings/translator_selector_open_button/translator_selector/TranslatorSelector.module.scss rename to src-ui/app/main_page/sidebar_section/language_settings/translator_selector_open_button/translator_selector/TranslatorSelector.module.scss diff --git a/src-ui/windows/main_window/sidebar_section/logo/Logo.jsx b/src-ui/app/main_page/sidebar_section/logo/Logo.jsx similarity index 70% rename from src-ui/windows/main_window/sidebar_section/logo/Logo.jsx rename to src-ui/app/main_page/sidebar_section/logo/Logo.jsx index a3700ec5..9bdae239 100644 --- a/src-ui/windows/main_window/sidebar_section/logo/Logo.jsx +++ b/src-ui/app/main_page/sidebar_section/logo/Logo.jsx @@ -11,11 +11,11 @@ export const Logo = () => { import vrct_logo from "@images/vrct_logo_for_dark_mode.png"; import chato_img from "@images/chato_white.png"; -import { useMainWindowCompactModeStatus } from "@store"; +import { useMainPageCompactModeStatus } from "@store"; export const LogoBox = () => { - const { currentMainWindowCompactModeStatus } = useMainWindowCompactModeStatus(); - if (currentMainWindowCompactModeStatus === true) { + const { currentMainPageCompactModeStatus } = useMainPageCompactModeStatus(); + if (currentMainPageCompactModeStatus === true) { return VRCT logo chato; } else { return VRCT logo; diff --git a/src-ui/windows/main_window/sidebar_section/logo/Logo.module.scss b/src-ui/app/main_page/sidebar_section/logo/Logo.module.scss similarity index 77% rename from src-ui/windows/main_window/sidebar_section/logo/Logo.module.scss rename to src-ui/app/main_page/sidebar_section/logo/Logo.module.scss index 74a57682..a1e64e37 100644 --- a/src-ui/windows/main_window/sidebar_section/logo/Logo.module.scss +++ b/src-ui/app/main_page/sidebar_section/logo/Logo.module.scss @@ -1,5 +1,5 @@ .container { - height: var(--main_window_topbar_height); + height: var(--main_page_topbar_height); display: flex; justify-content: center; align-items: center; diff --git a/src-ui/windows/main_window/sidebar_section/main_function_switch/MainFunctionSwitch.jsx b/src-ui/app/main_page/sidebar_section/main_function_switch/MainFunctionSwitch.jsx similarity index 87% rename from src-ui/windows/main_window/sidebar_section/main_function_switch/MainFunctionSwitch.jsx rename to src-ui/app/main_page/sidebar_section/main_function_switch/MainFunctionSwitch.jsx index 7154fba5..b038ed0c 100644 --- a/src-ui/windows/main_window/sidebar_section/main_function_switch/MainFunctionSwitch.jsx +++ b/src-ui/app/main_page/sidebar_section/main_function_switch/MainFunctionSwitch.jsx @@ -5,7 +5,7 @@ import TranslationSvg from "@images/translation.svg?react"; import MicSvg from "@images/mic.svg?react"; import HeadphonesSvg from "@images/headphones.svg?react"; import ForegroundSvg from "@images/foreground.svg?react"; -import { useMainWindowCompactModeStatus } from "@store"; +import { useMainPageCompactModeStatus } from "@store"; import { useMainFunction } from "@logics/useMainFunction"; @@ -23,28 +23,28 @@ export const MainFunctionSwitch = () => { const switch_items = [ { switch_id: "translation", - label: t("main_window.translation"), + label: t("main_page.translation"), SvgComponent: TranslationSvg, currentState: currentTranslationStatus, toggleFunction: toggleTranslation, }, { switch_id: "transcription_send", - label: t("main_window.transcription_send"), + label: t("main_page.transcription_send"), SvgComponent: MicSvg, currentState: currentTranscriptionSendStatus, toggleFunction: toggleTranscriptionSend, }, { switch_id: "transcription_receive", - label: t("main_window.transcription_receive"), + label: t("main_page.transcription_receive"), SvgComponent: HeadphonesSvg, currentState: currentTranscriptionReceiveStatus, toggleFunction: toggleTranscriptionReceive, }, { switch_id: "foreground", - label: t("main_window.foreground"), + label: t("main_page.foreground"), SvgComponent: ForegroundSvg, currentState: currentForegroundStatus, toggleFunction: toggleForeground, @@ -74,10 +74,10 @@ export const SwitchContainer = ({ switchLabel, switch_id, children, currentState const [is_hovered, setIsHovered] = useState(false); const [is_mouse_down, setIsMouseDown] = useState(false); - const { currentMainWindowCompactModeStatus } = useMainWindowCompactModeStatus(); + const { currentMainPageCompactModeStatus } = useMainPageCompactModeStatus(); const getClassNames = (baseClass) => clsx(baseClass, { - [styles.is_compact_mode]: currentMainWindowCompactModeStatus, + [styles.is_compact_mode]: currentMainPageCompactModeStatus, [styles.is_active]: (currentState.data === true), [styles.is_loading]: (currentState.state === "loading"), [styles.is_hovered]: is_hovered, diff --git a/src-ui/windows/main_window/sidebar_section/main_function_switch/MainFunctionSwitch.module.scss b/src-ui/app/main_page/sidebar_section/main_function_switch/MainFunctionSwitch.module.scss similarity index 100% rename from src-ui/windows/main_window/sidebar_section/main_function_switch/MainFunctionSwitch.module.scss rename to src-ui/app/main_page/sidebar_section/main_function_switch/MainFunctionSwitch.module.scss diff --git a/src-ui/windows/main_window/sidebar_section/open_settings/OpenSettings.jsx b/src-ui/app/main_page/sidebar_section/open_settings/OpenSettings.jsx similarity index 55% rename from src-ui/windows/main_window/sidebar_section/open_settings/OpenSettings.jsx rename to src-ui/app/main_page/sidebar_section/open_settings/OpenSettings.jsx index c664db11..c939d6a1 100644 --- a/src-ui/windows/main_window/sidebar_section/open_settings/OpenSettings.jsx +++ b/src-ui/app/main_page/sidebar_section/open_settings/OpenSettings.jsx @@ -1,18 +1,19 @@ import styles from "./OpenSettings.module.scss"; import ConfigurationSvg from "@images/configuration.svg?react"; -import { useWindow } from "@logics/useWindow"; +// import { useWindow } from "@logics/useWindow"; export const OpenSettings = () => { - const { createConfigWindow } = useWindow(); + // const { createConfigPage } = useWindow(); - const openConfigWindow = () => { - createConfigWindow(); + const openConfigPage = () => { + + // createConfigPage(); }; return (
-
+
diff --git a/src-ui/windows/main_window/sidebar_section/open_settings/OpenSettings.module.scss b/src-ui/app/main_page/sidebar_section/open_settings/OpenSettings.module.scss similarity index 89% rename from src-ui/windows/main_window/sidebar_section/open_settings/OpenSettings.module.scss rename to src-ui/app/main_page/sidebar_section/open_settings/OpenSettings.module.scss index 04871748..28607b98 100644 --- a/src-ui/windows/main_window/sidebar_section/open_settings/OpenSettings.module.scss +++ b/src-ui/app/main_page/sidebar_section/open_settings/OpenSettings.module.scss @@ -6,7 +6,7 @@ background-color: var(--dark_850_color); } -.open_config_window_button { +.open_config_page_button { width: auto; margin: 1rem; padding: 0.8rem 0; diff --git a/src-ui/logics/useMainFunction.js b/src-ui/logics/useMainFunction.js index 5f8774f8..2930726d 100644 --- a/src-ui/logics/useMainFunction.js +++ b/src-ui/logics/useMainFunction.js @@ -62,9 +62,9 @@ export const useMainFunction = () => { }, toggleForeground: () => { - const main_window = getCurrent(); + const main_page = getCurrent(); const is_foreground_enabled = !currentForegroundStatus.data; - main_window.setAlwaysOnTop(is_foreground_enabled); + main_page.setAlwaysOnTop(is_foreground_enabled); updateForegroundStatus(is_foreground_enabled); }, diff --git a/src-ui/logics/useWindow.js b/src-ui/logics/useWindow.js index 40933f38..7502c1a9 100644 --- a/src-ui/logics/useWindow.js +++ b/src-ui/logics/useWindow.js @@ -1,44 +1,44 @@ import { WebviewWindow } from "@tauri-apps/api/window"; -import { store, useIsOpenedConfigWindow } from "@store"; +import { store, useIsOpenedConfigPage } from "@store"; import { getCurrent } from "@tauri-apps/api/window"; export const useWindow = () => { - const { updateIsOpenedConfigWindow } = useIsOpenedConfigWindow(); + const { updateIsOpenedConfigPage } = useIsOpenedConfigPage(); - const createConfigWindow = async () => { - const main_window = getCurrent(); - if (store.config_window === null) { - const config_window = new WebviewWindow("vrct_config_window",{ - url: "./src-ui/windows/config_window/index.html", + const createConfigPage = async () => { + const main_page = getCurrent(); + if (store.config_page === null) { + const config_page = new WebviewWindow("vrct_config_page",{ + url: "./src-ui/windows/config_page/index.html", center: true, width: 1080, height: 700, title: "Settings" }); - config_window.once("tauri://created", function () { - store.config_window = config_window; - updateIsOpenedConfigWindow(true); + config_page.once("tauri://created", function () { + store.config_page = config_page; + updateIsOpenedConfigPage(true); }); - config_window.once("tauri://error", function (e) { + config_page.once("tauri://error", function (e) { console.log(e); }); - const unlisten_d = config_window.once("tauri://destroyed", (event) => { - store.config_window = null; - updateIsOpenedConfigWindow(false); + const unlisten_d = config_page.once("tauri://destroyed", (event) => { + store.config_page = null; + updateIsOpenedConfigPage(false); unlisten_d(); }); - main_window.onCloseRequested((event) => { - config_window.close(); + main_page.onCloseRequested((event) => { + config_page.close(); }); } }; - const closeConfigWindow = () => { - store.config_window.close(); + const closeConfigPage = () => { + store.config_page.close(); }; - return { createConfigWindow, closeConfigWindow }; + return { createConfigPage, closeConfigPage }; }; \ No newline at end of file diff --git a/src-ui/store.js b/src-ui/store.js index 191d7cf5..a4571eca 100644 --- a/src-ui/store.js +++ b/src-ui/store.js @@ -13,7 +13,7 @@ import { export const store = { backend_subprocess: null, - config_window: null, + config_page: null, log_box_ref: null, }; @@ -104,14 +104,14 @@ export const { atomInstance: Atom_TranscriptionReceiveStatus, useHook: useTransc export const { atomInstance: Atom_ForegroundStatus, useHook: useForegroundStatus } = createAsyncAtomWithHook(false, "ForegroundStatus"); export const { atomInstance: Atom_MessageLogsStatus, useHook: useMessageLogsStatus } = createAtomWithHook(generateTestData(20), "MessageLogsStatus"); -export const { atomInstance: Atom_MainWindowCompactModeStatus, useHook: useMainWindowCompactModeStatus } = createAtomWithHook(false, "MainWindowCompactModeStatus"); +export const { atomInstance: Atom_MainPageCompactModeStatus, useHook: useMainPageCompactModeStatus } = createAtomWithHook(false, "MainPageCompactModeStatus"); export const { atomInstance: Atom_IsOpenedLanguageSelector, useHook: useIsOpenedLanguageSelector } = createAtomWithHook( { your_language: false, target_language: false }, "IsOpenedLanguageSelector" ); export const { atomInstance: Atom_SelectedPresetTabStatus, useHook: useSelectedPresetTabStatus } = createAtomWithHook(1, "SelectedPresetTabStatus"); -export const { atomInstance: Atom_IsOpenedConfigWindow, useHook: useIsOpenedConfigWindow } = createAtomWithHook(false, "IsOpenedConfigWindow"); +export const { atomInstance: Atom_IsOpenedConfigPage, useHook: useIsOpenedConfigPage } = createAtomWithHook(false, "IsOpenedConfigPage"); export const { atomInstance: Atom_SelectedConfigTabId, useHook: useSelectedConfigTabId } = createAtomWithHook("appearance", "SelectedConfigTabId"); export const { atomInstance: Atom_IsOpenedDropdownMenu, useHook: useIsOpenedDropdownMenu } = createAtomWithHook("", "IsOpenedDropdownMenu"); diff --git a/src-ui/utils/variables.css b/src-ui/utils/variables.css index 1703fa73..34273744 100644 --- a/src-ui/utils/variables.css +++ b/src-ui/utils/variables.css @@ -45,7 +45,7 @@ --dark_1000_color: #151517; - --main_window_topbar_height: 4.8rem; - --config_window_sidebar_width: 22rem; - --config_window_topbar_height: 5.2rem; + --main_page_topbar_height: 4.8rem; + --config_page_sidebar_width: 22rem; + --config_page_topbar_height: 5.2rem; } \ No newline at end of file diff --git a/src-ui/windows/config_window/index.html b/src-ui/windows/config_window/index.html deleted file mode 100644 index a0e60b95..00000000 --- a/src-ui/windows/config_window/index.html +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - Settings - - - -
- - - diff --git a/src-ui/windows/config_window/index.jsx b/src-ui/windows/config_window/index.jsx deleted file mode 100644 index f1a5de76..00000000 --- a/src-ui/windows/config_window/index.jsx +++ /dev/null @@ -1,13 +0,0 @@ -import React from "react"; -import ReactDOM from "react-dom/client"; -import "@root/locales/config.js"; -import "@utils/root.css"; - -import { ConfigWindow } from "./ConfigWindow"; - -ReactDOM.createRoot(document.getElementById("root")).render( - - - , -); - diff --git a/src-ui/windows/main_window/MainWindow.jsx b/src-ui/windows/main_window/MainWindow.jsx deleted file mode 100644 index ee079a1c..00000000 --- a/src-ui/windows/main_window/MainWindow.jsx +++ /dev/null @@ -1,62 +0,0 @@ -import { getCurrent } from "@tauri-apps/api/window"; -import { useEffect, useRef } from "react"; -import styles from "./MainWindow.module.scss"; -import { SidebarSection } from "./sidebar_section/SidebarSection"; -import { MainSection } from "./main_section/MainSection"; -import { useStartPython } from "@logics/useStartPython"; -import { useConfig } from "@logics/useConfig"; - -export const MainWindow = () => { - const { asyncStartPython } = useStartPython(); - const hasRunRef = useRef(false); - const main_window = getCurrent(); - - const { getSoftwareVersion } = useConfig(); - - useEffect(() => { - main_window.setDecorations(true); - if (!hasRunRef.current) { - asyncStartPython().then((result) => { - getSoftwareVersion(); - }).catch((err) => { - - }); - } - return () => hasRunRef.current = true; - }, []); - - return ( -
- - - -
- ); -}; - - -import { useTranslation } from "react-i18next"; -import { useIsOpenedConfigWindow } from "@store"; -import { useWindow } from "@logics/useWindow"; - -export const MainWindowCover = () => { - const { t } = useTranslation(); - const { currentIsOpenedConfigWindow } = useIsOpenedConfigWindow(); - const { closeConfigWindow } = useWindow(); - // console.log(currentIsOpenedConfigWindow); - if ( currentIsOpenedConfigWindow === false) return null; - - const closeSettingsWindow = () => closeConfigWindow(); - - return ( -
-

{t("main_window.cover_message")}

- -
- ); -}; \ No newline at end of file diff --git a/vite.config.js b/vite.config.js index 5767f5e5..0aa096e4 100644 --- a/vite.config.js +++ b/vite.config.js @@ -26,7 +26,6 @@ export default defineConfig(async () => ({ rollupOptions: { input: { main: path.resolve(__dirname, "index.html"), - second: path.resolve(__dirname, "./src-ui/windows/config_window/index.html"), }, }, },