Search in sources :

Example 1 with AccountDashboardScreen

use of com.google.gerrit.client.changes.AccountDashboardScreen in project gerrit by GerritCodeReview.

the class Dispatcher method mine.

private static Screen mine() {
    if (Gerrit.isSignedIn()) {
        return new AccountDashboardScreen(Gerrit.getUserAccount().getId());
    }
    Screen r = new AccountDashboardScreen(null);
    r.setRequiresSignIn(true);
    return r;
}
Also used : EditScreen(com.google.gerrit.client.editor.EditScreen) AccountGroupAuditLogScreen(com.google.gerrit.client.admin.AccountGroupAuditLogScreen) ProjectScreen(com.google.gerrit.client.admin.ProjectScreen) MyWatchedProjectsScreen(com.google.gerrit.client.account.MyWatchedProjectsScreen) MyEditPreferencesScreen(com.google.gerrit.client.account.MyEditPreferencesScreen) MyGroupsScreen(com.google.gerrit.client.account.MyGroupsScreen) MyProfileScreen(com.google.gerrit.client.account.MyProfileScreen) ProjectDashboardsScreen(com.google.gerrit.client.admin.ProjectDashboardsScreen) NewAgreementScreen(com.google.gerrit.client.account.NewAgreementScreen) CreateGroupScreen(com.google.gerrit.client.admin.CreateGroupScreen) MyContactInformationScreen(com.google.gerrit.client.account.MyContactInformationScreen) MyPasswordScreen(com.google.gerrit.client.account.MyPasswordScreen) ProjectInfoScreen(com.google.gerrit.client.admin.ProjectInfoScreen) MyOAuthTokenScreen(com.google.gerrit.client.account.MyOAuthTokenScreen) MyPreferencesScreen(com.google.gerrit.client.account.MyPreferencesScreen) MyAgreementsScreen(com.google.gerrit.client.account.MyAgreementsScreen) Screen(com.google.gerrit.client.ui.Screen) ProjectDashboardScreen(com.google.gerrit.client.changes.ProjectDashboardScreen) ExtensionSettingsScreen(com.google.gerrit.client.api.ExtensionSettingsScreen) ValidateEmailScreen(com.google.gerrit.client.account.ValidateEmailScreen) ProjectBranchesScreen(com.google.gerrit.client.admin.ProjectBranchesScreen) AccountGroupScreen(com.google.gerrit.client.admin.AccountGroupScreen) CustomDashboardScreen(com.google.gerrit.client.changes.CustomDashboardScreen) AccountDashboardScreen(com.google.gerrit.client.changes.AccountDashboardScreen) PluginListScreen(com.google.gerrit.client.admin.PluginListScreen) AccountGroupInfoScreen(com.google.gerrit.client.admin.AccountGroupInfoScreen) MyIdentitiesScreen(com.google.gerrit.client.account.MyIdentitiesScreen) QueryScreen(com.google.gerrit.client.changes.QueryScreen) ExtensionScreen(com.google.gerrit.client.api.ExtensionScreen) MyDiffPreferencesScreen(com.google.gerrit.client.account.MyDiffPreferencesScreen) RegisterScreen(com.google.gerrit.client.account.RegisterScreen) MySshKeysScreen(com.google.gerrit.client.account.MySshKeysScreen) ProjectListScreen(com.google.gerrit.client.admin.ProjectListScreen) DocScreen(com.google.gerrit.client.documentation.DocScreen) CreateProjectScreen(com.google.gerrit.client.admin.CreateProjectScreen) GroupListScreen(com.google.gerrit.client.admin.GroupListScreen) MyGpgKeysScreen(com.google.gerrit.client.account.MyGpgKeysScreen) ProjectTagsScreen(com.google.gerrit.client.admin.ProjectTagsScreen) AccountGroupMembersScreen(com.google.gerrit.client.admin.AccountGroupMembersScreen) ProjectAccessScreen(com.google.gerrit.client.admin.ProjectAccessScreen) ChangeScreen(com.google.gerrit.client.change.ChangeScreen) AccountDashboardScreen(com.google.gerrit.client.changes.AccountDashboardScreen)

Example 2 with AccountDashboardScreen

use of com.google.gerrit.client.changes.AccountDashboardScreen in project gerrit by GerritCodeReview.

the class Dispatcher method dashboard.

