mirror of
https://github.com/ecency/ecency-mobile.git
synced 2024-12-21 20:31:37 +03:00
added popover to status icon
This commit is contained in:
parent
f1b48a04fb
commit
65996ee3be
@ -15,6 +15,7 @@ import { OptionsModal } from '../../atoms';
|
|||||||
// Styles
|
// Styles
|
||||||
import styles from './draftListItemStyles';
|
import styles from './draftListItemStyles';
|
||||||
import { ScheduledPostStatus } from '../../../providers/ecency/ecency.types';
|
import { ScheduledPostStatus } from '../../../providers/ecency/ecency.types';
|
||||||
|
import { PopoverWrapper } from '../../popoverWrapper/popoverWrapperView';
|
||||||
|
|
||||||
// Defaults
|
// Defaults
|
||||||
const DEFAULT_IMAGE =
|
const DEFAULT_IMAGE =
|
||||||
@ -55,8 +56,16 @@ const DraftListItemView = ({
|
|||||||
_isMounted = true;
|
_isMounted = true;
|
||||||
};
|
};
|
||||||
}, []);
|
}, []);
|
||||||
// Component Functions
|
|
||||||
|
|
||||||
|
// consts
|
||||||
|
const scheduleStatus =
|
||||||
|
status === ScheduledPostStatus.PENDING
|
||||||
|
? intl.formatMessage({ id: 'schedules.pending' })
|
||||||
|
: status === ScheduledPostStatus.POSTPONED
|
||||||
|
? intl.formatMessage({ id: 'schedules.postponed' })
|
||||||
|
: status === ScheduledPostStatus.PUBLISHED
|
||||||
|
? intl.formatMessage({ id: 'schedules.published' })
|
||||||
|
: intl.formatMessage({ id: 'schedules.error' });
|
||||||
const statusIcon =
|
const statusIcon =
|
||||||
status === ScheduledPostStatus.PENDING
|
status === ScheduledPostStatus.PENDING
|
||||||
? 'timer'
|
? 'timer'
|
||||||
@ -85,6 +94,7 @@ const DraftListItemView = ({
|
|||||||
/>
|
/>
|
||||||
<View style={styles.iconsContainer}>
|
<View style={styles.iconsContainer}>
|
||||||
{isSchedules && (
|
{isSchedules && (
|
||||||
|
<PopoverWrapper text={scheduleStatus}>
|
||||||
<IconButton
|
<IconButton
|
||||||
backgroundColor="transparent"
|
backgroundColor="transparent"
|
||||||
name={statusIcon}
|
name={statusIcon}
|
||||||
@ -95,6 +105,7 @@ const DraftListItemView = ({
|
|||||||
color={statusIconColor}
|
color={statusIconColor}
|
||||||
disabled
|
disabled
|
||||||
/>
|
/>
|
||||||
|
</PopoverWrapper>
|
||||||
)}
|
)}
|
||||||
<IconButton
|
<IconButton
|
||||||
backgroundColor="transparent"
|
backgroundColor="transparent"
|
||||||
|
@ -518,7 +518,11 @@
|
|||||||
"empty_list": "Nothing here",
|
"empty_list": "Nothing here",
|
||||||
"deleted": "Scheduled post deleted",
|
"deleted": "Scheduled post deleted",
|
||||||
"move": "Move to drafts",
|
"move": "Move to drafts",
|
||||||
"moved": "Moved to drafts"
|
"moved": "Moved to drafts",
|
||||||
|
"pending": "Pending",
|
||||||
|
"postponed": "Postponed",
|
||||||
|
"published": "Published",
|
||||||
|
"error": "Error"
|
||||||
},
|
},
|
||||||
"bookmarks": {
|
"bookmarks": {
|
||||||
"title": "Bookmarks",
|
"title": "Bookmarks",
|
||||||
|
Loading…
Reference in New Issue
Block a user