mirror of
https://github.com/bitsocialnet/5chan.git
synced 2026-08-03 07:41:04 +02:00
fix board nav mobile for subs not in list, fix hr mobile style
This commit is contained in:
@@ -37,10 +37,13 @@ const BoardNavDesktop = ({ subplebbits }: BoardNavProps) => {
|
|||||||
const BoardNavMobile = ({ subplebbits, currentSubplebbit }: BoardNavProps) => {
|
const BoardNavMobile = ({ subplebbits, currentSubplebbit }: BoardNavProps) => {
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
const navigate = useNavigate();
|
const navigate = useNavigate();
|
||||||
const displaySubplebbit = currentSubplebbit && currentSubplebbit.length > 10 ? currentSubplebbit.slice(0, 10).concat('...') : currentSubplebbit;
|
const displaySubplebbitAddress = currentSubplebbit && currentSubplebbit.length > 30 ? currentSubplebbit.slice(0, 30).concat('...') : currentSubplebbit;
|
||||||
|
|
||||||
|
const currentSubplebbitIsInList = subplebbits.some((subplebbit: any) => subplebbit.address === currentSubplebbit);
|
||||||
|
|
||||||
const boardSelect = (
|
const boardSelect = (
|
||||||
<select value={displaySubplebbit} onChange={(e) => navigate(`/p/${e.target.value}`)}>
|
<select value={currentSubplebbit || 'all'} onChange={(e) => navigate(`/p/${e.target.value}`)}>
|
||||||
|
{!currentSubplebbitIsInList && currentSubplebbit && <option value={currentSubplebbit}>{displaySubplebbitAddress}</option>}
|
||||||
<option value='all'>{t('all')}</option>
|
<option value='all'>{t('all')}</option>
|
||||||
<option value='subscriptions'>{t('subscriptions')}</option>
|
<option value='subscriptions'>{t('subscriptions')}</option>
|
||||||
{subplebbits.map((subplebbit: any, index: number) => {
|
{subplebbits.map((subplebbit: any, index: number) => {
|
||||||
|
|||||||
+6
-6
@@ -12,6 +12,12 @@ body, div, dl, dt, dd, ul, ol, li, h1, h2, h3, h4, h5, h6, pre, code, form, fiel
|
|||||||
padding: 0;
|
padding: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
hr {
|
||||||
|
border: var(--hr-border, revert);
|
||||||
|
border-top: var(--hr-border-top, revert);
|
||||||
|
height: var(--hr-height, revert);
|
||||||
|
}
|
||||||
|
|
||||||
.greentext {
|
.greentext {
|
||||||
color: var(--post-greentext-color);
|
color: var(--post-greentext-color);
|
||||||
}
|
}
|
||||||
@@ -47,10 +53,4 @@ body, div, dl, dt, dd, ul, ol, li, h1, h2, h3, h4, h5, h6, pre, code, form, fiel
|
|||||||
color: var(--button-desktop-text-color-hover);
|
color: var(--button-desktop-text-color-hover);
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
hr {
|
|
||||||
border: var(--hr-border, revert);
|
|
||||||
border-top: var(--hr-border-top, revert);
|
|
||||||
height: var(--hr-height, revert);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user