From 650d3d0e2df93f837329ed4e1794a0a196b267ba Mon Sep 17 00:00:00 2001 From: David Baker Date: Mon, 9 Mar 2020 16:17:25 +0000 Subject: [PATCH] Un-linkify version in settings Probably a bit confusing while our changelogs are mostly in react-sdk, and ended up linking to version 0.0.0 in nightly builds. --- .../settings/tabs/user/HelpUserSettingsTab.js | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-) diff --git a/src/components/views/settings/tabs/user/HelpUserSettingsTab.js b/src/components/views/settings/tabs/user/HelpUserSettingsTab.js index 8e7983970a..aca2f010b6 100644 --- a/src/components/views/settings/tabs/user/HelpUserSettingsTab.js +++ b/src/components/views/settings/tabs/user/HelpUserSettingsTab.js @@ -25,21 +25,6 @@ import Modal from "../../../../../Modal"; import * as sdk from "../../../../../"; import PlatformPeg from "../../../../../PlatformPeg"; -// Simple method to help prettify GH Release Tags and Commit Hashes. -const semVerRegex = /^v?(\d+\.\d+\.\d+(?:-rc.+)?)(?:-(?:\d+-g)?([0-9a-fA-F]+))?(?:-dirty)?$/i; -const ghVersionLabel = function(repo, token='') { - const match = token.match(semVerRegex); - let url; - if (match && match[1]) { // basic semVer string possibly with commit hash - url = (match.length > 1 && match[2]) - ? `https://github.com/${repo}/commit/${match[2]}` - : `https://github.com/${repo}/releases/tag/v${match[1]}`; - } else { - url = `https://github.com/${repo}/commit/${token.split('-')[0]}`; - } - return { token }; -}; - export default class HelpUserSettingsTab extends React.Component { static propTypes = { closeSettingsFn: PropTypes.func.isRequired, @@ -184,9 +169,7 @@ export default class HelpUserSettingsTab extends React.Component { ); } - const vectorVersion = this.state.vectorVersion - ? ghVersionLabel('vector-im/riot-web', this.state.vectorVersion) - : 'unknown'; + const vectorVersion = this.state.vectorVersion || 'unknown'; let olmVersion = MatrixClientPeg.get().olmVersion; olmVersion = olmVersion ? `${olmVersion[0]}.${olmVersion[1]}.${olmVersion[2]}` : '';