-
+
);
}
diff --git a/src/renderer/src/pages/achievements/achievements.scss b/src/renderer/src/pages/achievements/achievements.scss
new file mode 100644
index 00000000..5a5de8e6
--- /dev/null
+++ b/src/renderer/src/pages/achievements/achievements.scss
@@ -0,0 +1,262 @@
+@use "../../scss/globals.scss";
+@use "sass:math";
+
+$hero-height: 150px;
+$logo-height: 100px;
+$logo-max-width: 200px;
+
+.achievements {
+ display: flex;
+ flex-direction: column;
+ overflow: hidden;
+ width: 100%;
+ height: 100%;
+ transition: all ease 0.3s;
+
+ &__hero {
+ width: 100%;
+ height: $hero-height;
+ min-height: $hero-height;
+ display: flex;
+ flex-direction: column;
+ position: relative;
+ transition: all ease 0.2s;
+
+ &-content {
+ padding: globals.$spacing-unit * 2;
+ width: 100%;
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ }
+
+ &-logo-backdrop {
+ width: 100%;
+ height: 100%;
+ position: absolute;
+ display: flex;
+ flex-direction: column;
+ justify-content: flex-end;
+ }
+
+ &-image-skeleton {
+ height: 150px;
+ }
+ }
+
+ &__game-logo {
+ width: $logo-max-width;
+ height: $logo-height;
+ object-fit: contain;
+ transition: all ease 0.2s;
+
+ &:hover {
+ transform: scale(1.05);
+ }
+ }
+
+ &__container {
+ width: 100%;
+ height: 100%;
+ display: flex;
+ flex-direction: column;
+ overflow: auto;
+ z-index: 1;
+ }
+
+ &__table-header {
+ width: 100%;
+ background-color: var(--color-dark-background);
+ transition: all ease 0.2s;
+ border-bottom: solid 1px var(--color-border);
+ position: sticky;
+ top: 0;
+ z-index: 1;
+
+ &--stuck {
+ box-shadow: 0px 0px 15px 0px rgba(0, 0, 0, 0.8);
+ }
+ }
+
+ &__list {
+ list-style: none;
+ margin: 0;
+ display: flex;
+ flex-direction: column;
+ gap: globals.$spacing-unit * 2;
+ padding: globals.$spacing-unit * 2;
+ width: 100%;
+ background-color: var(--color-background);
+ }
+
+ &__item {
+ display: flex;
+ transition: all ease 0.1s;
+ color: var(--color-muted);
+ width: 100%;
+ overflow: hidden;
+ border-radius: 4px;
+ padding: globals.$spacing-unit globals.$spacing-unit;
+ gap: globals.$spacing-unit * 2;
+ align-items: center;
+ text-align: left;
+
+ &:hover {
+ background-color: rgba(255, 255, 255, 0.15);
+ text-decoration: none;
+ }
+
+ &-image {
+ width: 54px;
+ height: 54px;
+ border-radius: 4px;
+ object-fit: cover;
+
+ &--locked {
+ filter: grayscale(100%);
+ }
+ }
+
+ &-content {
+ flex: 1;
+ }
+
+ &-title {
+ display: flex;
+ align-items: center;
+ gap: 4px;
+ }
+
+ &-hidden-icon {
+ display: flex;
+ color: var(--color-warning);
+ opacity: 0.8;
+
+ &:hover {
+ opacity: 1;
+ }
+
+ svg {
+ width: 12px;
+ height: 12px;
+ }
+ }
+
+ &-eye-closed {
+ width: 12px;
+ height: 12px;
+ color: globals.$warning-color;
+ scale: 4;
+ }
+
+ &-meta {
+ display: flex;
+ flex-direction: column;
+ gap: 8px;
+ }
+
+ &-points {
+ display: flex;
+ align-items: center;
+ gap: 4px;
+ margin-right: 4px;
+ font-weight: 600;
+
+ &--locked {
+ cursor: pointer;
+ color: var(--color-warning);
+ }
+
+ &-icon {
+ width: 18px;
+ height: 18px;
+ }
+
+ &-value {
+ font-size: 1.1em;
+ }
+ }
+
+ &-unlock-time {
+ white-space: nowrap;
+ gap: 4px;
+ display: flex;
+ }
+
+ &-compared {
+ display: grid;
+ grid-template-columns: 3fr 1fr 1fr;
+
+ &--no-owner {
+ grid-template-columns: 3fr 2fr;
+ }
+ }
+
+ &-main {
+ display: flex;
+ flex-direction: row;
+ align-items: center;
+ gap: globals.$spacing-unit;
+ }
+
+ &-status {
+ display: flex;
+ padding: globals.$spacing-unit;
+ justify-content: center;
+
+ &--unlocked {
+ white-space: nowrap;
+ flex-direction: row;
+ gap: globals.$spacing-unit;
+ padding: 0;
+ }
+ }
+ }
+
+ &__progress-bar {
+ width: 100%;
+ height: 8px;
+ transition: all ease 0.2s;
+
+ &::-webkit-progress-bar {
+ background-color: rgba(255, 255, 255, 0.15);
+ border-radius: 4px;
+ }
+
+ &::-webkit-progress-value {
+ background-color: var(--color-muted);
+ border-radius: 4px;
+ }
+ }
+
+ &__profile-avatar {
+ height: 54px;
+ width: 54px;
+ border-radius: 4px;
+ display: flex;
+ justify-content: center;
+ align-items: center;
+ background-color: var(--color-background);
+ position: relative;
+ object-fit: cover;
+
+ &--small {
+ height: 32px;
+ width: 32px;
+ }
+ }
+
+ &__subscription-button {
+ text-decoration: none;
+ display: flex;
+ justify-content: center;
+ width: 100%;
+ gap: math.div(globals.$spacing-unit, 2);
+ color: var(--color-body);
+ cursor: pointer;
+
+ &:hover {
+ text-decoration: underline;
+ }
+ }
+}
diff --git a/src/renderer/src/pages/achievements/compared-achievement-list.tsx b/src/renderer/src/pages/achievements/compared-achievement-list.tsx
index 44aec686..1fb15c4d 100644
--- a/src/renderer/src/pages/achievements/compared-achievement-list.tsx
+++ b/src/renderer/src/pages/achievements/compared-achievement-list.tsx
@@ -1,12 +1,11 @@
import type { ComparedAchievements } from "@types";
-import * as styles from "./achievements.css";
+import "./achievements.scss";
import {
CheckCircleIcon,
EyeClosedIcon,
LockIcon,
} from "@primer/octicons-react";
import { useDate } from "@renderer/hooks";
-import { SPACING_UNIT } from "@renderer/theme.css";
import { useTranslation } from "react-i18next";
export interface ComparedAchievementListProps {
@@ -20,39 +19,26 @@ export function ComparedAchievementList({
const { formatDateTime } = useDate();
return (
-
+
{achievements.achievements.map((achievement, index) => (
-
-
+

-
-
+
+
{achievement.hidden && (
@@ -67,25 +53,13 @@ export function ComparedAchievementList({
{achievement.ownerStat ? (
achievement.ownerStat.unlocked ? (
) : (
-
+
)
@@ -93,25 +67,13 @@ export function ComparedAchievementList({
{achievement.targetStat.unlocked ? (
) : (
-