[Update] Config Page: supporters: Update-able supporters title calc period.
This commit is contained in:
@@ -2,6 +2,7 @@ import styles from "./SupportersContainer.module.scss";
|
|||||||
import { SupportersWrapper } from "./supporters_wrapper/SupportersWrapper";
|
import { SupportersWrapper } from "./supporters_wrapper/SupportersWrapper";
|
||||||
import { useSupporters } from "@logics_configs";
|
import { useSupporters } from "@logics_configs";
|
||||||
import { supporters_images_url } from "@ui_configs";
|
import { supporters_images_url } from "@ui_configs";
|
||||||
|
import vrct_supporters_title from "@images/supporters/vrct_supporters_title.png";
|
||||||
|
|
||||||
export const SupportersContainer = () => {
|
export const SupportersContainer = () => {
|
||||||
const { currentSupportersData } = useSupporters();
|
const { currentSupportersData } = useSupporters();
|
||||||
@@ -14,7 +15,10 @@ export const SupportersContainer = () => {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<div className={styles.supporters_container}>
|
<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 />
|
<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>
|
<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>
|
</div>
|
||||||
|
|||||||
@@ -5,8 +5,19 @@
|
|||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
gap: 1rem;
|
gap: 1rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.vrct_supporters_title_wrapper {
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
flex-direction: column;
|
||||||
|
gap: 0.2rem;
|
||||||
|
}
|
||||||
.vrct_supporters_title {
|
.vrct_supporters_title {
|
||||||
height: 6rem;
|
height: 4.2rem;
|
||||||
|
}
|
||||||
|
.calc_period {
|
||||||
|
height: 1.6rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
.vrct_supporters_desc_end {
|
.vrct_supporters_desc_end {
|
||||||
|
|||||||
@@ -57,8 +57,8 @@ export const SupportersWrapper = () => {
|
|||||||
|
|
||||||
const supporters_settings = currentSupportersData.data.supporters_settings;
|
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 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 chato_ex_count = supporters_settings.chato_ex_count;
|
||||||
const last_updated_local_date = new Date(supporters_settings.last_updated_utc_date)?.toString();
|
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) => {
|
const filtered_data = json_data.supporters_data.filter((supporter) => {
|
||||||
if (!supporter.supporter_id) return false;
|
if (!supporter.supporter_id) return false;
|
||||||
|
|
||||||
const months = Object.keys(supporter).filter((key) =>
|
const months = Object.keys(supporter).filter((key) => calc_support_period.includes(key));
|
||||||
key.match(/^\d{4}-\d{2}$/)
|
|
||||||
);
|
|
||||||
const has_valid_month = months.some((month) => supporter[month]);
|
const has_valid_month = months.some((month) => supporter[month]);
|
||||||
if (!has_valid_month) return false;
|
if (!has_valid_month) return false;
|
||||||
|
|
||||||
|
|||||||
BIN
src-ui/assets/supporters/vrct_supporters_title.png
Normal file
BIN
src-ui/assets/supporters/vrct_supporters_title.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 12 KiB |
Reference in New Issue
Block a user