@noldova/git.window 0.0.17 → 0.0.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +10 -10
- package/src/api/index.d.ts +53 -4
- package/src/api/index.js +1 -0
- package/src/api/index.js.map +1 -1
- package/src/app/components/git-account-dialog/git-account-dialog.component.js +3 -3
- package/src/app/components/git-accounts/git-accounts.component.js +3 -3
- package/src/app/components/git-agents/git-agents.component.js +3 -3
- package/src/app/components/git-branch-card/git-branch-card.component.js +3 -3
- package/src/app/components/git-branch-drop/git-branch-drop.component.js +3 -3
- package/src/app/components/git-bulk-branch-dialog/git-bulk-branch-dialog.component.js +3 -3
- package/src/app/components/git-bulk-push-dialog/git-bulk-push-dialog.component.js +3 -3
- package/src/app/components/git-clone-dialog/git-clone-dialog.component.js +6 -10
- package/src/app/components/git-clone-dialog/git-clone-dialog.component.js.map +1 -1
- package/src/app/components/git-command-log/git-command-log.component.js +3 -3
- package/src/app/components/git-commit-card/git-commit-card.component.js +3 -3
- package/src/app/components/git-commit-detail/git-commit-detail.component.js +3 -3
- package/src/app/components/git-commit-detail-view/git-commit-detail-view.component.js +3 -3
- package/src/app/components/git-commit-document/git-commit-document.component.js +3 -3
- package/src/app/components/git-conflict-detail/git-conflict-detail.component.js +3 -3
- package/src/app/components/git-conflicts/git-conflicts.component.js +5 -5
- package/src/app/components/git-conflicts/git-conflicts.component.js.map +1 -1
- package/src/app/components/git-dashboard/git-dashboard.component.js +3 -3
- package/src/app/components/git-diff-files/git-diff-files.component.js +3 -3
- package/src/app/components/git-discard-dialog/git-discard-dialog.component.js +3 -3
- package/src/app/components/git-file-group/git-file-group.component.js +3 -3
- package/src/app/components/git-file-layout-button/git-file-layout-button.component.js +3 -3
- package/src/app/components/git-force-push-dialog/git-force-push-dialog.component.js +3 -3
- package/src/app/components/git-history/git-history.component.js +29 -15
- package/src/app/components/git-history/git-history.component.js.map +1 -1
- package/src/app/components/git-host-row/git-host-row.component.js +3 -3
- package/src/app/components/git-person-avatar/git-person-avatar.component.js +3 -3
- package/src/app/components/git-pull-request-commits/git-pull-request-commits.component.js +3 -3
- package/src/app/components/git-pull-request-conflicts/git-pull-request-conflicts.component.js +3 -3
- package/src/app/components/git-pull-request-files/git-pull-request-files.component.js +3 -3
- package/src/app/components/git-pull-request-threads/git-pull-request-threads.component.js +11 -12
- package/src/app/components/git-pull-request-threads/git-pull-request-threads.component.js.map +1 -1
- package/src/app/components/git-pull-requests/git-pull-requests.component.js +3 -3
- package/src/app/components/git-rebase/git-rebase.component.js +3 -3
- package/src/app/components/git-rebase-preview/git-rebase-preview.component.js +3 -3
- package/src/app/components/git-reference-text/git-reference-text.component.js +3 -3
- package/src/app/components/git-repository/git-repository.component.js +19 -17
- package/src/app/components/git-repository/git-repository.component.js.map +1 -1
- package/src/app/components/git-repository-scan-dialog/git-repository-scan-dialog.component.js +3 -3
- package/src/app/components/git-switch-merge-dialog/git-switch-merge-dialog.component.js +3 -3
- package/src/app/components/git-undo-menu/git-undo-menu.component.js +3 -3
- package/src/app/components/git-view/git-view.component.js +4 -17
- package/src/app/components/git-view/git-view.component.js.map +1 -1
- package/src/app/components/git-workspace/git-visible.directive.js +3 -3
- package/src/app/components/git-workspace/git-workspace.component.js +59 -7
- package/src/app/components/git-workspace/git-workspace.component.js.map +1 -1
- package/src/app/components/git-workspace-across/git-workspace-across.component.js +3 -3
- package/src/app/components/git-workspace-across-view/git-workspace-across-view.component.js +3 -3
- package/src/app/components/git-workspaces/git-workspaces.component.js +4 -4
- package/src/app/enums/git-workspace-column.js +19 -0
- package/src/app/enums/git-workspace-column.js.map +1 -0
- package/src/app/models/git-force-push-offer.js +20 -3
- package/src/app/models/git-force-push-offer.js.map +1 -1
- package/src/app/models/git-workspace-header.js +31 -0
- package/src/app/models/git-workspace-header.js.map +1 -0
- package/src/app/models/git-workspace-overview.js +11 -0
- package/src/app/models/git-workspace-overview.js.map +1 -1
- package/src/app/models/git-workspace-page-sort.js +32 -0
- package/src/app/models/git-workspace-page-sort.js.map +1 -0
- package/src/app/models/git-workspace-row.js +7 -2
- package/src/app/models/git-workspace-row.js.map +1 -1
- package/src/app/models/git-workspace-sort.js +81 -0
- package/src/app/models/git-workspace-sort.js.map +1 -0
- package/src/app/services/git-action-notices.js +36 -0
- package/src/app/services/git-action-notices.js.map +1 -0
- package/src/app/services/git-code-colors.js +3 -3
- package/src/app/services/git-recent-repositories.js +18 -6
- package/src/app/services/git-recent-repositories.js.map +1 -1
- package/src/app/services/git-view-commands.js +46 -3
- package/src/app/services/git-view-commands.js.map +1 -1
- package/src/app/services/git-view-state.service.js +63 -75
- package/src/app/services/git-view-state.service.js.map +1 -1
- package/src/app/services/git-window-part.js +4 -1
- package/src/app/services/git-window-part.js.map +1 -1
- package/src/app/services/git-workspace-sorts.js +43 -0
- package/src/app/services/git-workspace-sorts.js.map +1 -0
- package/src/app/services/git-workspaces.js +3 -0
- package/src/app/services/git-workspaces.js.map +1 -1
- package/src/resources.js +49 -0
- package/src/resources.js.map +1 -1
|
@@ -26,7 +26,6 @@ import { GitViewStateService } from "../../services/git-view-state.service.js";
|
|
|
26
26
|
import { GitBranchCardComponent } from "../git-branch-card/git-branch-card.component.js";
|
|
27
27
|
import { GitCommitCardComponent } from "../git-commit-card/git-commit-card.component.js";
|
|
28
28
|
import { GitFileGroupComponent } from "../git-file-group/git-file-group.component.js";
|
|
29
|
-
import { GitForcePushDialogComponent } from "../git-force-push-dialog/git-force-push-dialog.component.js";
|
|
30
29
|
import { GitHostRowComponent } from "../git-host-row/git-host-row.component.js";
|
|
31
30
|
import { GitUndoMenuComponent } from "../git-undo-menu/git-undo-menu.component.js";
|
|
32
31
|
import * as i0 from "@angular/core";
|
|
@@ -91,18 +90,6 @@ export class GitViewComponent {
|
|
|
91
90
|
undoDiscard() {
|
|
92
91
|
void this.state.undoDiscardAsync().catch((error) => this.errors.handleError(error));
|
|
93
92
|
}
|
|
94
|
-
forcePush(offer) {
|
|
95
|
-
const dialog = this.dialogs.open(GitForcePushDialogComponent, ".cancel");
|
|
96
|
-
dialog.componentRef?.setInput("offer", offer);
|
|
97
|
-
dialog.componentInstance?.answered.subscribe(isForced => {
|
|
98
|
-
dialog.close();
|
|
99
|
-
if (isForced)
|
|
100
|
-
void this.state.forcePushAsync(offer);
|
|
101
|
-
});
|
|
102
|
-
}
|
|
103
|
-
fetch() {
|
|
104
|
-
void this.state.fetchAsync();
|
|
105
|
-
}
|
|
106
93
|
dismissFailure() {
|
|
107
94
|
this.state.failure.set(null);
|
|
108
95
|
}
|
|
@@ -159,12 +146,12 @@ export class GitViewComponent {
|
|
|
159
146
|
return null;
|
|
160
147
|
}
|
|
161
148
|
}
|
|
162
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.3.
|
|
163
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.3.0", type: GitViewComponent, isStandalone: true, selector: "nol-git-view", providers: [GitViewStateService], ngImport: i0, template: "<!--\n@license\nCopyright (c) Noldova.\n\nThis source code is licensed under the license found in the\nLICENSE file in the root directory of this source tree.\n-->\n\n@if (empty(); as empty) {\n <div class=\"empty\">\n <span class=\"empty-icon material-symbols-rounded\" aria-hidden=\"true\">{{ empty.icon }}</span>\n <h2 class=\"heading\">{{ empty.heading }}</h2>\n <p class=\"text\">{{ empty.text }}</p>\n @if (offersGit()) {\n <span class=\"actions\">\n <button nol-button type=\"button\" (click)=\"getGitAsync()\"><span nolButtonIcon class=\"material-symbols-rounded\" aria-hidden=\"true\">{{ resources.openLinkIcon }}</span>{{ resources.getGitLabel }}</button>\n <button nol-button type=\"button\" [variant]=\"secondary\" (click)=\"checkAgain()\">{{ resources.checkAgainLabel }}</button>\n </span>\n @if (linkFailed()) {\n <div class=\"notice link-failed\" role=\"alert\">\n <span class=\"notice-icon material-symbols-rounded\" aria-hidden=\"true\">{{ resources.failureIcon }}</span>\n <span class=\"notice-text\">{{ resources.linkNotOpened }}</span>\n </div>\n }\n }\n @if (look(); as folderLook) {\n <span class=\"actions\">\n <button nol-button type=\"button\" class=\"init-here\" [attr.aria-disabled]=\"folderLook.initializing()\" [attr.aria-busy]=\"folderLook.initializing()\"\n (click)=\"initAsync(folderLook)\">{{ resources.initHereLabel }}</button>\n @if (foundIn(folderLook); as scan) {\n <button nol-button type=\"button\" class=\"open-found\" [variant]=\"secondary\" [attr.aria-disabled]=\"folderLook.checking()\" [attr.aria-busy]=\"folderLook.checking()\"\n (click)=\"openFound(folderLook, scan)\">{{ resources.openFoundLabel }}</button>\n }\n </span>\n }\n </div>\n} @else if (state.status(); as status) {\n <div class=\"body\">\n @if (showsBranch()) {\n <nol-git-branch-card [status]=\"status\" />\n } @else {\n <div class=\"title\">\n <span class=\"title-text\">{{ resources.changesLabel }}</span>\n @if (switching() ?? status.branch; as branch) {\n <span class=\"title-branch\" [title]=\"branch\">{{ resources.formatOnBranch(branch) }}</span>\n }\n <nol-git-undo-menu class=\"title-undo\" />\n </div>\n }\n @if (status.remote; as remote) {\n <nol-git-host-row [remote]=\"remote\" [status]=\"status\" [folder]=\"state.folder() ?? ''\" />\n }\n @if (status.operation; as operation) {\n <div class=\"banner\" role=\"status\">\n <span class=\"banner-icon warning material-symbols-rounded\" aria-hidden=\"true\">{{ resources.mergeIcon }}</span>\n <span class=\"banner-text\">\n <span class=\"strong\">{{ operationOf(operation, status.branch) }}</span>\n <span class=\"muted\">{{ state.conflicts() === 0 ? resources.formatOperationReady(operation.kind) : resources.formatConflictText(state.conflicts()) }}</span>\n <span class=\"operation-actions\">\n @if (firstConflict(); as path) {\n <button nol-button type=\"button\" class=\"banner-action resolve-conflicts\" (click)=\"openConflict(state.folder() ?? '', path)\">{{ resources.resolveConflictsLabel }}</button>\n }\n <button nol-button type=\"button\" class=\"banner-action continue-operation\" [variant]=\"firstConflict() ? secondary : primary\" [disabled]=\"state.busy() || state.conflicts() > 0\"\n (click)=\"continueOperation()\">{{ resources.continueLabels[operation.kind] }}</button>\n @if (!operation.editStop && resources.skipLabels[operation.kind]; as skip) {\n <button nol-button type=\"button\" class=\"banner-action skip-operation\" [variant]=\"secondary\" [disabled]=\"state.busy()\" (click)=\"skipOperation()\">{{ skip }}</button>\n }\n <button nol-button type=\"button\" class=\"banner-action abort-operation\" [variant]=\"secondary\" (click)=\"abortOperation()\">{{ resources.abortLabels[operation.kind] }}</button>\n </span>\n </span>\n </div>\n }\n @if (state.watchFailure(); as watchFailure) {\n <div class=\"banner\" role=\"status\">\n <span class=\"banner-icon warning material-symbols-rounded\" aria-hidden=\"true\">{{ resources.watchFailedIcon }}</span>\n <span class=\"banner-text\">{{ watchFailure }}</span>\n <button nol-button type=\"button\" class=\"banner-action\" [variant]=\"secondary\" (click)=\"followAgain()\">{{ resources.checkAgainLabel }}</button>\n </div>\n }\n @if (state.failure(); as failure) {\n <div class=\"banner\" role=\"alert\">\n <span class=\"banner-icon failed material-symbols-rounded\" aria-hidden=\"true\">{{ resources.failureIcon }}</span>\n <span class=\"banner-text\">{{ failure }}</span>\n @if (state.forcePushOffer(); as offer) {\n <button nol-button type=\"button\" class=\"banner-action force-push\" [variant]=\"secondary\" [disabled]=\"state.busy()\" (click)=\"forcePush(offer)\">{{ resources.forcePushOfferLabel }}</button>\n }\n @if (state.fetchOffered()) {\n <button nol-button type=\"button\" class=\"banner-action fetch\" [variant]=\"secondary\" [disabled]=\"state.busy()\" (click)=\"fetch()\">{{ resources.fetchOfferLabel }}</button>\n }\n <button nol-button type=\"button\" class=\"banner-action\" [variant]=\"secondary\" (click)=\"dismissFailure()\">{{ resources.dismissLabel }}</button>\n </div>\n }\n @if (state.discarded(); as discarded) {\n <div class=\"banner discarded\" role=\"status\">\n <span class=\"banner-icon material-symbols-rounded\" aria-hidden=\"true\">{{ resources.discardedIcon }}</span>\n <span class=\"banner-text\">{{ resources.formatDiscarded(discarded.paths) }}</span>\n <button nol-button type=\"button\" class=\"banner-action undo\" [variant]=\"secondary\" [disabled]=\"state.busy()\" (click)=\"undoDiscard()\">{{ resources.undoLabel }}</button>\n <button nol-button type=\"button\" class=\"banner-action dismiss\" [variant]=\"secondary\" (click)=\"state.discarded.set(null)\">{{ resources.dismissLabel }}</button>\n </div>\n }\n @for (group of state.groups(); track group.kind) {\n <nol-git-file-group [group]=\"group\" (openConflict)=\"openConflict(state.folder() ?? '', $event)\" />\n } @empty {\n <p class=\"quiet\">{{ resources.noChanges }}</p>\n }\n @if (status.truncated) {\n <p class=\"quiet\">{{ resources.listCut }}</p>\n }\n @if (status.uncheckedLfsFiles > 0) {\n <p class=\"quiet lfs-unchecked\">{{ resources.formatUncheckedLfs(status.uncheckedLfsFiles) }}</p>\n }\n <nol-git-commit-card [status]=\"status\" />\n </div>\n} @else if (state.phase() === phases.Loading) {\n <div class=\"loading\"><nol-spinner [label]=\"resources.readingRepository\" [isDelayed]=\"true\" /></div>\n}\n", styles: ["/**\n * @license\n * Copyright (c) Noldova.\n *\n * This source code is licensed under the license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n:host {\n position: relative;\n display: flex;\n flex-direction: column;\n box-sizing: border-box;\n height: 100%;\n min-height: 0;\n overflow: auto;\n color: var(--nol-text);\n font-family: var(--nol-font-sans);\n font-size: var(--nol-text-panel);\n line-height: var(--nol-line-panel);\n}\n\n.body,\n.loading {\n display: flex;\n flex: 1 0 auto;\n flex-direction: column;\n gap: 0.75rem;\n box-sizing: border-box;\n padding: 0.75rem;\n}\n\n.body > nol-git-commit-card {\n margin-top: auto;\n}\n\n.title {\n display: flex;\n gap: 0.5rem;\n align-items: center;\n min-width: 0;\n}\n\n.title-text {\n flex: 1 1 auto;\n color: var(--nol-text-strong);\n font-size: 0.9375rem;\n font-weight: var(--nol-weight-emphasis);\n}\n\n.title-branch {\n overflow: hidden;\n color: var(--nol-text-muted);\n font-size: 0.75rem;\n white-space: nowrap;\n text-overflow: ellipsis;\n}\n\n.title-undo {\n display: flex;\n flex: none;\n margin-inline-end: calc((var(--nol-icon) - var(--nol-icon-button-target)) / 2);\n}\n\n.banner {\n display: flex;\n gap: var(--nol-space-2);\n align-items: flex-start;\n padding: var(--nol-space-2) var(--nol-view-padding-inline);\n border: var(--nol-border-width) solid var(--nol-card-border);\n border-radius: var(--nol-radius-medium);\n background-color: var(--nol-raised);\n}\n\n.banner-icon {\n flex: none;\n margin-top: var(--nol-tab-inset);\n font-size: var(--nol-icon);\n}\n\n.banner-text {\n display: grid;\n flex: 1;\n gap: var(--nol-tab-inset);\n min-width: 0;\n overflow-wrap: anywhere;\n}\n\n.banner-action {\n flex: none;\n}\n\n.operation-actions {\n display: flex;\n flex-wrap: wrap;\n gap: var(--nol-space-2);\n margin-top: var(--nol-space-1);\n}\n\n.warning {\n color: var(--nol-warning);\n}\n\n.failed {\n color: var(--nol-status-failed);\n}\n\n.strong {\n color: var(--nol-text-strong);\n font-weight: var(--nol-weight-emphasis);\n}\n\n.muted,\n.quiet {\n color: var(--nol-text-muted);\n}\n\n.quiet {\n margin: 0;\n padding: 0 var(--nol-view-padding-inline);\n}\n\n.empty {\n display: grid;\n gap: var(--nol-space-2);\n justify-items: start;\n padding: var(--nol-space-3) var(--nol-space-4);\n}\n\n.empty-icon {\n width: var(--nol-empty-icon);\n height: var(--nol-empty-icon);\n color: var(--nol-text-muted);\n font-size: var(--nol-empty-icon);\n}\n\n.heading {\n margin: 0;\n color: var(--nol-text-strong);\n font-size: inherit;\n font-weight: var(--nol-weight-emphasis);\n line-height: inherit;\n}\n\n.text {\n margin: 0;\n color: var(--nol-text-muted);\n}\n\n.actions {\n display: flex;\n flex-wrap: wrap;\n gap: var(--nol-space-2);\n}\n\n.notice {\n display: flex;\n gap: var(--nol-space-2);\n align-items: center;\n padding: var(--nol-space-2) var(--nol-view-padding-inline);\n border: var(--nol-border-width) solid var(--nol-card-border);\n border-radius: var(--nol-radius-medium);\n background-color: var(--nol-raised);\n color: var(--nol-text-muted);\n}\n\n.notice-text {\n flex: 1;\n min-width: 0;\n font-size: var(--nol-text-label);\n overflow-wrap: anywhere;\n}\n\n.notice-icon {\n flex: none;\n color: var(--nol-status-failed);\n}\n"], dependencies: [{ kind: "component", type: ButtonComponent, selector: "button[nol-button], a[nol-button]", inputs: ["variant", "overlay", "backdrop", "danger", "size", "busy"] }, { kind: "component", type: GitBranchCardComponent, selector: "nol-git-branch-card", inputs: ["status"] }, { kind: "component", type: GitCommitCardComponent, selector: "nol-git-commit-card", inputs: ["status"] }, { kind: "component", type: GitFileGroupComponent, selector: "nol-git-file-group", inputs: ["group"], outputs: ["openConflict"] }, { kind: "component", type: GitHostRowComponent, selector: "nol-git-host-row", inputs: ["remote", "status", "folder"] }, { kind: "component", type: GitUndoMenuComponent, selector: "nol-git-undo-menu" }, { kind: "component", type: SpinnerComponent, selector: "nol-spinner", inputs: ["label"] }] });
|
|
149
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.3.2", ngImport: i0, type: GitViewComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
150
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.3.2", type: GitViewComponent, isStandalone: true, selector: "nol-git-view", providers: [GitViewStateService], ngImport: i0, template: "<!--\n@license\nCopyright (c) Noldova.\n\nThis source code is licensed under the license found in the\nLICENSE file in the root directory of this source tree.\n-->\n\n@if (empty(); as empty) {\n <div class=\"empty\">\n <span class=\"empty-icon material-symbols-rounded\" aria-hidden=\"true\">{{ empty.icon }}</span>\n <h2 class=\"heading\">{{ empty.heading }}</h2>\n <p class=\"text\">{{ empty.text }}</p>\n @if (offersGit()) {\n <span class=\"actions\">\n <button nol-button type=\"button\" (click)=\"getGitAsync()\"><span nolButtonIcon class=\"material-symbols-rounded\" aria-hidden=\"true\">{{ resources.openLinkIcon }}</span>{{ resources.getGitLabel }}</button>\n <button nol-button type=\"button\" [variant]=\"secondary\" (click)=\"checkAgain()\">{{ resources.checkAgainLabel }}</button>\n </span>\n @if (linkFailed()) {\n <div class=\"notice link-failed\" role=\"alert\">\n <span class=\"notice-icon material-symbols-rounded\" aria-hidden=\"true\">{{ resources.failureIcon }}</span>\n <span class=\"notice-text\">{{ resources.linkNotOpened }}</span>\n </div>\n }\n }\n @if (look(); as folderLook) {\n <span class=\"actions\">\n <button nol-button type=\"button\" class=\"init-here\" [attr.aria-disabled]=\"folderLook.initializing()\" [attr.aria-busy]=\"folderLook.initializing()\"\n (click)=\"initAsync(folderLook)\">{{ resources.initHereLabel }}</button>\n @if (foundIn(folderLook); as scan) {\n <button nol-button type=\"button\" class=\"open-found\" [variant]=\"secondary\" [attr.aria-disabled]=\"folderLook.checking()\" [attr.aria-busy]=\"folderLook.checking()\"\n (click)=\"openFound(folderLook, scan)\">{{ resources.openFoundLabel }}</button>\n }\n </span>\n }\n </div>\n} @else if (state.status(); as status) {\n <div class=\"body\">\n @if (showsBranch()) {\n <nol-git-branch-card [status]=\"status\" />\n } @else {\n <div class=\"title\">\n <span class=\"title-text\">{{ resources.changesLabel }}</span>\n @if (switching() ?? status.branch; as branch) {\n <span class=\"title-branch\" [title]=\"branch\">{{ resources.formatOnBranch(branch) }}</span>\n }\n <nol-git-undo-menu class=\"title-undo\" />\n </div>\n }\n @if (status.remote; as remote) {\n <nol-git-host-row [remote]=\"remote\" [status]=\"status\" [folder]=\"state.folder() ?? ''\" />\n }\n @if (status.operation; as operation) {\n <div class=\"banner\" role=\"status\">\n <span class=\"banner-icon warning material-symbols-rounded\" aria-hidden=\"true\">{{ resources.mergeIcon }}</span>\n <span class=\"banner-text\">\n <span class=\"strong\">{{ operationOf(operation, status.branch) }}</span>\n <span class=\"muted\">{{ state.conflicts() === 0 ? resources.formatOperationReady(operation.kind) : resources.formatConflictText(state.conflicts()) }}</span>\n <span class=\"operation-actions\">\n @if (firstConflict(); as path) {\n <button nol-button type=\"button\" class=\"banner-action resolve-conflicts\" (click)=\"openConflict(state.folder() ?? '', path)\">{{ resources.resolveConflictsLabel }}</button>\n }\n <button nol-button type=\"button\" class=\"banner-action continue-operation\" [variant]=\"firstConflict() ? secondary : primary\" [disabled]=\"state.busy() || state.conflicts() > 0\"\n (click)=\"continueOperation()\">{{ resources.continueLabels[operation.kind] }}</button>\n @if (!operation.editStop && resources.skipLabels[operation.kind]; as skip) {\n <button nol-button type=\"button\" class=\"banner-action skip-operation\" [variant]=\"secondary\" [disabled]=\"state.busy()\" (click)=\"skipOperation()\">{{ skip }}</button>\n }\n <button nol-button type=\"button\" class=\"banner-action abort-operation\" [variant]=\"secondary\" (click)=\"abortOperation()\">{{ resources.abortLabels[operation.kind] }}</button>\n </span>\n </span>\n </div>\n }\n @if (state.watchFailure(); as watchFailure) {\n <div class=\"banner\" role=\"status\">\n <span class=\"banner-icon warning material-symbols-rounded\" aria-hidden=\"true\">{{ resources.watchFailedIcon }}</span>\n <span class=\"banner-text\">{{ watchFailure }}</span>\n <button nol-button type=\"button\" class=\"banner-action\" [variant]=\"secondary\" (click)=\"followAgain()\">{{ resources.checkAgainLabel }}</button>\n </div>\n }\n @if (state.failure(); as failure) {\n <div class=\"banner\" role=\"alert\">\n <span class=\"banner-icon failed material-symbols-rounded\" aria-hidden=\"true\">{{ resources.failureIcon }}</span>\n <span class=\"banner-text\">{{ failure }}</span>\n <button nol-button type=\"button\" class=\"banner-action\" [variant]=\"secondary\" (click)=\"dismissFailure()\">{{ resources.dismissLabel }}</button>\n </div>\n }\n @if (state.discarded(); as discarded) {\n <div class=\"banner discarded\" role=\"status\">\n <span class=\"banner-icon material-symbols-rounded\" aria-hidden=\"true\">{{ resources.discardedIcon }}</span>\n <span class=\"banner-text\">{{ resources.formatDiscarded(discarded.paths) }}</span>\n <button nol-button type=\"button\" class=\"banner-action undo\" [variant]=\"secondary\" [disabled]=\"state.busy()\" (click)=\"undoDiscard()\">{{ resources.undoLabel }}</button>\n <button nol-button type=\"button\" class=\"banner-action dismiss\" [variant]=\"secondary\" (click)=\"state.discarded.set(null)\">{{ resources.dismissLabel }}</button>\n </div>\n }\n @for (group of state.groups(); track group.kind) {\n <nol-git-file-group [group]=\"group\" (openConflict)=\"openConflict(state.folder() ?? '', $event)\" />\n } @empty {\n <p class=\"quiet\">{{ resources.noChanges }}</p>\n }\n @if (status.truncated) {\n <p class=\"quiet\">{{ resources.listCut }}</p>\n }\n @if (status.uncheckedLfsFiles > 0) {\n <p class=\"quiet lfs-unchecked\">{{ resources.formatUncheckedLfs(status.uncheckedLfsFiles) }}</p>\n }\n <nol-git-commit-card [status]=\"status\" />\n </div>\n} @else if (state.phase() === phases.Loading) {\n <div class=\"loading\"><nol-spinner [label]=\"resources.readingRepository\" [isDelayed]=\"true\" /></div>\n}\n", styles: ["/**\n * @license\n * Copyright (c) Noldova.\n *\n * This source code is licensed under the license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n:host {\n position: relative;\n display: flex;\n flex-direction: column;\n box-sizing: border-box;\n height: 100%;\n min-height: 0;\n overflow: auto;\n color: var(--nol-text);\n font-family: var(--nol-font-sans);\n font-size: var(--nol-text-panel);\n line-height: var(--nol-line-panel);\n}\n\n.body,\n.loading {\n display: flex;\n flex: 1 0 auto;\n flex-direction: column;\n gap: 0.75rem;\n box-sizing: border-box;\n padding: 0.75rem;\n}\n\n.body > nol-git-commit-card {\n margin-top: auto;\n}\n\n.title {\n display: flex;\n gap: 0.5rem;\n align-items: center;\n min-width: 0;\n}\n\n.title-text {\n flex: 1 1 auto;\n color: var(--nol-text-strong);\n font-size: 0.9375rem;\n font-weight: var(--nol-weight-emphasis);\n}\n\n.title-branch {\n overflow: hidden;\n color: var(--nol-text-muted);\n font-size: 0.75rem;\n white-space: nowrap;\n text-overflow: ellipsis;\n}\n\n.title-undo {\n display: flex;\n flex: none;\n margin-inline-end: calc((var(--nol-icon) - var(--nol-icon-button-target)) / 2);\n}\n\n.banner {\n display: flex;\n gap: var(--nol-space-2);\n align-items: flex-start;\n padding: var(--nol-space-2) var(--nol-view-padding-inline);\n border: var(--nol-border-width) solid var(--nol-card-border);\n border-radius: var(--nol-radius-medium);\n background-color: var(--nol-raised);\n}\n\n.banner-icon {\n flex: none;\n margin-top: var(--nol-tab-inset);\n font-size: var(--nol-icon);\n}\n\n.banner-text {\n display: grid;\n flex: 1;\n gap: var(--nol-tab-inset);\n min-width: 0;\n overflow-wrap: anywhere;\n}\n\n.banner-action {\n flex: none;\n}\n\n.operation-actions {\n display: flex;\n flex-wrap: wrap;\n gap: var(--nol-space-2);\n margin-top: var(--nol-space-1);\n}\n\n.warning {\n color: var(--nol-warning);\n}\n\n.failed {\n color: var(--nol-status-failed);\n}\n\n.strong {\n color: var(--nol-text-strong);\n font-weight: var(--nol-weight-emphasis);\n}\n\n.muted,\n.quiet {\n color: var(--nol-text-muted);\n}\n\n.quiet {\n margin: 0;\n padding: 0 var(--nol-view-padding-inline);\n}\n\n.empty {\n display: grid;\n gap: var(--nol-space-2);\n justify-items: start;\n padding: var(--nol-space-3) var(--nol-space-4);\n}\n\n.empty-icon {\n width: var(--nol-empty-icon);\n height: var(--nol-empty-icon);\n color: var(--nol-text-muted);\n font-size: var(--nol-empty-icon);\n}\n\n.heading {\n margin: 0;\n color: var(--nol-text-strong);\n font-size: inherit;\n font-weight: var(--nol-weight-emphasis);\n line-height: inherit;\n}\n\n.text {\n margin: 0;\n color: var(--nol-text-muted);\n}\n\n.actions {\n display: flex;\n flex-wrap: wrap;\n gap: var(--nol-space-2);\n}\n\n.notice {\n display: flex;\n gap: var(--nol-space-2);\n align-items: center;\n padding: var(--nol-space-2) var(--nol-view-padding-inline);\n border: var(--nol-border-width) solid var(--nol-card-border);\n border-radius: var(--nol-radius-medium);\n background-color: var(--nol-raised);\n color: var(--nol-text-muted);\n}\n\n.notice-text {\n flex: 1;\n min-width: 0;\n font-size: var(--nol-text-label);\n overflow-wrap: anywhere;\n}\n\n.notice-icon {\n flex: none;\n color: var(--nol-status-failed);\n}\n"], dependencies: [{ kind: "component", type: ButtonComponent, selector: "button[nol-button], a[nol-button]", inputs: ["variant", "overlay", "backdrop", "danger", "size", "busy"] }, { kind: "component", type: GitBranchCardComponent, selector: "nol-git-branch-card", inputs: ["status"] }, { kind: "component", type: GitCommitCardComponent, selector: "nol-git-commit-card", inputs: ["status"] }, { kind: "component", type: GitFileGroupComponent, selector: "nol-git-file-group", inputs: ["group"], outputs: ["openConflict"] }, { kind: "component", type: GitHostRowComponent, selector: "nol-git-host-row", inputs: ["remote", "status", "folder"] }, { kind: "component", type: GitUndoMenuComponent, selector: "nol-git-undo-menu" }, { kind: "component", type: SpinnerComponent, selector: "nol-spinner", inputs: ["label"] }] });
|
|
164
151
|
}
|
|
165
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.3.
|
|
152
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.3.2", ngImport: i0, type: GitViewComponent, decorators: [{
|
|
166
153
|
type: Component,
|
|
167
154
|
args: [{ selector: "nol-git-view", imports: [ButtonComponent, GitBranchCardComponent, GitCommitCardComponent, GitFileGroupComponent, GitHostRowComponent, GitUndoMenuComponent,
|
|
168
|
-
SpinnerComponent], providers: [GitViewStateService], template: "<!--\n@license\nCopyright (c) Noldova.\n\nThis source code is licensed under the license found in the\nLICENSE file in the root directory of this source tree.\n-->\n\n@if (empty(); as empty) {\n <div class=\"empty\">\n <span class=\"empty-icon material-symbols-rounded\" aria-hidden=\"true\">{{ empty.icon }}</span>\n <h2 class=\"heading\">{{ empty.heading }}</h2>\n <p class=\"text\">{{ empty.text }}</p>\n @if (offersGit()) {\n <span class=\"actions\">\n <button nol-button type=\"button\" (click)=\"getGitAsync()\"><span nolButtonIcon class=\"material-symbols-rounded\" aria-hidden=\"true\">{{ resources.openLinkIcon }}</span>{{ resources.getGitLabel }}</button>\n <button nol-button type=\"button\" [variant]=\"secondary\" (click)=\"checkAgain()\">{{ resources.checkAgainLabel }}</button>\n </span>\n @if (linkFailed()) {\n <div class=\"notice link-failed\" role=\"alert\">\n <span class=\"notice-icon material-symbols-rounded\" aria-hidden=\"true\">{{ resources.failureIcon }}</span>\n <span class=\"notice-text\">{{ resources.linkNotOpened }}</span>\n </div>\n }\n }\n @if (look(); as folderLook) {\n <span class=\"actions\">\n <button nol-button type=\"button\" class=\"init-here\" [attr.aria-disabled]=\"folderLook.initializing()\" [attr.aria-busy]=\"folderLook.initializing()\"\n (click)=\"initAsync(folderLook)\">{{ resources.initHereLabel }}</button>\n @if (foundIn(folderLook); as scan) {\n <button nol-button type=\"button\" class=\"open-found\" [variant]=\"secondary\" [attr.aria-disabled]=\"folderLook.checking()\" [attr.aria-busy]=\"folderLook.checking()\"\n (click)=\"openFound(folderLook, scan)\">{{ resources.openFoundLabel }}</button>\n }\n </span>\n }\n </div>\n} @else if (state.status(); as status) {\n <div class=\"body\">\n @if (showsBranch()) {\n <nol-git-branch-card [status]=\"status\" />\n } @else {\n <div class=\"title\">\n <span class=\"title-text\">{{ resources.changesLabel }}</span>\n @if (switching() ?? status.branch; as branch) {\n <span class=\"title-branch\" [title]=\"branch\">{{ resources.formatOnBranch(branch) }}</span>\n }\n <nol-git-undo-menu class=\"title-undo\" />\n </div>\n }\n @if (status.remote; as remote) {\n <nol-git-host-row [remote]=\"remote\" [status]=\"status\" [folder]=\"state.folder() ?? ''\" />\n }\n @if (status.operation; as operation) {\n <div class=\"banner\" role=\"status\">\n <span class=\"banner-icon warning material-symbols-rounded\" aria-hidden=\"true\">{{ resources.mergeIcon }}</span>\n <span class=\"banner-text\">\n <span class=\"strong\">{{ operationOf(operation, status.branch) }}</span>\n <span class=\"muted\">{{ state.conflicts() === 0 ? resources.formatOperationReady(operation.kind) : resources.formatConflictText(state.conflicts()) }}</span>\n <span class=\"operation-actions\">\n @if (firstConflict(); as path) {\n <button nol-button type=\"button\" class=\"banner-action resolve-conflicts\" (click)=\"openConflict(state.folder() ?? '', path)\">{{ resources.resolveConflictsLabel }}</button>\n }\n <button nol-button type=\"button\" class=\"banner-action continue-operation\" [variant]=\"firstConflict() ? secondary : primary\" [disabled]=\"state.busy() || state.conflicts() > 0\"\n (click)=\"continueOperation()\">{{ resources.continueLabels[operation.kind] }}</button>\n @if (!operation.editStop && resources.skipLabels[operation.kind]; as skip) {\n <button nol-button type=\"button\" class=\"banner-action skip-operation\" [variant]=\"secondary\" [disabled]=\"state.busy()\" (click)=\"skipOperation()\">{{ skip }}</button>\n }\n <button nol-button type=\"button\" class=\"banner-action abort-operation\" [variant]=\"secondary\" (click)=\"abortOperation()\">{{ resources.abortLabels[operation.kind] }}</button>\n </span>\n </span>\n </div>\n }\n @if (state.watchFailure(); as watchFailure) {\n <div class=\"banner\" role=\"status\">\n <span class=\"banner-icon warning material-symbols-rounded\" aria-hidden=\"true\">{{ resources.watchFailedIcon }}</span>\n <span class=\"banner-text\">{{ watchFailure }}</span>\n <button nol-button type=\"button\" class=\"banner-action\" [variant]=\"secondary\" (click)=\"followAgain()\">{{ resources.checkAgainLabel }}</button>\n </div>\n }\n @if (state.failure(); as failure) {\n <div class=\"banner\" role=\"alert\">\n <span class=\"banner-icon failed material-symbols-rounded\" aria-hidden=\"true\">{{ resources.failureIcon }}</span>\n <span class=\"banner-text\">{{ failure }}</span>\n @if (state.forcePushOffer(); as offer) {\n <button nol-button type=\"button\" class=\"banner-action force-push\" [variant]=\"secondary\" [disabled]=\"state.busy()\" (click)=\"forcePush(offer)\">{{ resources.forcePushOfferLabel }}</button>\n }\n @if (state.fetchOffered()) {\n <button nol-button type=\"button\" class=\"banner-action fetch\" [variant]=\"secondary\" [disabled]=\"state.busy()\" (click)=\"fetch()\">{{ resources.fetchOfferLabel }}</button>\n }\n <button nol-button type=\"button\" class=\"banner-action\" [variant]=\"secondary\" (click)=\"dismissFailure()\">{{ resources.dismissLabel }}</button>\n </div>\n }\n @if (state.discarded(); as discarded) {\n <div class=\"banner discarded\" role=\"status\">\n <span class=\"banner-icon material-symbols-rounded\" aria-hidden=\"true\">{{ resources.discardedIcon }}</span>\n <span class=\"banner-text\">{{ resources.formatDiscarded(discarded.paths) }}</span>\n <button nol-button type=\"button\" class=\"banner-action undo\" [variant]=\"secondary\" [disabled]=\"state.busy()\" (click)=\"undoDiscard()\">{{ resources.undoLabel }}</button>\n <button nol-button type=\"button\" class=\"banner-action dismiss\" [variant]=\"secondary\" (click)=\"state.discarded.set(null)\">{{ resources.dismissLabel }}</button>\n </div>\n }\n @for (group of state.groups(); track group.kind) {\n <nol-git-file-group [group]=\"group\" (openConflict)=\"openConflict(state.folder() ?? '', $event)\" />\n } @empty {\n <p class=\"quiet\">{{ resources.noChanges }}</p>\n }\n @if (status.truncated) {\n <p class=\"quiet\">{{ resources.listCut }}</p>\n }\n @if (status.uncheckedLfsFiles > 0) {\n <p class=\"quiet lfs-unchecked\">{{ resources.formatUncheckedLfs(status.uncheckedLfsFiles) }}</p>\n }\n <nol-git-commit-card [status]=\"status\" />\n </div>\n} @else if (state.phase() === phases.Loading) {\n <div class=\"loading\"><nol-spinner [label]=\"resources.readingRepository\" [isDelayed]=\"true\" /></div>\n}\n", styles: ["/**\n * @license\n * Copyright (c) Noldova.\n *\n * This source code is licensed under the license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n:host {\n position: relative;\n display: flex;\n flex-direction: column;\n box-sizing: border-box;\n height: 100%;\n min-height: 0;\n overflow: auto;\n color: var(--nol-text);\n font-family: var(--nol-font-sans);\n font-size: var(--nol-text-panel);\n line-height: var(--nol-line-panel);\n}\n\n.body,\n.loading {\n display: flex;\n flex: 1 0 auto;\n flex-direction: column;\n gap: 0.75rem;\n box-sizing: border-box;\n padding: 0.75rem;\n}\n\n.body > nol-git-commit-card {\n margin-top: auto;\n}\n\n.title {\n display: flex;\n gap: 0.5rem;\n align-items: center;\n min-width: 0;\n}\n\n.title-text {\n flex: 1 1 auto;\n color: var(--nol-text-strong);\n font-size: 0.9375rem;\n font-weight: var(--nol-weight-emphasis);\n}\n\n.title-branch {\n overflow: hidden;\n color: var(--nol-text-muted);\n font-size: 0.75rem;\n white-space: nowrap;\n text-overflow: ellipsis;\n}\n\n.title-undo {\n display: flex;\n flex: none;\n margin-inline-end: calc((var(--nol-icon) - var(--nol-icon-button-target)) / 2);\n}\n\n.banner {\n display: flex;\n gap: var(--nol-space-2);\n align-items: flex-start;\n padding: var(--nol-space-2) var(--nol-view-padding-inline);\n border: var(--nol-border-width) solid var(--nol-card-border);\n border-radius: var(--nol-radius-medium);\n background-color: var(--nol-raised);\n}\n\n.banner-icon {\n flex: none;\n margin-top: var(--nol-tab-inset);\n font-size: var(--nol-icon);\n}\n\n.banner-text {\n display: grid;\n flex: 1;\n gap: var(--nol-tab-inset);\n min-width: 0;\n overflow-wrap: anywhere;\n}\n\n.banner-action {\n flex: none;\n}\n\n.operation-actions {\n display: flex;\n flex-wrap: wrap;\n gap: var(--nol-space-2);\n margin-top: var(--nol-space-1);\n}\n\n.warning {\n color: var(--nol-warning);\n}\n\n.failed {\n color: var(--nol-status-failed);\n}\n\n.strong {\n color: var(--nol-text-strong);\n font-weight: var(--nol-weight-emphasis);\n}\n\n.muted,\n.quiet {\n color: var(--nol-text-muted);\n}\n\n.quiet {\n margin: 0;\n padding: 0 var(--nol-view-padding-inline);\n}\n\n.empty {\n display: grid;\n gap: var(--nol-space-2);\n justify-items: start;\n padding: var(--nol-space-3) var(--nol-space-4);\n}\n\n.empty-icon {\n width: var(--nol-empty-icon);\n height: var(--nol-empty-icon);\n color: var(--nol-text-muted);\n font-size: var(--nol-empty-icon);\n}\n\n.heading {\n margin: 0;\n color: var(--nol-text-strong);\n font-size: inherit;\n font-weight: var(--nol-weight-emphasis);\n line-height: inherit;\n}\n\n.text {\n margin: 0;\n color: var(--nol-text-muted);\n}\n\n.actions {\n display: flex;\n flex-wrap: wrap;\n gap: var(--nol-space-2);\n}\n\n.notice {\n display: flex;\n gap: var(--nol-space-2);\n align-items: center;\n padding: var(--nol-space-2) var(--nol-view-padding-inline);\n border: var(--nol-border-width) solid var(--nol-card-border);\n border-radius: var(--nol-radius-medium);\n background-color: var(--nol-raised);\n color: var(--nol-text-muted);\n}\n\n.notice-text {\n flex: 1;\n min-width: 0;\n font-size: var(--nol-text-label);\n overflow-wrap: anywhere;\n}\n\n.notice-icon {\n flex: none;\n color: var(--nol-status-failed);\n}\n"] }]
|
|
155
|
+
SpinnerComponent], providers: [GitViewStateService], template: "<!--\n@license\nCopyright (c) Noldova.\n\nThis source code is licensed under the license found in the\nLICENSE file in the root directory of this source tree.\n-->\n\n@if (empty(); as empty) {\n <div class=\"empty\">\n <span class=\"empty-icon material-symbols-rounded\" aria-hidden=\"true\">{{ empty.icon }}</span>\n <h2 class=\"heading\">{{ empty.heading }}</h2>\n <p class=\"text\">{{ empty.text }}</p>\n @if (offersGit()) {\n <span class=\"actions\">\n <button nol-button type=\"button\" (click)=\"getGitAsync()\"><span nolButtonIcon class=\"material-symbols-rounded\" aria-hidden=\"true\">{{ resources.openLinkIcon }}</span>{{ resources.getGitLabel }}</button>\n <button nol-button type=\"button\" [variant]=\"secondary\" (click)=\"checkAgain()\">{{ resources.checkAgainLabel }}</button>\n </span>\n @if (linkFailed()) {\n <div class=\"notice link-failed\" role=\"alert\">\n <span class=\"notice-icon material-symbols-rounded\" aria-hidden=\"true\">{{ resources.failureIcon }}</span>\n <span class=\"notice-text\">{{ resources.linkNotOpened }}</span>\n </div>\n }\n }\n @if (look(); as folderLook) {\n <span class=\"actions\">\n <button nol-button type=\"button\" class=\"init-here\" [attr.aria-disabled]=\"folderLook.initializing()\" [attr.aria-busy]=\"folderLook.initializing()\"\n (click)=\"initAsync(folderLook)\">{{ resources.initHereLabel }}</button>\n @if (foundIn(folderLook); as scan) {\n <button nol-button type=\"button\" class=\"open-found\" [variant]=\"secondary\" [attr.aria-disabled]=\"folderLook.checking()\" [attr.aria-busy]=\"folderLook.checking()\"\n (click)=\"openFound(folderLook, scan)\">{{ resources.openFoundLabel }}</button>\n }\n </span>\n }\n </div>\n} @else if (state.status(); as status) {\n <div class=\"body\">\n @if (showsBranch()) {\n <nol-git-branch-card [status]=\"status\" />\n } @else {\n <div class=\"title\">\n <span class=\"title-text\">{{ resources.changesLabel }}</span>\n @if (switching() ?? status.branch; as branch) {\n <span class=\"title-branch\" [title]=\"branch\">{{ resources.formatOnBranch(branch) }}</span>\n }\n <nol-git-undo-menu class=\"title-undo\" />\n </div>\n }\n @if (status.remote; as remote) {\n <nol-git-host-row [remote]=\"remote\" [status]=\"status\" [folder]=\"state.folder() ?? ''\" />\n }\n @if (status.operation; as operation) {\n <div class=\"banner\" role=\"status\">\n <span class=\"banner-icon warning material-symbols-rounded\" aria-hidden=\"true\">{{ resources.mergeIcon }}</span>\n <span class=\"banner-text\">\n <span class=\"strong\">{{ operationOf(operation, status.branch) }}</span>\n <span class=\"muted\">{{ state.conflicts() === 0 ? resources.formatOperationReady(operation.kind) : resources.formatConflictText(state.conflicts()) }}</span>\n <span class=\"operation-actions\">\n @if (firstConflict(); as path) {\n <button nol-button type=\"button\" class=\"banner-action resolve-conflicts\" (click)=\"openConflict(state.folder() ?? '', path)\">{{ resources.resolveConflictsLabel }}</button>\n }\n <button nol-button type=\"button\" class=\"banner-action continue-operation\" [variant]=\"firstConflict() ? secondary : primary\" [disabled]=\"state.busy() || state.conflicts() > 0\"\n (click)=\"continueOperation()\">{{ resources.continueLabels[operation.kind] }}</button>\n @if (!operation.editStop && resources.skipLabels[operation.kind]; as skip) {\n <button nol-button type=\"button\" class=\"banner-action skip-operation\" [variant]=\"secondary\" [disabled]=\"state.busy()\" (click)=\"skipOperation()\">{{ skip }}</button>\n }\n <button nol-button type=\"button\" class=\"banner-action abort-operation\" [variant]=\"secondary\" (click)=\"abortOperation()\">{{ resources.abortLabels[operation.kind] }}</button>\n </span>\n </span>\n </div>\n }\n @if (state.watchFailure(); as watchFailure) {\n <div class=\"banner\" role=\"status\">\n <span class=\"banner-icon warning material-symbols-rounded\" aria-hidden=\"true\">{{ resources.watchFailedIcon }}</span>\n <span class=\"banner-text\">{{ watchFailure }}</span>\n <button nol-button type=\"button\" class=\"banner-action\" [variant]=\"secondary\" (click)=\"followAgain()\">{{ resources.checkAgainLabel }}</button>\n </div>\n }\n @if (state.failure(); as failure) {\n <div class=\"banner\" role=\"alert\">\n <span class=\"banner-icon failed material-symbols-rounded\" aria-hidden=\"true\">{{ resources.failureIcon }}</span>\n <span class=\"banner-text\">{{ failure }}</span>\n <button nol-button type=\"button\" class=\"banner-action\" [variant]=\"secondary\" (click)=\"dismissFailure()\">{{ resources.dismissLabel }}</button>\n </div>\n }\n @if (state.discarded(); as discarded) {\n <div class=\"banner discarded\" role=\"status\">\n <span class=\"banner-icon material-symbols-rounded\" aria-hidden=\"true\">{{ resources.discardedIcon }}</span>\n <span class=\"banner-text\">{{ resources.formatDiscarded(discarded.paths) }}</span>\n <button nol-button type=\"button\" class=\"banner-action undo\" [variant]=\"secondary\" [disabled]=\"state.busy()\" (click)=\"undoDiscard()\">{{ resources.undoLabel }}</button>\n <button nol-button type=\"button\" class=\"banner-action dismiss\" [variant]=\"secondary\" (click)=\"state.discarded.set(null)\">{{ resources.dismissLabel }}</button>\n </div>\n }\n @for (group of state.groups(); track group.kind) {\n <nol-git-file-group [group]=\"group\" (openConflict)=\"openConflict(state.folder() ?? '', $event)\" />\n } @empty {\n <p class=\"quiet\">{{ resources.noChanges }}</p>\n }\n @if (status.truncated) {\n <p class=\"quiet\">{{ resources.listCut }}</p>\n }\n @if (status.uncheckedLfsFiles > 0) {\n <p class=\"quiet lfs-unchecked\">{{ resources.formatUncheckedLfs(status.uncheckedLfsFiles) }}</p>\n }\n <nol-git-commit-card [status]=\"status\" />\n </div>\n} @else if (state.phase() === phases.Loading) {\n <div class=\"loading\"><nol-spinner [label]=\"resources.readingRepository\" [isDelayed]=\"true\" /></div>\n}\n", styles: ["/**\n * @license\n * Copyright (c) Noldova.\n *\n * This source code is licensed under the license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n:host {\n position: relative;\n display: flex;\n flex-direction: column;\n box-sizing: border-box;\n height: 100%;\n min-height: 0;\n overflow: auto;\n color: var(--nol-text);\n font-family: var(--nol-font-sans);\n font-size: var(--nol-text-panel);\n line-height: var(--nol-line-panel);\n}\n\n.body,\n.loading {\n display: flex;\n flex: 1 0 auto;\n flex-direction: column;\n gap: 0.75rem;\n box-sizing: border-box;\n padding: 0.75rem;\n}\n\n.body > nol-git-commit-card {\n margin-top: auto;\n}\n\n.title {\n display: flex;\n gap: 0.5rem;\n align-items: center;\n min-width: 0;\n}\n\n.title-text {\n flex: 1 1 auto;\n color: var(--nol-text-strong);\n font-size: 0.9375rem;\n font-weight: var(--nol-weight-emphasis);\n}\n\n.title-branch {\n overflow: hidden;\n color: var(--nol-text-muted);\n font-size: 0.75rem;\n white-space: nowrap;\n text-overflow: ellipsis;\n}\n\n.title-undo {\n display: flex;\n flex: none;\n margin-inline-end: calc((var(--nol-icon) - var(--nol-icon-button-target)) / 2);\n}\n\n.banner {\n display: flex;\n gap: var(--nol-space-2);\n align-items: flex-start;\n padding: var(--nol-space-2) var(--nol-view-padding-inline);\n border: var(--nol-border-width) solid var(--nol-card-border);\n border-radius: var(--nol-radius-medium);\n background-color: var(--nol-raised);\n}\n\n.banner-icon {\n flex: none;\n margin-top: var(--nol-tab-inset);\n font-size: var(--nol-icon);\n}\n\n.banner-text {\n display: grid;\n flex: 1;\n gap: var(--nol-tab-inset);\n min-width: 0;\n overflow-wrap: anywhere;\n}\n\n.banner-action {\n flex: none;\n}\n\n.operation-actions {\n display: flex;\n flex-wrap: wrap;\n gap: var(--nol-space-2);\n margin-top: var(--nol-space-1);\n}\n\n.warning {\n color: var(--nol-warning);\n}\n\n.failed {\n color: var(--nol-status-failed);\n}\n\n.strong {\n color: var(--nol-text-strong);\n font-weight: var(--nol-weight-emphasis);\n}\n\n.muted,\n.quiet {\n color: var(--nol-text-muted);\n}\n\n.quiet {\n margin: 0;\n padding: 0 var(--nol-view-padding-inline);\n}\n\n.empty {\n display: grid;\n gap: var(--nol-space-2);\n justify-items: start;\n padding: var(--nol-space-3) var(--nol-space-4);\n}\n\n.empty-icon {\n width: var(--nol-empty-icon);\n height: var(--nol-empty-icon);\n color: var(--nol-text-muted);\n font-size: var(--nol-empty-icon);\n}\n\n.heading {\n margin: 0;\n color: var(--nol-text-strong);\n font-size: inherit;\n font-weight: var(--nol-weight-emphasis);\n line-height: inherit;\n}\n\n.text {\n margin: 0;\n color: var(--nol-text-muted);\n}\n\n.actions {\n display: flex;\n flex-wrap: wrap;\n gap: var(--nol-space-2);\n}\n\n.notice {\n display: flex;\n gap: var(--nol-space-2);\n align-items: center;\n padding: var(--nol-space-2) var(--nol-view-padding-inline);\n border: var(--nol-border-width) solid var(--nol-card-border);\n border-radius: var(--nol-radius-medium);\n background-color: var(--nol-raised);\n color: var(--nol-text-muted);\n}\n\n.notice-text {\n flex: 1;\n min-width: 0;\n font-size: var(--nol-text-label);\n overflow-wrap: anywhere;\n}\n\n.notice-icon {\n flex: none;\n color: var(--nol-status-failed);\n}\n"] }]
|
|
169
156
|
}], ctorParameters: () => [] });
|
|
170
157
|
//# sourceMappingURL=git-view.component.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"git-view.component.js","sourceRoot":"","sources":["../../../../../../../../src/noldova.git.window/src/app/components/git-view/git-view.component.ts","../../../../../../../../src/noldova.git.window/src/app/components/git-view/git-view.component.html"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,EAAe,MAAM,EAAE,SAAS,EAAuB,MAAM,eAAe,CAAC;AAC/J,OAAO,EAA2B,eAAe,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAErG,OAAO,EAAE,eAAe,EAAE,aAAa,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAEjH,OAAO,EAAE,gBAAgB,EAAE,MAAM,oCAAoC,CAAC;AACtE,OAAO,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAC;AAClD,OAAO,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;
|
|
1
|
+
{"version":3,"file":"git-view.component.js","sourceRoot":"","sources":["../../../../../../../../src/noldova.git.window/src/app/components/git-view/git-view.component.ts","../../../../../../../../src/noldova.git.window/src/app/components/git-view/git-view.component.html"],"names":[],"mappings":"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"}
|
|
@@ -17,10 +17,10 @@ export class GitVisibleDirective {
|
|
|
17
17
|
observer.observe(inject(ElementRef).nativeElement);
|
|
18
18
|
inject(DestroyRef).onDestroy(() => observer.disconnect());
|
|
19
19
|
}
|
|
20
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.3.
|
|
21
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.3.
|
|
20
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.3.2", ngImport: i0, type: GitVisibleDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
21
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.3.2", type: GitVisibleDirective, isStandalone: true, selector: "[nolGitVisible]", outputs: { visibleChange: "visibleChange" }, ngImport: i0 });
|
|
22
22
|
}
|
|
23
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.3.
|
|
23
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.3.2", ngImport: i0, type: GitVisibleDirective, decorators: [{
|
|
24
24
|
type: Directive,
|
|
25
25
|
args: [{ selector: "[nolGitVisible]" }]
|
|
26
26
|
}], ctorParameters: () => [], propDecorators: { visibleChange: [{ type: i0.Output, args: ["visibleChange"] }] } });
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* This source code is licensed under the license found in the
|
|
6
6
|
* LICENSE file in the root directory of this source tree.
|
|
7
7
|
*/
|
|
8
|
-
import { Component, computed, DestroyRef, effect, ElementRef, ErrorHandler, inject, Injector, input, signal, untracked, viewChild } from "@angular/core";
|
|
8
|
+
import { afterRenderEffect, Component, computed, DestroyRef, effect, ElementRef, ErrorHandler, inject, Injector, input, signal, untracked, viewChild } from "@angular/core";
|
|
9
9
|
import { FormsModule } from "@angular/forms";
|
|
10
10
|
import "@noldova/context.core";
|
|
11
11
|
import { LinkPlace, TimeFormatService, WindowPartTokens } from "@noldova/desktop.window";
|
|
@@ -14,13 +14,16 @@ import { ButtonComponent, ButtonVariant, CheckboxComponent, DialogService, IconB
|
|
|
14
14
|
import { Resources } from "../../../resources.js";
|
|
15
15
|
import { GitAddKind } from "../../enums/git-add-kind.js";
|
|
16
16
|
import { GitAgentState } from "../../enums/git-agent-state.js";
|
|
17
|
+
import { GitWorkspaceColumn } from "../../enums/git-workspace-column.js";
|
|
17
18
|
import { GitWorkspaceView } from "../../enums/git-workspace-view.js";
|
|
18
19
|
import { GitReferencePart } from "../../models/git-reference-part.js";
|
|
19
20
|
import { GitWorkspaceAcross } from "../../models/git-workspace-across.js";
|
|
21
|
+
import { GitWorkspaceHeader } from "../../models/git-workspace-header.js";
|
|
20
22
|
import { GitWorkspaceHost } from "../../models/git-workspace-host.js";
|
|
21
23
|
import { GitWorkspaceOverview } from "../../models/git-workspace-overview.js";
|
|
22
24
|
import { GitWorkspaceRow } from "../../models/git-workspace-row.js";
|
|
23
25
|
import { GitWorkspaceRun } from "../../models/git-workspace-run.js";
|
|
26
|
+
import { GitWorkspaceSort } from "../../models/git-workspace-sort.js";
|
|
24
27
|
import { GitWorkspaceSide } from "../../models/git-workspace-side.js";
|
|
25
28
|
import { GitAddRequests } from "../../services/git-add-requests.js";
|
|
26
29
|
import { GitAgents } from "../../services/git-agents.js";
|
|
@@ -34,6 +37,7 @@ import { GitWorkspaceBulk } from "../../services/git-workspace-bulk.js";
|
|
|
34
37
|
import { GitWorkspacePages } from "../../services/git-workspace-pages.js";
|
|
35
38
|
import { GitWorkspacePullRequests } from "../../services/git-workspace-pull-requests.js";
|
|
36
39
|
import { GitWorkspaces } from "../../services/git-workspaces.js";
|
|
40
|
+
import { GitWorkspaceSorts } from "../../services/git-workspace-sorts.js";
|
|
37
41
|
import { GitWorkspaceSides } from "../../services/git-workspace-sides.js";
|
|
38
42
|
import { GitBulkBranchDialogComponent } from "../git-bulk-branch-dialog/git-bulk-branch-dialog.component.js";
|
|
39
43
|
import { GitCloneDialogComponent } from "../git-clone-dialog/git-clone-dialog.component.js";
|
|
@@ -46,6 +50,7 @@ export class GitWorkspaceComponent {
|
|
|
46
50
|
instance = input.required(/* @ts-ignore */
|
|
47
51
|
...(ngDevMode ? [{ debugName: "instance" }] : /* istanbul ignore next */ []));
|
|
48
52
|
resources = Resources;
|
|
53
|
+
headers = GitWorkspaceHeader.all;
|
|
49
54
|
addKinds = GitAddKind;
|
|
50
55
|
secondary = ButtonVariant.Secondary;
|
|
51
56
|
around = GitReferencePart.around;
|
|
@@ -67,7 +72,7 @@ export class GitWorkspaceComponent {
|
|
|
67
72
|
...(ngDevMode ? [{ debugName: "workspace" }] : /* istanbul ignore next */ []));
|
|
68
73
|
title = computed(() => this.workspace()?.name ?? Resources.dashboardTitle, /* @ts-ignore */
|
|
69
74
|
...(ngDevMode ? [{ debugName: "title" }] : /* istanbul ignore next */ []));
|
|
70
|
-
folders = computed(() => this.workspace()?.folders ?? GitRecentRepositories.
|
|
75
|
+
folders = computed(() => this.workspace()?.folders ?? GitRecentRepositories.opened(), /* @ts-ignore */
|
|
71
76
|
...(ngDevMode ? [{ debugName: "folders" }] : /* istanbul ignore next */ []));
|
|
72
77
|
chosen = computed(() => new Set(this.folders().filter(t => this.selected().has(t))), /* @ts-ignore */
|
|
73
78
|
...(ngDevMode ? [{ debugName: "chosen" }] : /* istanbul ignore next */ []));
|
|
@@ -79,6 +84,8 @@ export class GitWorkspaceComponent {
|
|
|
79
84
|
return [...kept.values()];
|
|
80
85
|
}, /* @ts-ignore */
|
|
81
86
|
...(ngDevMode ? [{ debugName: "allRows" }] : /* istanbul ignore next */ []));
|
|
87
|
+
twins = computed(() => GitWorkspaceOverview.twinsOf(this.allRows()), /* @ts-ignore */
|
|
88
|
+
...(ngDevMode ? [{ debugName: "twins" }] : /* istanbul ignore next */ []));
|
|
82
89
|
chosenRows = computed(() => this.allRows().filter(t => this.chosen().has(t.folder)), /* @ts-ignore */
|
|
83
90
|
...(ngDevMode ? [{ debugName: "chosenRows" }] : /* istanbul ignore next */ []));
|
|
84
91
|
chosenBehind = computed(() => GitWorkspaceOverview.behindOf(this.chosenRows()), /* @ts-ignore */
|
|
@@ -90,10 +97,15 @@ export class GitWorkspaceComponent {
|
|
|
90
97
|
return this.views().some(t => t.view === view) ? view : null;
|
|
91
98
|
}, /* @ts-ignore */
|
|
92
99
|
...(ngDevMode ? [{ debugName: "view" }] : /* istanbul ignore next */ []));
|
|
100
|
+
sortPage = computed(() => this.workspace()?.id ?? Resources.openRepositoriesInstance, /* @ts-ignore */
|
|
101
|
+
...(ngDevMode ? [{ debugName: "sortPage" }] : /* istanbul ignore next */ []));
|
|
102
|
+
sort = computed(() => GitWorkspaceSorts.chosen().get(this.sortPage()) ?? (Object.isNull(this.workspace()) ? GitWorkspaceSort.byName : null), /* @ts-ignore */
|
|
103
|
+
...(ngDevMode ? [{ debugName: "sort" }] : /* istanbul ignore next */ []));
|
|
93
104
|
rows = computed(() => {
|
|
94
105
|
const filter = this.filter().trim().toLowerCase();
|
|
95
106
|
const view = this.view();
|
|
96
|
-
|
|
107
|
+
const sort = this.sort();
|
|
108
|
+
return (Object.isNull(sort) ? this.allRows() : sort.apply(this.allRows())).filter(t => (filter.length === 0 || t.folder.toLowerCase().includes(filter)) && (Object.isNull(view) || t.views().has(view)));
|
|
97
109
|
}, /* @ts-ignore */
|
|
98
110
|
...(ngDevMode ? [{ debugName: "rows" }] : /* istanbul ignore next */ []));
|
|
99
111
|
views = computed(() => Object.values(GitWorkspaceView).filter(view => view !== GitWorkspaceView.AgentsAtWork || GitAgents.all().length > 0)
|
|
@@ -126,8 +138,30 @@ export class GitWorkspaceComponent {
|
|
|
126
138
|
reviews = this.pullRequests.reviewsOf(this.allRows);
|
|
127
139
|
across = computed(() => new GitWorkspaceAcross(this.instance(), this.allRows(), this.runs(), this.reviews(), this.page), /* @ts-ignore */
|
|
128
140
|
...(ngDevMode ? [{ debugName: "across" }] : /* istanbul ignore next */ []));
|
|
141
|
+
host = inject((ElementRef));
|
|
142
|
+
rowFocus = null;
|
|
143
|
+
rowFocusPlace = -1;
|
|
129
144
|
nameField = viewChild("nameField", { ...(ngDevMode ? { debugName: "nameField" } : /* istanbul ignore next */ {}), read: (ElementRef) });
|
|
130
145
|
constructor() {
|
|
146
|
+
// A row that moves as the order changes keeps its focus, which the browser drops as the row's element moves: the
|
|
147
|
+
// control focused in a row, and the row's place, are noted before the rows render, and after, the control is focused
|
|
148
|
+
// again and, only when its row moved, scrolled into sight. A row the filter hides takes its focus with it.
|
|
149
|
+
effect(() => {
|
|
150
|
+
this.rows();
|
|
151
|
+
const focused = document.activeElement;
|
|
152
|
+
this.rowFocus = focused instanceof HTMLElement && this.host.nativeElement.contains(focused) && !Object.isNull(focused.closest(Resources.workspaceRowSelector)) ? focused
|
|
153
|
+
: null;
|
|
154
|
+
this.rowFocusPlace = Object.isNull(this.rowFocus) ? -1 : this.placeOf(this.rowFocus);
|
|
155
|
+
});
|
|
156
|
+
afterRenderEffect(() => {
|
|
157
|
+
this.rows();
|
|
158
|
+
const kept = this.rowFocus;
|
|
159
|
+
if (Object.isNull(kept) || !kept.isConnected)
|
|
160
|
+
return;
|
|
161
|
+
kept.focus({ preventScroll: true });
|
|
162
|
+
if (this.placeOf(kept) !== this.rowFocusPlace)
|
|
163
|
+
kept.scrollIntoView({ block: "nearest" });
|
|
164
|
+
});
|
|
131
165
|
effect(() => {
|
|
132
166
|
const kind = GitAddRequests.asked();
|
|
133
167
|
if (Object.isNull(kind) || this.instance() !== Resources.openRepositoriesInstance)
|
|
@@ -292,6 +326,24 @@ export class GitWorkspaceComponent {
|
|
|
292
326
|
else
|
|
293
327
|
GitWorkspaces.removeFolders(workspace.id, folders);
|
|
294
328
|
}
|
|
329
|
+
// The place among the rows of the row that holds an element.
|
|
330
|
+
placeOf(element) {
|
|
331
|
+
return [...this.host.nativeElement.querySelectorAll(Resources.workspaceRowSelector)].findIndex(t => t.contains(element));
|
|
332
|
+
}
|
|
333
|
+
// A header's click sorts by its column, and a second one reverses it; on a workspace a third returns it to its own order.
|
|
334
|
+
sortBy(column) {
|
|
335
|
+
const sort = this.sort();
|
|
336
|
+
if (!Object.isNull(this.workspace()) && sort?.column === column && sort.isDescending)
|
|
337
|
+
GitWorkspaceSorts.clear(this.sortPage());
|
|
338
|
+
else
|
|
339
|
+
GitWorkspaceSorts.choose(this.sortPage(), Object.isNull(sort) ? new GitWorkspaceSort(column, false) : sort.next(column));
|
|
340
|
+
}
|
|
341
|
+
ariaSortOf(column) {
|
|
342
|
+
const sort = this.sort();
|
|
343
|
+
if (sort?.column !== column)
|
|
344
|
+
return null;
|
|
345
|
+
return sort.isDescending ? Resources.descendingSort : Resources.ascendingSort;
|
|
346
|
+
}
|
|
295
347
|
only(folder) {
|
|
296
348
|
return new Set([folder]);
|
|
297
349
|
}
|
|
@@ -389,12 +441,12 @@ export class GitWorkspaceComponent {
|
|
|
389
441
|
return fallback;
|
|
390
442
|
}
|
|
391
443
|
}
|
|
392
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.3.
|
|
393
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.3.0", type: GitWorkspaceComponent, isStandalone: true, selector: "nol-git-workspace", inputs: { instance: { classPropertyName: "instance", publicName: "instance", isSignal: true, isRequired: true, transformFunction: null } }, viewQueries: [{ propertyName: "nameField", first: true, predicate: ["nameField"], descendants: true, read: ElementRef, isSignal: true }], ngImport: i0, template: "<!--\n@license\nCopyright (c) Noldova.\n\nThis source code is licensed under the license found in the\nLICENSE file in the root directory of this source tree.\n-->\n\n<div class=\"page\">\n <main class=\"panel\" [attr.aria-label]=\"title()\">\n <div class=\"toolbar\">\n @if (renaming(); as name) {\n @if (workspace(); as current) {\n <input #nameField nol-text-field class=\"name-field\" type=\"text\" name=\"workspaceName\" [attr.aria-label]=\"resources.workspaceNameLabel\" [ngModel]=\"name\"\n (ngModelChange)=\"renaming.set($event)\" (keydown.enter)=\"rename(current)\" (keydown.escape)=\"renaming.set(null)\" (blur)=\"rename(current)\" />\n }\n }\n @else {\n <span class=\"name\">{{ title() }}</span>\n }\n <span class=\"small muted count-text\">{{ resources.formatRepositoryCount(folders().length, chosen().size) }}</span>\n <span class=\"separator\" aria-hidden=\"true\"></span>\n <button type=\"button\" nol-toolbar-button class=\"fetch-all\" [icon]=\"resources.fetchAllIcon\" [label]=\"resources.fetchAllTitle\" [isShowingLabel]=\"true\"\n [isUnavailable]=\"isFetching() || folders().length === 0\" (click)=\"fetchAllAsync()\"></button>\n @if (chosen().size > 0) {\n <button type=\"button\" nol-toolbar-button class=\"pull-chosen\" [icon]=\"resources.pullIcon\" [label]=\"resources.formatPullChosen(chosenBehind().length)\"\n [isShowingLabel]=\"true\" [isUnavailable]=\"isWriting() || chosenBehind().length === 0\" (click)=\"pullChosenAsync()\"></button>\n <button type=\"button\" nol-toolbar-button class=\"new-branch\" [icon]=\"resources.newBranchIcon\" [label]=\"resources.formatNewBranchIn(chosen().size)\"\n [isShowingLabel]=\"true\" [isUnavailable]=\"isWriting()\" (click)=\"newBranchInChosen()\"></button>\n }\n <button type=\"button\" nol-toolbar-button class=\"add\" [icon]=\"resources.addIcon\" [label]=\"resources.addMenuTitle\" [isShowingLabel]=\"true\" [hasMenu]=\"true\"\n [isUnavailable]=\"isScanning()\" [nolMenuTriggerFor]=\"addMenu\"></button>\n @if (chosen().size > 0) {\n @if (workspace(); as current) {\n <button type=\"button\" nol-toolbar-button class=\"move-up\" [icon]=\"resources.moveUpIcon\" [label]=\"resources.moveUpTitle\" (click)=\"moveChosen(current, -1)\"></button>\n <button type=\"button\" nol-toolbar-button class=\"move-down\" [icon]=\"resources.moveDownIcon\" [label]=\"resources.moveDownTitle\" (click)=\"moveChosen(current, 1)\"></button>\n }\n <button type=\"button\" nol-toolbar-button class=\"remove\" [icon]=\"resources.removeIcon\" [label]=\"resources.formatRemoveRepositories(chosen().size)\" [isShowingLabel]=\"true\"\n (click)=\"removeChosen()\"></button>\n }\n <button type=\"button\" nol-toolbar-button class=\"open-across\" [icon]=\"resources.workspaceAcrossIcon\" [label]=\"resources.acrossHeading\" [isShowingLabel]=\"true\"\n (click)=\"openAcross()\"></button>\n <span class=\"grow\"></span>\n @if (workspace(); as current) {\n <button nol-icon-button type=\"button\" class=\"rename\" [icon]=\"resources.renameIcon\" [label]=\"resources.renameWorkspaceTitle\" (click)=\"renaming.set(current.name)\"></button>\n <button nol-icon-button type=\"button\" class=\"remove-workspace\" [icon]=\"resources.deleteIcon\" [label]=\"resources.removeWorkspaceTitle\" (click)=\"removeWorkspace(current)\"></button>\n }\n <label class=\"filter\">\n <span class=\"material-symbols-rounded\" aria-hidden=\"true\">{{ resources.filterIcon }}</span>\n <input #filterField type=\"search\" [placeholder]=\"resources.filterRepositoriesLabel\" [attr.aria-label]=\"resources.filterRepositoriesLabel\" [value]=\"filter()\"\n (input)=\"filter.set(filterField.value)\" />\n </label>\n </div>\n @if (result().length > 0) {\n <div class=\"small result\" role=\"status\">\n @for (line of result(); track $index) {\n <p>{{ line }}</p>\n }\n </div>\n }\n <div class=\"table\" role=\"table\" [attr.aria-label]=\"title()\">\n <div class=\"tr th\" role=\"row\">\n <span role=\"columnheader\"><span class=\"visually-hidden\">{{ resources.selectRepositoryLabel }}</span></span>\n <span role=\"columnheader\">{{ resources.repositoryColumn }}</span>\n <span role=\"columnheader\">{{ resources.branchColumn }}</span>\n <span role=\"columnheader\" class=\"sync-head\">{{ resources.syncColumn }}</span>\n <span role=\"columnheader\" class=\"changes-head\">{{ resources.changesColumn }}</span>\n <span role=\"columnheader\" class=\"pull-request-head\">{{ resources.pullRequestColumn }}</span>\n <span role=\"columnheader\">{{ resources.checksColumn }}</span>\n <span role=\"columnheader\" class=\"open-head\">{{ resources.openColumn }}</span>\n <span role=\"columnheader\" class=\"fetched-head\">{{ resources.fetchedColumn }}</span>\n </div>\n @for (row of rows(); track row.folder) {\n @let isChosen = chosen().has(row.folder);\n <div nolGitVisible class=\"tr\" role=\"row\" [class.selected]=\"isChosen\" [title]=\"row.folder\" (visibleChange)=\"follow(row.folder, $event)\">\n <span role=\"cell\">\n <nol-checkbox class=\"select\" [checked]=\"isChosen\" (checkedChange)=\"select(row.folder, $event)\"><span class=\"visually-hidden\">{{ row.name }}</span></nol-checkbox>\n </span>\n <span role=\"cell\" class=\"ic\">\n <span class=\"material-symbols-rounded\" aria-hidden=\"true\">{{ resources.folderIcon }}</span>\n <button type=\"button\" class=\"link name-cell\" [title]=\"row.name\" (click)=\"open(row.folder)\">{{ row.name }}</button>\n </span>\n @if (!row.isRepository()) {\n <span role=\"cell\" class=\"not-repository small\">\n <span class=\"muted\">{{ resources.notRepositoryHeading }}</span>\n <button type=\"button\" class=\"link remove-one\" (click)=\"remove(only(row.folder))\">{{ resources.removeLabel }}</button>\n </span>\n }\n @else if (row.failure(); as failure) {\n <span role=\"cell\" class=\"failure small\" [title]=\"failure\">{{ failure }}</span>\n }\n @else {\n <span role=\"cell\" class=\"ic branch\">\n @if (row.branch().length > 0) {\n <span class=\"material-symbols-rounded\" aria-hidden=\"true\">{{ resources.statusBarBranchIcon }}</span>\n }\n <span class=\"ellipsis\" [title]=\"row.branch()\">{{ row.branch() }}</span>\n </span>\n <span role=\"cell\" class=\"small sync\">{{ row.sync() }}</span>\n }\n <span role=\"cell\" class=\"small changes\" [class.conflicts]=\"row.hasConflicts()\">{{ row.changes() }}</span>\n <span role=\"cell\" class=\"small pull-request\">\n @if (row.pullRequest(); as pullRequest) {\n @let words = around(row.pullRequestText(), pullRequest.label);\n @let linkTitle = resources.formatPullRequestLinkTitle(row.pullRequestText(), pullRequest.title);\n <span class=\"link\" (click)=\"openPullRequest(row, pullRequest)\"><span [title]=\"linkTitle\">{{ words.before }}</span><nol-git-reference-text [text]=\"words.linked\" [folder]=\"row.folder\" [link]=\"pullRequest.url\" /><span [title]=\"linkTitle\">{{ words.after }}</span></span>\n }\n @else {\n {{ row.pullRequestText() }}\n }\n </span>\n <span role=\"cell\" class=\"ic small checks\">\n @if (row.checksTone().length > 0) {\n <span [class]=\"'dot ' + row.checksTone()\" aria-hidden=\"true\"></span>\n }\n {{ row.checks() }}\n </span>\n <span role=\"cell\" class=\"small open\" [title]=\"row.openTitle()\">{{ row.open() }}</span>\n <span role=\"cell\" class=\"small muted fetched\">{{ fetchedOf(row) }}</span>\n </div>\n }\n @empty {\n <div class=\"empty\">\n <p>{{ folders().length === 0 ? resources.noRepositories : resources.noRepositoryMatches }}</p>\n @if (folders().length === 0) {\n <div class=\"empty-actions\">\n <button nol-button type=\"button\" class=\"empty-add\" [disabled]=\"isScanning()\" (click)=\"add(addKinds.Local)\">{{ resources.addLocalTitle }}</button>\n <button nol-button type=\"button\" class=\"empty-clone\" [variant]=\"secondary\" (click)=\"add(addKinds.Clone)\">{{ resources.cloneRepositoryTitle }}</button>\n <button nol-button type=\"button\" class=\"empty-init\" [variant]=\"secondary\" (click)=\"add(addKinds.Init)\">{{ resources.initRepositoryTitle }}</button>\n </div>\n }\n </div>\n }\n </div>\n </main>\n</div>\n<ng-template #addMenu>\n <nol-menu>\n <button nol-menu-item class=\"add-local\" [label]=\"resources.addLocalTitle\" [icon]=\"resources.addIcon\" (triggered)=\"add(addKinds.Local)\"></button>\n <button nol-menu-item class=\"add-clone\" [label]=\"resources.cloneRepositoryTitle\" [icon]=\"resources.cloneIcon\" (triggered)=\"add(addKinds.Clone)\"></button>\n <button nol-menu-item class=\"add-init\" [label]=\"resources.initRepositoryTitle\" [icon]=\"resources.initIcon\" (triggered)=\"add(addKinds.Init)\"></button>\n </nol-menu>\n</ng-template>\n", styles: ["/**\n * @license\n * Copyright (c) Noldova.\n *\n * This source code is licensed under the license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n:host {\n display: block;\n container-type: inline-size;\n box-sizing: border-box;\n height: 100%;\n min-height: 0;\n color: var(--nol-text);\n font-family: var(--nol-font-sans);\n font-size: var(--nol-text-panel);\n line-height: var(--nol-line-panel);\n}\n\n.material-symbols-rounded {\n flex: none;\n width: var(--nol-icon);\n height: var(--nol-icon);\n overflow: hidden;\n color: var(--nol-icon-color);\n font-size: var(--nol-icon);\n line-height: 1;\n}\n\n.page {\n display: grid;\n grid-template-columns: minmax(0, 1fr);\n height: 100%;\n min-height: 0;\n}\n\n.panel {\n display: flex;\n flex-direction: column;\n min-width: 0;\n min-height: 0;\n overflow: hidden;\n background: var(--nol-panel);\n}\n\n.grow {\n flex: 1 1 auto;\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n\n.muted {\n color: var(--nol-text-muted);\n}\n\n.small {\n font-size: 0.75rem;\n}\n\n.toolbar {\n box-sizing: border-box;\n display: flex;\n flex: none;\n align-items: center;\n gap: 0.25rem;\n height: 2.25rem;\n padding: 0 0.75rem 0 0.5rem;\n border-bottom: var(--nol-border-width) solid var(--nol-border);\n}\n\n.result {\n flex: none;\n padding: 0.375rem 0.75rem;\n border-bottom: var(--nol-border-width) solid var(--nol-border);\n}\n\n.result p {\n margin: 0;\n line-height: var(--nol-line-message);\n}\n\n.name {\n padding: 0 0.25rem;\n color: var(--nol-text-strong);\n font-weight: var(--nol-weight-emphasis);\n white-space: nowrap;\n}\n\n.name-field {\n width: 14rem;\n}\n\n.count-text {\n white-space: nowrap;\n}\n\n.separator {\n flex: none;\n width: var(--nol-border-width);\n height: 1rem;\n margin: 0 0.25rem;\n background: var(--nol-border);\n}\n\n.filter {\n display: flex;\n flex: none;\n align-items: center;\n gap: 0.5rem;\n box-sizing: border-box;\n width: 14rem;\n height: 1.625rem;\n padding: 0 0.375rem;\n border: var(--nol-border-width) solid var(--nol-input-border);\n border-radius: var(--nol-radius-small);\n background: var(--nol-input);\n}\n\n.filter .material-symbols-rounded {\n color: var(--nol-placeholder);\n}\n\n.filter input {\n flex: 1;\n min-width: 0;\n padding: 0;\n border: 0;\n outline: none;\n background: transparent;\n color: var(--nol-text);\n font: inherit;\n}\n\n.filter input::placeholder {\n color: var(--nol-placeholder);\n}\n\n.filter:focus-within {\n outline: var(--nol-border-width) solid var(--nol-accent);\n outline-offset: calc(-1 * var(--nol-border-width));\n}\n\n.table {\n display: grid;\n grid-template-columns: 2.125rem 8rem minmax(8rem, 1fr) 5.5rem 5rem 8.5rem 5rem 6.5rem 6.25rem;\n align-content: start;\n column-gap: 0.5rem;\n min-height: 0;\n overflow: auto;\n}\n\n.tr {\n --row-fill: transparent;\n\n box-sizing: border-box;\n display: grid;\n grid-column: 1 / -1;\n grid-template-columns: subgrid;\n align-items: center;\n height: 2rem;\n padding: 0 0.75rem;\n border-bottom: var(--nol-border-width) solid var(--nol-border);\n white-space: nowrap;\n}\n\n.tr > * {\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n\n.tr:not(.th):hover {\n --row-fill: var(--nol-hover);\n\n background: var(--nol-hover);\n}\n\n.tr.selected,\n.tr.selected:hover {\n --row-fill: var(--nol-selected);\n\n background: var(--nol-selected);\n}\n\n.tr > :nth-child(2) {\n position: sticky;\n left: 0;\n z-index: 1;\n margin-inline-start: -0.75rem;\n padding-inline-start: 0.75rem;\n background: linear-gradient(var(--row-fill), var(--row-fill)), var(--nol-panel);\n}\n\n.fetched-head,\n.fetched {\n text-align: end;\n}\n\n.th {\n height: 1.75rem;\n color: var(--nol-text-strong);\n font-size: 0.75rem;\n font-weight: var(--nol-weight-emphasis);\n}\n\n.ic {\n display: inline-flex;\n align-items: center;\n gap: 0.25rem;\n}\n\n.link {\n min-width: 0;\n overflow: hidden;\n padding: 0;\n border: 0;\n background: none;\n color: var(--nol-text-strong);\n font: inherit;\n font-weight: var(--nol-weight-emphasis);\n text-overflow: ellipsis;\n cursor: pointer;\n}\n\n.link:hover {\n color: var(--nol-link);\n text-decoration: underline;\n}\n\n.ellipsis {\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n\n.failure {\n grid-column: span 2;\n color: var(--nol-error);\n}\n\n.not-repository {\n display: flex;\n grid-column: span 2;\n gap: var(--nol-space-2);\n align-items: center;\n min-width: 0;\n}\n\n.remove-one {\n font-weight: inherit;\n}\n\n.conflicts {\n color: var(--nol-warning);\n}\n\n.pull-request .link {\n display: inline-block;\n max-width: 100%;\n white-space: nowrap;\n vertical-align: bottom;\n color: inherit;\n font-weight: inherit;\n}\n\n.dot {\n flex: none;\n width: 0.5rem;\n height: 0.5rem;\n border-radius: 50%;\n background-color: var(--nol-text-muted);\n}\n\n.dot.ok {\n background-color: var(--nol-status-ok);\n}\n\n.dot.failed {\n background-color: var(--nol-status-failed);\n}\n\n.dot.pending {\n background-color: var(--nol-warning);\n}\n\n.dot.signed-out {\n background-color: var(--nol-warning);\n}\n\n.empty {\n display: grid;\n grid-column: 1 / -1;\n gap: 0.5rem;\n justify-items: center;\n padding: 1.5rem;\n color: var(--nol-text-muted);\n}\n\n.empty p {\n margin: 0;\n}\n\n.empty-actions {\n display: flex;\n flex-wrap: wrap;\n gap: 0.5rem;\n justify-content: center;\n}\n\n.visually-hidden {\n position: absolute;\n width: 1px;\n height: 1px;\n overflow: hidden;\n clip-path: inset(50%);\n white-space: nowrap;\n}\n\n@container (width < 59rem) {\n .table {\n grid-template-columns: 2.125rem 8rem minmax(8rem, 1fr) 5.5rem 5rem 8.5rem 5rem 6.25rem;\n }\n\n .open,\n .open-head {\n display: none;\n }\n}\n\n@container (width < 52rem) {\n .table {\n grid-template-columns: 2.125rem 8rem minmax(8rem, 1fr) 5.5rem 5rem 5rem 6.25rem;\n }\n\n .pull-request,\n .pull-request-head {\n display: none;\n }\n}\n\n@container (width < 43rem) {\n .table {\n grid-template-columns: 2.125rem 8rem minmax(8rem, 1fr) 5.5rem 5rem 6.25rem;\n }\n\n .changes,\n .changes-head {\n display: none;\n }\n}\n\n@container (width < 37.5rem) {\n .table {\n grid-template-columns: 2.125rem 8rem minmax(8rem, 1fr) 5rem 6.25rem;\n }\n\n .sync,\n .sync-head {\n display: none;\n }\n\n .failure,\n .not-repository {\n grid-column: span 1;\n }\n}\n\n@container (width < 31.5rem) {\n .table {\n grid-template-columns: 2.125rem 6.5rem minmax(6rem, 1fr) 5rem 6.25rem;\n }\n}\n\n@container (max-width: 46.75rem) {\n .toolbar {\n flex-wrap: wrap;\n height: auto;\n min-height: 2.25rem;\n padding-block: 0.25rem;\n }\n}\n"], dependencies: [{ kind: "component", type: ButtonComponent, selector: "button[nol-button], a[nol-button]", inputs: ["variant", "overlay", "backdrop", "danger", "size", "busy"] }, { kind: "component", type: CheckboxComponent, selector: "nol-checkbox", inputs: ["checked", "disabled", "label"], outputs: ["checkedChange"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox]):not([ngNoCva])[formControlName],textarea:not([ngNoCva])[formControlName],input:not([type=checkbox]):not([ngNoCva])[formControl],textarea:not([ngNoCva])[formControl],input:not([type=checkbox]):not([ngNoCva])[ngModel],textarea:not([ngNoCva])[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: GitReferenceTextComponent, selector: "nol-git-reference-text", inputs: ["text", "folder", "link", "title", "chipTabIndex"] }, { kind: "directive", type: GitVisibleDirective, selector: "[nolGitVisible]", outputs: ["visibleChange"] }, { kind: "component", type: IconButtonComponent, selector: "button[nol-icon-button]", inputs: ["icon", "label", "pressed", "filled", "overlay", "backdrop", "buttonHeight", "danger", "tabAction", "busy", "busyPressable"] }, { kind: "component", type: MenuComponent, selector: "nol-menu", inputs: ["minWidth"] }, { kind: "component", type: MenuItemComponent, selector: "button[nol-menu-item]", inputs: ["label", "icon", "checked", "checkbox", "shortcut", "description", "value", "tag", "danger", "isShowingChevron"] }, { kind: "directive", type: MenuTriggerDirective, selector: "[nolMenuTriggerFor]", inputs: ["nolMenuTriggerFor", "nolMenuAlignment"], exportAs: ["nolMenuTriggerFor"] }, { kind: "component", type: TextFieldComponent, selector: "input[nol-text-field], textarea[nol-text-field]", inputs: ["large", "quiet"] }, { kind: "component", type: ToolbarButtonComponent, selector: "button[nol-toolbar-button]", inputs: ["label", "icon", "isShowingLabel", "pressed", "hasMenu", "isUnavailable", "isPressedWhileOpen", "busy"] }] });
|
|
444
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.3.2", ngImport: i0, type: GitWorkspaceComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
445
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.3.2", type: GitWorkspaceComponent, isStandalone: true, selector: "nol-git-workspace", inputs: { instance: { classPropertyName: "instance", publicName: "instance", isSignal: true, isRequired: true, transformFunction: null } }, viewQueries: [{ propertyName: "nameField", first: true, predicate: ["nameField"], descendants: true, read: ElementRef, isSignal: true }], ngImport: i0, template: "<!--\n@license\nCopyright (c) Noldova.\n\nThis source code is licensed under the license found in the\nLICENSE file in the root directory of this source tree.\n-->\n\n<div class=\"page\">\n <main class=\"panel\" [attr.aria-label]=\"title()\">\n <div class=\"toolbar\">\n @if (renaming(); as name) {\n @if (workspace(); as current) {\n <input #nameField nol-text-field class=\"name-field\" type=\"text\" name=\"workspaceName\" [attr.aria-label]=\"resources.workspaceNameLabel\" [ngModel]=\"name\"\n (ngModelChange)=\"renaming.set($event)\" (keydown.enter)=\"rename(current)\" (keydown.escape)=\"renaming.set(null)\" (blur)=\"rename(current)\" />\n }\n }\n @else {\n <span class=\"name\">{{ title() }}</span>\n }\n <span class=\"small muted count-text\">{{ resources.formatRepositoryCount(folders().length, chosen().size) }}</span>\n <span class=\"separator\" aria-hidden=\"true\"></span>\n <button type=\"button\" nol-toolbar-button class=\"fetch-all\" [icon]=\"resources.fetchAllIcon\" [label]=\"resources.fetchAllTitle\" [isShowingLabel]=\"true\"\n [isUnavailable]=\"isFetching() || folders().length === 0\" (click)=\"fetchAllAsync()\"></button>\n @if (chosen().size > 0) {\n <button type=\"button\" nol-toolbar-button class=\"pull-chosen\" [icon]=\"resources.pullIcon\" [label]=\"resources.formatPullChosen(chosenBehind().length)\"\n [isShowingLabel]=\"true\" [isUnavailable]=\"isWriting() || chosenBehind().length === 0\" (click)=\"pullChosenAsync()\"></button>\n <button type=\"button\" nol-toolbar-button class=\"new-branch\" [icon]=\"resources.newBranchIcon\" [label]=\"resources.formatNewBranchIn(chosen().size)\"\n [isShowingLabel]=\"true\" [isUnavailable]=\"isWriting()\" (click)=\"newBranchInChosen()\"></button>\n }\n <button type=\"button\" nol-toolbar-button class=\"add\" [icon]=\"resources.addIcon\" [label]=\"resources.addMenuTitle\" [isShowingLabel]=\"true\" [hasMenu]=\"true\"\n [isUnavailable]=\"isScanning()\" [nolMenuTriggerFor]=\"addMenu\"></button>\n @if (chosen().size > 0) {\n @if (workspace(); as current) {\n @if (!sort()) {\n <button type=\"button\" nol-toolbar-button class=\"move-up\" [icon]=\"resources.moveUpIcon\" [label]=\"resources.moveUpTitle\" (click)=\"moveChosen(current, -1)\"></button>\n <button type=\"button\" nol-toolbar-button class=\"move-down\" [icon]=\"resources.moveDownIcon\" [label]=\"resources.moveDownTitle\" (click)=\"moveChosen(current, 1)\"></button>\n }\n }\n <button type=\"button\" nol-toolbar-button class=\"remove\" [icon]=\"resources.removeIcon\" [label]=\"resources.formatRemoveRepositories(chosen().size)\" [isShowingLabel]=\"true\"\n (click)=\"removeChosen()\"></button>\n }\n <button type=\"button\" nol-toolbar-button class=\"open-across\" [icon]=\"resources.workspaceAcrossIcon\" [label]=\"resources.acrossHeading\" [isShowingLabel]=\"true\"\n (click)=\"openAcross()\"></button>\n <span class=\"grow\"></span>\n @if (workspace(); as current) {\n <button nol-icon-button type=\"button\" class=\"rename\" [icon]=\"resources.renameIcon\" [label]=\"resources.renameWorkspaceTitle\" (click)=\"renaming.set(current.name)\"></button>\n <button nol-icon-button type=\"button\" class=\"remove-workspace\" [icon]=\"resources.deleteIcon\" [label]=\"resources.removeWorkspaceTitle\" (click)=\"removeWorkspace(current)\"></button>\n }\n <label class=\"filter\">\n <span class=\"material-symbols-rounded\" aria-hidden=\"true\">{{ resources.filterIcon }}</span>\n <input #filterField type=\"search\" [placeholder]=\"resources.filterRepositoriesLabel\" [attr.aria-label]=\"resources.filterRepositoriesLabel\" [value]=\"filter()\"\n (input)=\"filter.set(filterField.value)\" />\n </label>\n </div>\n @if (result().length > 0) {\n <div class=\"small result\" role=\"status\">\n @for (line of result(); track $index) {\n <p>{{ line }}</p>\n }\n </div>\n }\n <div class=\"table\" role=\"table\" [attr.aria-label]=\"title()\">\n <div class=\"tr th\" role=\"row\">\n <span role=\"columnheader\"><span class=\"visually-hidden\">{{ resources.selectRepositoryLabel }}</span></span>\n @for (header of headers; track header.column) {\n @let sorted = ariaSortOf(header.column);\n <span role=\"columnheader\" [class]=\"header.className\" [attr.aria-sort]=\"sorted\">\n <button type=\"button\" class=\"sort\" (click)=\"sortBy(header.column)\">{{ header.title }}<span class=\"material-symbols-rounded arrow\" [class.unsorted]=\"!sorted\" aria-hidden=\"true\">{{ sorted === resources.descendingSort ? resources.descendingIcon : resources.ascendingIcon }}</span></button>\n </span>\n }\n </div>\n @for (row of rows(); track row.folder) {\n @let isChosen = chosen().has(row.folder);\n <div nolGitVisible class=\"tr\" role=\"row\" [class.selected]=\"isChosen\" [title]=\"row.folder\" (visibleChange)=\"follow(row.folder, $event)\">\n <span role=\"cell\">\n <nol-checkbox class=\"select\" [checked]=\"isChosen\" (checkedChange)=\"select(row.folder, $event)\"><span class=\"visually-hidden\">{{ row.name }}</span></nol-checkbox>\n </span>\n <span role=\"cell\" class=\"ic\">\n <span class=\"material-symbols-rounded\" aria-hidden=\"true\">{{ resources.folderIcon }}</span>\n <button type=\"button\" class=\"link name-cell\" [title]=\"row.name\" (click)=\"open(row.folder)\">{{ row.name }}@if (twins().has(row.name.toLowerCase())) {<span class=\"place\">{{ row.parent }}</span>}</button>\n </span>\n @if (!row.isRepository()) {\n <span role=\"cell\" class=\"not-repository small\">\n <span class=\"muted\">{{ resources.notRepositoryHeading }}</span>\n <button type=\"button\" class=\"link remove-one\" (click)=\"remove(only(row.folder))\">{{ resources.removeLabel }}</button>\n </span>\n }\n @else if (row.failure(); as failure) {\n <span role=\"cell\" class=\"failure small\" [title]=\"failure\">{{ failure }}</span>\n }\n @else {\n <span role=\"cell\" class=\"ic branch\">\n @if (row.branch().length > 0) {\n <span class=\"material-symbols-rounded\" aria-hidden=\"true\">{{ resources.statusBarBranchIcon }}</span>\n }\n <span class=\"ellipsis\" [title]=\"row.branch()\">{{ row.branch() }}</span>\n </span>\n <span role=\"cell\" class=\"small sync\">{{ row.sync() }}</span>\n }\n <span role=\"cell\" class=\"small changes\" [class.conflicts]=\"row.hasConflicts()\">{{ row.changes() }}</span>\n <span role=\"cell\" class=\"small pull-request\">\n @if (row.pullRequest(); as pullRequest) {\n @let words = around(row.pullRequestText(), pullRequest.label);\n @let linkTitle = resources.formatPullRequestLinkTitle(row.pullRequestText(), pullRequest.title);\n <span class=\"link\" (click)=\"openPullRequest(row, pullRequest)\"><span [title]=\"linkTitle\">{{ words.before }}</span><nol-git-reference-text [text]=\"words.linked\" [folder]=\"row.folder\" [link]=\"pullRequest.url\" /><span [title]=\"linkTitle\">{{ words.after }}</span></span>\n }\n @else {\n {{ row.pullRequestText() }}\n }\n </span>\n <span role=\"cell\" class=\"ic small checks\">\n @if (row.checksTone().length > 0) {\n <span [class]=\"'dot ' + row.checksTone()\" aria-hidden=\"true\"></span>\n }\n {{ row.checks() }}\n </span>\n <span role=\"cell\" class=\"small open\" [title]=\"row.openTitle()\">{{ row.open() }}</span>\n <span role=\"cell\" class=\"small muted fetched\">{{ fetchedOf(row) }}</span>\n </div>\n }\n @empty {\n <div class=\"empty\">\n <p>{{ folders().length === 0 ? resources.noRepositories : resources.noRepositoryMatches }}</p>\n @if (folders().length === 0) {\n <div class=\"empty-actions\">\n <button nol-button type=\"button\" class=\"empty-add\" [disabled]=\"isScanning()\" (click)=\"add(addKinds.Local)\">{{ resources.addLocalTitle }}</button>\n <button nol-button type=\"button\" class=\"empty-clone\" [variant]=\"secondary\" (click)=\"add(addKinds.Clone)\">{{ resources.cloneRepositoryTitle }}</button>\n <button nol-button type=\"button\" class=\"empty-init\" [variant]=\"secondary\" (click)=\"add(addKinds.Init)\">{{ resources.initRepositoryTitle }}</button>\n </div>\n }\n </div>\n }\n </div>\n </main>\n</div>\n<ng-template #addMenu>\n <nol-menu>\n <button nol-menu-item class=\"add-local\" [label]=\"resources.addLocalTitle\" [icon]=\"resources.addIcon\" (triggered)=\"add(addKinds.Local)\"></button>\n <button nol-menu-item class=\"add-clone\" [label]=\"resources.cloneRepositoryTitle\" [icon]=\"resources.cloneIcon\" (triggered)=\"add(addKinds.Clone)\"></button>\n <button nol-menu-item class=\"add-init\" [label]=\"resources.initRepositoryTitle\" [icon]=\"resources.initIcon\" (triggered)=\"add(addKinds.Init)\"></button>\n </nol-menu>\n</ng-template>\n", styles: ["/**\n * @license\n * Copyright (c) Noldova.\n *\n * This source code is licensed under the license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n:host {\n display: block;\n container-type: inline-size;\n box-sizing: border-box;\n height: 100%;\n min-height: 0;\n color: var(--nol-text);\n font-family: var(--nol-font-sans);\n font-size: var(--nol-text-panel);\n line-height: var(--nol-line-panel);\n}\n\n.material-symbols-rounded {\n flex: none;\n width: var(--nol-icon);\n height: var(--nol-icon);\n overflow: hidden;\n color: var(--nol-icon-color);\n font-size: var(--nol-icon);\n line-height: 1;\n}\n\n.page {\n display: grid;\n grid-template-columns: minmax(0, 1fr);\n height: 100%;\n min-height: 0;\n}\n\n.panel {\n display: flex;\n flex-direction: column;\n min-width: 0;\n min-height: 0;\n overflow: hidden;\n background: var(--nol-panel);\n}\n\n.grow {\n flex: 1 1 auto;\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n\n.muted {\n color: var(--nol-text-muted);\n}\n\n.small {\n font-size: 0.75rem;\n}\n\n.toolbar {\n box-sizing: border-box;\n display: flex;\n flex: none;\n align-items: center;\n gap: 0.25rem;\n height: 2.25rem;\n padding: 0 0.75rem 0 0.5rem;\n border-bottom: var(--nol-border-width) solid var(--nol-border);\n}\n\n.result {\n flex: none;\n padding: 0.375rem 0.75rem;\n border-bottom: var(--nol-border-width) solid var(--nol-border);\n}\n\n.result p {\n margin: 0;\n line-height: var(--nol-line-message);\n}\n\n.name {\n padding: 0 0.25rem;\n color: var(--nol-text-strong);\n font-weight: var(--nol-weight-emphasis);\n white-space: nowrap;\n}\n\n.name-field {\n width: 14rem;\n}\n\n.count-text {\n white-space: nowrap;\n}\n\n.separator {\n flex: none;\n width: var(--nol-border-width);\n height: 1rem;\n margin: 0 0.25rem;\n background: var(--nol-border);\n}\n\n.filter {\n display: flex;\n flex: none;\n align-items: center;\n gap: 0.5rem;\n box-sizing: border-box;\n width: 14rem;\n height: 1.625rem;\n padding: 0 0.375rem;\n border: var(--nol-border-width) solid var(--nol-input-border);\n border-radius: var(--nol-radius-small);\n background: var(--nol-input);\n}\n\n.filter .material-symbols-rounded {\n color: var(--nol-placeholder);\n}\n\n.filter input {\n flex: 1;\n min-width: 0;\n padding: 0;\n border: 0;\n outline: none;\n background: transparent;\n color: var(--nol-text);\n font: inherit;\n}\n\n.filter input::placeholder {\n color: var(--nol-placeholder);\n}\n\n.filter:focus-within {\n outline: var(--nol-border-width) solid var(--nol-accent);\n outline-offset: calc(-1 * var(--nol-border-width));\n}\n\n.table {\n display: grid;\n grid-template-columns: 2.125rem 8rem minmax(8rem, 1fr) 5.5rem 5rem 8.5rem 5rem 6.5rem 6.25rem;\n align-content: start;\n column-gap: 0.5rem;\n min-height: 0;\n overflow: auto;\n}\n\n.tr {\n --row-fill: transparent;\n\n box-sizing: border-box;\n display: grid;\n grid-column: 1 / -1;\n grid-template-columns: subgrid;\n align-items: center;\n height: 2rem;\n padding: 0 0.75rem;\n border-bottom: var(--nol-border-width) solid var(--nol-border);\n white-space: nowrap;\n}\n\n.tr > * {\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n\n.tr:not(.th):hover {\n --row-fill: var(--nol-hover);\n\n background: var(--nol-hover);\n}\n\n.tr.selected,\n.tr.selected:hover {\n --row-fill: var(--nol-selected);\n\n background: var(--nol-selected);\n}\n\n.tr > :nth-child(2) {\n position: sticky;\n left: 0;\n z-index: 1;\n margin-inline-start: -0.75rem;\n padding-inline-start: 0.75rem;\n background: linear-gradient(var(--row-fill), var(--row-fill)), var(--nol-panel);\n}\n\n.fetched-head,\n.fetched {\n text-align: end;\n}\n\n.th {\n height: 1.75rem;\n color: var(--nol-text-strong);\n font-size: 0.75rem;\n font-weight: var(--nol-weight-emphasis);\n}\n\n.ic {\n display: inline-flex;\n align-items: center;\n gap: 0.25rem;\n}\n\n.sort {\n display: inline-flex;\n align-items: center;\n gap: 0.125rem;\n max-width: 100%;\n padding: 0;\n border: 0;\n background: none;\n color: inherit;\n font: inherit;\n cursor: pointer;\n}\n\n.sort:hover {\n color: var(--nol-link);\n}\n\n.sort:focus-visible {\n outline: var(--nol-border-width) solid var(--nol-accent);\n}\n\n.arrow {\n font-size: 0.875rem;\n}\n\n/* An unsorted header keeps its arrow's space, so a right-aligned title doesn't move when its column is sorted. */\n.arrow.unsorted {\n visibility: hidden;\n}\n\n.link {\n min-width: 0;\n overflow: hidden;\n padding: 0;\n border: 0;\n background: none;\n color: var(--nol-text-strong);\n font: inherit;\n font-weight: var(--nol-weight-emphasis);\n text-overflow: ellipsis;\n cursor: pointer;\n}\n\n.link:hover {\n color: var(--nol-link);\n text-decoration: underline;\n}\n\n.place {\n margin-inline-start: 0.5rem;\n color: var(--nol-text-muted);\n}\n\n.ellipsis {\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n\n.failure {\n grid-column: span 2;\n color: var(--nol-error);\n}\n\n.not-repository {\n display: flex;\n grid-column: span 2;\n gap: var(--nol-space-2);\n align-items: center;\n min-width: 0;\n}\n\n.remove-one {\n font-weight: inherit;\n}\n\n.conflicts {\n color: var(--nol-warning);\n}\n\n.pull-request .link {\n display: inline-block;\n max-width: 100%;\n white-space: nowrap;\n vertical-align: bottom;\n color: inherit;\n font-weight: inherit;\n}\n\n.dot {\n flex: none;\n width: 0.5rem;\n height: 0.5rem;\n border-radius: 50%;\n background-color: var(--nol-text-muted);\n}\n\n.dot.ok {\n background-color: var(--nol-status-ok);\n}\n\n.dot.failed {\n background-color: var(--nol-status-failed);\n}\n\n.dot.pending {\n background-color: var(--nol-warning);\n}\n\n.dot.signed-out {\n background-color: var(--nol-warning);\n}\n\n.empty {\n display: grid;\n grid-column: 1 / -1;\n gap: 0.5rem;\n justify-items: center;\n padding: 1.5rem;\n color: var(--nol-text-muted);\n}\n\n.empty p {\n margin: 0;\n}\n\n.empty-actions {\n display: flex;\n flex-wrap: wrap;\n gap: 0.5rem;\n justify-content: center;\n}\n\n.visually-hidden {\n position: absolute;\n width: 1px;\n height: 1px;\n overflow: hidden;\n clip-path: inset(50%);\n white-space: nowrap;\n}\n\n@container (width < 59rem) {\n .table {\n grid-template-columns: 2.125rem 8rem minmax(8rem, 1fr) 5.5rem 5rem 8.5rem 5rem 6.25rem;\n }\n\n .open,\n .open-head {\n display: none;\n }\n}\n\n@container (width < 52rem) {\n .table {\n grid-template-columns: 2.125rem 8rem minmax(8rem, 1fr) 5.5rem 5rem 5rem 6.25rem;\n }\n\n .pull-request,\n .pull-request-head {\n display: none;\n }\n}\n\n@container (width < 43rem) {\n .table {\n grid-template-columns: 2.125rem 8rem minmax(8rem, 1fr) 5.5rem 5rem 6.25rem;\n }\n\n .changes,\n .changes-head {\n display: none;\n }\n}\n\n@container (width < 37.5rem) {\n .table {\n grid-template-columns: 2.125rem 8rem minmax(8rem, 1fr) 5rem 6.25rem;\n }\n\n .sync,\n .sync-head {\n display: none;\n }\n\n .failure,\n .not-repository {\n grid-column: span 1;\n }\n}\n\n@container (width < 31.5rem) {\n .table {\n grid-template-columns: 2.125rem 6.5rem minmax(6rem, 1fr) 5rem 6.25rem;\n }\n}\n\n@container (max-width: 46.75rem) {\n .toolbar {\n flex-wrap: wrap;\n height: auto;\n min-height: 2.25rem;\n padding-block: 0.25rem;\n }\n}\n"], dependencies: [{ kind: "component", type: ButtonComponent, selector: "button[nol-button], a[nol-button]", inputs: ["variant", "overlay", "backdrop", "danger", "size", "busy"] }, { kind: "component", type: CheckboxComponent, selector: "nol-checkbox", inputs: ["checked", "disabled", "label"], outputs: ["checkedChange"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox]):not([ngNoCva])[formControlName],textarea:not([ngNoCva])[formControlName],input:not([type=checkbox]):not([ngNoCva])[formControl],textarea:not([ngNoCva])[formControl],input:not([type=checkbox]):not([ngNoCva])[ngModel],textarea:not([ngNoCva])[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: GitReferenceTextComponent, selector: "nol-git-reference-text", inputs: ["text", "folder", "link", "title", "chipTabIndex"] }, { kind: "directive", type: GitVisibleDirective, selector: "[nolGitVisible]", outputs: ["visibleChange"] }, { kind: "component", type: IconButtonComponent, selector: "button[nol-icon-button]", inputs: ["icon", "label", "pressed", "filled", "overlay", "backdrop", "buttonHeight", "danger", "tabAction", "busy", "busyPressable"] }, { kind: "component", type: MenuComponent, selector: "nol-menu", inputs: ["minWidth"] }, { kind: "component", type: MenuItemComponent, selector: "button[nol-menu-item]", inputs: ["label", "icon", "checked", "checkbox", "shortcut", "description", "value", "tag", "danger", "isShowingChevron"] }, { kind: "directive", type: MenuTriggerDirective, selector: "[nolMenuTriggerFor]", inputs: ["nolMenuTriggerFor", "nolMenuAlignment"], exportAs: ["nolMenuTriggerFor"] }, { kind: "component", type: TextFieldComponent, selector: "input[nol-text-field], textarea[nol-text-field]", inputs: ["large", "quiet"] }, { kind: "component", type: ToolbarButtonComponent, selector: "button[nol-toolbar-button]", inputs: ["label", "icon", "isShowingLabel", "pressed", "hasMenu", "isUnavailable", "isPressedWhileOpen", "busy"] }] });
|
|
394
446
|
}
|
|
395
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.3.
|
|
447
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.3.2", ngImport: i0, type: GitWorkspaceComponent, decorators: [{
|
|
396
448
|
type: Component,
|
|
397
449
|
args: [{ selector: "nol-git-workspace", imports: [ButtonComponent, CheckboxComponent, FormsModule, GitReferenceTextComponent, GitVisibleDirective, IconButtonComponent, MenuComponent, MenuItemComponent,
|
|
398
|
-
MenuTriggerDirective, TextFieldComponent, ToolbarButtonComponent], template: "<!--\n@license\nCopyright (c) Noldova.\n\nThis source code is licensed under the license found in the\nLICENSE file in the root directory of this source tree.\n-->\n\n<div class=\"page\">\n <main class=\"panel\" [attr.aria-label]=\"title()\">\n <div class=\"toolbar\">\n @if (renaming(); as name) {\n @if (workspace(); as current) {\n <input #nameField nol-text-field class=\"name-field\" type=\"text\" name=\"workspaceName\" [attr.aria-label]=\"resources.workspaceNameLabel\" [ngModel]=\"name\"\n (ngModelChange)=\"renaming.set($event)\" (keydown.enter)=\"rename(current)\" (keydown.escape)=\"renaming.set(null)\" (blur)=\"rename(current)\" />\n }\n }\n @else {\n <span class=\"name\">{{ title() }}</span>\n }\n <span class=\"small muted count-text\">{{ resources.formatRepositoryCount(folders().length, chosen().size) }}</span>\n <span class=\"separator\" aria-hidden=\"true\"></span>\n <button type=\"button\" nol-toolbar-button class=\"fetch-all\" [icon]=\"resources.fetchAllIcon\" [label]=\"resources.fetchAllTitle\" [isShowingLabel]=\"true\"\n [isUnavailable]=\"isFetching() || folders().length === 0\" (click)=\"fetchAllAsync()\"></button>\n @if (chosen().size > 0) {\n <button type=\"button\" nol-toolbar-button class=\"pull-chosen\" [icon]=\"resources.pullIcon\" [label]=\"resources.formatPullChosen(chosenBehind().length)\"\n [isShowingLabel]=\"true\" [isUnavailable]=\"isWriting() || chosenBehind().length === 0\" (click)=\"pullChosenAsync()\"></button>\n <button type=\"button\" nol-toolbar-button class=\"new-branch\" [icon]=\"resources.newBranchIcon\" [label]=\"resources.formatNewBranchIn(chosen().size)\"\n [isShowingLabel]=\"true\" [isUnavailable]=\"isWriting()\" (click)=\"newBranchInChosen()\"></button>\n }\n <button type=\"button\" nol-toolbar-button class=\"add\" [icon]=\"resources.addIcon\" [label]=\"resources.addMenuTitle\" [isShowingLabel]=\"true\" [hasMenu]=\"true\"\n [isUnavailable]=\"isScanning()\" [nolMenuTriggerFor]=\"addMenu\"></button>\n @if (chosen().size > 0) {\n @if (workspace(); as current) {\n <button type=\"button\" nol-toolbar-button class=\"move-up\" [icon]=\"resources.moveUpIcon\" [label]=\"resources.moveUpTitle\" (click)=\"moveChosen(current, -1)\"></button>\n <button type=\"button\" nol-toolbar-button class=\"move-down\" [icon]=\"resources.moveDownIcon\" [label]=\"resources.moveDownTitle\" (click)=\"moveChosen(current, 1)\"></button>\n }\n <button type=\"button\" nol-toolbar-button class=\"remove\" [icon]=\"resources.removeIcon\" [label]=\"resources.formatRemoveRepositories(chosen().size)\" [isShowingLabel]=\"true\"\n (click)=\"removeChosen()\"></button>\n }\n <button type=\"button\" nol-toolbar-button class=\"open-across\" [icon]=\"resources.workspaceAcrossIcon\" [label]=\"resources.acrossHeading\" [isShowingLabel]=\"true\"\n (click)=\"openAcross()\"></button>\n <span class=\"grow\"></span>\n @if (workspace(); as current) {\n <button nol-icon-button type=\"button\" class=\"rename\" [icon]=\"resources.renameIcon\" [label]=\"resources.renameWorkspaceTitle\" (click)=\"renaming.set(current.name)\"></button>\n <button nol-icon-button type=\"button\" class=\"remove-workspace\" [icon]=\"resources.deleteIcon\" [label]=\"resources.removeWorkspaceTitle\" (click)=\"removeWorkspace(current)\"></button>\n }\n <label class=\"filter\">\n <span class=\"material-symbols-rounded\" aria-hidden=\"true\">{{ resources.filterIcon }}</span>\n <input #filterField type=\"search\" [placeholder]=\"resources.filterRepositoriesLabel\" [attr.aria-label]=\"resources.filterRepositoriesLabel\" [value]=\"filter()\"\n (input)=\"filter.set(filterField.value)\" />\n </label>\n </div>\n @if (result().length > 0) {\n <div class=\"small result\" role=\"status\">\n @for (line of result(); track $index) {\n <p>{{ line }}</p>\n }\n </div>\n }\n <div class=\"table\" role=\"table\" [attr.aria-label]=\"title()\">\n <div class=\"tr th\" role=\"row\">\n <span role=\"columnheader\"><span class=\"visually-hidden\">{{ resources.selectRepositoryLabel }}</span></span>\n <span role=\"columnheader\">{{ resources.repositoryColumn }}</span>\n <span role=\"columnheader\">{{ resources.branchColumn }}</span>\n <span role=\"columnheader\" class=\"sync-head\">{{ resources.syncColumn }}</span>\n <span role=\"columnheader\" class=\"changes-head\">{{ resources.changesColumn }}</span>\n <span role=\"columnheader\" class=\"pull-request-head\">{{ resources.pullRequestColumn }}</span>\n <span role=\"columnheader\">{{ resources.checksColumn }}</span>\n <span role=\"columnheader\" class=\"open-head\">{{ resources.openColumn }}</span>\n <span role=\"columnheader\" class=\"fetched-head\">{{ resources.fetchedColumn }}</span>\n </div>\n @for (row of rows(); track row.folder) {\n @let isChosen = chosen().has(row.folder);\n <div nolGitVisible class=\"tr\" role=\"row\" [class.selected]=\"isChosen\" [title]=\"row.folder\" (visibleChange)=\"follow(row.folder, $event)\">\n <span role=\"cell\">\n <nol-checkbox class=\"select\" [checked]=\"isChosen\" (checkedChange)=\"select(row.folder, $event)\"><span class=\"visually-hidden\">{{ row.name }}</span></nol-checkbox>\n </span>\n <span role=\"cell\" class=\"ic\">\n <span class=\"material-symbols-rounded\" aria-hidden=\"true\">{{ resources.folderIcon }}</span>\n <button type=\"button\" class=\"link name-cell\" [title]=\"row.name\" (click)=\"open(row.folder)\">{{ row.name }}</button>\n </span>\n @if (!row.isRepository()) {\n <span role=\"cell\" class=\"not-repository small\">\n <span class=\"muted\">{{ resources.notRepositoryHeading }}</span>\n <button type=\"button\" class=\"link remove-one\" (click)=\"remove(only(row.folder))\">{{ resources.removeLabel }}</button>\n </span>\n }\n @else if (row.failure(); as failure) {\n <span role=\"cell\" class=\"failure small\" [title]=\"failure\">{{ failure }}</span>\n }\n @else {\n <span role=\"cell\" class=\"ic branch\">\n @if (row.branch().length > 0) {\n <span class=\"material-symbols-rounded\" aria-hidden=\"true\">{{ resources.statusBarBranchIcon }}</span>\n }\n <span class=\"ellipsis\" [title]=\"row.branch()\">{{ row.branch() }}</span>\n </span>\n <span role=\"cell\" class=\"small sync\">{{ row.sync() }}</span>\n }\n <span role=\"cell\" class=\"small changes\" [class.conflicts]=\"row.hasConflicts()\">{{ row.changes() }}</span>\n <span role=\"cell\" class=\"small pull-request\">\n @if (row.pullRequest(); as pullRequest) {\n @let words = around(row.pullRequestText(), pullRequest.label);\n @let linkTitle = resources.formatPullRequestLinkTitle(row.pullRequestText(), pullRequest.title);\n <span class=\"link\" (click)=\"openPullRequest(row, pullRequest)\"><span [title]=\"linkTitle\">{{ words.before }}</span><nol-git-reference-text [text]=\"words.linked\" [folder]=\"row.folder\" [link]=\"pullRequest.url\" /><span [title]=\"linkTitle\">{{ words.after }}</span></span>\n }\n @else {\n {{ row.pullRequestText() }}\n }\n </span>\n <span role=\"cell\" class=\"ic small checks\">\n @if (row.checksTone().length > 0) {\n <span [class]=\"'dot ' + row.checksTone()\" aria-hidden=\"true\"></span>\n }\n {{ row.checks() }}\n </span>\n <span role=\"cell\" class=\"small open\" [title]=\"row.openTitle()\">{{ row.open() }}</span>\n <span role=\"cell\" class=\"small muted fetched\">{{ fetchedOf(row) }}</span>\n </div>\n }\n @empty {\n <div class=\"empty\">\n <p>{{ folders().length === 0 ? resources.noRepositories : resources.noRepositoryMatches }}</p>\n @if (folders().length === 0) {\n <div class=\"empty-actions\">\n <button nol-button type=\"button\" class=\"empty-add\" [disabled]=\"isScanning()\" (click)=\"add(addKinds.Local)\">{{ resources.addLocalTitle }}</button>\n <button nol-button type=\"button\" class=\"empty-clone\" [variant]=\"secondary\" (click)=\"add(addKinds.Clone)\">{{ resources.cloneRepositoryTitle }}</button>\n <button nol-button type=\"button\" class=\"empty-init\" [variant]=\"secondary\" (click)=\"add(addKinds.Init)\">{{ resources.initRepositoryTitle }}</button>\n </div>\n }\n </div>\n }\n </div>\n </main>\n</div>\n<ng-template #addMenu>\n <nol-menu>\n <button nol-menu-item class=\"add-local\" [label]=\"resources.addLocalTitle\" [icon]=\"resources.addIcon\" (triggered)=\"add(addKinds.Local)\"></button>\n <button nol-menu-item class=\"add-clone\" [label]=\"resources.cloneRepositoryTitle\" [icon]=\"resources.cloneIcon\" (triggered)=\"add(addKinds.Clone)\"></button>\n <button nol-menu-item class=\"add-init\" [label]=\"resources.initRepositoryTitle\" [icon]=\"resources.initIcon\" (triggered)=\"add(addKinds.Init)\"></button>\n </nol-menu>\n</ng-template>\n", styles: ["/**\n * @license\n * Copyright (c) Noldova.\n *\n * This source code is licensed under the license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n:host {\n display: block;\n container-type: inline-size;\n box-sizing: border-box;\n height: 100%;\n min-height: 0;\n color: var(--nol-text);\n font-family: var(--nol-font-sans);\n font-size: var(--nol-text-panel);\n line-height: var(--nol-line-panel);\n}\n\n.material-symbols-rounded {\n flex: none;\n width: var(--nol-icon);\n height: var(--nol-icon);\n overflow: hidden;\n color: var(--nol-icon-color);\n font-size: var(--nol-icon);\n line-height: 1;\n}\n\n.page {\n display: grid;\n grid-template-columns: minmax(0, 1fr);\n height: 100%;\n min-height: 0;\n}\n\n.panel {\n display: flex;\n flex-direction: column;\n min-width: 0;\n min-height: 0;\n overflow: hidden;\n background: var(--nol-panel);\n}\n\n.grow {\n flex: 1 1 auto;\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n\n.muted {\n color: var(--nol-text-muted);\n}\n\n.small {\n font-size: 0.75rem;\n}\n\n.toolbar {\n box-sizing: border-box;\n display: flex;\n flex: none;\n align-items: center;\n gap: 0.25rem;\n height: 2.25rem;\n padding: 0 0.75rem 0 0.5rem;\n border-bottom: var(--nol-border-width) solid var(--nol-border);\n}\n\n.result {\n flex: none;\n padding: 0.375rem 0.75rem;\n border-bottom: var(--nol-border-width) solid var(--nol-border);\n}\n\n.result p {\n margin: 0;\n line-height: var(--nol-line-message);\n}\n\n.name {\n padding: 0 0.25rem;\n color: var(--nol-text-strong);\n font-weight: var(--nol-weight-emphasis);\n white-space: nowrap;\n}\n\n.name-field {\n width: 14rem;\n}\n\n.count-text {\n white-space: nowrap;\n}\n\n.separator {\n flex: none;\n width: var(--nol-border-width);\n height: 1rem;\n margin: 0 0.25rem;\n background: var(--nol-border);\n}\n\n.filter {\n display: flex;\n flex: none;\n align-items: center;\n gap: 0.5rem;\n box-sizing: border-box;\n width: 14rem;\n height: 1.625rem;\n padding: 0 0.375rem;\n border: var(--nol-border-width) solid var(--nol-input-border);\n border-radius: var(--nol-radius-small);\n background: var(--nol-input);\n}\n\n.filter .material-symbols-rounded {\n color: var(--nol-placeholder);\n}\n\n.filter input {\n flex: 1;\n min-width: 0;\n padding: 0;\n border: 0;\n outline: none;\n background: transparent;\n color: var(--nol-text);\n font: inherit;\n}\n\n.filter input::placeholder {\n color: var(--nol-placeholder);\n}\n\n.filter:focus-within {\n outline: var(--nol-border-width) solid var(--nol-accent);\n outline-offset: calc(-1 * var(--nol-border-width));\n}\n\n.table {\n display: grid;\n grid-template-columns: 2.125rem 8rem minmax(8rem, 1fr) 5.5rem 5rem 8.5rem 5rem 6.5rem 6.25rem;\n align-content: start;\n column-gap: 0.5rem;\n min-height: 0;\n overflow: auto;\n}\n\n.tr {\n --row-fill: transparent;\n\n box-sizing: border-box;\n display: grid;\n grid-column: 1 / -1;\n grid-template-columns: subgrid;\n align-items: center;\n height: 2rem;\n padding: 0 0.75rem;\n border-bottom: var(--nol-border-width) solid var(--nol-border);\n white-space: nowrap;\n}\n\n.tr > * {\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n\n.tr:not(.th):hover {\n --row-fill: var(--nol-hover);\n\n background: var(--nol-hover);\n}\n\n.tr.selected,\n.tr.selected:hover {\n --row-fill: var(--nol-selected);\n\n background: var(--nol-selected);\n}\n\n.tr > :nth-child(2) {\n position: sticky;\n left: 0;\n z-index: 1;\n margin-inline-start: -0.75rem;\n padding-inline-start: 0.75rem;\n background: linear-gradient(var(--row-fill), var(--row-fill)), var(--nol-panel);\n}\n\n.fetched-head,\n.fetched {\n text-align: end;\n}\n\n.th {\n height: 1.75rem;\n color: var(--nol-text-strong);\n font-size: 0.75rem;\n font-weight: var(--nol-weight-emphasis);\n}\n\n.ic {\n display: inline-flex;\n align-items: center;\n gap: 0.25rem;\n}\n\n.link {\n min-width: 0;\n overflow: hidden;\n padding: 0;\n border: 0;\n background: none;\n color: var(--nol-text-strong);\n font: inherit;\n font-weight: var(--nol-weight-emphasis);\n text-overflow: ellipsis;\n cursor: pointer;\n}\n\n.link:hover {\n color: var(--nol-link);\n text-decoration: underline;\n}\n\n.ellipsis {\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n\n.failure {\n grid-column: span 2;\n color: var(--nol-error);\n}\n\n.not-repository {\n display: flex;\n grid-column: span 2;\n gap: var(--nol-space-2);\n align-items: center;\n min-width: 0;\n}\n\n.remove-one {\n font-weight: inherit;\n}\n\n.conflicts {\n color: var(--nol-warning);\n}\n\n.pull-request .link {\n display: inline-block;\n max-width: 100%;\n white-space: nowrap;\n vertical-align: bottom;\n color: inherit;\n font-weight: inherit;\n}\n\n.dot {\n flex: none;\n width: 0.5rem;\n height: 0.5rem;\n border-radius: 50%;\n background-color: var(--nol-text-muted);\n}\n\n.dot.ok {\n background-color: var(--nol-status-ok);\n}\n\n.dot.failed {\n background-color: var(--nol-status-failed);\n}\n\n.dot.pending {\n background-color: var(--nol-warning);\n}\n\n.dot.signed-out {\n background-color: var(--nol-warning);\n}\n\n.empty {\n display: grid;\n grid-column: 1 / -1;\n gap: 0.5rem;\n justify-items: center;\n padding: 1.5rem;\n color: var(--nol-text-muted);\n}\n\n.empty p {\n margin: 0;\n}\n\n.empty-actions {\n display: flex;\n flex-wrap: wrap;\n gap: 0.5rem;\n justify-content: center;\n}\n\n.visually-hidden {\n position: absolute;\n width: 1px;\n height: 1px;\n overflow: hidden;\n clip-path: inset(50%);\n white-space: nowrap;\n}\n\n@container (width < 59rem) {\n .table {\n grid-template-columns: 2.125rem 8rem minmax(8rem, 1fr) 5.5rem 5rem 8.5rem 5rem 6.25rem;\n }\n\n .open,\n .open-head {\n display: none;\n }\n}\n\n@container (width < 52rem) {\n .table {\n grid-template-columns: 2.125rem 8rem minmax(8rem, 1fr) 5.5rem 5rem 5rem 6.25rem;\n }\n\n .pull-request,\n .pull-request-head {\n display: none;\n }\n}\n\n@container (width < 43rem) {\n .table {\n grid-template-columns: 2.125rem 8rem minmax(8rem, 1fr) 5.5rem 5rem 6.25rem;\n }\n\n .changes,\n .changes-head {\n display: none;\n }\n}\n\n@container (width < 37.5rem) {\n .table {\n grid-template-columns: 2.125rem 8rem minmax(8rem, 1fr) 5rem 6.25rem;\n }\n\n .sync,\n .sync-head {\n display: none;\n }\n\n .failure,\n .not-repository {\n grid-column: span 1;\n }\n}\n\n@container (width < 31.5rem) {\n .table {\n grid-template-columns: 2.125rem 6.5rem minmax(6rem, 1fr) 5rem 6.25rem;\n }\n}\n\n@container (max-width: 46.75rem) {\n .toolbar {\n flex-wrap: wrap;\n height: auto;\n min-height: 2.25rem;\n padding-block: 0.25rem;\n }\n}\n"] }]
|
|
450
|
+
MenuTriggerDirective, TextFieldComponent, ToolbarButtonComponent], template: "<!--\n@license\nCopyright (c) Noldova.\n\nThis source code is licensed under the license found in the\nLICENSE file in the root directory of this source tree.\n-->\n\n<div class=\"page\">\n <main class=\"panel\" [attr.aria-label]=\"title()\">\n <div class=\"toolbar\">\n @if (renaming(); as name) {\n @if (workspace(); as current) {\n <input #nameField nol-text-field class=\"name-field\" type=\"text\" name=\"workspaceName\" [attr.aria-label]=\"resources.workspaceNameLabel\" [ngModel]=\"name\"\n (ngModelChange)=\"renaming.set($event)\" (keydown.enter)=\"rename(current)\" (keydown.escape)=\"renaming.set(null)\" (blur)=\"rename(current)\" />\n }\n }\n @else {\n <span class=\"name\">{{ title() }}</span>\n }\n <span class=\"small muted count-text\">{{ resources.formatRepositoryCount(folders().length, chosen().size) }}</span>\n <span class=\"separator\" aria-hidden=\"true\"></span>\n <button type=\"button\" nol-toolbar-button class=\"fetch-all\" [icon]=\"resources.fetchAllIcon\" [label]=\"resources.fetchAllTitle\" [isShowingLabel]=\"true\"\n [isUnavailable]=\"isFetching() || folders().length === 0\" (click)=\"fetchAllAsync()\"></button>\n @if (chosen().size > 0) {\n <button type=\"button\" nol-toolbar-button class=\"pull-chosen\" [icon]=\"resources.pullIcon\" [label]=\"resources.formatPullChosen(chosenBehind().length)\"\n [isShowingLabel]=\"true\" [isUnavailable]=\"isWriting() || chosenBehind().length === 0\" (click)=\"pullChosenAsync()\"></button>\n <button type=\"button\" nol-toolbar-button class=\"new-branch\" [icon]=\"resources.newBranchIcon\" [label]=\"resources.formatNewBranchIn(chosen().size)\"\n [isShowingLabel]=\"true\" [isUnavailable]=\"isWriting()\" (click)=\"newBranchInChosen()\"></button>\n }\n <button type=\"button\" nol-toolbar-button class=\"add\" [icon]=\"resources.addIcon\" [label]=\"resources.addMenuTitle\" [isShowingLabel]=\"true\" [hasMenu]=\"true\"\n [isUnavailable]=\"isScanning()\" [nolMenuTriggerFor]=\"addMenu\"></button>\n @if (chosen().size > 0) {\n @if (workspace(); as current) {\n @if (!sort()) {\n <button type=\"button\" nol-toolbar-button class=\"move-up\" [icon]=\"resources.moveUpIcon\" [label]=\"resources.moveUpTitle\" (click)=\"moveChosen(current, -1)\"></button>\n <button type=\"button\" nol-toolbar-button class=\"move-down\" [icon]=\"resources.moveDownIcon\" [label]=\"resources.moveDownTitle\" (click)=\"moveChosen(current, 1)\"></button>\n }\n }\n <button type=\"button\" nol-toolbar-button class=\"remove\" [icon]=\"resources.removeIcon\" [label]=\"resources.formatRemoveRepositories(chosen().size)\" [isShowingLabel]=\"true\"\n (click)=\"removeChosen()\"></button>\n }\n <button type=\"button\" nol-toolbar-button class=\"open-across\" [icon]=\"resources.workspaceAcrossIcon\" [label]=\"resources.acrossHeading\" [isShowingLabel]=\"true\"\n (click)=\"openAcross()\"></button>\n <span class=\"grow\"></span>\n @if (workspace(); as current) {\n <button nol-icon-button type=\"button\" class=\"rename\" [icon]=\"resources.renameIcon\" [label]=\"resources.renameWorkspaceTitle\" (click)=\"renaming.set(current.name)\"></button>\n <button nol-icon-button type=\"button\" class=\"remove-workspace\" [icon]=\"resources.deleteIcon\" [label]=\"resources.removeWorkspaceTitle\" (click)=\"removeWorkspace(current)\"></button>\n }\n <label class=\"filter\">\n <span class=\"material-symbols-rounded\" aria-hidden=\"true\">{{ resources.filterIcon }}</span>\n <input #filterField type=\"search\" [placeholder]=\"resources.filterRepositoriesLabel\" [attr.aria-label]=\"resources.filterRepositoriesLabel\" [value]=\"filter()\"\n (input)=\"filter.set(filterField.value)\" />\n </label>\n </div>\n @if (result().length > 0) {\n <div class=\"small result\" role=\"status\">\n @for (line of result(); track $index) {\n <p>{{ line }}</p>\n }\n </div>\n }\n <div class=\"table\" role=\"table\" [attr.aria-label]=\"title()\">\n <div class=\"tr th\" role=\"row\">\n <span role=\"columnheader\"><span class=\"visually-hidden\">{{ resources.selectRepositoryLabel }}</span></span>\n @for (header of headers; track header.column) {\n @let sorted = ariaSortOf(header.column);\n <span role=\"columnheader\" [class]=\"header.className\" [attr.aria-sort]=\"sorted\">\n <button type=\"button\" class=\"sort\" (click)=\"sortBy(header.column)\">{{ header.title }}<span class=\"material-symbols-rounded arrow\" [class.unsorted]=\"!sorted\" aria-hidden=\"true\">{{ sorted === resources.descendingSort ? resources.descendingIcon : resources.ascendingIcon }}</span></button>\n </span>\n }\n </div>\n @for (row of rows(); track row.folder) {\n @let isChosen = chosen().has(row.folder);\n <div nolGitVisible class=\"tr\" role=\"row\" [class.selected]=\"isChosen\" [title]=\"row.folder\" (visibleChange)=\"follow(row.folder, $event)\">\n <span role=\"cell\">\n <nol-checkbox class=\"select\" [checked]=\"isChosen\" (checkedChange)=\"select(row.folder, $event)\"><span class=\"visually-hidden\">{{ row.name }}</span></nol-checkbox>\n </span>\n <span role=\"cell\" class=\"ic\">\n <span class=\"material-symbols-rounded\" aria-hidden=\"true\">{{ resources.folderIcon }}</span>\n <button type=\"button\" class=\"link name-cell\" [title]=\"row.name\" (click)=\"open(row.folder)\">{{ row.name }}@if (twins().has(row.name.toLowerCase())) {<span class=\"place\">{{ row.parent }}</span>}</button>\n </span>\n @if (!row.isRepository()) {\n <span role=\"cell\" class=\"not-repository small\">\n <span class=\"muted\">{{ resources.notRepositoryHeading }}</span>\n <button type=\"button\" class=\"link remove-one\" (click)=\"remove(only(row.folder))\">{{ resources.removeLabel }}</button>\n </span>\n }\n @else if (row.failure(); as failure) {\n <span role=\"cell\" class=\"failure small\" [title]=\"failure\">{{ failure }}</span>\n }\n @else {\n <span role=\"cell\" class=\"ic branch\">\n @if (row.branch().length > 0) {\n <span class=\"material-symbols-rounded\" aria-hidden=\"true\">{{ resources.statusBarBranchIcon }}</span>\n }\n <span class=\"ellipsis\" [title]=\"row.branch()\">{{ row.branch() }}</span>\n </span>\n <span role=\"cell\" class=\"small sync\">{{ row.sync() }}</span>\n }\n <span role=\"cell\" class=\"small changes\" [class.conflicts]=\"row.hasConflicts()\">{{ row.changes() }}</span>\n <span role=\"cell\" class=\"small pull-request\">\n @if (row.pullRequest(); as pullRequest) {\n @let words = around(row.pullRequestText(), pullRequest.label);\n @let linkTitle = resources.formatPullRequestLinkTitle(row.pullRequestText(), pullRequest.title);\n <span class=\"link\" (click)=\"openPullRequest(row, pullRequest)\"><span [title]=\"linkTitle\">{{ words.before }}</span><nol-git-reference-text [text]=\"words.linked\" [folder]=\"row.folder\" [link]=\"pullRequest.url\" /><span [title]=\"linkTitle\">{{ words.after }}</span></span>\n }\n @else {\n {{ row.pullRequestText() }}\n }\n </span>\n <span role=\"cell\" class=\"ic small checks\">\n @if (row.checksTone().length > 0) {\n <span [class]=\"'dot ' + row.checksTone()\" aria-hidden=\"true\"></span>\n }\n {{ row.checks() }}\n </span>\n <span role=\"cell\" class=\"small open\" [title]=\"row.openTitle()\">{{ row.open() }}</span>\n <span role=\"cell\" class=\"small muted fetched\">{{ fetchedOf(row) }}</span>\n </div>\n }\n @empty {\n <div class=\"empty\">\n <p>{{ folders().length === 0 ? resources.noRepositories : resources.noRepositoryMatches }}</p>\n @if (folders().length === 0) {\n <div class=\"empty-actions\">\n <button nol-button type=\"button\" class=\"empty-add\" [disabled]=\"isScanning()\" (click)=\"add(addKinds.Local)\">{{ resources.addLocalTitle }}</button>\n <button nol-button type=\"button\" class=\"empty-clone\" [variant]=\"secondary\" (click)=\"add(addKinds.Clone)\">{{ resources.cloneRepositoryTitle }}</button>\n <button nol-button type=\"button\" class=\"empty-init\" [variant]=\"secondary\" (click)=\"add(addKinds.Init)\">{{ resources.initRepositoryTitle }}</button>\n </div>\n }\n </div>\n }\n </div>\n </main>\n</div>\n<ng-template #addMenu>\n <nol-menu>\n <button nol-menu-item class=\"add-local\" [label]=\"resources.addLocalTitle\" [icon]=\"resources.addIcon\" (triggered)=\"add(addKinds.Local)\"></button>\n <button nol-menu-item class=\"add-clone\" [label]=\"resources.cloneRepositoryTitle\" [icon]=\"resources.cloneIcon\" (triggered)=\"add(addKinds.Clone)\"></button>\n <button nol-menu-item class=\"add-init\" [label]=\"resources.initRepositoryTitle\" [icon]=\"resources.initIcon\" (triggered)=\"add(addKinds.Init)\"></button>\n </nol-menu>\n</ng-template>\n", styles: ["/**\n * @license\n * Copyright (c) Noldova.\n *\n * This source code is licensed under the license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n:host {\n display: block;\n container-type: inline-size;\n box-sizing: border-box;\n height: 100%;\n min-height: 0;\n color: var(--nol-text);\n font-family: var(--nol-font-sans);\n font-size: var(--nol-text-panel);\n line-height: var(--nol-line-panel);\n}\n\n.material-symbols-rounded {\n flex: none;\n width: var(--nol-icon);\n height: var(--nol-icon);\n overflow: hidden;\n color: var(--nol-icon-color);\n font-size: var(--nol-icon);\n line-height: 1;\n}\n\n.page {\n display: grid;\n grid-template-columns: minmax(0, 1fr);\n height: 100%;\n min-height: 0;\n}\n\n.panel {\n display: flex;\n flex-direction: column;\n min-width: 0;\n min-height: 0;\n overflow: hidden;\n background: var(--nol-panel);\n}\n\n.grow {\n flex: 1 1 auto;\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n\n.muted {\n color: var(--nol-text-muted);\n}\n\n.small {\n font-size: 0.75rem;\n}\n\n.toolbar {\n box-sizing: border-box;\n display: flex;\n flex: none;\n align-items: center;\n gap: 0.25rem;\n height: 2.25rem;\n padding: 0 0.75rem 0 0.5rem;\n border-bottom: var(--nol-border-width) solid var(--nol-border);\n}\n\n.result {\n flex: none;\n padding: 0.375rem 0.75rem;\n border-bottom: var(--nol-border-width) solid var(--nol-border);\n}\n\n.result p {\n margin: 0;\n line-height: var(--nol-line-message);\n}\n\n.name {\n padding: 0 0.25rem;\n color: var(--nol-text-strong);\n font-weight: var(--nol-weight-emphasis);\n white-space: nowrap;\n}\n\n.name-field {\n width: 14rem;\n}\n\n.count-text {\n white-space: nowrap;\n}\n\n.separator {\n flex: none;\n width: var(--nol-border-width);\n height: 1rem;\n margin: 0 0.25rem;\n background: var(--nol-border);\n}\n\n.filter {\n display: flex;\n flex: none;\n align-items: center;\n gap: 0.5rem;\n box-sizing: border-box;\n width: 14rem;\n height: 1.625rem;\n padding: 0 0.375rem;\n border: var(--nol-border-width) solid var(--nol-input-border);\n border-radius: var(--nol-radius-small);\n background: var(--nol-input);\n}\n\n.filter .material-symbols-rounded {\n color: var(--nol-placeholder);\n}\n\n.filter input {\n flex: 1;\n min-width: 0;\n padding: 0;\n border: 0;\n outline: none;\n background: transparent;\n color: var(--nol-text);\n font: inherit;\n}\n\n.filter input::placeholder {\n color: var(--nol-placeholder);\n}\n\n.filter:focus-within {\n outline: var(--nol-border-width) solid var(--nol-accent);\n outline-offset: calc(-1 * var(--nol-border-width));\n}\n\n.table {\n display: grid;\n grid-template-columns: 2.125rem 8rem minmax(8rem, 1fr) 5.5rem 5rem 8.5rem 5rem 6.5rem 6.25rem;\n align-content: start;\n column-gap: 0.5rem;\n min-height: 0;\n overflow: auto;\n}\n\n.tr {\n --row-fill: transparent;\n\n box-sizing: border-box;\n display: grid;\n grid-column: 1 / -1;\n grid-template-columns: subgrid;\n align-items: center;\n height: 2rem;\n padding: 0 0.75rem;\n border-bottom: var(--nol-border-width) solid var(--nol-border);\n white-space: nowrap;\n}\n\n.tr > * {\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n\n.tr:not(.th):hover {\n --row-fill: var(--nol-hover);\n\n background: var(--nol-hover);\n}\n\n.tr.selected,\n.tr.selected:hover {\n --row-fill: var(--nol-selected);\n\n background: var(--nol-selected);\n}\n\n.tr > :nth-child(2) {\n position: sticky;\n left: 0;\n z-index: 1;\n margin-inline-start: -0.75rem;\n padding-inline-start: 0.75rem;\n background: linear-gradient(var(--row-fill), var(--row-fill)), var(--nol-panel);\n}\n\n.fetched-head,\n.fetched {\n text-align: end;\n}\n\n.th {\n height: 1.75rem;\n color: var(--nol-text-strong);\n font-size: 0.75rem;\n font-weight: var(--nol-weight-emphasis);\n}\n\n.ic {\n display: inline-flex;\n align-items: center;\n gap: 0.25rem;\n}\n\n.sort {\n display: inline-flex;\n align-items: center;\n gap: 0.125rem;\n max-width: 100%;\n padding: 0;\n border: 0;\n background: none;\n color: inherit;\n font: inherit;\n cursor: pointer;\n}\n\n.sort:hover {\n color: var(--nol-link);\n}\n\n.sort:focus-visible {\n outline: var(--nol-border-width) solid var(--nol-accent);\n}\n\n.arrow {\n font-size: 0.875rem;\n}\n\n/* An unsorted header keeps its arrow's space, so a right-aligned title doesn't move when its column is sorted. */\n.arrow.unsorted {\n visibility: hidden;\n}\n\n.link {\n min-width: 0;\n overflow: hidden;\n padding: 0;\n border: 0;\n background: none;\n color: var(--nol-text-strong);\n font: inherit;\n font-weight: var(--nol-weight-emphasis);\n text-overflow: ellipsis;\n cursor: pointer;\n}\n\n.link:hover {\n color: var(--nol-link);\n text-decoration: underline;\n}\n\n.place {\n margin-inline-start: 0.5rem;\n color: var(--nol-text-muted);\n}\n\n.ellipsis {\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n\n.failure {\n grid-column: span 2;\n color: var(--nol-error);\n}\n\n.not-repository {\n display: flex;\n grid-column: span 2;\n gap: var(--nol-space-2);\n align-items: center;\n min-width: 0;\n}\n\n.remove-one {\n font-weight: inherit;\n}\n\n.conflicts {\n color: var(--nol-warning);\n}\n\n.pull-request .link {\n display: inline-block;\n max-width: 100%;\n white-space: nowrap;\n vertical-align: bottom;\n color: inherit;\n font-weight: inherit;\n}\n\n.dot {\n flex: none;\n width: 0.5rem;\n height: 0.5rem;\n border-radius: 50%;\n background-color: var(--nol-text-muted);\n}\n\n.dot.ok {\n background-color: var(--nol-status-ok);\n}\n\n.dot.failed {\n background-color: var(--nol-status-failed);\n}\n\n.dot.pending {\n background-color: var(--nol-warning);\n}\n\n.dot.signed-out {\n background-color: var(--nol-warning);\n}\n\n.empty {\n display: grid;\n grid-column: 1 / -1;\n gap: 0.5rem;\n justify-items: center;\n padding: 1.5rem;\n color: var(--nol-text-muted);\n}\n\n.empty p {\n margin: 0;\n}\n\n.empty-actions {\n display: flex;\n flex-wrap: wrap;\n gap: 0.5rem;\n justify-content: center;\n}\n\n.visually-hidden {\n position: absolute;\n width: 1px;\n height: 1px;\n overflow: hidden;\n clip-path: inset(50%);\n white-space: nowrap;\n}\n\n@container (width < 59rem) {\n .table {\n grid-template-columns: 2.125rem 8rem minmax(8rem, 1fr) 5.5rem 5rem 8.5rem 5rem 6.25rem;\n }\n\n .open,\n .open-head {\n display: none;\n }\n}\n\n@container (width < 52rem) {\n .table {\n grid-template-columns: 2.125rem 8rem minmax(8rem, 1fr) 5.5rem 5rem 5rem 6.25rem;\n }\n\n .pull-request,\n .pull-request-head {\n display: none;\n }\n}\n\n@container (width < 43rem) {\n .table {\n grid-template-columns: 2.125rem 8rem minmax(8rem, 1fr) 5.5rem 5rem 6.25rem;\n }\n\n .changes,\n .changes-head {\n display: none;\n }\n}\n\n@container (width < 37.5rem) {\n .table {\n grid-template-columns: 2.125rem 8rem minmax(8rem, 1fr) 5rem 6.25rem;\n }\n\n .sync,\n .sync-head {\n display: none;\n }\n\n .failure,\n .not-repository {\n grid-column: span 1;\n }\n}\n\n@container (width < 31.5rem) {\n .table {\n grid-template-columns: 2.125rem 6.5rem minmax(6rem, 1fr) 5rem 6.25rem;\n }\n}\n\n@container (max-width: 46.75rem) {\n .toolbar {\n flex-wrap: wrap;\n height: auto;\n min-height: 2.25rem;\n padding-block: 0.25rem;\n }\n}\n"] }]
|
|
399
451
|
}], ctorParameters: () => [], propDecorators: { instance: [{ type: i0.Input, args: [{ isSignal: true, alias: "instance", required: true }] }], nameField: [{ type: i0.ViewChild, args: ["nameField", { ...{ read: (ElementRef) }, isSignal: true }] }] } });
|
|
400
452
|
//# sourceMappingURL=git-workspace.component.js.map
|