commit
bfde6d73e9
3 changed files with 17 additions and 12 deletions
|
@ -895,6 +895,7 @@ input.proxies {
|
||||||
block-size: var(--panelSize);
|
block-size: var(--panelSize);
|
||||||
max-block-size: var(--panelSize);
|
max-block-size: var(--panelSize);
|
||||||
min-block-size: var(--panelSize);
|
min-block-size: var(--panelSize);
|
||||||
|
overflow-x: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
.proxy-panel-title {
|
.proxy-panel-title {
|
||||||
|
|
|
@ -1943,17 +1943,6 @@ Logic.registerPanel(P_MOZILLA_VPN_SERVER_LIST, {
|
||||||
|
|
||||||
Utils.addEnterHandler(document.getElementById("moz-vpn-return"), async () => {
|
Utils.addEnterHandler(document.getElementById("moz-vpn-return"), async () => {
|
||||||
const identity = Logic.currentIdentity();
|
const identity = Logic.currentIdentity();
|
||||||
const { mozillaVpnServers } = await browser.storage.local.get("mozillaVpnServers");
|
|
||||||
|
|
||||||
const selectedServer = document.querySelector(".server-radio-btn:checked");
|
|
||||||
const proxy = MozillaVPN.getProxy(
|
|
||||||
selectedServer.dataset.countryCode,
|
|
||||||
selectedServer.dataset.cityName,
|
|
||||||
true,
|
|
||||||
mozillaVpnServers
|
|
||||||
);
|
|
||||||
|
|
||||||
await proxifiedContainers.set(identity.cookieStoreId, proxy);
|
|
||||||
Logic.showPanel(P_CONTAINER_EDIT, identity, false, false);
|
Logic.showPanel(P_CONTAINER_EDIT, identity, false, false);
|
||||||
Logic.showPreviousPanel();
|
Logic.showPreviousPanel();
|
||||||
});
|
});
|
||||||
|
@ -1997,6 +1986,21 @@ Logic.registerPanel(P_MOZILLA_VPN_SERVER_LIST, {
|
||||||
radioBtn.dataset.cityName = city.name;
|
radioBtn.dataset.cityName = city.name;
|
||||||
radioBtn.name = "server-city";
|
radioBtn.name = "server-city";
|
||||||
|
|
||||||
|
const cityListItem = cityTemplateClone.querySelector(".server-city-list-item");
|
||||||
|
Utils.addEnterHandler((cityListItem), async(e) => {
|
||||||
|
if (e.key === "Enter") {
|
||||||
|
radioBtn.checked = true;
|
||||||
|
}
|
||||||
|
const identity = Logic.currentIdentity();
|
||||||
|
const proxy = MozillaVPN.getProxy(
|
||||||
|
radioBtn.dataset.countryCode,
|
||||||
|
radioBtn.dataset.cityName,
|
||||||
|
true,
|
||||||
|
mozillaVpnServers
|
||||||
|
);
|
||||||
|
await proxifiedContainers.set(identity.cookieStoreId, proxy);
|
||||||
|
});
|
||||||
|
|
||||||
// Set city name
|
// Set city name
|
||||||
cityName.textContent = city.name;
|
cityName.textContent = city.name;
|
||||||
cityList.appendChild(cityTemplateClone);
|
cityList.appendChild(cityTemplateClone);
|
||||||
|
|
|
@ -408,7 +408,7 @@
|
||||||
</template>
|
</template>
|
||||||
<template id="server-city-list-items">
|
<template id="server-city-list-items">
|
||||||
<li>
|
<li>
|
||||||
<label class="server-city-list-item">
|
<label class="server-city-list-item" tabindex="0">
|
||||||
<input class="server-radio-btn" type="radio" data-country-code="" data-city-name="" checked=""/>
|
<input class="server-radio-btn" type="radio" data-country-code="" data-city-name="" checked=""/>
|
||||||
<div class="server-radio-control"></div>
|
<div class="server-radio-control"></div>
|
||||||
<span class="server-city-name"></span>
|
<span class="server-city-name"></span>
|
||||||
|
|
Loading…
Add table
Reference in a new issue