Monoforum: Remove Edit Forum button from topic (#6881)
This commit is contained in:
parent
ad0e8938c9
commit
e42616655e
@ -389,6 +389,26 @@ const RightHeader: FC<OwnProps & StateProps> = ({
|
|||||||
);
|
);
|
||||||
}, [isMobile, lang]);
|
}, [isMobile, lang]);
|
||||||
|
|
||||||
|
const primaryEditButton = canEditTopic ? (
|
||||||
|
<Button
|
||||||
|
round
|
||||||
|
color="translucent"
|
||||||
|
size="smaller"
|
||||||
|
ariaLabel={oldLang('EditTopic')}
|
||||||
|
onClick={toggleEditTopic}
|
||||||
|
iconName="edit"
|
||||||
|
/>
|
||||||
|
) : (canManage || canEditBot) ? (
|
||||||
|
<Button
|
||||||
|
round
|
||||||
|
color="translucent"
|
||||||
|
size="smaller"
|
||||||
|
ariaLabel={oldLang('Edit')}
|
||||||
|
onClick={handleToggleManagement}
|
||||||
|
iconName="edit"
|
||||||
|
/>
|
||||||
|
) : undefined;
|
||||||
|
|
||||||
function renderHeaderContent() {
|
function renderHeaderContent() {
|
||||||
if (renderingContentKey === -1) {
|
if (renderingContentKey === -1) {
|
||||||
return undefined;
|
return undefined;
|
||||||
@ -635,36 +655,7 @@ const RightHeader: FC<OwnProps & StateProps> = ({
|
|||||||
iconName="add-user"
|
iconName="add-user"
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
{canManage && !isInsideTopic && (
|
{primaryEditButton}
|
||||||
<Button
|
|
||||||
round
|
|
||||||
color="translucent"
|
|
||||||
size="smaller"
|
|
||||||
ariaLabel={oldLang('Edit')}
|
|
||||||
onClick={handleToggleManagement}
|
|
||||||
iconName="edit"
|
|
||||||
/>
|
|
||||||
)}
|
|
||||||
{canEditBot && (
|
|
||||||
<Button
|
|
||||||
round
|
|
||||||
color="translucent"
|
|
||||||
size="smaller"
|
|
||||||
ariaLabel={oldLang('Edit')}
|
|
||||||
onClick={handleToggleManagement}
|
|
||||||
iconName="edit"
|
|
||||||
/>
|
|
||||||
)}
|
|
||||||
{canEditTopic && (
|
|
||||||
<Button
|
|
||||||
round
|
|
||||||
color="translucent"
|
|
||||||
size="smaller"
|
|
||||||
ariaLabel={oldLang('EditTopic')}
|
|
||||||
onClick={toggleEditTopic}
|
|
||||||
iconName="edit"
|
|
||||||
/>
|
|
||||||
)}
|
|
||||||
{canViewStatistics && (
|
{canViewStatistics && (
|
||||||
<Button
|
<Button
|
||||||
round
|
round
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user