From 76fa60498e6c67dc4b9222e8fcaa4a8f85de27eb Mon Sep 17 00:00:00 2001 From: Ainar Garipov Date: Tue, 1 Feb 2022 19:42:07 +0300 Subject: [PATCH] Pull request: all: imp ann url Updates #4209. Squashed commit of the following: commit 0c31a59c5bf6bcc27a4779adf226d9a1ac9eece1 Merge: 803f32db 8455940b Author: Ainar Garipov Date: Tue Feb 1 19:33:55 2022 +0300 Merge branch 'master' into 4209-ann-url commit 803f32dbc7276077a4374ed0f5e0a1fa36f91c9b Author: Ildar Kamalov Date: Tue Feb 1 14:46:47 2022 +0300 client: add manual update link to update topline commit ca375b52fa53503a3987b9723eb9a1d74878e890 Author: Ainar Garipov Date: Mon Jan 31 20:49:42 2022 +0300 all: imp ann url --- client/src/__locales/en.json | 1 + client/src/components/ui/UpdateTopline.js | 33 ++++++++++++++++------- scripts/make/build-release.sh | 12 ++++++--- 3 files changed, 32 insertions(+), 14 deletions(-) diff --git a/client/src/__locales/en.json b/client/src/__locales/en.json index ccc4c0b8..4b19ea7a 100644 --- a/client/src/__locales/en.json +++ b/client/src/__locales/en.json @@ -403,6 +403,7 @@ "dns_providers": "Here is a <0>list of known DNS providers to choose from.", "update_now": "Update now", "update_failed": "Auto-update failed. Please follow these steps to update manually.", + "manual_update": "Please follow these steps to update manually.", "processing_update": "Please wait, AdGuard Home is being updated", "clients_title": "Clients", "clients_desc": "Configure devices connected to AdGuard Home", diff --git a/client/src/components/ui/UpdateTopline.js b/client/src/components/ui/UpdateTopline.js index 2e78c884..85e75f4a 100644 --- a/client/src/components/ui/UpdateTopline.js +++ b/client/src/components/ui/UpdateTopline.js @@ -1,8 +1,10 @@ import React from 'react'; import { Trans } from 'react-i18next'; import { shallowEqual, useDispatch, useSelector } from 'react-redux'; + import Topline from './Topline'; import { getUpdate } from '../../actions'; +import { MANUAL_UPDATE_LINK } from '../../helpers/constants'; const UpdateTopline = () => { const { @@ -29,16 +31,27 @@ const UpdateTopline = () => { > update_announcement - {canAutoUpdate - && - } +   + {canAutoUpdate ? ( + + ) : ( + + Link + + ), + }}> + manual_update + + )} ; }; diff --git a/scripts/make/build-release.sh b/scripts/make/build-release.sh index f3326a04..16486e0b 100644 --- a/scripts/make/build-release.sh +++ b/scripts/make/build-release.sh @@ -379,17 +379,21 @@ readonly version_download_url version_json # Point users to the master branch if the channel is edge. if [ "$channel" = 'edge' ] then - version_history_url='https://github.com/AdguardTeam/AdGuardHome/commits/master' + # TODO(a.garipov): Put a link to the platforms page here. Something like: + # + # announcement_url='https://github.com/AdguardTeam/AdGuardHome/wiki/Platforms' + # + announcement_url='https://github.com/AdguardTeam/AdGuardHome/commits/master' else - version_history_url='https://github.com/AdguardTeam/AdGuardHome/releases' + announcement_url="https://github.com/AdguardTeam/AdGuardHome/releases/tag/${version}" fi -readonly version_history_url +readonly announcement_url rm -f "$version_json" echo "{ \"version\": \"${version}\", \"announcement\": \"AdGuard Home ${version} is now available!\", - \"announcement_url\": \"${version_history_url}\", + \"announcement_url\": \"${announcement_url}\", \"selfupdate_min_version\": \"0.0\", " >> "$version_json"