From d9f62a346e57e04be4ac3ee3b5cb371d346f6cc5 Mon Sep 17 00:00:00 2001 From: "plebeius.eth" Date: Sun, 10 Sep 2023 14:12:25 +0200 Subject: [PATCH] add commitRef for netlify to all views --- src/components/modals/SettingsModal.jsx | 3 ++- src/components/views/All.jsx | 3 ++- src/components/views/AllCatalog.jsx | 3 ++- src/components/views/Board.jsx | 3 ++- src/components/views/Catalog.jsx | 3 ++- src/components/views/Description.jsx | 3 ++- src/components/views/Home.jsx | 3 +-- src/components/views/NotFound.jsx | 3 ++- src/components/views/Pending.jsx | 3 ++- src/components/views/Rules.jsx | 3 ++- src/components/views/Subscriptions.jsx | 3 ++- src/components/views/SubscriptionsCatalog.jsx | 3 ++- src/components/views/Thread.jsx | 3 ++- 13 files changed, 25 insertions(+), 14 deletions(-) diff --git a/src/components/modals/SettingsModal.jsx b/src/components/modals/SettingsModal.jsx index f5eefe82..2a97e032 100755 --- a/src/components/modals/SettingsModal.jsx +++ b/src/components/modals/SettingsModal.jsx @@ -10,6 +10,7 @@ import useAnonModeStore from '../../hooks/stores/useAnonModeStore'; import useGeneralStore from '../../hooks/stores/useGeneralStore'; import packageJson from '../../../package.json'; const {version} = packageJson; +const commitRef = process?.env?.REACT_APP_COMMIT_REF ? ` ${process.env.REACT_APP_COMMIT_REF.slice(0, 7)}` : ''; const SettingsModal = ({ isOpen, closeModal }) => { @@ -423,7 +424,7 @@ const SettingsModal = ({ isOpen, closeModal }) => {
- v{version} -  + v{version}{commitRef} -  {window.electron && window.electron.isElectron ? ( full node diff --git a/src/components/views/All.jsx b/src/components/views/All.jsx index a45db8ed..5c18e161 100755 --- a/src/components/views/All.jsx +++ b/src/components/views/All.jsx @@ -47,6 +47,7 @@ import useGeneralStore from '../../hooks/stores/useGeneralStore'; import packageJson from '../../../package.json'; const {version} = packageJson; let lastVirtuosoStates = {}; +const commitRef = process?.env?.REACT_APP_COMMIT_REF ? ` ${process.env.REACT_APP_COMMIT_REF.slice(0, 7)}` : ''; const All = () => { @@ -2540,7 +2541,7 @@ const All = () => {
- plebchan v{version}. GPL-2.0 + plebchan v{version}{commitRef}. GPL-2.0
{ @@ -972,7 +973,7 @@ const AllCatalog = () => {
- plebchan v{version}. GPL-2.0 + plebchan v{version}{commitRef}. GPL-2.0
{ @@ -3219,7 +3220,7 @@ const Board = () => {
- plebchan v{version}. GPL-2.0 + plebchan v{version}{commitRef}. GPL-2.0
{ @@ -1630,7 +1631,7 @@ const Catalog = () => {
- plebchan v{version}. GPL-2.0 + plebchan v{version}{commitRef}. GPL-2.0
{ @@ -511,7 +512,7 @@ const Description = () => {
- plebchan v{version}. GPL-2.0 + plebchan v{version}{commitRef}. GPL-2.0
{ diff --git a/src/components/views/NotFound.jsx b/src/components/views/NotFound.jsx index 13b35da9..e6815d21 100644 --- a/src/components/views/NotFound.jsx +++ b/src/components/views/NotFound.jsx @@ -4,6 +4,7 @@ import { Link } from "react-router-dom"; import { Container, Header, Logo, Page, Boards, BoardsTitle } from '../styled/views/Home.styled'; import packageJson from '../../../package.json'; const {version} = packageJson; +const commitRef = process?.env?.REACT_APP_COMMIT_REF ? ` ${process.env.REACT_APP_COMMIT_REF.slice(0, 7)}` : ''; const NotFound = () => { @@ -61,7 +62,7 @@ const NotFound = () => { fontSize: "11px", marginTop: "2em", }}> - plebchan v{version}. GPL-2.0 + plebchan v{version}{commitRef}. GPL-2.0
diff --git a/src/components/views/Pending.jsx b/src/components/views/Pending.jsx index 62943f91..d1e10ded 100755 --- a/src/components/views/Pending.jsx +++ b/src/components/views/Pending.jsx @@ -21,6 +21,7 @@ import useError from '../../hooks/useError'; import useStateString from '../../hooks/useStateString'; import packageJson from '../../../package.json'; const {version} = packageJson; +const commitRef = process?.env?.REACT_APP_COMMIT_REF ? ` ${process.env.REACT_APP_COMMIT_REF.slice(0, 7)}` : ''; const Pending = () => { @@ -601,7 +602,7 @@ const Pending = () => { marginTop: "2em", marginBottom: "2em", }}> - plebchan v{version}. GPL-2.0 + plebchan v{version}{commitRef}. GPL-2.0
diff --git a/src/components/views/Rules.jsx b/src/components/views/Rules.jsx index 4ea80089..cb478da7 100644 --- a/src/components/views/Rules.jsx +++ b/src/components/views/Rules.jsx @@ -20,6 +20,7 @@ import handleStyleChange from '../../utils/handleStyleChange'; import useGeneralStore from '../../hooks/stores/useGeneralStore'; import packageJson from '../../../package.json'; const {version} = packageJson; +const commitRef = process?.env?.REACT_APP_COMMIT_REF ? ` ${process.env.REACT_APP_COMMIT_REF.slice(0, 7)}` : ''; const Rules = () => { @@ -509,7 +510,7 @@ const Rules = () => {
- plebchan v{version}. GPL-2.0 + plebchan v{version}{commitRef}. GPL-2.0
{ @@ -2547,7 +2548,7 @@ const Subscriptions = () => {
- plebchan v{version}. GPL-2.0 + plebchan v{version}{commitRef}. GPL-2.0
{ @@ -982,7 +983,7 @@ const SubscriptionsCatalog = () => {
- plebchan v{version}. GPL-2.0 + plebchan v{version}{commitRef}. GPL-2.0
{ @@ -2459,7 +2460,7 @@ const Thread = () => {
- plebchan v{version}. GPL-2.0 + plebchan v{version}{commitRef}. GPL-2.0