mirror of
https://github.com/ckaczor/vscode-gitlens.git
synced 2026-02-09 01:32:40 -05:00
Adds helpful placeholder text to repo quickpick
Moves show all quickpick item to be first
This commit is contained in:
@@ -48,7 +48,7 @@ export class ShowAllCommitsQuickPickItem implements QuickPickItem {
|
|||||||
detail: string;
|
detail: string;
|
||||||
|
|
||||||
constructor(maxItems: number) {
|
constructor(maxItems: number) {
|
||||||
this.label = `Show All Commits`;
|
this.label = `\u21BB Show All Commits`;
|
||||||
this.description = `\u2014 Currently only showing the first ${maxItems} commits`;
|
this.description = `\u2014 Currently only showing the first ${maxItems} commits`;
|
||||||
this.detail = `This may take a while`;
|
this.detail = `This may take a while`;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -47,10 +47,11 @@ export default class ShowQuickRepoHistoryCommand extends Command {
|
|||||||
if (!log) return window.showWarningMessage(`Unable to show repository history`);
|
if (!log) return window.showWarningMessage(`Unable to show repository history`);
|
||||||
|
|
||||||
const commits = Array.from(Iterables.map(log.commits.values(), c => new CommitQuickPickItem(c, ` \u2014 ${c.fileName}`))) as QuickPickItem[];
|
const commits = Array.from(Iterables.map(log.commits.values(), c => new CommitQuickPickItem(c, ` \u2014 ${c.fileName}`))) as QuickPickItem[];
|
||||||
let placeHolder = '';
|
let placeHolder = 'Search by commit message, filename, or sha';
|
||||||
if (maxCount !== 0 && commits.length === this.git.config.advanced.maxQuickHistory) {
|
if (maxCount !== 0 && commits.length === this.git.config.advanced.maxQuickHistory) {
|
||||||
placeHolder = `Only showing the first ${this.git.config.advanced.maxQuickHistory} commits`;
|
// placeHolder += `; Only showing the first ${this.git.config.advanced.maxQuickHistory} commits`;
|
||||||
commits.push(new ShowAllCommitsQuickPickItem(this.git.config.advanced.maxQuickHistory));
|
// commits.push(new ShowAllCommitsQuickPickItem(this.git.config.advanced.maxQuickHistory));
|
||||||
|
commits.splice(0, 0, new ShowAllCommitsQuickPickItem(this.git.config.advanced.maxQuickHistory));
|
||||||
}
|
}
|
||||||
|
|
||||||
let pick: QuickPickItem;
|
let pick: QuickPickItem;
|
||||||
|
|||||||
Reference in New Issue
Block a user