mirror of
https://github.com/discourse/discourse.git
synced 2025-01-18 18:02:46 +08:00
DEV: Don't render header on invites page (#22138)
What this change? Previous solution relied on CSS to hide the header which is first wasteful since we're still rendering the header and second makes it untestable. If we don't want the header to show, we should avoid rendering it in the first place.
This commit is contained in:
parent
9fad71809c
commit
783bce4b2c
|
@ -19,6 +19,22 @@ export default DiscourseRoute.extend(DisableSidebar, {
|
|||
}
|
||||
},
|
||||
|
||||
activate() {
|
||||
this._super(...arguments);
|
||||
|
||||
this.controllerFor("application").setProperties({
|
||||
showSiteHeader: false,
|
||||
});
|
||||
},
|
||||
|
||||
deactivate() {
|
||||
this._super(...arguments);
|
||||
|
||||
this.controllerFor("application").setProperties({
|
||||
showSiteHeader: true,
|
||||
});
|
||||
},
|
||||
|
||||
setupController(controller, model) {
|
||||
this._super(...arguments);
|
||||
|
||||
|
|
|
@ -103,6 +103,11 @@ acceptance("Invite accept", function (needs) {
|
|||
"does not display the sidebar on the invites page"
|
||||
);
|
||||
|
||||
assert.notOk(
|
||||
exists(".d-header"),
|
||||
"does not display the site header on the invites page"
|
||||
);
|
||||
|
||||
assert.ok(exists("#new-account-email"), "shows the email input");
|
||||
assert.ok(exists("#new-account-username"), "shows the username input");
|
||||
assert.strictEqual(
|
||||
|
|
|
@ -36,9 +36,6 @@ body.invite-page {
|
|||
background-color: var(--primary-50);
|
||||
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
|
||||
Oxygen-Sans, Ubuntu, Cantarell, Arial, sans-serif;
|
||||
.d-header {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
// Create Account + Login
|
||||
|
|
Loading…
Reference in New Issue
Block a user