Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 2 additions & 26 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5840,7 +5840,7 @@
},
{
"command": "gitlens.showAccountView",
"title": "Show Account View",
"title": "Show Account on Home",
"category": "GitLens"
},
{
Expand Down Expand Up @@ -8089,12 +8089,6 @@
"category": "GitLens",
"icon": "$(refresh)"
},
{
"command": "gitlens.views.account.refresh",
"title": "Refresh",
"category": "GitLens",
"icon": "$(refresh)"
},
{
"command": "gitlens.views.launchpad.copy",
"title": "Copy",
Expand Down Expand Up @@ -9943,7 +9937,7 @@
},
{
"command": "gitlens.showAccountView",
"when": "gitlens:enabled"
"when": "false"
},
{
"command": "gitlens.showInCommitGraph",
Expand Down Expand Up @@ -11489,10 +11483,6 @@
"command": "gitlens.views.home.refresh",
"when": "false"
},
{
"command": "gitlens.views.account.refresh",
"when": "false"
},
{
"command": "gitlens.views.launchpad.copy",
"when": "false"
Expand Down Expand Up @@ -13333,11 +13323,6 @@
"when": "view =~ /^gitlens\\.views\\.home/",
"group": "navigation@99"
},
{
"command": "gitlens.views.account.refresh",
"when": "view =~ /^gitlens\\.views\\.account/",
"group": "navigation@99"
},
{
"command": "gitlens.views.launchpad.refresh",
"when": "view =~ /^gitlens\\.views\\.launchpad/",
Expand Down Expand Up @@ -17642,15 +17627,6 @@
"icon": "$(gitlens-workspaces-view)",
"initialSize": 2,
"visibility": "visible"
},
{
"type": "webview",
"id": "gitlens.views.account",
"name": "GitKraken Account",
"contextualTitle": "GitLens",
"icon": "$(gitlens-gitlens)",
"initialSize": 1,
"visibility": "collapsed"
}
],
"gitlensInspect": [
Expand Down
8 changes: 6 additions & 2 deletions src/commands/showView.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { Commands } from '../constants.commands';
import type { Container } from '../container';
import type { GraphWebviewShowingArgs } from '../plus/webviews/graph/registration';
import { command } from '../system/vscode/command';
import type { HomeWebviewShowingArgs } from '../webviews/home/registration';
import type { CommandContext } from './base';
import { Command } from './base';

Expand Down Expand Up @@ -39,7 +40,10 @@ export class ShowViewCommand extends Command {
const command = context.command as Commands;
switch (command) {
case Commands.ShowAccountView:
return this.container.accountView.show();
return this.container.homeView.show(
undefined,
...([{ focusAccount: true }, ...args] as HomeWebviewShowingArgs),
);
case Commands.ShowBranchesView:
return this.container.branchesView.show();
case Commands.ShowCommitDetailsView:
Expand All @@ -55,7 +59,7 @@ export class ShowViewCommand extends Command {
case Commands.ShowGraphView:
return this.container.graphView.show(undefined, ...(args as GraphWebviewShowingArgs));
case Commands.ShowHomeView:
return this.container.homeView.show();
return this.container.homeView.show(undefined, ...(args as HomeWebviewShowingArgs));
case Commands.ShowLaunchpadView:
return this.container.launchpadView.show();
case Commands.ShowLineHistoryView:
Expand Down
11 changes: 2 additions & 9 deletions src/constants.views.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,7 @@ export type TreeViewIds<T extends TreeViewTypes = TreeViewTypes> = `gitlens.view
export type WebviewTypes = 'focus' | 'graph' | 'patchDetails' | 'settings' | 'timeline' | 'welcome';
export type WebviewIds = `gitlens.${WebviewTypes}`;

export type WebviewViewTypes =
| 'account'
| 'commitDetails'
| 'graph'
| 'graphDetails'
| 'home'
| 'patchDetails'
| 'timeline';
export type WebviewViewTypes = 'commitDetails' | 'graph' | 'graphDetails' | 'home' | 'patchDetails' | 'timeline';
export type WebviewViewIds<T extends WebviewViewTypes = WebviewViewTypes> = `gitlens.views.${T}`;

export type ViewTypes = TreeViewTypes | WebviewViewTypes;
Expand Down Expand Up @@ -72,7 +65,7 @@ export const viewIdsByDefaultContainerId = new Map<ViewContainerIds | CoreViewCo
'workbench.view.extension.gitlensInspect',
['commitDetails', 'fileHistory', 'lineHistory', 'timeline', 'searchAndCompare'],
],
['workbench.view.extension.gitlens', ['home', 'workspaces', 'account']],
['workbench.view.extension.gitlens', ['home', 'workspaces']],
]);

export type TreeViewRefNodeTypes = 'branch' | 'commit' | 'stash' | 'tag';
Expand Down
10 changes: 2 additions & 8 deletions src/container.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ import { EnrichmentService } from './plus/launchpad/enrichmentService';
import { LaunchpadIndicator } from './plus/launchpad/launchpadIndicator';
import { LaunchpadProvider } from './plus/launchpad/launchpadProvider';
import { RepositoryIdentityService } from './plus/repos/repositoryIdentityService';
import { registerAccountWebviewView } from './plus/webviews/account/registration';
import type { GraphWebviewShowingArgs } from './plus/webviews/graph/registration';
import {
registerGraphWebviewCommands,
Expand Down Expand Up @@ -91,6 +90,7 @@ import {
registerCommitDetailsWebviewView,
registerGraphDetailsWebviewView,
} from './webviews/commitDetails/registration';
import type { HomeWebviewShowingArgs } from './webviews/home/registration';
import { registerHomeWebviewView } from './webviews/home/registration';
import { RebaseEditorProvider } from './webviews/rebase/rebaseEditor';
import { registerSettingsWebviewCommands, registerSettingsWebviewPanel } from './webviews/settings/registration';
Expand Down Expand Up @@ -292,7 +292,6 @@ export class Container {
this._disposables.push((this._workspacesView = new WorkspacesView(this)));

this._disposables.push((this._homeView = registerHomeWebviewView(this._webviews)));
this._disposables.push((this._accountView = registerAccountWebviewView(this._webviews)));

if (configuration.get('launchpad.indicator.enabled')) {
this._disposables.push((this._launchpadIndicator = new LaunchpadIndicator(this, this._launchpadProvider)));
Expand Down Expand Up @@ -387,11 +386,6 @@ export class Container {
return this._accountAuthentication;
}

private readonly _accountView: WebviewViewProxy<[]>;
get accountView() {
return this._accountView;
}

private readonly _actionRunners: ActionRunners;
get actionRunners() {
return this._actionRunners;
Expand Down Expand Up @@ -628,7 +622,7 @@ export class Container {
return this._graphView;
}

private readonly _homeView: WebviewViewProxy<[]>;
private readonly _homeView: WebviewViewProxy<HomeWebviewShowingArgs>;
get homeView() {
return this._homeView;
}
Expand Down
2 changes: 1 addition & 1 deletion src/plus/gk/account/subscriptionService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -640,7 +640,7 @@ export class SubscriptionService implements Disposable {
async showAccountView(silent: boolean = false): Promise<void> {
if (silent && !configuration.get('plusFeatures.enabled', undefined, true)) return;

if (!this.container.accountView.visible) {
if (!this.container.homeView.visible) {
await executeCommand(Commands.ShowAccountView);
}
}
Expand Down
130 changes: 0 additions & 130 deletions src/plus/webviews/account/accountWebview.ts

This file was deleted.

24 changes: 0 additions & 24 deletions src/plus/webviews/account/protocol.ts

This file was deleted.

24 changes: 0 additions & 24 deletions src/plus/webviews/account/registration.ts

This file was deleted.

3 changes: 2 additions & 1 deletion src/webviews/apps/home/components/feature-nav.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { consume } from '@lit/context';
import { css, html } from 'lit';
import { customElement, property, state } from 'lit/decorators.js';
import { when } from 'lit/directives/when.js';
import type { Source } from '../../../../constants.telemetry';
import type { State } from '../../../home/protocol';
import { GlElement } from '../../shared/components/element';
import { linkBase } from '../../shared/components/styles/lit/base.css';
Expand All @@ -13,7 +14,7 @@ export class GlFeatureNav extends GlElement {
static override styles = [linkBase, homeBaseStyles, navListStyles, css``];

@property({ type: Object })
private badgeSource = { source: 'home', detail: 'badge' };
private badgeSource: Source = { source: 'home', detail: 'badge' };

@consume<State>({ context: stateContext, subscribe: true })
@state()
Expand Down
Loading
Loading