Merge pull request #1179 from element-hq/midhun/fix-1178

Account for new develop version and global hash
This commit is contained in:
R Midhun Suresh 2024-08-19 19:31:52 +05:30 committed by GitHub
commit 8e446a4dde
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -15,12 +15,29 @@ limitations under the License.
*/
export function hydrogenGithubLink(t) {
if (DEFINE_VERSION && DEFINE_GLOBAL_HASH) {
return t.a({target: "_blank",
href: `https://github.com/vector-im/hydrogen-web/releases/tag/v${DEFINE_VERSION}`},
`Hydrogen v${DEFINE_VERSION} (${DEFINE_GLOBAL_HASH}) on Github`);
if (DEFINE_VERSION === "develop") {
return t.a(
{
target: "_blank",
href: `https://github.com/vector-im/hydrogen-web`,
},
`Hydrogen develop, ${DEFINE_GLOBAL_HASH}`
);
} else if (DEFINE_VERSION && DEFINE_GLOBAL_HASH) {
return t.a(
{
target: "_blank",
href: `https://github.com/vector-im/hydrogen-web/releases/tag/v${DEFINE_VERSION}`,
},
`Hydrogen v${DEFINE_VERSION} (${DEFINE_GLOBAL_HASH}) on Github`
);
} else {
return t.a({target: "_blank", href: "https://github.com/vector-im/hydrogen-web"},
"Hydrogen on Github");
return t.a(
{
target: "_blank",
href: "https://github.com/vector-im/hydrogen-web",
},
"Hydrogen on Github"
);
}
}