[Refactor] Move to src-ui/views and src-ui/logics structure.

This commit is contained in:
Sakamoto Shiina
2025-11-05 11:49:48 +09:00
parent 62f7c6d534
commit db820375f1
339 changed files with 19 additions and 19 deletions

View File

@@ -0,0 +1,38 @@
import { useI18n } from "@useI18n";
import clsx from "clsx";
import styles from "./Topbar.module.scss";
import { useIsOpenedConfigPage } from "@logics_common";
import ArrowLeftSvg from "@images/arrow_left.svg?react";
import { TitleBox } from "./title_box/TitleBox";
import { SectionTitleBox } from "./section_title_box/SectionTitleBox";
import { CompactSwitchBox } from "./compact_switch_box/CompactSwitchBox";
export const Topbar = () => {
const { t } = useI18n();
const { currentIsOpenedConfigPage, setIsOpenedConfigPage } = useIsOpenedConfigPage();
const closeConfigPage = () => {
setIsOpenedConfigPage(false);
};
return (
<div className={clsx(styles.container, {
[styles.show_config]: currentIsOpenedConfigPage.data,
[styles.show_main]: !currentIsOpenedConfigPage.data
})}>
<div className={styles.wrapper} onClick={() => closeConfigPage()}>
<div className={styles.go_back_button}>
<ArrowLeftSvg className={styles.arrow_left_svg} />
</div>
<div className={styles.go_back_text_wrapper}>
<p className={styles.go_back_text}>{t("common.go_back_button_label")}</p>
</div>
{/* <TitleBox />
<SectionTitleBox />
<CompactSwitchBox /> */}
</div>
</div>
);
};

View File

@@ -0,0 +1,82 @@
.container {
width: 100%;
height: 0%;
transition: top 0.5s ease;
position: absolute;
top: 0;
left: 0;
}
.show_config.container {
top: 0;
}
.show_main.container {
top: 100%;
}
.wrapper {
background-color: var(--dark_850_color);
cursor: pointer;
height: 1rem;
width: 100%;
position: relative;
transition: all 0.3s ease;
&:hover {
height: 2rem;
.go_back_button {
top: -12rem;
transform: rotate(35deg);
}
.arrow_left_svg {
color: var(--dark_400_color);
}
.go_back_text {
color: var(--dark_400_color);
}
.go_back_text_wrapper {
padding-top: 8.2rem;
}
}
}
.go_back_button {
height: 16rem;
width: 16rem;
border-radius: 1.2rem;
background-color: var(--dark_850_color);
position: absolute;
top: -13.2rem;
right: 10rem;
transform: rotate(30deg);
transition: all 0.3s ease;
}
.arrow_left_svg {
height: 2.8rem;
position: absolute;
right: 1rem;
bottom: 0.4rem;
color: var(--dark_600_color);
transform: rotate(-100deg);
}
.go_back_text_wrapper {
position: absolute;
top: -4.6rem;
right: 0rem;
padding-top: 7.2rem;
padding-bottom: 1rem;
width: 15.2rem;
transition: all 0.3s ease;
}
.go_back_text {
color: var(--dark_650_color);
font-size: 1.6rem;
padding-left: 4rem;
transition: all 0.3s ease;
}

View File

@@ -0,0 +1,12 @@
import { useI18n } from "@useI18n";
import styles from "./CompactSwitchBox.module.scss";
export const CompactSwitchBox = () => {
const { t } = useI18n();
return (
<div className={styles.container}>
<p>{t("config_page.compact_mode")}</p>
</div>
);
};

View File

@@ -0,0 +1,9 @@
.container {
// flex: 0;
// width: 100%;
width: 14rem;
height: 100%;
display: flex;
justify-content: center;
align-items: center;
}

View File

@@ -0,0 +1,13 @@
import { useI18n } from "@useI18n";
import styles from "./SectionTitleBox.module.scss";
import { useStore_SelectedConfigTabId } from "@store";
export const SectionTitleBox = () => {
const { t } = useI18n();
const { currentSelectedConfigTabId } = useStore_SelectedConfigTabId();
return (
<div className={styles.container}>
<p className={styles.title}>{t(`config_page.side_menu_labels.${currentSelectedConfigTabId.data}`)}</p>
</div>
);
};

View File

@@ -0,0 +1,13 @@
.container {
flex: 1;
width: 100%;
height: 100%;
display: flex;
justify-content: left;
align-items: center;
padding-left: 2rem;
}
.title {
font-size: 2.2rem;
}

View File

@@ -0,0 +1,14 @@
import { useI18n } from "@useI18n";
import styles from "./TitleBox.module.scss";
import chato_img from "@images/chato_white.png";
export const TitleBox = () => {
const { t } = useI18n();
return (
<div className={styles.container}>
<img src={chato_img} className={styles.logo_chato} alt="VRCT logo chato" />
<p className={styles.title}>{t("config_page.config_title")}</p>
</div>
);
};

View File

@@ -0,0 +1,19 @@
.container {
// flex: 0;
width: var(--config_page_sidebar_width);
height: 100%;
display: flex;
justify-content: left;
align-items: center;
padding-left: 2.6rem;
gap: 1.4rem;
}
.logo_chato {
width: 3.2rem;
padding-top: 0.6rem;
}
.title {
font-size: 2.2rem;
}