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

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ enum BrowserStatus {
Initial,
Pending,
Ready,
Complete,
Error,
}

Expand All @@ -54,6 +53,9 @@ export class ProfileBrowserDialog extends BtrixElement {
@state()
private browserStatus = BrowserStatus.Initial;

@state()
private originsLoaded = false;

@state()
private showConfirmation = false;

Expand Down Expand Up @@ -151,7 +153,8 @@ export class ProfileBrowserDialog extends BtrixElement {
render() {
const isCrawler = this.appState.isCrawler;
const creatingNew = this.duplicating || !this.profile;
const incomplete = this.browserStatus !== BrowserStatus.Complete;
const incomplete =
!this.originsLoaded || this.browserStatus !== BrowserStatus.Ready;
const saving = this.saveProfileTask.status === TaskStatus.PENDING;

return html`<btrix-dialog
Expand Down Expand Up @@ -341,7 +344,7 @@ export class ProfileBrowserDialog extends BtrixElement {
e: CustomEvent<BrowserOriginsChange>,
) => {
if (e.detail.origins.length) {
this.browserStatus = BrowserStatus.Complete;
this.originsLoaded = true;
}
};

Expand Down
6 changes: 1 addition & 5 deletions frontend/src/features/browser-profiles/profile-browser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -173,11 +173,7 @@ export class ProfileBrowser extends BtrixElement {
try {
const { origins } = await this.pingBrowser(browser.id, signal);

if (
this.originsTask.value &&
origins &&
isNotEqual(this.originsTask.value, origins)
) {
if (origins && isNotEqual(this.originsTask.value, origins)) {
this.dispatchEvent(
new CustomEvent<BrowserOriginsChange>(
"btrix-browser-origins-change",
Expand Down
Loading