Przeglądaj źródła

Adds "discovered" repo sort & makes it default

Ensures that "lastFetched" sort updates the views properly
Moves sorting settings to a new "Sorting" section
main
Eric Amodio 1 rok temu
rodzic
commit
d641c49286
20 zmienionych plików z 223 dodań i 239 usunięć
  1. +2
    -0
      CHANGELOG.md
  2. +1
    -0
      README.md
  3. +92
    -84
      package.json
  4. +1
    -1
      src/config.ts
  5. +30
    -28
      src/git/models/repository.ts
  6. +2
    -1
      src/views/branchesView.ts
  7. +2
    -1
      src/views/commitsView.ts
  8. +2
    -1
      src/views/contributorsView.ts
  9. +3
    -1
      src/views/nodes/abstract/repositoryFolderNode.ts
  10. +2
    -1
      src/views/remotesView.ts
  11. +2
    -1
      src/views/stashesView.ts
  12. +2
    -1
      src/views/tagsView.ts
  13. +2
    -1
      src/views/worktreesView.ts
  14. +70
    -0
      src/webviews/apps/settings/partials/sorting.html
  15. +0
    -14
      src/webviews/apps/settings/partials/views.branches.html
  16. +0
    -16
      src/webviews/apps/settings/partials/views.contributors.html
  17. +0
    -14
      src/webviews/apps/settings/partials/views.remotes.html
  18. +0
    -60
      src/webviews/apps/settings/partials/views.repositories.html
  19. +0
    -14
      src/webviews/apps/settings/partials/views.tags.html
  20. +10
    -0
      src/webviews/apps/settings/settings.html

+ 2
- 0
CHANGELOG.md Wyświetl plik

