From 5781b05b4ac20c502a205b9116c2b5d17963db90 Mon Sep 17 00:00:00 2001 From: Gela Date: Tue, 9 Jan 2024 09:02:10 -0800 Subject: [PATCH] [VPN-5914] [VPN-5915] Implement Update and What's New Addons for 2.20 (#8910) (#8929) * 2.20 addons * Remove 2.19 update message addon --- .../enable.js | 4 +-- .../getHelp.js | 0 .../manifest.json | 10 +++--- .../update.js | 0 .../updateWeb.js | 0 addons/message_whats_new_v2.20/manifest.json | 32 +++++++++++++++++++ addons/message_whats_new_v2.20/setDate.js | 3 ++ 7 files changed, 42 insertions(+), 7 deletions(-) rename addons/{message_update_v2.19 => message_update_v2.20}/enable.js (92%) rename addons/{message_update_v2.19 => message_update_v2.20}/getHelp.js (100%) rename addons/{message_update_v2.19 => message_update_v2.20}/manifest.json (84%) rename addons/{message_update_v2.19 => message_update_v2.20}/update.js (100%) rename addons/{message_update_v2.19 => message_update_v2.20}/updateWeb.js (100%) create mode 100644 addons/message_whats_new_v2.20/manifest.json create mode 100644 addons/message_whats_new_v2.20/setDate.js diff --git a/addons/message_update_v2.19/enable.js b/addons/message_update_v2.20/enable.js similarity index 92% rename from addons/message_update_v2.19/enable.js rename to addons/message_update_v2.20/enable.js index c430ae055f..b360bcc7d2 100644 --- a/addons/message_update_v2.19/enable.js +++ b/addons/message_update_v2.20/enable.js @@ -10,7 +10,7 @@ // Macos v2.16.0 requires a web-based update. if (api.env.platform === 'macos' && api.env.versionString === '2.16.0') { api.addon.setTitle( - 'message.message_update_v2.19.block.extra_1', + 'message.message_update_v2.20.block.extra_1', 'Download the new Mozilla VPN'); api.addon.composer.remove('c_3'); return; @@ -51,6 +51,6 @@ api.addon.composer.remove('c_3'); api.addon.setTitle( - 'message.message_update_v2.19.block.extra_1', + 'message.message_update_v2.20.block.extra_1', 'Download the new Mozilla VPN'); }) diff --git a/addons/message_update_v2.19/getHelp.js b/addons/message_update_v2.20/getHelp.js similarity index 100% rename from addons/message_update_v2.19/getHelp.js rename to addons/message_update_v2.20/getHelp.js diff --git a/addons/message_update_v2.19/manifest.json b/addons/message_update_v2.20/manifest.json similarity index 84% rename from addons/message_update_v2.19/manifest.json rename to addons/message_update_v2.20/manifest.json index 9e8df619d3..c7f4d6fc04 100644 --- a/addons/message_update_v2.19/manifest.json +++ b/addons/message_update_v2.20/manifest.json @@ -1,7 +1,7 @@ { "api_version": "0.1", - "id": "message_update_v2.19", - "name": "Update to Mozilla VPN 2.19", + "id": "message_update_v2.20", + "name": "Update to Mozilla VPN 2.20", "type": "message", "conditions": { "max_client_version": "2.18.9" @@ -11,8 +11,8 @@ }, "message": { "date": 1671066000, - "id": "message_update_v2.19", - "title": "Update to Mozilla VPN 2.19", + "id": "message_update_v2.20", + "title": "Update to Mozilla VPN 2.20", "subtitle": "We’ve released an updated version of Mozilla VPN! Update to the latest version for the best possible Mozilla VPN experience.", "badge": "new_update", "blocks": [ @@ -45,7 +45,7 @@ { "id": "extra_1", "type": "text", - "content": "Download the new Mozilla VPN 2.19" + "content": "Download the new Mozilla VPN 2.20" } ] } diff --git a/addons/message_update_v2.19/update.js b/addons/message_update_v2.20/update.js similarity index 100% rename from addons/message_update_v2.19/update.js rename to addons/message_update_v2.20/update.js diff --git a/addons/message_update_v2.19/updateWeb.js b/addons/message_update_v2.20/updateWeb.js similarity index 100% rename from addons/message_update_v2.19/updateWeb.js rename to addons/message_update_v2.20/updateWeb.js diff --git a/addons/message_whats_new_v2.20/manifest.json b/addons/message_whats_new_v2.20/manifest.json new file mode 100644 index 0000000000..67a38fce17 --- /dev/null +++ b/addons/message_whats_new_v2.20/manifest.json @@ -0,0 +1,32 @@ +{ + "api_version": "0.1", + "id": "message_whats_new_v2.20", + "name": "What's new message", + "type": "message", + "conditions": { + "min_client_version": "2.20.0", + "max_client_version": "2.20.0" + }, + "javascript": { + "enable": "setDate.js" + }, + "message": { + "date": 1675040400, + "id": "message_whats_new_v2.20", + "title": "You’ve updated to Mozilla VPN 2.20", + "subtitle": "You’re using the latest version of Mozilla VPN.", + "badge": "whats_new", + "blocks": [ + { + "id": "c_1-1", + "type": "text", + "content": "This update includes minor bug fixes, UI adjustments and other performance improvements." + }, + { + "id": "c_3", + "type": "text", + "content": "Thank you for installing the latest version!" + } + ] + } +} diff --git a/addons/message_whats_new_v2.20/setDate.js b/addons/message_whats_new_v2.20/setDate.js new file mode 100644 index 0000000000..86100c828c --- /dev/null +++ b/addons/message_whats_new_v2.20/setDate.js @@ -0,0 +1,3 @@ +(function (api) { + api.addon.date = (api.settings.updateTime.getTime() / 1000); +})