[Update] Starting Up: Add announcements button to starting up display. temporarily tho
This commit is contained in:
@@ -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 (
|
||||
<div>
|
||||
<StartUpProgressContainer />
|
||||
<DownloadModelsContainer />
|
||||
<AnnouncementsContainer />
|
||||
</div>
|
||||
);
|
||||
};
|
||||
};
|
||||
|
||||
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 (
|
||||
<a
|
||||
href="https://docs.google.com/spreadsheets/d/1_L5i-1U6PB1dnaPPTE_5uKMfqOpkLziPyRkiMLi4mqU/edit?usp=sharing"
|
||||
target="_blank"
|
||||
rel="noreferrer"
|
||||
>
|
||||
<button className={styles.announcements_button}>
|
||||
<MegaphoneSvg className={styles.announcements_link_svg} />
|
||||
<p className={styles.announcements_label}>{labels[currentLabelIndex]}</p>
|
||||
</button>
|
||||
</a>
|
||||
);
|
||||
};
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
1
src-ui/assets/megaphone.svg
Normal file
1
src-ui/assets/megaphone.svg
Normal file
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M13.333 6.805l4.213 7.297-13.256 3.223c-.572.133-1.068.333-1.492.604l-.227-.393c.525-.293.929-.675 1.227-.993l9.535-9.738zm.332-2.626l-11.011 11.244c-.616.66-1.164.977-1.857.977-.244 0-.507-.04-.797-.117l2.646 4.585c.258-1.094.814-1.708 2.006-1.985l15.348-3.732-6.335-10.972zm.31 13.951l-.467 2.118c-.094.378-.391.674-.77.771l-2.951.774c-.365.095-.754-.012-1.018-.28l-1.574-1.712 1.605-.395.646.77c.176.177.433.248.675.186l1.598-.425c.252-.064.449-.261.511-.512l.161-.906 1.584-.389zm8.719-11.267l-2.684 1.613-.756-1.262 2.686-1.612.754 1.261zm-4.396-1.161l-1.335-.616 1.342-2.914 1.335.617-1.342 2.913zm5.619 6.157l-3.202-.174.081-1.469 3.204.175-.083 1.468z"/></svg>
|
||||
|
After Width: | Height: | Size: 737 B |
Reference in New Issue
Block a user