-
+ ${VPNCard.shield(this.enabled)}
${vpnHeader}
- ${subLine} ${timeString}
+ ${VPNCard.subline(this.enabled, this.stability)} ${timeString}
@@ -119,6 +122,41 @@ export class VPNCard extends LitElement {
`;
}
+ static subline(enabled, stability) {
+ if (!enabled) {
+ return html`
${tr("turnOnForPrivateConnection")}
`;
+ }
+ const errorSvg = html`
+
+ `;
+
+ switch (stability) {
+ case VPNState.NoSignal:
+ return html`
${errorSvg} No Signal
`;
+ case VPNState.Unstable:
+ return html`
${errorSvg} Unstable
`;
+ default:
+ null;
+ }
+ }
+
+ static shield(enabled) {
+ if (!enabled) {
+ return html`
+
+ `;
+ }
+ return html`
+
+ `;
+ }
+
static styles = css`
${resetSizing}
@@ -147,6 +185,9 @@ export class VPNCard extends LitElement {
width: 100%;
justify-content: baseline;
}
+ footer img {
+ margin-right: 8px;
+ }
main {
justify-content: space-between;
padding: var(--default-padding);
@@ -173,12 +214,21 @@ export class VPNCard extends LitElement {
.box.on * {
color: var(--main-card-text-color);
}
+ .box.unstable {
+ --shield-color: var(--color-warning);
+ --error-fill: var(--color-warning);
+ }
+ .box.noSignal {
+ --shield-color: var(--color-fatal-error);
+ --error-fill: var(--color-fatal-error);
+ }
+ .box.stable {
+ --shield-color: var(--color-enabled);
+ }
+
.infobox {
flex: 4;
}
- img {
- margin-right: var(--default-padding);
- }
h1 {
font-size: 18px;
line-height: 20px;
@@ -188,7 +238,6 @@ export class VPNCard extends LitElement {
font-size: 14px;
line-height: 21px;
font-weight: 400;
- color: var(--main-card-text-color);
opacity: 0.7;
}
@@ -196,7 +245,25 @@ export class VPNCard extends LitElement {
.subline {
margin-block-start: calc(var(--default-padding) / 2);
}
+ .subline svg {
+ width: 14px;
+ height: 14px;
+ margin: 0px;
+ transform: scale(1.1);
+ }
+ .unstable .subline {
+ color: var(--color-warning);
+ }
+ .noSignal .subline {
+ color: var(--color-fatal-error);
+ }
+ svg {
+ height: 48px;
+ width: 48px;
+ transition: all 3s;
+ margin-right: var(--default-padding);
+ }
.pill {
width: 45px;
height: 24px;
diff --git a/src/ui/browserAction/popupPage.js b/src/ui/browserAction/popupPage.js
index 8aadf48..f3e8265 100644
--- a/src/ui/browserAction/popupPage.js
+++ b/src/ui/browserAction/popupPage.js
@@ -151,6 +151,7 @@ export class BrowserActionPopup extends LitElement {
.cityName=${this.vpnState?.exitServerCity?.name}
.countryFlag=${this.vpnState?.exitServerCountry?.code}
.connectedSince=${this.vpnState?.connectedSince}
+ .stability=${this.vpnState?.connectionStability}
>
${this.locationSettings()}
diff --git a/src/ui/variables.css b/src/ui/variables.css
index cecdcb0..dec57eb 100644
--- a/src/ui/variables.css
+++ b/src/ui/variables.css
@@ -38,6 +38,8 @@
--font-family-semi-bold: "Inter Semi Bold";
--font-family-bold: "Inter Bold";
--color-enabled: #3fe1b0;
+ --color-warning: #ffa436;
+ --color-fatal-error: #ff6a75;
--main-card-background: #321c64;
--main-card-text-color: white;
--main-card--pill-background: lch(