mirror of
https://github.com/discourse/discourse.git
synced 2025-03-26 03:15:41 +08:00
correct full screen login feature
This commit is contained in:
parent
5b16adc0e8
commit
fab51496cb
app
lib/plugin
@ -114,7 +114,7 @@ export default Ember.Controller.extend(ModalFunctionality, {
|
|||||||
customLogin();
|
customLogin();
|
||||||
} else {
|
} else {
|
||||||
var authUrl = Discourse.getURL("/auth/" + name);
|
var authUrl = Discourse.getURL("/auth/" + name);
|
||||||
if (loginMethod.get("full_screen_login")) {
|
if (loginMethod.get("fullScreenLogin")) {
|
||||||
window.location = authUrl;
|
window.location = authUrl;
|
||||||
} else {
|
} else {
|
||||||
this.set('authenticate', name);
|
this.set('authenticate', name);
|
||||||
|
@ -26,7 +26,7 @@
|
|||||||
window.opener.Discourse.authenticationComplete(<%=@auth_result.to_client_hash.to_json.html_safe%>);
|
window.opener.Discourse.authenticationComplete(<%=@auth_result.to_client_hash.to_json.html_safe%>);
|
||||||
window.close();
|
window.close();
|
||||||
} else {
|
} else {
|
||||||
window.location = <%= @origin.inspect %>;
|
window.location = <%= @origin.inspect.html_safe %>;
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
</div>
|
</div>
|
||||||
|
@ -2,7 +2,7 @@ class Plugin::AuthProvider
|
|||||||
|
|
||||||
def self.auth_attributes
|
def self.auth_attributes
|
||||||
[:glyph, :background_color, :title, :message, :frame_width, :frame_height, :authenticator,
|
[:glyph, :background_color, :title, :message, :frame_width, :frame_height, :authenticator,
|
||||||
:title_setting, :enabled_setting]
|
:title_setting, :enabled_setting, :full_screen_login]
|
||||||
end
|
end
|
||||||
|
|
||||||
attr_accessor(*auth_attributes)
|
attr_accessor(*auth_attributes)
|
||||||
@ -19,6 +19,7 @@ class Plugin::AuthProvider
|
|||||||
result['messageOverride'] = message if message
|
result['messageOverride'] = message if message
|
||||||
result['frameWidth'] = frame_width if frame_width
|
result['frameWidth'] = frame_width if frame_width
|
||||||
result['frameHeight'] = frame_height if frame_height
|
result['frameHeight'] = frame_height if frame_height
|
||||||
|
result['fullScreenLogin'] = full_screen_login if full_screen_login
|
||||||
result.to_json
|
result.to_json
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user