diff --git a/ghost/admin/app/components/modals/settings/about.hbs b/ghost/admin/app/components/modals/settings/about.hbs new file mode 100644 index 0000000000..549cd3cae8 --- /dev/null +++ b/ghost/admin/app/components/modals/settings/about.hbs @@ -0,0 +1,79 @@ +
diff --git a/ghost/admin/app/components/modals/settings/about.js b/ghost/admin/app/components/modals/settings/about.js new file mode 100644 index 0000000000..b209d51dd9 --- /dev/null +++ b/ghost/admin/app/components/modals/settings/about.js @@ -0,0 +1,15 @@ +import Component from '@glimmer/component'; +import config from 'ghost-admin/config/environment'; +import {inject as service} from '@ember/service'; + +export default class AboutModal extends Component { + @service config; + @service upgradeStatus; + + constructor() { + super(...arguments); + if (this.isTesting === undefined) { + this.isTesting = config.environment === 'test'; + } + } +} diff --git a/ghost/admin/app/controllers/settings.js b/ghost/admin/app/controllers/settings.js index 2f0d6b7f90..db906a9a40 100644 --- a/ghost/admin/app/controllers/settings.js +++ b/ghost/admin/app/controllers/settings.js @@ -1,3 +1,4 @@ +import AboutModal from '../components/modals/settings/about'; import classic from 'ember-classic-decorator'; import {action} from '@ember/object'; import {inject as service} from '@ember/service'; @@ -8,6 +9,8 @@ import Controller from '@ember/controller'; export default class SettingsController extends Controller { @service settings; @service session; + @service modals; + @service upgradeStatus; showLeaveSettingsModal = false; @@ -21,4 +24,9 @@ export default class SettingsController extends Controller { this.settings.rollbackAttributes(); this.set('showLeaveSettingsModal', false); } + + @action + openAbout() { + this.advancedModal = this.modals.open(AboutModal); + } } diff --git a/ghost/admin/app/styles/layouts/settings.css b/ghost/admin/app/styles/layouts/settings.css index c40792f29a..d46d01c5da 100644 --- a/ghost/admin/app/styles/layouts/settings.css +++ b/ghost/admin/app/styles/layouts/settings.css @@ -3001,4 +3001,159 @@ p.theme-validation-details { font-size: 1.4rem !important; min-width: 130px; } +} + +/* About /ghost/settings/about/ +/* ---------------------------------------------------------- */ +.gh-about-logo svg { + position: relative; + width: 120px; + height: auto; +} + +.gh-about-logo { + border-bottom: 1px solid var(--lightgrey-l2); + padding-bottom: 10px; + margin-bottom: 16px; +} + +.gh-about-modal .gh-about-logo { + margin: 4px 0 20px; + border-bottom: none; + padding-bottom: 0; +} + +.gh-about-container { + display: grid; + grid-template-columns: 2fr 1fr; + grid-gap: 80px; +} + +.gh-whats-new-canvas .gh-about-container { + display: flex; + grid-template-columns: unset; + grid-gap: unset; + margin: 0 auto; + max-width: 920px; + margin-top: 60px; +} + +.gh-about-box { + position: sticky; + top: 96px; + right: 0; + display: flex; + flex-grow: 1; + flex-direction: column; + height: max-content; + border-radius: 3px; + min-width: 300px; +} + +.gh-about-box.grey { + border: none; + background: var(--main-color-content-greybg); +} + +.gh-env-details { + display: flex; + flex-grow: 1; + flex-direction: column; + padding: 24px 28px 28px; +} + +.gh-about-container h2 { + font-size: 1.65rem; + line-height: 1.4em; + font-weight: 600; + border-bottom: 1px solid var(--lightgrey-l2); + padding-bottom: 12px; + margin-bottom: 12px; +} + +.gh-env-list { + margin: 0; + padding: 0; + list-style: none; +} + +.gh-env-list li { + margin: 0 0 4px; + font-size: 1.4rem; + line-height: 1.5em; +} + +.gh-env-error { + margin: 1.2rem 0; + padding: 16px; + line-height: 1.4em; + border: none; + background: color-mod(var(--red) a(6%)); + border-radius: 3px; +} + +.gh-env-error a { + color: var(--red); +} + +.gh-env-help { + max-width: 200px; +} + +.gh-env-help .gh-btn { + margin: 4px 0; +} + +@media (max-width: 670px) { + .gh-env-details { + flex-direction: column; + } + .gh-env-help { + margin: 1em 0; + max-width: none; + } + .gh-env-help .gh-btn { + display: inline-block; + } +} + +.gh-about-content-actions { + display: none; +} + + + +/* Upgrade +/* ---------------------------------------------------------- */ + +.gh-upgrade-notification { + padding-top: 1em; +} + +.gh-upgrade-notification a { + text-decoration: underline; +} + +.gh-about-modal .gh-upgrade-notification { + background: color-mod(var(--green) a(8%)); + padding: 24px 28px 24px; + border-radius: 3px; + margin-bottom: 28px; +} + +/* Copyright Info +/* ---------------------------------------------------------- */ + +.gh-copyright-info { + color: var(--midgrey); + font-size: 1.3rem; + border-top: 1px solid var(--lightgrey-l2); + padding-top: 16px; + margin-top: 16px; + line-height: 1.45em; +} + +.gh-about-modal .gh-copyright-info { + margin: 4px 0 8px; + border-top: none; } \ No newline at end of file diff --git a/ghost/admin/app/styles/layouts/whatsnew.css b/ghost/admin/app/styles/layouts/whatsnew.css index 1c4aa97b4c..4229598c83 100644 --- a/ghost/admin/app/styles/layouts/whatsnew.css +++ b/ghost/admin/app/styles/layouts/whatsnew.css @@ -1,141 +1,3 @@ -/* About /ghost/settings/about/ -/* ---------------------------------------------------------- */ -.gh-about-logo svg { - position: relative; - width: 120px; - height: auto; -} - -.gh-about-logo { - border-bottom: 1px solid var(--lightgrey-l2); - padding-bottom: 10px; - margin-bottom: 16px; -} - -.gh-about-container { - display: grid; - grid-template-columns: 2fr 1fr; - grid-gap: 80px; -} - -.gh-whats-new-canvas .gh-about-container { - display: flex; - grid-template-columns: unset; - grid-gap: unset; - margin: 0 auto; - max-width: 920px; - margin-top: 60px; -} - -.gh-about-box { - position: sticky; - top: 96px; - right: 0; - display: flex; - flex-grow: 1; - flex-direction: column; - height: max-content; - border-radius: 3px; - min-width: 300px; -} - -.gh-about-box.grey { - border: none; - background: var(--main-color-content-greybg); -} - -.gh-env-details { - display: flex; - flex-grow: 1; - flex-direction: column; - padding: 24px 28px 28px; -} - -.gh-about-container h2 { - font-size: 1.65rem; - line-height: 1.4em; - font-weight: 600; - border-bottom: 1px solid var(--lightgrey-l2); - padding-bottom: 12px; - margin-bottom: 12px; -} - -.gh-env-list { - margin: 0; - padding: 0; - list-style: none; -} - -.gh-env-list li { - margin: 0 0 4px; - font-size: 1.4rem; - line-height: 1.5em; -} - -.gh-env-error { - margin: 1.2rem 0; - padding: 16px; - line-height: 1.4em; - border: none; - background: color-mod(var(--red) a(6%)); - border-radius: 3px; -} - -.gh-env-error a { - color: var(--red); -} - -.gh-env-help { - max-width: 200px; -} - -.gh-env-help .gh-btn { - margin: 4px 0; -} - -@media (max-width: 670px) { - .gh-env-details { - flex-direction: column; - } - .gh-env-help { - margin: 1em 0; - max-width: none; - } - .gh-env-help .gh-btn { - display: inline-block; - } -} - -.gh-about-content-actions { - display: none; -} - - - -/* Upgrade -/* ---------------------------------------------------------- */ - -.gh-upgrade-notification { - padding-top: 1em; -} - -.gh-upgrade-notification a { - text-decoration: underline; -} - -/* Copyright Info -/* ---------------------------------------------------------- */ - -.gh-copyright-info { - color: var(--midgrey); - font-size: 1.3rem; - border-top: 1px solid var(--lightgrey-l2); - padding-top: 16px; - margin-top: 16px; - line-height: 1.45em; -} - - /* What's new */ /* ---------------------------------------------------------- */ .gh-whats-new-canvas .gh-canvas-header-content { diff --git a/ghost/admin/app/styles/patterns/buttons.css b/ghost/admin/app/styles/patterns/buttons.css index 26524f0b71..2f966e1aee 100644 --- a/ghost/admin/app/styles/patterns/buttons.css +++ b/ghost/admin/app/styles/patterns/buttons.css @@ -802,4 +802,23 @@ Usage: CTA buttons grouped together horizontally. /* Conditional wording for mobile to save space */ .gh-btn .gh-btn-text-hide-for-mobile { display: none; +} + +.gh-btn-with-notification { + position: relative; +} + +.gh-btn-notification-dot { + position: absolute; + top: -6px; + right: -6px; + display: block; + content: ""; + width: 14px !important; + height: 14px !important; + background: var(--green); + padding: 0 !important; + margin: 0 !important; + border-radius: 999px !important; + border: 1px solid var(--main-bg-color); } \ No newline at end of file diff --git a/ghost/admin/app/templates/settings.hbs b/ghost/admin/app/templates/settings.hbs index d8e2ec1cc2..7d0e492e56 100644 --- a/ghost/admin/app/templates/settings.hbs +++ b/ghost/admin/app/templates/settings.hbs @@ -3,6 +3,20 @@Testing ground for new features
View system event log
+