Fix upgrade button not working
This commit is contained in:
@@ -207,15 +207,18 @@ export default {
|
|||||||
},
|
},
|
||||||
async upgrade() {
|
async upgrade() {
|
||||||
if (process.env.MAC) {
|
if (process.env.MAC) {
|
||||||
console.log("send upgrade event to host app");
|
try {
|
||||||
await browser.runtime.sendNativeMessage(
|
console.log("send upgrade event to host app");
|
||||||
"application.id",
|
await browser.runtime.sendNativeMessage(
|
||||||
JSON.stringify({
|
"application.id",
|
||||||
upgrade: {},
|
JSON.stringify({
|
||||||
})
|
upgrade: {},
|
||||||
);
|
})
|
||||||
|
);
|
||||||
|
} catch (error) {
|
||||||
|
console.info("can't send data to native app", error);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
console.info("can't send data to native app", error);
|
|
||||||
let apiUrl = await SLStorage.get(SLStorage.SETTINGS.API_URL);
|
let apiUrl = await SLStorage.get(SLStorage.SETTINGS.API_URL);
|
||||||
let upgradeURL = apiUrl + "/dashboard/pricing";
|
let upgradeURL = apiUrl + "/dashboard/pricing";
|
||||||
browser.tabs.create({ url: upgradeURL });
|
browser.tabs.create({ url: upgradeURL });
|
||||||
|
|||||||
@@ -525,15 +525,18 @@ export default {
|
|||||||
|
|
||||||
async upgrade() {
|
async upgrade() {
|
||||||
if (process.env.MAC) {
|
if (process.env.MAC) {
|
||||||
console.log("send upgrade event to host app");
|
try {
|
||||||
await browser.runtime.sendNativeMessage(
|
console.log("send upgrade event to host app");
|
||||||
"application.id",
|
await browser.runtime.sendNativeMessage(
|
||||||
JSON.stringify({
|
"application.id",
|
||||||
upgrade: {},
|
JSON.stringify({
|
||||||
})
|
upgrade: {},
|
||||||
);
|
})
|
||||||
|
);
|
||||||
|
} catch (error) {
|
||||||
|
console.info("can't send data to native app", error);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
console.info("can't send data to native app", error);
|
|
||||||
let upgradeURL = this.apiUrl + "/dashboard/pricing";
|
let upgradeURL = this.apiUrl + "/dashboard/pricing";
|
||||||
browser.tabs.create({ url: upgradeURL });
|
browser.tabs.create({ url: upgradeURL });
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user