Add UI extension point to password screen
This extension point is useful if a plugin wants to display authentication tokens, e.g. for OAuth. Change-Id: Ia809926af7a98f8fffa9c61125f43ac2c734f298 Signed-off-by: Edwin Kempin <edwin.kempin@sap.com>
This commit is contained in:
@@ -994,6 +994,11 @@ Panel will be shown at the bottom of the screen.
|
|||||||
+
|
+
|
||||||
The name of the project.
|
The name of the project.
|
||||||
|
|
||||||
|
* User Password Screen:
|
||||||
|
** `GerritUiExtensionPoint.PASSWORD_SCREEN_BOTTOM`:
|
||||||
|
+
|
||||||
|
Panel will be shown at the bottom of the screen.
|
||||||
|
|
||||||
* User Profile Screen:
|
* User Profile Screen:
|
||||||
** `GerritUiExtensionPoint.PROFILE_SCREEN_BOTTOM`:
|
** `GerritUiExtensionPoint.PROFILE_SCREEN_BOTTOM`:
|
||||||
+
|
+
|
||||||
|
|||||||
@@ -18,6 +18,9 @@ public enum GerritUiExtensionPoint {
|
|||||||
/* ChangeScreen */
|
/* ChangeScreen */
|
||||||
CHANGE_SCREEN_BELOW_CHANGE_INFO_BLOCK,
|
CHANGE_SCREEN_BELOW_CHANGE_INFO_BLOCK,
|
||||||
|
|
||||||
|
/* MyPasswordScreen */
|
||||||
|
PASSWORD_SCREEN_BOTTOM,
|
||||||
|
|
||||||
/* MyProfileScreen */
|
/* MyProfileScreen */
|
||||||
PROFILE_SCREEN_BOTTOM,
|
PROFILE_SCREEN_BOTTOM,
|
||||||
|
|
||||||
|
|||||||
@@ -98,6 +98,7 @@ public interface GerritCss extends CssResource {
|
|||||||
String errorDialogErrorType();
|
String errorDialogErrorType();
|
||||||
String errorDialogGlass();
|
String errorDialogGlass();
|
||||||
String errorDialogTitle();
|
String errorDialogTitle();
|
||||||
|
String extensionPanel();
|
||||||
String loadingPluginsDialog();
|
String loadingPluginsDialog();
|
||||||
String fileColumnHeader();
|
String fileColumnHeader();
|
||||||
String fileCommentBorder();
|
String fileCommentBorder();
|
||||||
|
|||||||
@@ -15,7 +15,9 @@
|
|||||||
package com.google.gerrit.client.account;
|
package com.google.gerrit.client.account;
|
||||||
|
|
||||||
import com.google.gerrit.client.Gerrit;
|
import com.google.gerrit.client.Gerrit;
|
||||||
|
import com.google.gerrit.client.GerritUiExtensionPoint;
|
||||||
import com.google.gerrit.client.VoidResult;
|
import com.google.gerrit.client.VoidResult;
|
||||||
|
import com.google.gerrit.client.api.ExtensionPanel;
|
||||||
import com.google.gerrit.client.rpc.GerritCallback;
|
import com.google.gerrit.client.rpc.GerritCallback;
|
||||||
import com.google.gerrit.client.rpc.NativeString;
|
import com.google.gerrit.client.rpc.NativeString;
|
||||||
import com.google.gerrit.client.rpc.RestApi;
|
import com.google.gerrit.client.rpc.RestApi;
|
||||||
@@ -91,6 +93,10 @@ public class MyPasswordScreen extends SettingsScreen {
|
|||||||
@Override
|
@Override
|
||||||
protected void onLoad() {
|
protected void onLoad() {
|
||||||
super.onLoad();
|
super.onLoad();
|
||||||
|
ExtensionPanel extensionPanel =
|
||||||
|
new ExtensionPanel(GerritUiExtensionPoint.PASSWORD_SCREEN_BOTTOM);
|
||||||
|
extensionPanel.addStyleName(Gerrit.RESOURCES.css().extensionPanel());
|
||||||
|
add(extensionPanel);
|
||||||
|
|
||||||
if (password == null) {
|
if (password == null) {
|
||||||
display();
|
display();
|
||||||
|
|||||||
@@ -118,6 +118,10 @@ a:hover {
|
|||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.extensionPanel {
|
||||||
|
padding-top: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
/** MenuScreen **/
|
/** MenuScreen **/
|
||||||
.menuScreenMenuBar {
|
.menuScreenMenuBar {
|
||||||
background: topMenuColor;
|
background: topMenuColor;
|
||||||
|
|||||||
Reference in New Issue
Block a user