Skip to content

Commit

Permalink
Format
Browse files Browse the repository at this point in the history
  • Loading branch information
lesleyjanenorton committed Sep 20, 2024
1 parent 2ff8e86 commit 46ba0d5
Showing 1 changed file with 17 additions and 10 deletions.
27 changes: 17 additions & 10 deletions src/ui/browserAction/popupPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import {
render,
createRef,
ref,
live
live,
} from "../../vendor/lit-all.min.js";

import { vpnController, proxyHandler } from "./backend.js";
Expand Down Expand Up @@ -52,7 +52,7 @@ export class BrowserActionPopup extends LitElement {
pageURL: { type: String },
_siteContext: { type: Object },
hasSiteContext: { type: Boolean },
_siteContexts: {type: Array}
_siteContexts: { type: Array },
};

constructor() {
Expand All @@ -65,7 +65,10 @@ export class BrowserActionPopup extends LitElement {
this.vpnState = s;
});
vpnController.servers.subscribe((s) => (this.servers = s));
proxyHandler.siteContexts.subscribe((s) => { this._siteContexts = s; console.log(this._siteContexts) })
proxyHandler.siteContexts.subscribe((s) => {
this._siteContexts = s;
console.log(this._siteContexts);
});
this.updatePage();
}
updatePage() {
Expand Down Expand Up @@ -96,7 +99,7 @@ export class BrowserActionPopup extends LitElement {

get currentSiteContext() {
if (this._siteContext) {
return this._siteContext;
return this._siteContext;
}
return defaultSiteContext(this.vpnState, this.pageURL);
}
Expand Down Expand Up @@ -259,17 +262,21 @@ export class BrowserActionPopup extends LitElement {
<p>${tr("exludePageFor", siteContext.origin)}</p>
</div>
${pageLocationPicker}
<button id="selectLocation" class=${hasSiteContext ? "" : "disabled"} @click=${removeSiteContext}>
<button
id="selectLocation"
class=${hasSiteContext ? "" : "disabled"}
@click=${removeSiteContext}
>
${tr("resetPageSettings")}
</button>
`;
}
static styles = css`
#reset-context.disabled {
opacity: .7;
pointer-events: none;
}
`
#reset-context.disabled {
opacity: 0.7;
pointer-events: none;
}
`;
static backBtn(back) {
return html` <mz-iconlink
@goBack=${back}
Expand Down

0 comments on commit 46ba0d5

Please sign in to comment.