[Update] Config Page: supporters: Update-able supporters title calc period.

This commit is contained in:
Sakamoto Shiina
2025-02-03 14:08:07 +09:00
parent 0955aaa12c
commit 34f6bb215a
4 changed files with 19 additions and 6 deletions

View File

@@ -2,6 +2,7 @@ import styles from "./SupportersContainer.module.scss";
import { SupportersWrapper } from "./supporters_wrapper/SupportersWrapper";
import { useSupporters } from "@logics_configs";
import { supporters_images_url } from "@ui_configs";
import vrct_supporters_title from "@images/supporters/vrct_supporters_title.png";
export const SupportersContainer = () => {
const { currentSupportersData } = useSupporters();
@@ -14,7 +15,10 @@ export const SupportersContainer = () => {
return (
<div className={styles.supporters_container}>
<img className={styles.vrct_supporters_title} src={`${supporters_images_url}/vrct_supporters_title.png`} />
<div className={styles.vrct_supporters_title_wrapper}>
<img className={styles.vrct_supporters_title} src={vrct_supporters_title}/>
<img className={styles.calc_period} src={`${supporters_images_url}/calc_period_label.png`}/>
</div>
<SupportersWrapper />
<p className={styles.vrct_supporters_desc_end}>{`みなさんのおかげで、みしゃ社長は布団で寝ることを許され(in開発室) しいなは喜び庭駆け回っていますふわもちもぐもぐですありがとうございます。これからもまだまだ進化するVRCTをどうかよろしくお願いします\nThanks to everyone, Misha has been granted the privilege of sleeping in a proper bed (in the development room), and Shiina is so happy, running around the yard! Fuwa-mochi-mogu-mogu! Thank you so much! We hope you'll continue to support the ever-evolving VRCT!`}</p>
</div>

View File

@@ -5,8 +5,19 @@
flex-direction: column;
gap: 1rem;
}
.vrct_supporters_title_wrapper {
display: flex;
justify-content: center;
align-items: center;
flex-direction: column;
gap: 0.2rem;
}
.vrct_supporters_title {
height: 6rem;
height: 4.2rem;
}
.calc_period {
height: 1.6rem;
}
.vrct_supporters_desc_end {

View File

@@ -57,8 +57,8 @@ export const SupportersWrapper = () => {
const supporters_settings = currentSupportersData.data.supporters_settings;
const target_supporting_month = supporters_settings.target_supporting_month;
const calc_support_period = supporters_settings.calc_support_period;
const target_supporting_month = calc_support_period.at(-1);
const chato_ex_count = supporters_settings.chato_ex_count;
const last_updated_local_date = new Date(supporters_settings.last_updated_utc_date)?.toString();
@@ -78,9 +78,7 @@ export const SupportersWrapper = () => {
const filtered_data = json_data.supporters_data.filter((supporter) => {
if (!supporter.supporter_id) return false;
const months = Object.keys(supporter).filter((key) =>
key.match(/^\d{4}-\d{2}$/)
);
const months = Object.keys(supporter).filter((key) => calc_support_period.includes(key));
const has_valid_month = months.some((month) => supporter[month]);
if (!has_valid_month) return false;