Update text of button when unhiding a story
Co-authored-by: trevor-signal <131492920+trevor-signal@users.noreply.github.com>
This commit is contained in:
parent
bfc72084ca
commit
0fd9c3faa7
4 changed files with 26 additions and 15 deletions
|
@ -6918,7 +6918,7 @@
|
||||||
"description": "aria-label for the story list button"
|
"description": "aria-label for the story list button"
|
||||||
},
|
},
|
||||||
"icu:StoryListItem__unhide": {
|
"icu:StoryListItem__unhide": {
|
||||||
"messageformat": "Show stories",
|
"messageformat": "Unhide story",
|
||||||
"description": "Label for menu item to un-hide the story"
|
"description": "Label for menu item to un-hide the story"
|
||||||
},
|
},
|
||||||
"icu:StoryListItem__hide": {
|
"icu:StoryListItem__hide": {
|
||||||
|
|
|
@ -189,6 +189,12 @@
|
||||||
@include StoryListItem__Icon('../images/icons/v3/x/x-circle-compact.svg');
|
@include StoryListItem__Icon('../images/icons/v3/x/x-circle-compact.svg');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
&--unhide {
|
||||||
|
@include StoryListItem__Icon(
|
||||||
|
'../images/icons/v3/check/check-circle-compact.svg'
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
&--info {
|
&--info {
|
||||||
@include StoryListItem__Icon('../images/icons/v3/info/info-compact.svg');
|
@include StoryListItem__Icon('../images/icons/v3/info/info-compact.svg');
|
||||||
}
|
}
|
||||||
|
|
|
@ -117,21 +117,24 @@ export function StoryListItem({
|
||||||
repliesElement = <div className="StoryListItem__info--replies--others" />;
|
repliesElement = <div className="StoryListItem__info--replies--others" />;
|
||||||
}
|
}
|
||||||
|
|
||||||
const menuOptions = [
|
const menuOptions = [];
|
||||||
{
|
if (isHidden) {
|
||||||
icon: 'StoryListItem__icon--hide',
|
menuOptions.push({
|
||||||
label: isHidden
|
icon: 'StoryListItem__icon--unhide',
|
||||||
? i18n('icu:StoryListItem__unhide')
|
label: i18n('icu:StoryListItem__unhide'),
|
||||||
: i18n('icu:StoryListItem__hide'),
|
|
||||||
onClick: () => {
|
onClick: () => {
|
||||||
if (isHidden) {
|
onHideStory(conversationId);
|
||||||
onHideStory(conversationId);
|
|
||||||
} else {
|
|
||||||
setHasConfirmHideStory(true);
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
},
|
});
|
||||||
];
|
} else {
|
||||||
|
menuOptions.push({
|
||||||
|
icon: 'StoryListItem__icon--hide',
|
||||||
|
label: i18n('icu:StoryListItem__hide'),
|
||||||
|
onClick: () => {
|
||||||
|
setHasConfirmHideStory(true);
|
||||||
|
},
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
if (!isSignalOfficial) {
|
if (!isSignalOfficial) {
|
||||||
menuOptions.push({
|
menuOptions.push({
|
||||||
|
|
|
@ -516,7 +516,9 @@ export function StoryViewer({
|
||||||
onClick: () => setCurrentViewTarget(StoryViewTargetType.Details),
|
onClick: () => setCurrentViewTarget(StoryViewTargetType.Details),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
icon: 'StoryListItem__icon--hide',
|
icon: isHidden
|
||||||
|
? 'StoryListItem__icon--unhide'
|
||||||
|
: 'StoryListItem__icon--hide',
|
||||||
label: isHidden
|
label: isHidden
|
||||||
? i18n('icu:StoryListItem__unhide')
|
? i18n('icu:StoryListItem__unhide')
|
||||||
: i18n('icu:StoryListItem__hide'),
|
: i18n('icu:StoryListItem__hide'),
|
||||||
|
|
Loading…
Reference in a new issue