@chisquare-tech/origine-ngx-apps-code 0.11.1 → 0.11.3
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.
|
@@ -792,7 +792,7 @@ class DiffView {
|
|
|
792
792
|
</div>
|
|
793
793
|
</div></div>
|
|
794
794
|
</ng-template>
|
|
795
|
-
`, isInline: true, styles: [":host ::ng-deep [class^=tk-k]{color:var(--o-tk-k)}:host ::ng-deep [class^=tk-s],:host ::ng-deep [class^=tk-l]{color:var(--o-tk-s)}:host ::ng-deep [class^=tk-c]{color:var(--o-tk-c);font-style:italic}:host ::ng-deep [class^=tk-m]{color:var(--o-tk-n)}:host ::ng-deep .tk-nf,:host ::ng-deep .tk-nx,:host ::ng-deep .tk-fm{color:var(--o-tk-f)}:host ::ng-deep .tk-nb,:host ::ng-deep .tk-nt,:host ::ng-deep .tk-bp{color:var(--o-tk-p)}:host ::ng-deep .tk-gi{color:var(--o-add)}:host ::ng-deep .tk-gd{color:var(--o-bad-tx)}\n", ".o-ln .o-n{cursor:default;width:44px}.o-ln .o-n.cmt{cursor:pointer}.o-ln .o-n.cmt:hover{color:var(--o-acc-tx)}.hunk{color:var(--o-dim);background:var(--o-well);padding:2px 12px;font-size:11px}.split{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr)}.split .side-l{border-right:1px solid var(--o-line-soft)}.split .full{grid-column:1 / -1}.split .o-ln .o-t{white-space:pre-wrap;word-break:break-all}.empty-side{background:var(--o-well)}.viewed{display:inline-flex;align-items:center;gap:6px}.sugg{border:1px solid var(--o-line);border-radius:6px;overflow:hidden;margin-top:2px}.sugg-h{display:flex;align-items:center;gap:8px;padding:6px 10px;background:var(--o-well);font-size:12px}\n"], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[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: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
795
|
+
`, isInline: true, styles: [":host ::ng-deep [class^=tk-k]{color:var(--o-tk-k)}:host ::ng-deep [class^=tk-s],:host ::ng-deep [class^=tk-l]{color:var(--o-tk-s)}:host ::ng-deep [class^=tk-c]{color:var(--o-tk-c);font-style:italic}:host ::ng-deep [class^=tk-m]{color:var(--o-tk-n)}:host ::ng-deep .tk-nf,:host ::ng-deep .tk-nx,:host ::ng-deep .tk-fm{color:var(--o-tk-f)}:host ::ng-deep .tk-nb,:host ::ng-deep .tk-nt,:host ::ng-deep .tk-bp{color:var(--o-tk-p)}:host ::ng-deep .tk-gi{color:var(--o-add)}:host ::ng-deep .tk-gd{color:var(--o-bad-tx)}\n", ".o-ln .o-n{cursor:default;width:44px;color:var(--o-mut)}.o-ln .o-n.cmt{cursor:pointer}.o-ln .o-n.cmt:hover{color:var(--o-acc-tx)}.hunk{color:var(--o-dim);background:var(--o-well);padding:2px 12px;font-size:11px}.split{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr)}.split .side-l{border-right:1px solid var(--o-line-soft)}.split .full{grid-column:1 / -1}.split .o-ln .o-t{white-space:pre-wrap;word-break:break-all}.empty-side{background:var(--o-well)}.viewed{display:inline-flex;align-items:center;gap:6px}.sugg{border:1px solid var(--o-line);border-radius:6px;overflow:hidden;margin-top:2px}.sugg-h{display:flex;align-items:center;gap:8px;padding:6px 10px;background:var(--o-well);font-size:12px}\n"], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[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: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
796
796
|
}
|
|
797
797
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: DiffView, decorators: [{
|
|
798
798
|
type: Component,
|
|
@@ -924,7 +924,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.12", ngImpo
|
|
|
924
924
|
</div>
|
|
925
925
|
</div></div>
|
|
926
926
|
</ng-template>
|
|
927
|
-
`, styles: [":host ::ng-deep [class^=tk-k]{color:var(--o-tk-k)}:host ::ng-deep [class^=tk-s],:host ::ng-deep [class^=tk-l]{color:var(--o-tk-s)}:host ::ng-deep [class^=tk-c]{color:var(--o-tk-c);font-style:italic}:host ::ng-deep [class^=tk-m]{color:var(--o-tk-n)}:host ::ng-deep .tk-nf,:host ::ng-deep .tk-nx,:host ::ng-deep .tk-fm{color:var(--o-tk-f)}:host ::ng-deep .tk-nb,:host ::ng-deep .tk-nt,:host ::ng-deep .tk-bp{color:var(--o-tk-p)}:host ::ng-deep .tk-gi{color:var(--o-add)}:host ::ng-deep .tk-gd{color:var(--o-bad-tx)}\n", ".o-ln .o-n{cursor:default;width:44px}.o-ln .o-n.cmt{cursor:pointer}.o-ln .o-n.cmt:hover{color:var(--o-acc-tx)}.hunk{color:var(--o-dim);background:var(--o-well);padding:2px 12px;font-size:11px}.split{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr)}.split .side-l{border-right:1px solid var(--o-line-soft)}.split .full{grid-column:1 / -1}.split .o-ln .o-t{white-space:pre-wrap;word-break:break-all}.empty-side{background:var(--o-well)}.viewed{display:inline-flex;align-items:center;gap:6px}.sugg{border:1px solid var(--o-line);border-radius:6px;overflow:hidden;margin-top:2px}.sugg-h{display:flex;align-items:center;gap:8px;padding:6px 10px;background:var(--o-well);font-size:12px}\n"] }]
|
|
927
|
+
`, styles: [":host ::ng-deep [class^=tk-k]{color:var(--o-tk-k)}:host ::ng-deep [class^=tk-s],:host ::ng-deep [class^=tk-l]{color:var(--o-tk-s)}:host ::ng-deep [class^=tk-c]{color:var(--o-tk-c);font-style:italic}:host ::ng-deep [class^=tk-m]{color:var(--o-tk-n)}:host ::ng-deep .tk-nf,:host ::ng-deep .tk-nx,:host ::ng-deep .tk-fm{color:var(--o-tk-f)}:host ::ng-deep .tk-nb,:host ::ng-deep .tk-nt,:host ::ng-deep .tk-bp{color:var(--o-tk-p)}:host ::ng-deep .tk-gi{color:var(--o-add)}:host ::ng-deep .tk-gd{color:var(--o-bad-tx)}\n", ".o-ln .o-n{cursor:default;width:44px;color:var(--o-mut)}.o-ln .o-n.cmt{cursor:pointer}.o-ln .o-n.cmt:hover{color:var(--o-acc-tx)}.hunk{color:var(--o-dim);background:var(--o-well);padding:2px 12px;font-size:11px}.split{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr)}.split .side-l{border-right:1px solid var(--o-line-soft)}.split .full{grid-column:1 / -1}.split .o-ln .o-t{white-space:pre-wrap;word-break:break-all}.empty-side{background:var(--o-well)}.viewed{display:inline-flex;align-items:center;gap:6px}.sugg{border:1px solid var(--o-line);border-radius:6px;overflow:hidden;margin-top:2px}.sugg-h{display:flex;align-items:center;gap:8px;padding:6px 10px;background:var(--o-well);font-size:12px}\n"] }]
|
|
928
928
|
}], ctorParameters: () => [], propDecorators: { repo: [{ type: i0.Input, args: [{ isSignal: true, alias: "repo", required: true }] }], file: [{ type: i0.Input, args: [{ isSignal: true, alias: "file", required: true }] }], head: [{ type: i0.Input, args: [{ isSignal: true, alias: "head", required: true }] }], base: [{ type: i0.Input, args: [{ isSignal: true, alias: "base", required: false }] }], threads: [{ type: i0.Input, args: [{ isSignal: true, alias: "threads", required: false }] }], canComment: [{ type: i0.Input, args: [{ isSignal: true, alias: "canComment", required: false }] }], mode: [{ type: i0.Input, args: [{ isSignal: true, alias: "mode", required: false }] }], ignoreSpace: [{ type: i0.Input, args: [{ isSignal: true, alias: "ignoreSpace", required: false }] }], viewed: [{ type: i0.Input, args: [{ isSignal: true, alias: "viewed", required: false }] }], reviewing: [{ type: i0.Input, args: [{ isSignal: true, alias: "reviewing", required: false }] }], comment: [{ type: i0.Output, args: ["comment"] }], reply: [{ type: i0.Output, args: ["reply"] }], resolve: [{ type: i0.Output, args: ["resolve"] }], discard: [{ type: i0.Output, args: ["discard"] }], canApply: [{ type: i0.Input, args: [{ isSignal: true, alias: "canApply", required: false }] }], batch: [{ type: i0.Input, args: [{ isSignal: true, alias: "batch", required: false }] }], apply: [{ type: i0.Output, args: ["apply"] }], batchToggle: [{ type: i0.Output, args: ["batchToggle"] }], viewedChange: [{ type: i0.Output, args: ["viewedChange"] }] } });
|
|
929
929
|
/** Pairs a hunk's lines side by side: context on both sides, a run of removals beside the run of additions that follows it. */
|
|
930
930
|
function pair(lines) {
|
|
@@ -1159,7 +1159,6 @@ class NewRepoPage {
|
|
|
1159
1159
|
<div class="o-fld"><label for="ir-user">Username <span class="o-faint">(private repos)</span></label><input id="ir-user" class="o-in" name="user" [(ngModel)]="user" autocomplete="off" /></div>
|
|
1160
1160
|
<div class="o-fld"><label for="ir-tok">Access token</label><input id="ir-tok" class="o-in" type="password" name="token" [(ngModel)]="token" autocomplete="off" /></div>
|
|
1161
1161
|
</div>
|
|
1162
|
-
<div class="o-flex"><button type="button" class="o-tog o-dis" disabled aria-label="Keep as a pull mirror"></button><span class="o-sm">Keep as a pull mirror</span><b class="o-ph-tag o-later">Later</b></div>
|
|
1163
1162
|
<div class="o-flex"><span class="o-faint o-sm">Imports run in the background; you'll get an inbox message when done.</span><button type="submit" class="o-btn o-dark o-r" [disabled]="busy() || !url_.trim() || !repoName.trim()">Import</button></div>
|
|
1164
1163
|
</form>
|
|
1165
1164
|
}
|
|
@@ -1224,7 +1223,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.12", ngImpo
|
|
|
1224
1223
|
<div class="o-fld"><label for="ir-user">Username <span class="o-faint">(private repos)</span></label><input id="ir-user" class="o-in" name="user" [(ngModel)]="user" autocomplete="off" /></div>
|
|
1225
1224
|
<div class="o-fld"><label for="ir-tok">Access token</label><input id="ir-tok" class="o-in" type="password" name="token" [(ngModel)]="token" autocomplete="off" /></div>
|
|
1226
1225
|
</div>
|
|
1227
|
-
<div class="o-flex"><button type="button" class="o-tog o-dis" disabled aria-label="Keep as a pull mirror"></button><span class="o-sm">Keep as a pull mirror</span><b class="o-ph-tag o-later">Later</b></div>
|
|
1228
1226
|
<div class="o-flex"><span class="o-faint o-sm">Imports run in the background; you'll get an inbox message when done.</span><button type="submit" class="o-btn o-dark o-r" [disabled]="busy() || !url_.trim() || !repoName.trim()">Import</button></div>
|
|
1229
1227
|
</form>
|
|
1230
1228
|
}
|
|
@@ -1692,7 +1690,9 @@ function matchesPattern(pattern, branch) {
|
|
|
1692
1690
|
}
|
|
1693
1691
|
// The web editor's commit box (prototype code_file "Commit and open PR", DEV-13): a message, and
|
|
1694
1692
|
// either the branch itself or a new branch with a pull request. A branch whose rules block direct
|
|
1695
|
-
// pushes only offers the second.
|
|
1693
|
+
// pushes only offers the second. The rules load asynchronously: until they have, nothing can be
|
|
1694
|
+
// committed (a quick commit straight to a protected branch was refused by the server); when they
|
|
1695
|
+
// cannot be loaded, the change goes to a new branch with a pull request, which any branch takes.
|
|
1696
1696
|
class CommitBox {
|
|
1697
1697
|
constructor() {
|
|
1698
1698
|
this.api = inject(CodeApi);
|
|
@@ -1707,8 +1707,14 @@ class CommitBox {
|
|
|
1707
1707
|
this.toNew = signal(false, ...(ngDevMode ? [{ debugName: "toNew" }] : /* istanbul ignore next */ []));
|
|
1708
1708
|
this.newBranch = signal('', ...(ngDevMode ? [{ debugName: "newBranch" }] : /* istanbul ignore next */ []));
|
|
1709
1709
|
this.rules = signal([], ...(ngDevMode ? [{ debugName: "rules" }] : /* istanbul ignore next */ []));
|
|
1710
|
-
/**
|
|
1711
|
-
this.
|
|
1710
|
+
/** Whether the branch's rules are known yet. */
|
|
1711
|
+
this.rulesState = signal('loading', ...(ngDevMode ? [{ debugName: "rulesState" }] : /* istanbul ignore next */ []));
|
|
1712
|
+
/**
|
|
1713
|
+
* Direct commits are refused (or may be): the rules block direct pushes, or require signed
|
|
1714
|
+
* commits (a browser commit is unsigned), or they could not be loaded.
|
|
1715
|
+
*/
|
|
1716
|
+
this.blocked = computed(() => this.rulesState() === 'failed' || this.rules().some((r) => (r.blockDirectPush || r.requireSignedCommits) && matchesPattern(r.pattern, this.branch())), ...(ngDevMode ? [{ debugName: "blocked" }] : /* istanbul ignore next */ []));
|
|
1717
|
+
this.rulesFor = null;
|
|
1712
1718
|
effect(() => {
|
|
1713
1719
|
const m = this.defaultMessage();
|
|
1714
1720
|
untracked(() => this.message.set(m));
|
|
@@ -1719,20 +1725,45 @@ class CommitBox {
|
|
|
1719
1725
|
if (!p || !repo)
|
|
1720
1726
|
return;
|
|
1721
1727
|
untracked(() => {
|
|
1722
|
-
this.
|
|
1728
|
+
this.rulesFor = { project: p.id, repo };
|
|
1729
|
+
this.loadRules();
|
|
1723
1730
|
const me = (this.host.people().find((x) => x.id === this.host.meId())?.name || 'patch').toLowerCase().replace(/[^a-z0-9]+/g, '-').replace(/^-|-$/g, '') || 'patch';
|
|
1724
1731
|
this.newBranch.set(`${me}/patch-${Math.floor(Date.now() / 1000) % 100000}`);
|
|
1725
1732
|
});
|
|
1726
1733
|
});
|
|
1727
1734
|
}
|
|
1735
|
+
loadRules() {
|
|
1736
|
+
const at = this.rulesFor;
|
|
1737
|
+
if (!at)
|
|
1738
|
+
return;
|
|
1739
|
+
this.rulesState.set('loading');
|
|
1740
|
+
this.api.protections(at.project, at.repo).subscribe({
|
|
1741
|
+
next: (r) => {
|
|
1742
|
+
if (this.rulesFor !== at)
|
|
1743
|
+
return;
|
|
1744
|
+
this.rules.set(r);
|
|
1745
|
+
this.rulesState.set('loaded');
|
|
1746
|
+
},
|
|
1747
|
+
error: () => {
|
|
1748
|
+
if (this.rulesFor === at)
|
|
1749
|
+
this.rulesState.set('failed');
|
|
1750
|
+
},
|
|
1751
|
+
});
|
|
1752
|
+
}
|
|
1728
1753
|
send() {
|
|
1754
|
+
if (this.rulesState() === 'loading')
|
|
1755
|
+
return;
|
|
1729
1756
|
const toNew = this.toNew() || this.blocked();
|
|
1730
1757
|
this.commit.emit({ message: this.message().trim(), newBranch: toNew ? this.newBranch().trim() : undefined });
|
|
1731
1758
|
}
|
|
1732
1759
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: CommitBox, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1733
1760
|
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.12", type: CommitBox, isStandalone: true, selector: "o-commit-box", inputs: { repo: { classPropertyName: "repo", publicName: "repo", isSignal: true, isRequired: true, transformFunction: null }, branch: { classPropertyName: "branch", publicName: "branch", isSignal: true, isRequired: true, transformFunction: null }, defaultMessage: { classPropertyName: "defaultMessage", publicName: "defaultMessage", isSignal: true, isRequired: false, transformFunction: null }, busy: { classPropertyName: "busy", publicName: "busy", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { commit: "commit", cancel: "cancel" }, ngImport: i0, template: `
|
|
1734
1761
|
<div class="o-col" style="gap:10px" data-testid="commit-box">
|
|
1735
|
-
@
|
|
1762
|
+
@switch (rulesState()) {
|
|
1763
|
+
@case ('loading') {<div class="o-note" role="status" data-testid="commit-rules">Checking the rules of {{ branch() }}…</div>}
|
|
1764
|
+
@case ('failed') {<div class="o-note o-amb" role="status">Could not check the rules of <b>{{ branch() }}</b>, so your change is committed to a new branch with a pull request. <button type="button" class="o-lnk" (click)="loadRules()" data-testid="commit-rules-retry">Retry</button></div>}
|
|
1765
|
+
@default {@if (blocked()) {<div class="o-note o-blu">Your change is committed to a new branch with a pull request because <b>{{ branch() }}</b> is protected.</div>}}
|
|
1766
|
+
}
|
|
1736
1767
|
<div class="o-fld"><label for="cb-msg">Commit message</label><input id="cb-msg" class="o-in" [ngModel]="message()" (ngModelChange)="message.set($event)" data-testid="commit-message" /></div>
|
|
1737
1768
|
@if (!blocked()) {
|
|
1738
1769
|
<label class="o-flex o-sm"><input type="radio" name="cb-where" [checked]="!toNew()" (change)="toNew.set(false)" /> Commit directly to <b class="o-mono">{{ branch() }}</b></label>
|
|
@@ -1743,7 +1774,7 @@ class CommitBox {
|
|
|
1743
1774
|
}
|
|
1744
1775
|
<div class="o-flex">
|
|
1745
1776
|
<button type="button" class="o-btn o-sm o-r" (click)="cancel.emit()">Cancel</button>
|
|
1746
|
-
<button type="button" class="o-btn o-sm o-pri" [disabled]="busy() || !message().trim() || ((toNew() || blocked()) && !newBranch().trim())" (click)="send()" data-testid="commit-submit">{{ toNew() || blocked() ? 'Commit and open PR' : 'Commit changes' }}</button>
|
|
1777
|
+
<button type="button" class="o-btn o-sm o-pri" [disabled]="busy() || rulesState() === 'loading' || !message().trim() || ((toNew() || blocked()) && !newBranch().trim())" (click)="send()" data-testid="commit-submit">{{ toNew() || blocked() ? 'Commit and open PR' : 'Commit changes' }}</button>
|
|
1747
1778
|
</div>
|
|
1748
1779
|
</div>
|
|
1749
1780
|
`, isInline: true, dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[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"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
@@ -1756,7 +1787,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.12", ngImpo
|
|
|
1756
1787
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
1757
1788
|
template: `
|
|
1758
1789
|
<div class="o-col" style="gap:10px" data-testid="commit-box">
|
|
1759
|
-
@
|
|
1790
|
+
@switch (rulesState()) {
|
|
1791
|
+
@case ('loading') {<div class="o-note" role="status" data-testid="commit-rules">Checking the rules of {{ branch() }}…</div>}
|
|
1792
|
+
@case ('failed') {<div class="o-note o-amb" role="status">Could not check the rules of <b>{{ branch() }}</b>, so your change is committed to a new branch with a pull request. <button type="button" class="o-lnk" (click)="loadRules()" data-testid="commit-rules-retry">Retry</button></div>}
|
|
1793
|
+
@default {@if (blocked()) {<div class="o-note o-blu">Your change is committed to a new branch with a pull request because <b>{{ branch() }}</b> is protected.</div>}}
|
|
1794
|
+
}
|
|
1760
1795
|
<div class="o-fld"><label for="cb-msg">Commit message</label><input id="cb-msg" class="o-in" [ngModel]="message()" (ngModelChange)="message.set($event)" data-testid="commit-message" /></div>
|
|
1761
1796
|
@if (!blocked()) {
|
|
1762
1797
|
<label class="o-flex o-sm"><input type="radio" name="cb-where" [checked]="!toNew()" (change)="toNew.set(false)" /> Commit directly to <b class="o-mono">{{ branch() }}</b></label>
|
|
@@ -1767,7 +1802,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.12", ngImpo
|
|
|
1767
1802
|
}
|
|
1768
1803
|
<div class="o-flex">
|
|
1769
1804
|
<button type="button" class="o-btn o-sm o-r" (click)="cancel.emit()">Cancel</button>
|
|
1770
|
-
<button type="button" class="o-btn o-sm o-pri" [disabled]="busy() || !message().trim() || ((toNew() || blocked()) && !newBranch().trim())" (click)="send()" data-testid="commit-submit">{{ toNew() || blocked() ? 'Commit and open PR' : 'Commit changes' }}</button>
|
|
1805
|
+
<button type="button" class="o-btn o-sm o-pri" [disabled]="busy() || rulesState() === 'loading' || !message().trim() || ((toNew() || blocked()) && !newBranch().trim())" (click)="send()" data-testid="commit-submit">{{ toNew() || blocked() ? 'Commit and open PR' : 'Commit changes' }}</button>
|
|
1771
1806
|
</div>
|
|
1772
1807
|
</div>
|
|
1773
1808
|
`,
|
|
@@ -3582,7 +3617,6 @@ class RepoSettingsPage extends RepoPage {
|
|
|
3582
3617
|
</div>
|
|
3583
3618
|
<div class="o-flex"><button type="button" class="o-tog" role="switch" aria-labelledby="rs-del" [class.o-on]="g.deleteBranchOnMerge" [attr.aria-checked]="g.deleteBranchOnMerge" (click)="g.deleteBranchOnMerge = !g.deleteBranchOnMerge" [disabled]="!canMaintain()"></button><span id="rs-del">Delete head branches after merge</span></div>
|
|
3584
3619
|
<div class="o-flex"><button type="button" class="o-tog" role="switch" aria-labelledby="rs-auto" [class.o-on]="g.allowAutoMerge" [attr.aria-checked]="g.allowAutoMerge" (click)="g.allowAutoMerge = !g.allowAutoMerge" [disabled]="!canMaintain()" data-testid="allow-auto-merge"></button><span id="rs-auto">Allow auto-merge when all requirements pass</span></div>
|
|
3585
|
-
<div class="o-flex"><button type="button" class="o-tog o-dis" disabled aria-label="Allow auto-merge"></button>Allow auto-merge when all requirements pass<b class="o-ph-tag o-ga">GA</b></div>
|
|
3586
3620
|
@if (canMaintain()) {<div class="o-flex">@if (!canAdmin()) {<span class="o-faint o-sm">As a maintain collaborator you change these settings; a project Maintainer renames the repository or changes its visibility.</span>}<button type="submit" class="o-btn o-dark o-r" [disabled]="busy() || !g.mergeMethods.length" data-testid="settings-save">Save</button></div>}
|
|
3587
3621
|
</form>
|
|
3588
3622
|
}
|
|
@@ -3710,7 +3744,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.12", ngImpo
|
|
|
3710
3744
|
</div>
|
|
3711
3745
|
<div class="o-flex"><button type="button" class="o-tog" role="switch" aria-labelledby="rs-del" [class.o-on]="g.deleteBranchOnMerge" [attr.aria-checked]="g.deleteBranchOnMerge" (click)="g.deleteBranchOnMerge = !g.deleteBranchOnMerge" [disabled]="!canMaintain()"></button><span id="rs-del">Delete head branches after merge</span></div>
|
|
3712
3746
|
<div class="o-flex"><button type="button" class="o-tog" role="switch" aria-labelledby="rs-auto" [class.o-on]="g.allowAutoMerge" [attr.aria-checked]="g.allowAutoMerge" (click)="g.allowAutoMerge = !g.allowAutoMerge" [disabled]="!canMaintain()" data-testid="allow-auto-merge"></button><span id="rs-auto">Allow auto-merge when all requirements pass</span></div>
|
|
3713
|
-
<div class="o-flex"><button type="button" class="o-tog o-dis" disabled aria-label="Allow auto-merge"></button>Allow auto-merge when all requirements pass<b class="o-ph-tag o-ga">GA</b></div>
|
|
3714
3747
|
@if (canMaintain()) {<div class="o-flex">@if (!canAdmin()) {<span class="o-faint o-sm">As a maintain collaborator you change these settings; a project Maintainer renames the repository or changes its visibility.</span>}<button type="submit" class="o-btn o-dark o-r" [disabled]="busy() || !g.mergeMethods.length" data-testid="settings-save">Save</button></div>}
|
|
3715
3748
|
</form>
|
|
3716
3749
|
}
|