mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FIX: use full screen login for new-topic route (#7467)
DEV: add javascript tests for new-topic and new-message routes DEV: fix an existing test that was being skipped
This commit is contained in:
@@ -11,7 +11,7 @@ const Discourse = Ember.Application.extend({
|
||||
_docTitle: document.title,
|
||||
RAW_TEMPLATES: {},
|
||||
__widget_helpers: {},
|
||||
showingSignup: false,
|
||||
useFullScreenLogin: false,
|
||||
customEvents: {
|
||||
paste: "paste"
|
||||
},
|
||||
|
||||
@@ -93,7 +93,8 @@ export function findAll(siteSettings, capabilities, isMobileDevice) {
|
||||
// On Mobile, Android or iOS always go with full screen
|
||||
if (
|
||||
isMobileDevice ||
|
||||
(capabilities && (capabilities.isIOS || capabilities.isAndroid))
|
||||
(capabilities && (capabilities.isIOS || capabilities.isAndroid)) ||
|
||||
Discourse.useFullScreenLogin
|
||||
) {
|
||||
methods.forEach(m => m.set("full_screen_login", true));
|
||||
}
|
||||
|
||||
@@ -55,11 +55,8 @@ export default Discourse.Route.extend({
|
||||
});
|
||||
} else {
|
||||
$.cookie("destination_url", window.location.href);
|
||||
if (Discourse.showingSignup) {
|
||||
Discourse.showingSignup = false;
|
||||
} else {
|
||||
this.replaceWith("login");
|
||||
}
|
||||
Discourse.useFullScreenLogin = true;
|
||||
this.replaceWith("login");
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
@@ -72,12 +72,8 @@ export default Discourse.Route.extend({
|
||||
} else {
|
||||
// User is not logged in
|
||||
$.cookie("destination_url", window.location.href);
|
||||
if (Discourse.showingSignup) {
|
||||
// We're showing the sign up modal
|
||||
Discourse.showingSignup = false;
|
||||
} else {
|
||||
self.replaceWith("login");
|
||||
}
|
||||
Discourse.useFullScreenLogin = true;
|
||||
self.replaceWith("login");
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user