From 9caedbaf566815c85aa55448bb31c4251d7474de Mon Sep 17 00:00:00 2001 From: Kai Vandivier Date: Fri, 24 Sep 2021 18:00:53 +0200 Subject: [PATCH 1/3] fix(offline-interface): improve SW update message & actions --- pwa/i18n/en.pot | 11 +++++++---- pwa/src/offline-interface/offline-interface.js | 14 ++++++++------ 2 files changed, 15 insertions(+), 10 deletions(-) diff --git a/pwa/i18n/en.pot b/pwa/i18n/en.pot index 33500a68c..e8268e78a 100644 --- a/pwa/i18n/en.pot +++ b/pwa/i18n/en.pot @@ -5,8 +5,8 @@ msgstr "" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1)\n" -"POT-Creation-Date: 2021-06-08T14:38:45.083Z\n" -"PO-Revision-Date: 2021-06-08T14:38:45.083Z\n" +"POT-Creation-Date: 2021-09-24T15:38:52.938Z\n" +"PO-Revision-Date: 2021-09-24T15:38:52.938Z\n" msgid "" "App updates are ready and will be activated after all tabs of this app are " @@ -15,5 +15,8 @@ msgstr "" "App updates are ready and will be activated after all tabs of this app are " "closed. Skip waiting and reload to update now?" -msgid "Update" -msgstr "Update" +msgid "Update and reload" +msgstr "Update and reload" + +msgid "Not now" +msgstr "Not now" diff --git a/pwa/src/offline-interface/offline-interface.js b/pwa/src/offline-interface/offline-interface.js index 0daf626bc..b5c58d5aa 100644 --- a/pwa/src/offline-interface/offline-interface.js +++ b/pwa/src/offline-interface/offline-interface.js @@ -62,17 +62,19 @@ export class OfflineInterface { if (!promptUpdate) { return } - const reloadMessage = i18n.t( - 'App updates are ready and will be activated after all tabs of this app are closed. Skip waiting and reload to update now?' - ) + + const message = i18n.t("There's an update available for this app.") const onConfirm = () => registration.waiting.postMessage({ type: swMsgs.skipWaiting, }) + const actions = [ + { label: i18n.t('Update and reload'), onClick: onConfirm }, + { label: i18n.t('Not now'), onClick: () => {} }, + ] promptUpdate({ - message: reloadMessage, - action: i18n.t('Update'), - onConfirm: onConfirm, + message, + actions, }) } From 7b1c2546a9c170d66e572124803bdf006ecfcfa8 Mon Sep 17 00:00:00 2001 From: Kai Vandivier Date: Tue, 28 Sep 2021 10:08:12 +0200 Subject: [PATCH 2/3] chore(deps): update app-runtime ^3.2.2 --- pwa/i18n/en.pot | 12 ++++-------- shell/package.json | 2 +- yarn.lock | 48 +++++++++++++++++++++++----------------------- 3 files changed, 29 insertions(+), 33 deletions(-) diff --git a/pwa/i18n/en.pot b/pwa/i18n/en.pot index e8268e78a..5d3b76f86 100644 --- a/pwa/i18n/en.pot +++ b/pwa/i18n/en.pot @@ -5,15 +5,11 @@ msgstr "" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1)\n" -"POT-Creation-Date: 2021-09-24T15:38:52.938Z\n" -"PO-Revision-Date: 2021-09-24T15:38:52.938Z\n" +"POT-Creation-Date: 2021-09-28T08:07:21.173Z\n" +"PO-Revision-Date: 2021-09-28T08:07:21.173Z\n" -msgid "" -"App updates are ready and will be activated after all tabs of this app are " -"closed. Skip waiting and reload to update now?" -msgstr "" -"App updates are ready and will be activated after all tabs of this app are " -"closed. Skip waiting and reload to update now?" +msgid "There's an update available for this app." +msgstr "There's an update available for this app." msgid "Update and reload" msgstr "Update and reload" diff --git a/shell/package.json b/shell/package.json index 40c65096c..d8558d3d6 100644 --- a/shell/package.json +++ b/shell/package.json @@ -13,7 +13,7 @@ }, "dependencies": { "@dhis2/app-adapter": "8.1.0", - "@dhis2/app-runtime": "^3.2.0", + "@dhis2/app-runtime": "^3.2.2", "@dhis2/d2-i18n": "^1.1.0", "@dhis2/pwa": "8.1.0", "@dhis2/ui": "^7.2.0", diff --git a/yarn.lock b/yarn.lock index 076892d54..be48f806a 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1869,37 +1869,37 @@ classnames "^2.3.1" prop-types "^15.7.2" -"@dhis2/app-runtime@^3.2.0": - version "3.2.0" - resolved "https://registry.yarnpkg.com/@dhis2/app-runtime/-/app-runtime-3.2.0.tgz#96e98c3874e9f60cf2598490b0c6a82aca7d810a" - integrity sha512-KlQun0RAHrgPErwZFaJ+fF8iW8advzhePYneRtRrWkjBXfxGE5L5qtsmZ3OC3ahVqOuyTXXMQHppfkw+m6fKUg== +"@dhis2/app-runtime@^3.2.2": + version "3.2.2" + resolved "https://registry.yarnpkg.com/@dhis2/app-runtime/-/app-runtime-3.2.2.tgz#9cc4c9a8397f3268bc6eb3b40e86c8c1c9919599" + integrity sha512-DE8CYq3R5cEcvltTQHTV7uDoFyb5wvZ1urW3aEPz8v5BmUL76uqeaazAdUcwZPFFhB3rg4XpmRGCeqEHHIO64A== dependencies: - "@dhis2/app-service-alerts" "3.2.0" - "@dhis2/app-service-config" "3.2.0" - "@dhis2/app-service-data" "3.2.0" - "@dhis2/app-service-offline" "3.2.0" + "@dhis2/app-service-alerts" "3.2.2" + "@dhis2/app-service-config" "3.2.2" + "@dhis2/app-service-data" "3.2.2" + "@dhis2/app-service-offline" "3.2.2" -"@dhis2/app-service-alerts@3.2.0": - version "3.2.0" - resolved "https://registry.yarnpkg.com/@dhis2/app-service-alerts/-/app-service-alerts-3.2.0.tgz#aeeacb92cae5b84c7619c21653b2c10c31c904da" - integrity sha512-QFLeA7itoKzzxtxR68JjAUu2VMtr2yybDXX4yFktGGDk6XmlRaWZ1ZzJZ1DGKK09x1+rL1Ex3atKwvJyQd+L2Q== +"@dhis2/app-service-alerts@3.2.2": + version "3.2.2" + resolved "https://registry.yarnpkg.com/@dhis2/app-service-alerts/-/app-service-alerts-3.2.2.tgz#5f969a568a5c9a002bf8604e5b8e773596b0978c" + integrity sha512-BtqrlQnwl6+4jzEKBGeqm3WnRxeZ79qEgqtP6sPTLwLisoFljTNt8P6RYKJGWR2inymIvXaWO7GgIy6FpauP1g== -"@dhis2/app-service-config@3.2.0": - version "3.2.0" - resolved "https://registry.yarnpkg.com/@dhis2/app-service-config/-/app-service-config-3.2.0.tgz#41d3047217d8f28ca0c8e58ca084f7ae707bbaa4" - integrity sha512-YLHSX82+X9tKTQYnzef5/U4p7oeTV5z8DNxDVQn1aYfoCn5Yno1h0vledVZKTm2bBzdaieOgoA5yPF+dtPK1/A== +"@dhis2/app-service-config@3.2.2": + version "3.2.2" + resolved "https://registry.yarnpkg.com/@dhis2/app-service-config/-/app-service-config-3.2.2.tgz#64cb0a488c2938a2e876ace074ee244deda5a02b" + integrity sha512-rXiN7MNkGoF7q23AuGeHMFqnXZyWsqq6DStLzO6UbqmRc7FasxEO4dndqS9t0v1VEXf9KfM3LYSCHCI32+2zUg== -"@dhis2/app-service-data@3.2.0": - version "3.2.0" - resolved "https://registry.yarnpkg.com/@dhis2/app-service-data/-/app-service-data-3.2.0.tgz#7f3c459a54369e197825380c6816f1d1c6b88a42" - integrity sha512-5NnEbSJNC8xMA4ruuQjyw0v4IImHDdTpIBwTLJTiiL354+cOqJI8bRvyqLUEFLVNhR16kTOC6YCbQxTIHDYsSA== +"@dhis2/app-service-data@3.2.2": + version "3.2.2" + resolved "https://registry.yarnpkg.com/@dhis2/app-service-data/-/app-service-data-3.2.2.tgz#487dda93593a026d29749fbd88b6063a5b727aa4" + integrity sha512-J3iIPlsC2qweqVJ18F0eWKiTZ3MMaGLn2V7a7HajVtJgJfn4qXduFp1XDCG38Lcq2ssv15iGNz6ZPMXlcuUtPA== dependencies: react-query "^3.13.11" -"@dhis2/app-service-offline@3.2.0": - version "3.2.0" - resolved "https://registry.yarnpkg.com/@dhis2/app-service-offline/-/app-service-offline-3.2.0.tgz#60561da1229bd696d449e1acb2e42a9f420e45a6" - integrity sha512-5aU/+lAKDEMeYCvznDunCqRmS0J0tzeHWmj2DjXHOqPpVdWTHPBNIboENYAfvA/rCq1+L/uMcgluoxsv/Opgkg== +"@dhis2/app-service-offline@3.2.2": + version "3.2.2" + resolved "https://registry.yarnpkg.com/@dhis2/app-service-offline/-/app-service-offline-3.2.2.tgz#5aab27fd408fb3d50a628798387260f4a3fcffca" + integrity sha512-8liyb43a7/MzejA2d524fojL9ViOds2E2aJrizh6LzLGEgq8GtV1WvIMjMl3uynejYbIpwglHVpKIdz4NfzSEg== dependencies: lodash "^4.17.21" From c99c736562f34072088eb45c650c3b1ac6ec57b7 Mon Sep 17 00:00:00 2001 From: "@dhis2-bot" Date: Tue, 28 Sep 2021 11:18:25 +0000 Subject: [PATCH 3/3] chore(release): cut 8.1.1 [skip ci] ## [8.1.1](https://github.com/dhis2/app-platform/compare/v8.1.0...v8.1.1) (2021-09-28) ### Bug Fixes * **offline-interface:** improve SW update message & actions ([9caedba](https://github.com/dhis2/app-platform/commit/9caedbaf566815c85aa55448bb31c4251d7474de)) --- CHANGELOG.md | 7 +++++++ adapter/package.json | 6 +++--- cli/package.json | 4 ++-- examples/pwa-app/package.json | 2 +- examples/simple-app/package.json | 2 +- package.json | 2 +- pwa/package.json | 4 ++-- shell/package.json | 6 +++--- 8 files changed, 20 insertions(+), 13 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f5dd7eaab..7d687dd0d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,10 @@ +## [8.1.1](https://github.com/dhis2/app-platform/compare/v8.1.0...v8.1.1) (2021-09-28) + + +### Bug Fixes + +* **offline-interface:** improve SW update message & actions ([9caedba](https://github.com/dhis2/app-platform/commit/9caedbaf566815c85aa55448bb31c4251d7474de)) + # [8.1.0](https://github.com/dhis2/app-platform/compare/v8.0.1...v8.1.0) (2021-09-23) diff --git a/adapter/package.json b/adapter/package.json index 54234a2dd..47580538e 100644 --- a/adapter/package.json +++ b/adapter/package.json @@ -1,6 +1,6 @@ { "name": "@dhis2/app-adapter", - "version": "8.1.0", + "version": "8.1.1", "repository": { "type": "git", "url": "https://github.com/amcgee/dhis2-app-platform", @@ -21,11 +21,11 @@ "build" ], "dependencies": { - "@dhis2/pwa": "8.1.0", + "@dhis2/pwa": "8.1.1", "moment": "^2.24.0" }, "devDependencies": { - "@dhis2/cli-app-scripts": "8.1.0", + "@dhis2/cli-app-scripts": "8.1.1", "@testing-library/react": "^12.0.0", "enzyme": "^3.11.0", "enzyme-adapter-react-16": "^1.15.5", diff --git a/cli/package.json b/cli/package.json index 2e1ed478e..0eaa56a70 100644 --- a/cli/package.json +++ b/cli/package.json @@ -1,6 +1,6 @@ { "name": "@dhis2/cli-app-scripts", - "version": "8.1.0", + "version": "8.1.1", "engines": { "node": ">=12" }, @@ -28,7 +28,7 @@ "@babel/preset-env": "^7.14.7", "@babel/preset-react": "^7.0.0", "@babel/preset-typescript": "^7.6.0", - "@dhis2/app-shell": "8.1.0", + "@dhis2/app-shell": "8.1.1", "@dhis2/cli-helpers-engine": "^3.0.0", "@jest/core": "^27.0.6", "archiver": "^3.1.1", diff --git a/examples/pwa-app/package.json b/examples/pwa-app/package.json index ddee29ae3..b961a144d 100644 --- a/examples/pwa-app/package.json +++ b/examples/pwa-app/package.json @@ -1,6 +1,6 @@ { "name": "pwa-app", - "version": "8.1.0", + "version": "8.1.1", "description": "", "license": "BSD-3-Clause", "private": true, diff --git a/examples/simple-app/package.json b/examples/simple-app/package.json index 33150e0b6..088281458 100644 --- a/examples/simple-app/package.json +++ b/examples/simple-app/package.json @@ -1,6 +1,6 @@ { "name": "simple-app", - "version": "8.1.0", + "version": "8.1.1", "repository": "https://github.com/amcgee/dhis2-app-platform", "author": "Austin McGee ", "license": "BSD-3-Clause", diff --git a/package.json b/package.json index 52a1c2826..2449a0f03 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "root", - "version": "8.1.0", + "version": "8.1.1", "private": true, "repository": { "type": "git", diff --git a/pwa/package.json b/pwa/package.json index ed3beafaf..f02af26dd 100644 --- a/pwa/package.json +++ b/pwa/package.json @@ -1,6 +1,6 @@ { "name": "@dhis2/pwa", - "version": "8.1.0", + "version": "8.1.1", "description": "", "license": "BSD-3-Clause", "publishConfig": { @@ -13,7 +13,7 @@ "deploy": "d2-app-scripts deploy" }, "devDependencies": { - "@dhis2/cli-app-scripts": "8.1.0" + "@dhis2/cli-app-scripts": "8.1.1" }, "dependencies": { "idb": "^6.0.0", diff --git a/shell/package.json b/shell/package.json index d8558d3d6..933cf60c3 100644 --- a/shell/package.json +++ b/shell/package.json @@ -1,6 +1,6 @@ { "name": "@dhis2/app-shell", - "version": "8.1.0", + "version": "8.1.1", "repository": { "type": "git", "url": "https://github.com/amcgee/dhis2-app-platform", @@ -12,10 +12,10 @@ "access": "public" }, "dependencies": { - "@dhis2/app-adapter": "8.1.0", + "@dhis2/app-adapter": "8.1.1", "@dhis2/app-runtime": "^3.2.2", "@dhis2/d2-i18n": "^1.1.0", - "@dhis2/pwa": "8.1.0", + "@dhis2/pwa": "8.1.1", "@dhis2/ui": "^7.2.0", "classnames": "^2.2.6", "moment": "^2.29.1",