From d3b63abdd33c2de769e44b277addb5314dfbd986 Mon Sep 17 00:00:00 2001 From: Phillip Thelen Date: Thu, 29 Aug 2024 16:15:45 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=A7=91=E2=80=8D=F0=9F=92=BC=F0=9F=8E=9B?= =?UTF-8?q?=EF=B8=8F=20Overhaul=20(#15270)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Add option to search for users by email or username in admin panel * Make Admin panel design more consistent * fix test * fix width of items * escape regex for searching users * load own user when pressing enter on empty field * add styling for warning buttons * improve sub styling * fix checkbox alignment in admin panel * Unify date preview display * Fix bottom button display * admin panel display improvements * remove autocannon file * search improvements * time travel button display fix * fix loading spinner * fix sorting * Split email search into multiple queries * fix email search * remove console * fix line break --- test/content/index.test.js | 8 +- website/client/src/assets/scss/button.scss | 24 ++ .../src/components/admin-panel/index.vue | 79 +++-- .../src/components/admin-panel/search.vue | 155 +++++++++ .../admin-panel/user-support/achievements.vue | 21 +- .../user-support/avatarAndDrops.vue | 21 +- .../user-support/contributorDetails.vue | 291 ++++++++--------- .../admin-panel/user-support/cronAndAuth.vue | 302 ++++++++++-------- .../user-support/customizationsOwned.vue | 21 +- .../admin-panel/user-support/itemsOwned.vue | 21 +- .../user-support/partyAndQuest.vue | 27 +- .../user-support/privilegesAndGems.vue | 163 ++++++---- .../user-support/subscriptionAndPerks.vue | 238 +++++++++----- .../admin-panel/user-support/transactions.vue | 21 +- .../admin-panel/user-support/userProfile.vue | 78 +++-- website/client/src/components/appFooter.vue | 11 +- .../src/components/ui/loadingSpinner.vue | 18 ++ .../components/ui/purchaseHistoryTable.vue | 9 +- website/client/src/router/index.js | 13 +- .../client/src/store/actions/adminPanel.js | 7 + website/client/src/store/actions/index.js | 2 + website/server/controllers/api-v3/hall.js | 17 +- website/server/controllers/api-v4/admin.js | 76 +++++ 23 files changed, 1086 insertions(+), 537 deletions(-) create mode 100644 website/client/src/components/admin-panel/search.vue create mode 100644 website/client/src/store/actions/adminPanel.js create mode 100644 website/server/controllers/api-v4/admin.js diff --git a/test/content/index.test.js b/test/content/index.test.js index 2d39379122..265824b97c 100644 --- a/test/content/index.test.js +++ b/test/content/index.test.js @@ -42,23 +42,23 @@ describe('content index', () => { expect(Object.keys(juneGear).length, '').to.equal(Object.keys(julyGear).length - 3); }); - it('Releases pets gear when appropriate without needing restarting', () => { + it('Releases pets when appropriate without needing restarting', () => { clock = sinon.useFakeTimers(new Date('2024-06-20')); const junePets = content.petInfo; expect(junePets['Chameleon-Base']).to.not.exist; clock.restore(); - clock = sinon.useFakeTimers(new Date('2024-07-20')); + clock = sinon.useFakeTimers(new Date('2024-07-18')); const julyPets = content.petInfo; expect(julyPets['Chameleon-Base']).to.exist; expect(Object.keys(junePets).length, '').to.equal(Object.keys(julyPets).length - 10); }); - it('Releases mounts gear when appropriate without needing restarting', () => { + it('Releases mounts when appropriate without needing restarting', () => { clock = sinon.useFakeTimers(new Date('2024-06-20')); const juneMounts = content.mountInfo; expect(juneMounts['Chameleon-Base']).to.not.exist; clock.restore(); - clock = sinon.useFakeTimers(new Date('2024-07-20')); + clock = sinon.useFakeTimers(new Date('2024-07-18')); const julyMounts = content.mountInfo; expect(julyMounts['Chameleon-Base']).to.exist; expect(Object.keys(juneMounts).length, '').to.equal(Object.keys(julyMounts).length - 10); diff --git a/website/client/src/assets/scss/button.scss b/website/client/src/assets/scss/button.scss index 62eb95422f..ae50232258 100644 --- a/website/client/src/assets/scss/button.scss +++ b/website/client/src/assets/scss/button.scss @@ -174,6 +174,30 @@ } } +.btn-warning { + background: $orange-10; + color: $white !important; + + &:hover:not(:disabled):not(.disabled) { + background: $orange-100; + color: $white; + } + + &:focus { + background: $orange-10; + border-color: $purple-400; + } + + &:not(:disabled):not(.disabled):active:focus, &:not(:disabled):not(.disabled).active:focus { + box-shadow: none; + border-color: $purple-400; + } + + &:not(:disabled):not(.disabled):active, &:not(:disabled):not(.disabled).active { + background: $orange-10; + } +} + .btn-success { background: $green-50; border: 1px solid transparent; diff --git a/website/client/src/components/admin-panel/index.vue b/website/client/src/components/admin-panel/index.vue index acd58c31d2..c31d729042 100644 --- a/website/client/src/components/admin-panel/index.vue +++ b/website/client/src/components/admin-panel/index.vue @@ -1,30 +1,41 @@ @@ -33,6 +44,15 @@ .uidField { min-width: 45ch; } + + .input-group-append { + width:auto; + } + + .admin-panel-content { + flex: 0 0 800px; + max-width: 800px; + } diff --git a/website/client/src/components/admin-panel/user-support/achievements.vue b/website/client/src/components/admin-panel/user-support/achievements.vue index d3ab101b34..e52cfd05c8 100644 --- a/website/client/src/components/admin-panel/user-support/achievements.vue +++ b/website/client/src/components/admin-panel/user-support/achievements.vue @@ -1,13 +1,18 @@