From 5f856e4d70bc3809de647683ad91b935959c3c6a Mon Sep 17 00:00:00 2001
From: Lang <7system7@gmail.com>
Date: Sun, 19 Apr 2026 22:11:58 +0200
Subject: [PATCH] chg: usr: add filter to the Profile page's recent plays and
an infite list too #7
---
assets/css/homepage/_profile.scss | 82 ++++++++++++++++++++++++++++
assets/js/profile.jsx | 25 +++++++++
src/Controller/ProfileController.php | 2 +-
templates/Security/profile.html.twig | 14 ++++-
4 files changed, 120 insertions(+), 3 deletions(-)
diff --git a/assets/css/homepage/_profile.scss b/assets/css/homepage/_profile.scss
index 9adbea1..fdfa4b5 100644
--- a/assets/css/homepage/_profile.scss
+++ b/assets/css/homepage/_profile.scss
@@ -427,10 +427,88 @@
}
}
+.profile-games__filter-wrap {
+ position: relative;
+ display: flex;
+ align-items: center;
+ margin-bottom: 4px;
+}
+
+.profile-games__filter-icon {
+ position: absolute;
+ left: 14px;
+ font-size: 12px;
+ color: rgba(149, 207, 245, 0.4);
+ pointer-events: none;
+}
+
+.profile-games__filter {
+ width: 100%;
+ background: rgba(255, 255, 255, 0.025);
+ border: 1px solid rgba(255, 255, 255, 0.07);
+ border-radius: 6px;
+ padding: 9px 14px 9px 36px;
+ font: 500 13px 'Rajdhani', sans-serif;
+ color: #fff;
+ letter-spacing: 0.5px;
+ transition: border-color 200ms ease, background 200ms ease;
+
+ &::placeholder {
+ color: rgba(255, 255, 255, 0.3);
+ }
+
+ &:focus {
+ outline: none;
+ background: rgba(255, 255, 255, 0.045);
+ border-color: rgba(35, 111, 135, 0.55);
+ }
+}
+
.profile-games {
display: flex;
flex-direction: column;
gap: 6px;
+
+ &.is-filtering + .profile-games__load-more {
+ display: none;
+ }
+
+ &.is-filtering .profile-game--hidden:not(.profile-game--filtered-out) {
+ display: grid;
+ }
+
+ .profile-game--filtered-out {
+ display: none;
+ }
+
+ &__load-more {
+ align-self: center;
+ margin-top: 14px;
+ background: rgba(35, 111, 135, 0.12);
+ color: rgba(149, 207, 245, 0.75);
+ border: 1px solid rgba(35, 111, 135, 0.3);
+ border-radius: 6px;
+ padding: 9px 20px;
+ font: 600 12px 'Rajdhani', sans-serif;
+ text-transform: uppercase;
+ letter-spacing: 1.5px;
+ cursor: pointer;
+ display: inline-flex;
+ align-items: center;
+ gap: 8px;
+ transition: background 200ms ease, border-color 200ms ease, color 200ms ease;
+
+ i {
+ font-size: 11px;
+ opacity: 0.8;
+ }
+
+ &:hover {
+ background: rgba(35, 111, 135, 0.22);
+ border-color: rgba(35, 111, 135, 0.55);
+ color: rgba(149, 207, 245, 1);
+ }
+ }
}
.profile-game {
@@ -469,6 +547,10 @@
border-left-color: rgba(255, 193, 7, 0.4);
opacity: 0.85;
}
+
+ &--hidden {
+ display: none;
+ }
}
.profile-game__badge {
diff --git a/assets/js/profile.jsx b/assets/js/profile.jsx
index ed5e2a8..aff4425 100644
--- a/assets/js/profile.jsx
+++ b/assets/js/profile.jsx
@@ -29,3 +29,28 @@ if (battleRoot) {