From c2868e445fad2db7ff291553c4e368bf4ab37daf Mon Sep 17 00:00:00 2001 From: Sakamoto Shiina <68018796+ShiinaSakamoto@users.noreply.github.com> Date: Mon, 30 Dec 2024 10:53:47 +0900 Subject: [PATCH] [Update] Starting Up: Add announcements button to starting up display. temporarily tho --- .../app/splash_component/SplashComponent.jsx | 31 ++++++++++++++++++- .../SplashComponent.module.scss | 30 ++++++++++++++---- src-ui/assets/megaphone.svg | 1 + 3 files changed, 55 insertions(+), 7 deletions(-) create mode 100644 src-ui/assets/megaphone.svg diff --git a/src-ui/app/splash_component/SplashComponent.jsx b/src-ui/app/splash_component/SplashComponent.jsx index 6de17662..44d62233 100644 --- a/src-ui/app/splash_component/SplashComponent.jsx +++ b/src-ui/app/splash_component/SplashComponent.jsx @@ -1,12 +1,41 @@ +import { useState, useEffect } from "react"; import styles from "./SplashComponent.module.scss"; import { StartUpProgressContainer } from "./start_up_progress_container/StartUpProgressContainer/"; import { DownloadModelsContainer } from "./download_models_container/DownloadModelsContainer/"; +import MegaphoneSvg from "@images/megaphone.svg?react"; export const SplashComponent = () => { return (
+
); -}; \ No newline at end of file +}; + +const AnnouncementsContainer = () => { + const labels = ["VRCT Real-Time Announcements", "VRCTからのお知らせ"]; + const [currentLabelIndex, setCurrentLabelIndex] = useState(0); + + + useEffect(() => { + const labelInterval = setInterval(() => { + setCurrentLabelIndex((prevIndex) => (prevIndex + 1) % labels.length); + }, 6000); + return () => clearInterval(labelInterval); + }, [labels.length]); + + return ( + + + + ); +}; diff --git a/src-ui/app/splash_component/SplashComponent.module.scss b/src-ui/app/splash_component/SplashComponent.module.scss index 031853d0..086b8ba6 100644 --- a/src-ui/app/splash_component/SplashComponent.module.scss +++ b/src-ui/app/splash_component/SplashComponent.module.scss @@ -1,8 +1,26 @@ -.progress_container { - position: relative; -} -.progress_label { +.announcements_button { position: absolute; - font-size: 1rem; - color: var(--dark_basic_text_color); + top: 16px; + left: 20px; + border: 1px solid var(--dark_600_color); + display: flex; + justify-content: center; + align-items: center; + gap: 6px; + padding: 6px 8px; + border-radius: 4px; + &:hover { + background-color: var(--dark_750_color); + } + &:active { + background-color: var(--dark_850_color); + } + transition: all 0.1s ease; +} + +.announcements_label { + font-size: 12px; +} +.announcements_link_svg { + width: 20px; } \ No newline at end of file diff --git a/src-ui/assets/megaphone.svg b/src-ui/assets/megaphone.svg new file mode 100644 index 00000000..86b7ebcb --- /dev/null +++ b/src-ui/assets/megaphone.svg @@ -0,0 +1 @@ + \ No newline at end of file