private static void dashboard(final String token) {
    String rest = skip(token);
    if (rest.matches("[0-9]+")) {
        Gerrit.display(token, new AccountDashboardScreen(Account.Id.parse(rest)));
        return;
    }
    if (rest.equals("self")) {
        if (Gerrit.isSignedIn()) {
            Gerrit.display(token, new AccountDashboardScreen(Gerrit.getUserAccount().getId()));
        } else {
            Screen s = new AccountDashboardScreen(null);
            s.setRequiresSignIn(true);
            Gerrit.display(token, s);
        }
        return;
    }
    if (rest.startsWith("?")) {
        Gerrit.display(token, new CustomDashboardScreen(rest.substring(1)));
        return;
    }
    Gerrit.display(token, new NotFoundScreen());
}
Also used : EditScreen(com.google.gerrit.client.editor.EditScreen) AccountGroupAuditLogScreen(com.google.gerrit.client.admin.AccountGroupAuditLogScreen) ProjectScreen(com.google.gerrit.client.admin.ProjectScreen) MyWatchedProjectsScreen(com.google.gerrit.client.account.MyWatchedProjectsScreen) MyEditPreferencesScreen(com.google.gerrit.client.account.MyEditPreferencesScreen) MyGroupsScreen(com.google.gerrit.client.account.MyGroupsScreen) MyProfileScreen(com.google.gerrit.client.account.MyProfileScreen) ProjectDashboardsScreen(com.google.gerrit.client.admin.ProjectDashboardsScreen) NewAgreementScreen(com.google.gerrit.client.account.NewAgreementScreen) CreateGroupScreen(com.google.gerrit.client.admin.CreateGroupScreen) MyContactInformationScreen(com.google.gerrit.client.account.MyContactInformationScreen) MyPasswordScreen(com.google.gerrit.client.account.MyPasswordScreen) ProjectInfoScreen(com.google.gerrit.client.admin.ProjectInfoScreen) MyOAuthTokenScreen(com.google.gerrit.client.account.MyOAuthTokenScreen) MyPreferencesScreen(com.google.gerrit.client.account.MyPreferencesScreen) MyAgreementsScreen(com.google.gerrit.client.account.MyAgreementsScreen) Screen(com.google.gerrit.client.ui.Screen) ProjectDashboardScreen(com.google.gerrit.client.changes.ProjectDashboardScreen) ExtensionSettingsScreen(com.google.gerrit.client.api.ExtensionSettingsScreen) ValidateEmailScreen(com.google.gerrit.client.account.ValidateEmailScreen) ProjectBranchesScreen(com.google.gerrit.client.admin.ProjectBranchesScreen) AccountGroupScreen(com.google.gerrit.client.admin.AccountGroupScreen) CustomDashboardScreen(com.google.gerrit.client.changes.CustomDashboardScreen) AccountDashboardScreen(com.google.gerrit.client.changes.AccountDashboardScreen) PluginListScreen(com.google.gerrit.client.admin.PluginListScreen) AccountGroupInfoScreen(com.google.gerrit.client.admin.AccountGroupInfoScreen) MyIdentitiesScreen(com.google.gerrit.client.account.MyIdentitiesScreen) QueryScreen(com.google.gerrit.client.changes.QueryScreen) ExtensionScreen(com.google.gerrit.client.api.ExtensionScreen) MyDiffPreferencesScreen(com.google.gerrit.client.account.MyDiffPreferencesScreen) RegisterScreen(com.google.gerrit.client.account.RegisterScreen) MySshKeysScreen(com.google.gerrit.client.account.MySshKeysScreen) ProjectListScreen(com.google.gerrit.client.admin.ProjectListScreen) DocScreen(com.google.gerrit.client.documentation.DocScreen) CreateProjectScreen(com.google.gerrit.client.admin.CreateProjectScreen) GroupListScreen(com.google.gerrit.client.admin.GroupListScreen) MyGpgKeysScreen(com.google.gerrit.client.account.MyGpgKeysScreen) ProjectTagsScreen(com.google.gerrit.client.admin.ProjectTagsScreen) AccountGroupMembersScreen(com.google.gerrit.client.admin.AccountGroupMembersScreen) ProjectAccessScreen(com.google.gerrit.client.admin.ProjectAccessScreen) ChangeScreen(com.google.gerrit.client.change.ChangeScreen) AccountDashboardScreen(com.google.gerrit.client.changes.AccountDashboardScreen) CustomDashboardScreen(com.google.gerrit.client.changes.CustomDashboardScreen)

Aggregations

MyAgreementsScreen (com.google.gerrit.client.account.MyAgreementsScreen)2 MyContactInformationScreen (com.google.gerrit.client.account.MyContactInformationScreen)2 MyDiffPreferencesScreen (com.google.gerrit.client.account.MyDiffPreferencesScreen)2 MyEditPreferencesScreen (com.google.gerrit.client.account.MyEditPreferencesScreen)2 MyGpgKeysScreen (com.google.gerrit.client.account.MyGpgKeysScreen)2 MyGroupsScreen (com.google.gerrit.client.account.MyGroupsScreen)2 MyIdentitiesScreen (com.google.gerrit.client.account.MyIdentitiesScreen)2 MyOAuthTokenScreen (com.google.gerrit.client.account.MyOAuthTokenScreen)2 MyPasswordScreen (com.google.gerrit.client.account.MyPasswordScreen)2 MyPreferencesScreen (com.google.gerrit.client.account.MyPreferencesScreen)2 MyProfileScreen (com.google.gerrit.client.account.MyProfileScreen)2 MySshKeysScreen (com.google.gerrit.client.account.MySshKeysScreen)2 MyWatchedProjectsScreen (com.google.gerrit.client.account.MyWatchedProjectsScreen)2 NewAgreementScreen (com.google.gerrit.client.account.NewAgreementScreen)2 RegisterScreen (com.google.gerrit.client.account.RegisterScreen)2 ValidateEmailScreen (com.google.gerrit.client.account.ValidateEmailScreen)2 AccountGroupAuditLogScreen (com.google.gerrit.client.admin.AccountGroupAuditLogScreen)2 AccountGroupInfoScreen (com.google.gerrit.client.admin.AccountGroupInfoScreen)2 AccountGroupMembersScreen (com.google.gerrit.client.admin.AccountGroupMembersScreen)2 AccountGroupScreen (com.google.gerrit.client.admin.AccountGroupScreen)2