From a78b92ddcc63c5c6bd7288e9e465c1173d2eb3a7 Mon Sep 17 00:00:00 2001 From: Blake Erickson Date: Wed, 10 Aug 2022 13:05:54 +0100 Subject: [PATCH] FEATURE: Add quick access button to user profile dropdown (#130) --- .../discourse/initializers/setup-subscriptions.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/assets/javascripts/discourse/initializers/setup-subscriptions.js b/assets/javascripts/discourse/initializers/setup-subscriptions.js index e74c5f8..6ece5aa 100644 --- a/assets/javascripts/discourse/initializers/setup-subscriptions.js +++ b/assets/javascripts/discourse/initializers/setup-subscriptions.js @@ -15,6 +15,15 @@ export default { href: "/s", }); } + + const user = api.getCurrentUser(); + if (user) { + api.addQuickAccessProfileItem({ + icon: "far-credit-card", + href: `/u/${user.username}/billing/subscriptions`, + content: "Billing", + }); + } }); }, };