From 80e49f8e182c5acece0b22f3d01314c025872192 Mon Sep 17 00:00:00 2001 From: Spectralitree <72747870+Spectralitree@users.noreply.github.com> Date: Sat, 7 Aug 2021 10:50:18 +0200 Subject: [PATCH] add option for banner at bottom of page --- src/Components/Private/MemberCard.js | 3 +++ src/Components/Private/MemberPage.js | 3 +++ src/Components/Private/System.js | 3 +++ src/Components/Public/Profile.js | 3 +++ src/Components/Public/ProfileCard.js | 3 +++ src/Components/Public/ProfilePage.js | 3 +++ src/Pages/Settings.js | 30 +++++++++++++++++++++++++++- 7 files changed, 47 insertions(+), 1 deletion(-) diff --git a/src/Components/Private/MemberCard.js b/src/Components/Private/MemberCard.js index d00ae747..449d0527 100644 --- a/src/Components/Private/MemberCard.js +++ b/src/Components/Private/MemberCard.js @@ -429,6 +429,9 @@ export default function MemberCard(props) {
: "" }

Description:

{ localStorage.getItem('twemoji') ?

:

} + { !member.banner || !localStorage.getItem("bottombanners") ? "" : + + } { proxyView ? "" : privacyEdit ? "" : privacyView ? "" : <> setEditMode(true)}>Edit View page } } ) diff --git a/src/Components/Private/MemberPage.js b/src/Components/Private/MemberPage.js index 107ec047..b185d95e 100644 --- a/src/Components/Private/MemberPage.js +++ b/src/Components/Private/MemberPage.js @@ -456,6 +456,9 @@ export default function MemberPage(props) {
: "" }

Description:

{ localStorage.getItem('twemoji') ?

:

} + { !member.banner || !localStorage.getItem("bottombanners") ? "" : + + } { proxyView ? "" : privacyMode ? "" : privacyView ? "" : <> setEditMode(true)}>Edit Back} } ) diff --git a/src/Components/Private/System.js b/src/Components/Private/System.js index 3288c13b..fe3f6b64 100644 --- a/src/Components/Private/System.js +++ b/src/Components/Private/System.js @@ -251,6 +251,9 @@ export default function System(props) { ) : (

)} + { !user.banner || !localStorage.getItem("bottombanners") ? "" : + + } {privacyEdit ? ( "" ) : privacyView ? ( diff --git a/src/Components/Public/Profile.js b/src/Components/Public/Profile.js index e98f7810..f416da50 100644 --- a/src/Components/Public/Profile.js +++ b/src/Components/Public/Profile.js @@ -122,6 +122,9 @@ export default function Profile () {

Description:

{ localStorage.getItem('twemoji') ?

:

} + { !system.banner || !localStorage.getItem("bottombanners") ? "" : + + } diff --git a/src/Components/Public/ProfileCard.js b/src/Components/Public/ProfileCard.js index a85f9914..8beeba73 100644 --- a/src/Components/Public/ProfileCard.js +++ b/src/Components/Public/ProfileCard.js @@ -131,6 +131,9 @@ export default function MemberCard(props) {
: "" }

Description:

{ localStorage.getItem('twemoji') ?

:

} + { !member.banner || !localStorage.getItem("bottombanners") ? "" : + + } View page ) } diff --git a/src/Components/Public/ProfilePage.js b/src/Components/Public/ProfilePage.js index 97e8c116..ec1eb771 100644 --- a/src/Components/Public/ProfilePage.js +++ b/src/Components/Public/ProfilePage.js @@ -154,6 +154,9 @@ export default function ProfilePage(props) {
: "" }

Description:

{ localStorage.getItem('twemoji') ?

:

} + { !member.banner || !localStorage.getItem("bottombanners") ? "" : + + } Back diff --git a/src/Pages/Settings.js b/src/Pages/Settings.js index eee2cbf2..719f057e 100644 --- a/src/Pages/Settings.js +++ b/src/Pages/Settings.js @@ -217,7 +217,35 @@ const Settings = ({ forceUpdate }) => { }} /> )} - Hide system and member banners? + Hide banners at the top? + + + {localStorage.getItem("bottombanners") ? ( + { + localStorage.removeItem("bottombanners"); + forceUpdate(); + }} + /> + ) : ( + { + localStorage.setItem("bottombanners", "true"); + forceUpdate(); + }} + /> + )} + Show banners at the bottom?