add version info, show posts on mobile for testing

This commit is contained in:
plebeius.eth
2024-03-26 17:08:31 +01:00
parent 04159d9b33
commit c2d6eb6e1e
3 changed files with 29 additions and 2 deletions
+2 -2
View File
@@ -88,9 +88,9 @@
.postDesktop .postMessage {
padding: 1em 40px;
}
/*
@media (max-width: 640px) {
.postDesktop {
display: none;
}
}
} */
+4
View File
@@ -5,6 +5,10 @@
transform: translate(-50%, -50%);
}
.version {
display: block;
}
.content select {
background-color: var(--select-background-color, revert);
border: var(--select-border, revert);
+23
View File
@@ -2,6 +2,9 @@ import { useTranslation } from 'react-i18next';
import useTheme from '../../hooks/use-theme';
import styles from './settings.module.css';
import { Link } from 'react-router-dom';
import packageJson from '../../../package.json';
const isElectron = window.isElectron === true;
const commitRef = process.env.REACT_APP_COMMIT_REF;
// TODO: remove theme and languages selectors for debugging
const ThemeSettings = () => {
@@ -46,6 +49,26 @@ const LanguageSettings = () => {
const Settings = () => {
return (
<div className={styles.content}>
<div className={styles.version}>
<a href={`https://github.com/plebbit/plebchan/releases/tag/v${packageJson.version}`} target='_blank' rel='noopener noreferrer'>
v{packageJson.version}
</a>
{isElectron && (
<a className={styles.fullNodeStats} href='http://localhost:5001/webui/' target='_blank' rel='noreferrer'>
node stats
</a>
)}
{commitRef && (
<>
{' '}
(
<a href={`https://github.com/plebbit/plebchan/commit/${commitRef}`} target='_blank' rel='noopener noreferrer'>
{commitRef.slice(0, 7)}
</a>
)
</>
)}
</div>
<div>
<Link to='/'>Home</Link>
</div>