Merge branch 'ui_supporters_about_vrct' into develop
This commit is contained in:
@@ -1,4 +1,5 @@
|
|||||||
$progress_ease: cubic-bezier(0, 1, 0.75, 1);
|
$progress_ease: cubic-bezier(0, 1, 0.75, 1);
|
||||||
|
// Duplicated
|
||||||
|
|
||||||
@keyframes revealTopImg {
|
@keyframes revealTopImg {
|
||||||
0% {
|
0% {
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
import React, { useState, useCallback, useEffect } from "react";
|
import React, { useState, useCallback, useEffect } from "react";
|
||||||
import clsx from "clsx";
|
import clsx from "clsx";
|
||||||
|
import Tooltip, { tooltipClasses } from '@mui/material/Tooltip';
|
||||||
import ArrowLeftSvg from "@images/arrow_left.svg?react";
|
import ArrowLeftSvg from "@images/arrow_left.svg?react";
|
||||||
import styles from "./SupportersWrapper.module.scss";
|
import styles from "./SupportersWrapper.module.scss";
|
||||||
import { shuffleArray, randomIntMinMax, randomMinMax } from "@utils";
|
import { shuffleArray, randomIntMinMax, randomMinMax } from "@utils";
|
||||||
@@ -261,18 +262,39 @@ const SupporterLabelComponent = ({ item, target_plan, chato_src }) => {
|
|||||||
|
|
||||||
const SupporterPeriodContainer = ({ settings, calc_support_period }) => {
|
const SupporterPeriodContainer = ({ settings, calc_support_period }) => {
|
||||||
const period_data = extractKeys(settings, calc_support_period);
|
const period_data = extractKeys(settings, calc_support_period);
|
||||||
|
const offset = {
|
||||||
|
popper: {
|
||||||
|
sx: {
|
||||||
|
[`&.${tooltipClasses.popper}[data-popper-placement*="top"] .${tooltipClasses.tooltip}`]: { marginBottom: "0.2em" },
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className={styles.supporter_period_container}>
|
<div className={styles.supporter_period_container}>
|
||||||
{Object.entries(period_data).map(([key, item], index) => {
|
{Object.entries(period_data).map(([key, item], index) => {
|
||||||
if (item === "") return null;
|
if (item === "") return null;
|
||||||
const class_name = clsx(styles.period_box, {
|
const period_box_class_name = clsx(styles.period_box, {
|
||||||
[styles.mogu_bar]: item === "mogu_2000",
|
[styles.mogu_bar]: item === "mogu_2000",
|
||||||
[styles.mochi_bar]: item === "mochi_1000",
|
[styles.mochi_bar]: item === "mochi_1000",
|
||||||
[styles.fuwa_bar]: item === "fuwa_500",
|
[styles.fuwa_bar]: item === "fuwa_500",
|
||||||
[styles.basic_bar]: item === "basic_300",
|
[styles.basic_bar]: item === "basic_300",
|
||||||
});
|
});
|
||||||
|
|
||||||
return <div key={index} className={class_name}></div>;
|
return (
|
||||||
|
<Tooltip
|
||||||
|
key={index}
|
||||||
|
title={
|
||||||
|
<p className={styles.tooltip_period_label}>{key}</p>
|
||||||
|
}
|
||||||
|
placement="top"
|
||||||
|
slotProps={offset}
|
||||||
|
>
|
||||||
|
<div className={styles.period_box_wrapper}>
|
||||||
|
<div className={period_box_class_name}></div>
|
||||||
|
</div>
|
||||||
|
</Tooltip>
|
||||||
|
);
|
||||||
})}
|
})}
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -13,7 +13,7 @@
|
|||||||
align-content: start;
|
align-content: start;
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
column-gap: 1.8rem;
|
column-gap: 1.8rem;
|
||||||
row-gap: 1rem;
|
row-gap: 0.4rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
.supporter_image_container {
|
.supporter_image_container {
|
||||||
@@ -21,12 +21,14 @@
|
|||||||
width: 18rem;
|
width: 18rem;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
gap: 0.3rem;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.supporter_image_wrapper {
|
.supporter_image_wrapper {
|
||||||
position: relative;
|
position: relative;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
|
&:hover .supporter_icon_wrapper{
|
||||||
|
transform: rotate(360deg);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.supporter_image {
|
.supporter_image {
|
||||||
@@ -54,7 +56,8 @@
|
|||||||
height: 1.4rem;
|
height: 1.4rem;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
$progress_ease: cubic-bezier(0, 1, 0.75, 1);
|
||||||
|
// Duplicated
|
||||||
.supporter_icon_wrapper {
|
.supporter_icon_wrapper {
|
||||||
height: 4rem;
|
height: 4rem;
|
||||||
aspect-ratio: 1 /1;
|
aspect-ratio: 1 /1;
|
||||||
@@ -62,6 +65,7 @@
|
|||||||
background-color: #ffffff;
|
background-color: #ffffff;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
position: relative;
|
position: relative;
|
||||||
|
transition: transform 0.6s $progress_ease;
|
||||||
}
|
}
|
||||||
|
|
||||||
.supporter_icon {
|
.supporter_icon {
|
||||||
@@ -227,6 +231,12 @@
|
|||||||
background-color: var(--dark_800_color);
|
background-color: var(--dark_800_color);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.period_box_wrapper {
|
||||||
|
padding: 0.3rem 0 0.4rem 0;
|
||||||
|
}
|
||||||
|
.tooltip_period_label {
|
||||||
|
font-size: 1.4rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
.progress_bar {
|
.progress_bar {
|
||||||
|
|||||||
@@ -45,7 +45,9 @@ const Tab = (props) => {
|
|||||||
|
|
||||||
const getLabel = () => {
|
const getLabel = () => {
|
||||||
if (props.tab_id === "vr") return "VR";
|
if (props.tab_id === "vr") return "VR";
|
||||||
if (props.tab_id === "supporters") return "Supporters";
|
if (props.tab_id === "supporters") return (
|
||||||
|
<>Supporters<span className={styles.crown_emoji}>👑</span></>
|
||||||
|
);
|
||||||
if (props.tab_id === "about_vrct") return "About VRCT";
|
if (props.tab_id === "about_vrct") return "About VRCT";
|
||||||
return t(`config_page.side_menu_labels.${props.tab_id}`);
|
return t(`config_page.side_menu_labels.${props.tab_id}`);
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -60,9 +60,18 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.tab_text {
|
.tab_text {
|
||||||
overflow: hidden;
|
// overflow: hidden;
|
||||||
font-size: 1.6rem;
|
font-size: 1.6rem;
|
||||||
text-overflow: ellipsis;
|
// text-overflow: ellipsis;
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
.crown_emoji {
|
||||||
|
font-size: 1.6rem;
|
||||||
|
position: absolute;
|
||||||
|
top: 40%;
|
||||||
|
left: 100%;
|
||||||
|
transform: translateY(-50%);
|
||||||
|
padding-left: 0.4rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
.separated_tabs_wrapper {
|
.separated_tabs_wrapper {
|
||||||
|
|||||||
@@ -51,6 +51,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
$progress_ease: cubic-bezier(0, 1, 0.75, 1);
|
$progress_ease: cubic-bezier(0, 1, 0.75, 1);
|
||||||
|
// Duplicated
|
||||||
.progress_bar {
|
.progress_bar {
|
||||||
height: 8px;
|
height: 8px;
|
||||||
transition: width 0.3s $progress_ease;
|
transition: width 0.3s $progress_ease;
|
||||||
|
|||||||
Binary file not shown.
|
Before Width: | Height: | Size: 39 KiB After Width: | Height: | Size: 40 KiB |
Reference in New Issue
Block a user