diff --git a/src/pages/settings.css b/src/pages/settings.css index b9dd0e9c..3e21dedb 100644 --- a/src/pages/settings.css +++ b/src/pages/settings.css @@ -140,3 +140,10 @@ color: var(--link-color); vertical-align: middle; } + +#settings-container .version-string { + padding: 4px; + font-family: var(--monospace-font); + font-size: 85%; + text-align: center; +} diff --git a/src/pages/settings.jsx b/src/pages/settings.jsx index abbb99c9..ff06f6ca 100644 --- a/src/pages/settings.jsx +++ b/src/pages/settings.jsx @@ -18,6 +18,7 @@ import { removeSubscription, updateSubscription, } from '../utils/push-notifications'; +import showToast from '../utils/show-toast'; import states from '../utils/states'; import store from '../utils/store'; @@ -508,21 +509,38 @@ function Settings({ onClose }) {
{__BUILD_TIME__ && (
- Last build:{' '}
- {__COMMIT_HASH__}
-
- )
- >
- )}
+ Version:{' '}
+ {
+ e.target.select();
+ // Copy to clipboard
+ try {
+ navigator.clipboard.writeText(e.target.value);
+ showToast('Version string copied');
+ } catch (e) {
+ console.warn(e);
+ showToast('Unable to copy version string');
+ }
+ }}
+ />{' '}
+
+ (
+
+