Add full auto tag to GridRep

This commit is contained in:
Justin Edmund 2023-01-03 19:24:37 -08:00
parent ef8822fff7
commit 56c4842e82
7 changed files with 34 additions and 10 deletions

View file

@ -117,24 +117,25 @@
.bottom { .bottom {
display: flex; display: flex;
flex-direction: row; flex-direction: row;
color: $grey-55;
font-size: $font-small;
a.user:hover { a.user:hover {
color: var(--link-text-hover); color: var(--link-text-hover);
} }
} }
.raid, .Properties,
.user,
time {
color: $grey-55;
font-size: $font-small;
}
.raid,
.user { .user {
flex-grow: 1; flex-grow: 1;
} }
.Properties {
.full_auto {
color: var(--full-auto-text);
}
}
.raid { .raid {
margin-bottom: calc($unit / 2); margin-bottom: calc($unit / 2);
} }

View file

@ -22,6 +22,7 @@ interface Props {
raid: Raid raid: Raid
grid: GridWeapon[] grid: GridWeapon[]
user?: User user?: User
fullAuto: boolean
favorited: boolean favorited: boolean
createdAt: Date createdAt: Date
displayUser?: boolean | false displayUser?: boolean | false
@ -161,8 +162,17 @@ const GridRep = (props: Props) => {
<div className="Details"> <div className="Details">
<h2 className={titleClass}>{props.name ? props.name : t('no_title')}</h2> <h2 className={titleClass}>{props.name ? props.name : t('no_title')}</h2>
<div className="bottom"> <div className="bottom">
<div className={raidClass}> <div className="Properties">
<span className={raidClass}>
{props.raid ? props.raid.name[locale] : t('no_raid')} {props.raid ? props.raid.name[locale] : t('no_raid')}
</span>
{props.fullAuto ? (
<span className="full_auto">
{` · ${t('party.details.labels.full_auto')}`}
</span>
) : (
''
)}
</div> </div>
<time className="last-updated" dateTime={props.createdAt.toISOString()}> <time className="last-updated" dateTime={props.createdAt.toISOString()}>
{formatTimeAgo(props.createdAt, locale)} {formatTimeAgo(props.createdAt, locale)}

View file

@ -236,6 +236,7 @@ const ProfileRoute: React.FC<Props> = (props: Props) => {
raid={party.raid} raid={party.raid}
grid={party.weapons} grid={party.weapons}
favorited={party.favorited} favorited={party.favorited}
fullAuto={party.full_auto}
key={`party-${i}`} key={`party-${i}`}
onClick={goTo} onClick={goTo}
/> />

View file

@ -276,6 +276,7 @@ const SavedRoute: React.FC<Props> = (props: Props) => {
grid={party.weapons} grid={party.weapons}
user={party.user} user={party.user}
favorited={party.favorited} favorited={party.favorited}
fullAuto={party.full_auto}
key={`party-${i}`} key={`party-${i}`}
displayUser={true} displayUser={true}
onClick={goTo} onClick={goTo}

View file

@ -275,6 +275,7 @@ const TeamsRoute: React.FC<Props> = (props: Props) => {
grid={party.weapons} grid={party.weapons}
user={party.user} user={party.user}
favorited={party.favorited} favorited={party.favorited}
fullAuto={party.full_auto}
key={`party-${i}`} key={`party-${i}`}
displayUser={true} displayUser={true}
onClick={goTo} onClick={goTo}

View file

@ -9,6 +9,8 @@
--link-text-hover: #{$text--link--hover--light}; --link-text-hover: #{$text--link--hover--light};
--full-auto-text: #{$text--full--auto--light};
// Light - Menus // Light - Menus
--dialog-bg: #{$dialog--bg--light}; --dialog-bg: #{$dialog--bg--light};
@ -129,6 +131,8 @@
--link-text-hover: #{$text--link--hover--dark}; --link-text-hover: #{$text--link--hover--dark};
--full-auto-text: #{$text--full--auto--dark};
// Dark - Dialogs // Dark - Dialogs
--dialog-bg: #{$dialog--bg--dark}; --dialog-bg: #{$dialog--bg--dark};

View file

@ -118,6 +118,9 @@ $dark-bg-00: #d565fb55;
$dark-bg-10: #d565fb; $dark-bg-10: #d565fb;
$dark-bg-20: #f2cdff; $dark-bg-20: #f2cdff;
$yellow-text-10: #a39200;
$yellow-text-20: #ffed4c;
$page--bg--light: $grey-90; $page--bg--light: $grey-90;
$page--bg--dark: $grey-15; $page--bg--dark: $grey-15;
@ -258,6 +261,9 @@ $text--tertiary--hover--dark: $grey-70;
$text--link--hover--light: $grey-40; $text--link--hover--light: $grey-40;
$text--link--hover--dark: $grey-100; $text--link--hover--dark: $grey-100;
$text--full--auto--light: $yellow-text-10;
$text--full--auto--dark: $yellow-text-20;
// Color Definitions: Icon // Color Definitions: Icon
$icon--secondary--color--light: $grey-70; $icon--secondary--color--light: $grey-70;
$icon--secondary--color--dark: $grey-50; $icon--secondary--color--dark: $grey-50;