@ -20,6 +20,8 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p
- Improves the experience of the _Search Commits_ quick pick menu
- Adds a stateful authors picker to make it much easier to search for commits by specific authors
- Adds a file and folder picker to make it much easier to search for commits containing specific files or in specific folders
- Adds ability to sort repositories in the views and quick pick menus — closes [#2836](https://github.com/gitkraken/vscode-gitlens/issues/2836) thanks to [PR #2991](https://github.com/gitkraken/vscode-gitlens/pull/2991)
- Adds a `gitlens.sortRepositoriesBy` setting to specify how repositories are sorted in quick pick menus and viewsby Aidos Kanapyanov ([@aidoskanapyanov](https://github.com/aidoskanapyanov))
- Adds a _[Show|Hide] Merge Commits_ toggle to the Commits\_ view — closes [#1399](https://github.com/gitkraken/vscode-gitlens/issues/1399) thanks to [PR #1540](https://github.com/gitkraken/vscode-gitlens/pull/1540) by Shashank Shastri ([@Shashank-Shastri](https://github.com/Shashank-Shastri))
- Adds a _Filter Commits by Author..._ commands to the _Commits_ view and comparisons context menus to filter commits in the _Commits_ view by specific authors
- Adds an _Open Comparison on Remote_ command to comparisons in views

+ 1
- 0
README.md Wyświetl plik

@ -361,6 +361,7 @@ A big thanks to the people that have contributed to this project 🙏❤️:
- jogo- ([@jogo-](https://github.com/jogo-)) — [contributions](https://github.com/gitkraken/vscode-gitlens/commits?author=jogo-)
- Nils K ([@septatrix](https://github.com/septatrix)) — [contributions](https://github.com/gitkraken/vscode-gitlens/commits?author=septatrix)
- Chris Kaczor ([@ckaczor](https://github.com/ckaczor)) — [contributions](https://github.com/gitkraken/vscode-gitlens/commits?author=ckaczor)
- Aidos Kanapyanov ([@aidoskanapyanov](https://github.com/aidoskanapyanov)) — [contributions](https://github.com/gitkraken/vscode-gitlens/commits?author=aidoskanapyanov)
- Allan Karlson ([@bees4ever](https://github.com/bees4ever)) — [contributions](https://github.com/gitkraken/vscode-gitlens/commits?author=bees4ever)
- Nafiur Rahman Khadem ([@ShafinKhadem](https://github.com/ShafinKhadem)) — [contributions](https://github.com/gitkraken/vscode-gitlens/commits?author=ShafinKhadem)
- Mathew King ([@MathewKing](https://github.com/MathewKing)) — [contributions](https://github.com/gitkraken/vscode-gitlens/commits?author=MathewKing)

+ 92
- 84
package.json Wyświetl plik

@ -1292,25 +1292,6 @@
"scope": "window",
"order": 30
},
"gitlens.sortBranchesBy": {
"type": "string",
"default": "date:desc",
"enum": [
"date:desc",
"date:asc",
"name:asc",
"name:desc"
],
"enumDescriptions": [
"Sorts branches by the most recent commit date in descending order",
"Sorts branches by the most recent commit date in ascending order",
"Sorts branches by name in ascending order",
"Sorts branches by name in descending order"
],
"markdownDescription": "Specifies how branches are sorted in quick pick menus and views",
"scope": "window",
"order": 40
},
"gitlens.views.branches.files.layout": {
"type": "string",
"default": "auto",
@ -1556,25 +1537,6 @@
"scope": "window",
"order": 10
},
"gitlens.sortTagsBy": {
"type": "string",
"default": "date:desc",
"enum": [
"date:desc",
"date:asc",
"name:asc",
"name:desc"
],
"enumDescriptions": [
"Sorts tags by date in descending order",
"Sorts tags by date in ascending order",
"Sorts tags by name in ascending order",
"Sorts tags by name in descending order"
],
"markdownDescription": "Specifies how tags are sorted in quick pick menus and views",
"scope": "window",
"order": 20
},
"gitlens.views.tags.files.layout": {
"type": "string",
"default": "auto",
@ -1811,49 +1773,6 @@
"scope": "window",
"order": 31
},
"gitlens.sortContributorsBy": {
"type": "string",
"default": "count:desc",
"enum": [
"count:desc",
"count:asc",
"date:desc",
"date:asc",
"name:asc",
"name:desc"
],
"enumDescriptions": [
"Sorts contributors by commit count in descending order",
"Sorts contributors by commit count in ascending order",
"Sorts contributors by the most recent commit date in descending order",
"Sorts contributors by the most recent commit date in ascending order",
"Sorts contributors by name in ascending order",
"Sorts contributors by name in descending order"
],
"markdownDescription": "Specifies how contributors are sorted in quick pick menus and views",
"scope": "window",
"order": 40
},
"gitlens.sortRepositoriesBy": {
"type": "string",
"default": "lastFetched:desc",
"enum": [
"name:asc",
"name:desc",
"lastFetched:asc",
"lastFetched:desc"
],
"enumDescriptions": [
"Sorts repositories by name in ascending order",
"Sorts repositories by name in descending order",
"Sorts repositories by last fetched date in ascending order",
"Sorts repositories by last fetched date in descending order",
"Sorts repositories by starred first"
],
"markdownDescription": "Specifies how repositories are sorted in quick pick menus and views",
"scope": "window",
"order": 41
},
"gitlens.views.contributors.files.layout": {
"type": "string",
"default": "auto",
@ -3324,9 +3243,98 @@
}
},
{
"id": "sorting",
"title": "Sorting",
"order": 121,
"properties": {
"gitlens.sortRepositoriesBy": {
"type": "string",
"default": "discovered",
"enum": [
"discovered",
"lastFetched:desc",
"lastFetched:asc",
"name:asc",
"name:desc"
],
"enumDescriptions": [
"Sorts repositories by discovery or workspace order",
"Sorts repositories by last fetched date in descending order",
"Sorts repositories by last fetched date in ascending order",
"Sorts repositories by name in ascending order",
"Sorts repositories by name in descending order"
],
"markdownDescription": "Specifies how repositories are sorted in quick pick menus and views",
"scope": "window",
"order": 10
},
"gitlens.sortBranchesBy": {
"type": "string",
"default": "date:desc",
"enum": [
"date:desc",
"date:asc",
"name:asc",
"name:desc"
],
"enumDescriptions": [
"Sorts branches by the most recent commit date in descending order",
"Sorts branches by the most recent commit date in ascending order",
"Sorts branches by name in ascending order",
"Sorts branches by name in descending order"
],
"markdownDescription": "Specifies how branches are sorted in quick pick menus and views",
"scope": "window",
"order": 20
},
"gitlens.sortTagsBy": {
"type": "string",
"default": "date:desc",
"enum": [
"date:desc",
"date:asc",
"name:asc",
"name:desc"
],
"enumDescriptions": [
"Sorts tags by date in descending order",
"Sorts tags by date in ascending order",
"Sorts tags by name in ascending order",
"Sorts tags by name in descending order"
],
"markdownDescription": "Specifies how tags are sorted in quick pick menus and views",
"scope": "window",
"order": 30
},
"gitlens.sortContributorsBy": {
"type": "string",
"default": "count:desc",
"enum": [
"count:desc",
"count:asc",
"date:desc",
"date:asc",
"name:asc",
"name:desc"
],
"enumDescriptions": [
"Sorts contributors by commit count in descending order",
"Sorts contributors by commit count in ascending order",
"Sorts contributors by the most recent commit date in descending order",
"Sorts contributors by the most recent commit date in ascending order",
"Sorts contributors by name in ascending order",
"Sorts contributors by name in descending order"
],
"markdownDescription": "Specifies how contributors are sorted in quick pick menus and views",
"scope": "window",
"order": 40
}
}
},
{
"id": "menus-toolbars",
"title": "Menus & Toolbars",
"order": 121,
"order": 122,
"properties": {
"gitlens.menus": {
"anyOf": [
@ -3701,7 +3709,7 @@
{
"id": "keyboard",
"title": "Keyboard Shortcuts",
"order": 122,
"order": 123,
"properties": {
"gitlens.keymap": {
"type": "string",
@ -3725,7 +3733,7 @@
{
"id": "modes",
"title": "Modes",
"order": 123,
"order": 124,
"properties": {
"gitlens.mode.statusBar.enabled": {
"type": "boolean",

+ 1
- 1
src/config.ts Wyświetl plik

@ -248,7 +248,7 @@ export const enum CodeLensCommand {
export type CodeLensScopes = 'document' | 'containers' | 'blocks';
export type ContributorSorting = 'count:desc' | 'count:asc' | 'date:desc' | 'date:asc' | 'name:asc' | 'name:desc';
export type RepositoriesSorting = 'name:asc' | 'name:desc' | 'lastFetched:asc' | 'lastFetched:desc';
export type RepositoriesSorting = 'discovered' | 'lastFetched:desc' | 'lastFetched:asc' | 'name:asc' | 'name:desc';
export type CustomRemoteType =
| 'AzureDevOps'
| 'Bitbucket'

+ 30
- 28
src/git/models/repository.ts Wyświetl plik

@ -72,9 +72,7 @@ export const enum RepositoryChange {
Remotes = 5,
Worktrees = 6,
Config = 7,
/*
* Union of Cherry, Merge, and Rebase
*/
/** Union of Cherry, Merge, and Rebase */
Status = 8,
CherryPick = 9,
Merge = 10,
@ -90,7 +88,6 @@ export const enum RepositoryChange {
export const enum RepositoryChangeComparisonMode {
Any,
All,
Exclusive,
}
@ -194,20 +191,18 @@ export class Repository implements Disposable {
(a, b) => (a.starred ? -1 : 1) - (b.starred ? -1 : 1) || sortCompare(b.name, a.name),
);
case 'lastFetched:asc':
return repositories.sort((a, b) => {
if (typeof a._lastFetched === 'undefined' && typeof b._lastFetched === 'undefined') return 0;
else if (typeof a._lastFetched === 'undefined') return 1;
else if (typeof b._lastFetched === 'undefined') return -1;
return (a.starred ? -1 : 1) - (b.starred ? -1 : 1) || a._lastFetched - b._lastFetched;
});
return repositories.sort(
(a, b) =>
(a.starred ? -1 : 1) - (b.starred ? -1 : 1) || (a._lastFetched ?? 0) - (b._lastFetched ?? 0),
);
case 'lastFetched:desc':
return repositories.sort(
(a, b) =>
(a.starred ? -1 : 1) - (b.starred ? -1 : 1) || (b._lastFetched ?? 0) - (a._lastFetched ?? 0),
);
case 'discovered':
default:
return repositories.sort((a, b) => {
if (typeof a._lastFetched === 'undefined' && typeof b._lastFetched === 'undefined') return 0;
else if (typeof a._lastFetched === 'undefined') return 1;
else if (typeof b._lastFetched === 'undefined') return -1;
return (a.starred ? -1 : 1) - (b.starred ? -1 : 1) || b._lastFetched - a._lastFetched;
});
return repositories;
}
}
@ -301,6 +296,9 @@ export class Repository implements Disposable {
);
this.onConfigurationChanged();
if (this._orderByLastFetched) {
void this.getLastFetched();
}
}
private setupRepoWatchers() {
@ -388,12 +386,21 @@ export class Repository implements Disposable {
return this._updatedAt;
}
private _orderByLastFetched = false;
get orderByLastFetched(): boolean {
return this._orderByLastFetched;
}
private _updatedAt: number = 0;
get updatedAt(): number {
return this._updatedAt;
}
private onConfigurationChanged(e?: ConfigurationChangeEvent) {
if (configuration.changed(e, 'sortRepositoriesBy')) {
this._orderByLastFetched = configuration.get('sortRepositoriesBy')?.startsWith('lastFetched:') ?? false;
}
if (e != null && configuration.changed(e, 'remotes', this.folder?.uri)) {
this.resetCaches('remotes');
this.fireChange(RepositoryChange.Remotes);
@ -421,6 +428,9 @@ export class Repository implements Disposable {
}
this._lastFetched = undefined;
if (this._orderByLastFetched) {
void this.getLastFetched();
}
const match =
uri != null
@ -684,18 +694,10 @@ export class Repository implements Disposable {
private _lastFetched: number | undefined;
@gate()
async getLastFetched(): Promise<number> {
if (this._lastFetched == null) {
if (!(await this.hasRemotes())) return 0;
}
try {
const lastFetched = await this.container.git.getLastFetchedTimestamp(this.uri);
// If we don't get a number, assume the fetch failed, and don't update the timestamp
if (lastFetched != null) {
this._lastFetched = lastFetched;
}
} catch {
this._lastFetched = undefined;
const lastFetched = await this.container.git.getLastFetchedTimestamp(this.uri);
// If we don't get a number, assume the fetch failed, and don't update the timestamp
if (lastFetched != null) {
this._lastFetched = lastFetched;
}
return this._lastFetched ?? 0;

+ 2
- 1
src/views/branchesView.ts Wyświetl plik

@ -178,7 +178,8 @@ export class BranchesView extends ViewBase<'branches', BranchesViewNode, Branche
!configuration.changed(e, 'defaultDateStyle') &&
!configuration.changed(e, 'defaultGravatarsStyle') &&
!configuration.changed(e, 'defaultTimeFormat') &&
!configuration.changed(e, 'sortBranchesBy')
!configuration.changed(e, 'sortBranchesBy') &&
!configuration.changed(e, 'sortRepositoriesBy')
) {
return false;
}

+ 2
- 1
src/views/commitsView.ts Wyświetl plik

@ -300,7 +300,8 @@ export class CommitsView extends ViewBase<'commits', CommitsViewNode, CommitsVie
!configuration.changed(e, 'defaultDateStyle') &&
!configuration.changed(e, 'defaultGravatarsStyle') &&
!configuration.changed(e, 'defaultTimeFormat') &&
!configuration.changed(e, 'plusFeatures.enabled')
!configuration.changed(e, 'plusFeatures.enabled') &&
!configuration.changed(e, 'sortRepositoriesBy')
) {
return false;
}

+ 2
- 1
src/views/contributorsView.ts Wyświetl plik

@ -197,7 +197,8 @@ export class ContributorsView extends ViewBase<'contributors', ContributorsViewN
!configuration.changed(e, 'defaultDateStyle') &&
!configuration.changed(e, 'defaultGravatarsStyle') &&
!configuration.changed(e, 'defaultTimeFormat') &&
!configuration.changed(e, 'sortContributorsBy')
!configuration.changed(e, 'sortContributorsBy') &&
!configuration.changed(e, 'sortRepositoriesBy')
) {
return false;
}

+ 3
- 1
src/views/nodes/abstract/repositoryFolderNode.ts Wyświetl plik

@ -207,7 +207,9 @@ export abstract class RepositoryFolderNode<
}
if (this.changed(e)) {
void (this.loaded ? this : this.parent ?? this).triggerChange(true);
// If we are sorting by last fetched, then we need to trigger the parent to resort
const node = !this.loaded || this.repo.orderByLastFetched ? this.parent ?? this : this;
void node.triggerChange(true);
}
}
}

+ 2
- 1
src/views/remotesView.ts Wyświetl plik

@ -170,7 +170,8 @@ export class RemotesView extends ViewBase<'remotes', RemotesViewNode, RemotesVie
!configuration.changed(e, 'defaultGravatarsStyle') &&
!configuration.changed(e, 'defaultTimeFormat') &&
!configuration.changed(e, 'integrations.enabled') &&
!configuration.changed(e, 'sortBranchesBy')
!configuration.changed(e, 'sortBranchesBy') &&
!configuration.changed(e, 'sortRepositoriesBy')
) {
return false;
}

+ 2
- 1
src/views/stashesView.ts Wyświetl plik

@ -140,7 +140,8 @@ export class StashesView extends ViewBase<'stashes', StashesViewNode, StashesVie
!configuration.changed(e, 'defaultDateSource') &&
!configuration.changed(e, 'defaultDateStyle') &&
!configuration.changed(e, 'defaultGravatarsStyle') &&
!configuration.changed(e, 'defaultTimeFormat')
!configuration.changed(e, 'defaultTimeFormat') &&
!configuration.changed(e, 'sortRepositoriesBy')
) {
return false;
}

+ 2
- 1
src/views/tagsView.ts Wyświetl plik

@ -146,7 +146,8 @@ export class TagsView extends ViewBase<'tags', TagsViewNode, TagsViewConfig> {
!configuration.changed(e, 'defaultDateStyle') &&
!configuration.changed(e, 'defaultGravatarsStyle') &&
!configuration.changed(e, 'defaultTimeFormat') &&
!configuration.changed(e, 'sortTagsBy')
!configuration.changed(e, 'sortTagsBy') &&
!configuration.changed(e, 'sortRepositoriesBy')
) {
return false;
}

+ 2
- 1
src/views/worktreesView.ts Wyświetl plik

@ -212,7 +212,8 @@ export class WorktreesView extends ViewBase<'worktrees', WorktreesViewNode, Work
!configuration.changed(e, 'defaultDateSource') &&
!configuration.changed(e, 'defaultDateStyle') &&
!configuration.changed(e, 'defaultGravatarsStyle') &&
!configuration.changed(e, 'defaultTimeFormat')
!configuration.changed(e, 'defaultTimeFormat') &&
!configuration.changed(e, 'sortRepositoriesBy')
// !configuration.changed(e, 'sortWorktreesBy')
) {
return false;

+ 70
- 0
src/webviews/apps/settings/partials/sorting.html Wyświetl plik

@ -0,0 +1,70 @@
<section id="views" class="section--settings section--collapsible">
<div class="section__header">
<h2>Sorting</h2>
</div>
<div class="section__collapsible">
<div class="section__group">
<div class="section__content">
<div class="setting">
<div class="setting__input">
<label for="sortRepositoriesBy">Sort repositories</label>
<div class="select-container">
<select id="sortRepositoriesBy" name="sortRepositoriesBy" data-setting>
<option value="dcovered">by discovery or workspace order</option>
<option value="lastFetched:desc">by last fetched date, descending</option>
<option value="lastFetched:asc">by last fetched date, ascending</option>
<option value="name:asc">by name, ascending</option>
<option value="name:desc">by name, descending</option>
</select>
</div>
</div>
</div>
<div class="setting">
<div class="setting__input">
<label for="sortBranchesBy">Sort branches</label>
<div class="select-container">
<select id="sortBranchesBy" name="sortBranchesBy" data-setting>
<option value="date:desc">by recent commit date, descending</option>
<option value="date:asc">by recent commit date, ascending</option>
<option value="name:asc">by name, ascending</option>
<option value="name:desc">by name, descending</option>
</select>
</div>
</div>
</div>
<div class="setting">
<div class="setting__input">
<label for="sortTagsBy">Sort tags</label>
<div class="select-container">
<select id="sortTagsBy" name="sortTagsBy" data-setting>
<option value="date:desc">by recent commit date, descending</option>
<option value="date:asc">by recent commit date, ascending</option>
<option value="name:asc">by name, ascending</option>
<option value="name:desc">by name, descending</option>
</select>
</div>
</div>
</div>
<div class="setting">
<div class="setting__input">
<label for="sortContributorsBy">Sort contributors</label>
<div class="select-container">
<select id="sortContributorsBy" name="sortContributorsBy" data-setting>
<option value="count:desc">by commit count, descending</option>
<option value="count:asc">by commit count, ascending</option>
<option value="date:desc">by recent commit date, descending</option>
<option value="date:asc">by recent commit date, ascending</option>
<option value="name:asc">by name, ascending</option>
<option value="name:desc">by name, descending</option>
</select>
</div>
</div>
</div>
</div>
</div>
</div>
</section>

+ 0
- 14
src/webviews/apps/settings/partials/views.branches.html Wyświetl plik

@ -112,20 +112,6 @@
<div class="setting">
<div class="setting__input">
<label for="sortBranchesBy">Sort branches</label>
<div class="select-container">
<select id="sortBranchesBy" name="sortBranchesBy" data-setting>
<option value="date:desc">by recent commit date, descending</option>
<option value="date:asc">by recent commit date, ascending</option>
<option value="name:asc">by name, ascending</option>
<option value="name:desc">by name, descending</option>
</select>
</div>
</div>
</div>
<div class="setting">
<div class="setting__input">
<label for="views.branches.files.layout">Layout files</label>
<div class="select-container">
<select

+ 0
- 16
src/webviews/apps/settings/partials/views.contributors.html Wyświetl plik

@ -80,22 +80,6 @@
<div class="setting">
<div class="setting__input">
<label for="sortContributorsBy">Sort contributors</label>
<div class="select-container">
<select id="sortContributorsBy" name="sortContributorsBy" data-setting>
<option value="count:desc">by commit count, descending</option>
<option value="count:asc">by commit count, ascending</option>
<option value="date:desc">by recent commit date, descending</option>
<option value="date:asc">by recent commit date, ascending</option>
<option value="name:asc">by name, ascending</option>
<option value="name:desc">by name, descending</option>
</select>
</div>
</div>
</div>
<div class="setting">
<div class="setting__input">
<label for="views.contributors.files.layout">Layout files</label>
<div class="select-container">
<select

+ 0
- 14
src/webviews/apps/settings/partials/views.remotes.html Wyświetl plik

@ -97,20 +97,6 @@
<div class="setting">
<div class="setting__input">
<label for="sortBranchesBy">Sort branches</label>
<div class="select-container">
<select id="sortBranchesBy" name="sortBranchesBy" data-setting>
<option value="date:desc">by recent commit date, descending</option>
<option value="date:asc">by recent commit date, ascending</option>
<option value="name:asc">by name, ascending</option>
<option value="name:desc">by name, descending</option>
</select>
</div>
</div>
</div>
<div class="setting">
<div class="setting__input">
<label for="views.remotes.files.layout">Layout files</label>
<div class="select-container">
<select id="views.remotes.files.layout" name="views.remotes.files.layout" data-setting>

+ 0
- 60
src/webviews/apps/settings/partials/views.repositories.html Wyświetl plik

@ -330,66 +330,6 @@
</div>
<p class="setting__hint">Compacts (flattens) unnecessary nesting when using a tree layouts</p>
</div>
<div class="setting">
<div class="setting__input">
<label for="sortBranchesBy">Sort branches</label>
<div class="select-container">
<select id="sortBranchesBy" name="sortBranchesBy" data-setting>
<option value="date:desc">by recent commit date, descending</option>
<option value="date:asc">by recent commit date, ascending</option>
<option value="name:asc">by name, ascending</option>
<option value="name:desc">by name, descending</option>
</select>
</div>
</div>
</div>
<div class="setting">
<div class="setting__input">
<label for="sortContributorsBy">Sort contributors</label>
<div class="select-container">
<select id="sortContributorsBy" name="sortContributorsBy" data-setting>
<option value="count:desc">by commit count, descending</option>
<option value="count:asc">by commit count, ascending</option>
<option value="date:desc">by recent commit date, descending</option>
<option value="date:asc">by recent commit date, ascending</option>
<option value="name:asc">by name, ascending</option>
<option value="name:desc">by name, descending</option>
</select>
</div>
</div>
</div>
<div class="setting">
<div class="setting__input">
<label for="sortTagsBy">Sort tags</label>
<div class="select-container">
<select id="sortTagsBy" name="sortTagsBy" data-setting>
<option value="date:desc">by recent commit date, descending</option>
<option value="date:asc">by recent commit date, ascending</option>
<option value="name:asc">by name, ascending</option>
<option value="name:desc">by name, descending</option>
</select>
</div>
</div>
</div>
<div class="setting">
<div class="setting__input">
<label for="sortRepositoriesBy">Sort repositories</label>
<div class="select-container">
<select id="sortRepositoriesBy" name="sortRepositoriesBy" data-setting>
<option value="name:asc">by name, ascending</option>
<option value="name:desc">by name, descending</option>
<option value="lastFetched:asc">by last fetched date, ascending</option>
<option value="lastFetched:desc">by last fetched date, descending</option>
<option value="starredFirst">by starred first</option>
</select>
</div>
</div>
</div>
</div>
</div>
<div class="section__preview">

+ 0
- 14
src/webviews/apps/settings/partials/views.tags.html Wyświetl plik

@ -38,20 +38,6 @@
<div class="setting">
<div class="setting__input">
<label for="sortTagsBy">Sort tags</label>
<div class="select-container">
<select id="sortTagsBy" name="sortTagsBy" data-setting>
<option value="date:desc">by recent commit date, descending</option>
<option value="date:asc">by recent commit date, ascending</option>
<option value="name:asc">by name, ascending</option>
<option value="name:desc">by name, descending</option>
</select>
</div>
</div>
</div>
<div class="setting">
<div class="setting__input">
<label for="views.tags.files.layout">Layout files</label>
<div class="select-container">
<select id="views.tags.files.layout" name="views.tags.files.layout" data-setting>

+ 10
- 0
src/webviews/apps/settings/settings.html Wyświetl plik

@ -100,6 +100,7 @@
<%= require('html-loader?{"esModule":false}!./partials/autolinks.html') %>
<%= require('html-loader?{"esModule":false}!./partials/terminal-links.html') %>
<%= require('html-loader?{"esModule":false}!./partials/dates.html') %>
<%= require('html-loader?{"esModule":false}!./partials/sorting.html') %>
<%= require('html-loader?{"esModule":false}!./partials/menus.html') %>
<%= require('html-loader?{"esModule":false}!./partials/shortcuts.html') %>
<%= require('html-loader?{"esModule":false}!./partials/modes.html') %>
@ -331,6 +332,15 @@
<a
class="sidebar__jump-link"
data-action="jump"
href="#views"
title="Jump to Sorting settings"
>Sorting</a
>
</li>
<li>
<a
class="sidebar__jump-link"
data-action="jump"
href="#menus"
title="Jump to Menus & Toolbars settings"
>Menus & Toolbars</a

Ładowanie…
Anuluj
Zapisz