mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-25 20:03:12 +03:00
Added basic portal settings in new membership area
no refs Members related settings are being consolidated into a single screen. - Adds basic portal settings UI
This commit is contained in:
parent
de560733c5
commit
4c736d1c80
@ -8,6 +8,9 @@ export default class MembersAccessController extends Controller {
|
||||
@service settings;
|
||||
|
||||
@tracked showLeaveSettingsModal = false;
|
||||
@tracked showPortalSettings = false;
|
||||
|
||||
queryParams = ['showPortalSettings'];
|
||||
|
||||
leaveRoute(transition) {
|
||||
if (this.settings.get('hasDirtyAttributes')) {
|
||||
@ -17,6 +20,28 @@ export default class MembersAccessController extends Controller {
|
||||
}
|
||||
}
|
||||
|
||||
@action
|
||||
async leavePortalSettings() {
|
||||
this.settings.rollbackAttributes();
|
||||
this.showPortalSettings = false;
|
||||
this.showLeaveSettingsModal = false;
|
||||
}
|
||||
|
||||
@action
|
||||
openStripeSettings() {
|
||||
// Open stripe settings here
|
||||
}
|
||||
|
||||
@action
|
||||
closePortalSettings() {
|
||||
const changedAttributes = this.settings.changedAttributes();
|
||||
if (changedAttributes && Object.keys(changedAttributes).length > 0) {
|
||||
this.showLeaveSettingsModal = true;
|
||||
} else {
|
||||
this.showPortalSettings = false;
|
||||
}
|
||||
}
|
||||
|
||||
@action
|
||||
async confirmLeave() {
|
||||
this.settings.rollbackAttributes();
|
||||
|
@ -17,6 +17,23 @@
|
||||
</section>
|
||||
</GhCanvasHeader>
|
||||
|
||||
<section class="view-container settings-debug">
|
||||
<div class="gh-main-section">
|
||||
<h4 class="gh-main-section-header small">Portal settings</h4>
|
||||
</div>
|
||||
<div class="flex flex-row pa2">
|
||||
<div class="flex-grow-1">
|
||||
<h4>Portal Settings</h4>
|
||||
<span>Customize members modal signup flow</span>
|
||||
</div>
|
||||
<div>
|
||||
<button type="button" class="gh-btn gh-btn-green gh-btn-outline" {{action (toggle "showPortalSettings" this)}} data-test-toggle-membersFrom>
|
||||
<span> Customise Portal </span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section class="view-container settings-debug">
|
||||
<div class="gh-main-section">
|
||||
<h4 class="gh-main-section-header small">Access and payments</h4>
|
||||
@ -33,4 +50,12 @@
|
||||
@modifier="action wide"
|
||||
/>
|
||||
{{/if}}
|
||||
{{#if this.showPortalSettings}}
|
||||
<GhFullscreenModal @modal="portal-settings"
|
||||
@model={{hash
|
||||
openStripeSettings=(action "openStripeSettings")
|
||||
}}
|
||||
@close={{action "closePortalSettings"}}
|
||||
@modifier="full-overlay portal-settings" />
|
||||
{{/if}}
|
||||
</section>
|
Loading…
Reference in New Issue
Block a user