diff --git a/Components/Repo/Repo.js b/Components/Repo/Repo.js index 4edfd5e..2dce1ae 100644 --- a/Components/Repo/Repo.js +++ b/Components/Repo/Repo.js @@ -7,6 +7,7 @@ import { IconChevronDown, IconChevronUp, IconBellOff, + IconLockPlus, } from '@tabler/icons-react'; import timestampConverter from '../../helpers/functions/timestampConverter'; import StorageBar from '../UI/StorageBar/StorageBar'; @@ -72,6 +73,16 @@ export default function Repo(props) { } }; + const appendOnlyModeIndicator = () => { + if (props.appendOnlyMode) { + return ( +
+ +
+ ); + } + }; + return ( <> {displayDetails ? ( @@ -80,6 +91,7 @@ export default function Repo(props) {
{props.alias}
+ {appendOnlyModeIndicator()} {alertIndicator()} {props.comment && (
@@ -155,6 +167,7 @@ export default function Repo(props) {
{props.alias}
+ {appendOnlyModeIndicator()} {alertIndicator()} {props.comment && (
diff --git a/Components/Repo/Repo.module.css b/Components/Repo/Repo.module.css index ae972e8..edbf05e 100644 --- a/Components/Repo/Repo.module.css +++ b/Components/Repo/Repo.module.css @@ -157,6 +157,13 @@ margin-left: 10px; } +.appendOnlyModeIcon { + display: flex; + flex-direction: row; + align-items: center; + margin-left: 10px; +} + /* GENERAL */ .alias { font-weight: bold; diff --git a/Containers/RepoList/RepoList.js b/Containers/RepoList/RepoList.js index 8e794f1..602be5a 100644 --- a/Containers/RepoList/RepoList.js +++ b/Containers/RepoList/RepoList.js @@ -123,6 +123,7 @@ export default function RepoList() { sshPublicKey={repo.sshPublicKey} comment={repo.comment} lanCommand={repo.lanCommand} + appendOnlyMode={repo.appendOnlyMode} repoManageEditHandler={() => repoManageEditHandler(repo.id)} wizardEnv={wizardEnv} > diff --git a/Containers/RepoManage/RepoManage.js b/Containers/RepoManage/RepoManage.js index 36ebc62..251b24d 100644 --- a/Containers/RepoManage/RepoManage.js +++ b/Containers/RepoManage/RepoManage.js @@ -170,6 +170,7 @@ export default function RepoManage(props) { comment: dataForm.comment, alert: dataForm.alert.value, lanCommand: dataForm.lanCommand, + appendOnlyMode: dataForm.appendOnlyMode, }; //POST API to send new repo await fetch('/api/repo/add', { @@ -210,6 +211,7 @@ export default function RepoManage(props) { comment: dataForm.comment, alert: dataForm.alert.value, lanCommand: dataForm.lanCommand, + appendOnlyMode: dataForm.appendOnlyMode, }; await fetch('/api/repo/id/' + router.query.slug + '/edit', { method: 'PUT', @@ -426,7 +428,7 @@ export default function RepoManage(props) { )} {/* LAN COMMAND GENERATION */} -
+
+ {/* APPEND-ONLY MODE */} +
+ + + + + +
{/* ALERT */}