From 02851a671da85bf6bf025de08c4c3d98ef99299c Mon Sep 17 00:00:00 2001 From: Peter Zimon Date: Tue, 15 Nov 2022 17:27:58 +0100 Subject: [PATCH] Update "update banner" for 5.0 no refs. - "Update banner" needed to be improved to drive more traffic --- app/controllers/application.js | 15 +++++++++++++++ app/styles/layouts/main.css | 2 +- app/templates/application.hbs | 24 ++++++++++++++++++------ 3 files changed, 34 insertions(+), 7 deletions(-) diff --git a/app/controllers/application.js b/app/controllers/application.js index 98d585bb7..66b50eceb 100644 --- a/app/controllers/application.js +++ b/app/controllers/application.js @@ -16,6 +16,7 @@ export default class ApplicationController extends Controller { @service router; @service session; @service settings; + @service store; @service ui; @reads('config.hostSettings.update.enabled') @@ -47,6 +48,20 @@ export default class ApplicationController extends Controller { && !router.currentRouteName.match(/(signin|signup|setup|reset)/); } + get ownerUserNameOrEmail() { + let user = this.store.peekAll('user').findBy('isOwnerOnly', true); + + if (user) { + if (user.name) { + return user.name; + } else if (user.email) { + return user.email; + } + } + + return null; + } + @action openUpdateTab() { const updateWindow = window.open('', '_blank'); diff --git a/app/styles/layouts/main.css b/app/styles/layouts/main.css index 9f7a60fbe..c4b5462da 100644 --- a/app/styles/layouts/main.css +++ b/app/styles/layouts/main.css @@ -2078,7 +2078,7 @@ section.gh-ds h2 { display: flex; align-items: center; justify-content: center; - background: #15171A; + background: linear-gradient(90deg, var(--purple) 0%, var(--pink) 100%);; color: rgba(255, 255, 255, 0.95); padding: 14px; } diff --git a/app/templates/application.hbs b/app/templates/application.hbs index e072ee2d3..7605e3148 100644 --- a/app/templates/application.hbs +++ b/app/templates/application.hbs @@ -1,12 +1,24 @@ Skip to main content - {{#if (and this.session.user.isOwnerOnly this.showUpdateLink)}} + {{#if (and this.session.user.isAdmin this.showUpdateLink)}} {{/if}} @@ -65,4 +77,4 @@
- \ No newline at end of file +