First time My Stories post experience
This commit is contained in:
parent
c18fa35354
commit
f611256afc
|
@ -7393,6 +7393,10 @@
|
||||||
"message": "Story settings",
|
"message": "Story settings",
|
||||||
"description": "Button label to get to story settings"
|
"description": "Button label to get to story settings"
|
||||||
},
|
},
|
||||||
|
"SendStoryModal__choose-who-can-view": {
|
||||||
|
"message": "Choose who can view your story",
|
||||||
|
"description": "Shown during the first time posting a story"
|
||||||
|
},
|
||||||
"SendStoryModal__title": {
|
"SendStoryModal__title": {
|
||||||
"message": "Send to",
|
"message": "Send to",
|
||||||
"description": "Title for the send story modal"
|
"description": "Title for the send story modal"
|
||||||
|
@ -7425,6 +7429,20 @@
|
||||||
"message": "Choose groups",
|
"message": "Choose groups",
|
||||||
"description": "Modal title when choosing groups"
|
"description": "Modal title when choosing groups"
|
||||||
},
|
},
|
||||||
|
"SendStoryModal__my-stories-privacy": {
|
||||||
|
"message": "My stories privacy",
|
||||||
|
"description": "Modal title for setting privacy for My Stories"
|
||||||
|
},
|
||||||
|
"SendStoryModal__privacy-disclaimer": {
|
||||||
|
"message": "Choose which Signal connections can view your story. You can always change this in privacy settings. $learnMore$",
|
||||||
|
"description": "Disclaimer on how changes to story settings work",
|
||||||
|
"placeholders": {
|
||||||
|
"learnMore": {
|
||||||
|
"content": "$1",
|
||||||
|
"example": "<a>Learn more</a>"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"Stories__settings-toggle--title": {
|
"Stories__settings-toggle--title": {
|
||||||
"message": "Share & View Stories",
|
"message": "Share & View Stories",
|
||||||
"description": "Select box title for the stories on/off toggle"
|
"description": "Select box title for the stories on/off toggle"
|
||||||
|
|
|
@ -36,6 +36,9 @@ export default {
|
||||||
groupStories: {
|
groupStories: {
|
||||||
defaultValue: Array.from(Array(2), getDefaultGroup),
|
defaultValue: Array.from(Array(2), getDefaultGroup),
|
||||||
},
|
},
|
||||||
|
hasFirstStoryPostExperience: {
|
||||||
|
defaultValue: false,
|
||||||
|
},
|
||||||
i18n: {
|
i18n: {
|
||||||
defaultValue: i18n,
|
defaultValue: i18n,
|
||||||
},
|
},
|
||||||
|
@ -44,11 +47,15 @@ export default {
|
||||||
},
|
},
|
||||||
onClose: { action: true },
|
onClose: { action: true },
|
||||||
onDistributionListCreated: { action: true },
|
onDistributionListCreated: { action: true },
|
||||||
|
onHideMyStoriesFrom: { action: true },
|
||||||
onSend: { action: true },
|
onSend: { action: true },
|
||||||
|
onViewersUpdated: { action: true },
|
||||||
|
setMyStoriesToAllSignalConnections: { action: true },
|
||||||
signalConnections: {
|
signalConnections: {
|
||||||
defaultValue: Array.from(Array(42), getDefaultConversation),
|
defaultValue: Array.from(Array(42), getDefaultConversation),
|
||||||
},
|
},
|
||||||
tagGroupsAsNewGroupStory: { action: true },
|
tagGroupsAsNewGroupStory: { action: true },
|
||||||
|
toggleSignalConnectionsModal: { action: true },
|
||||||
},
|
},
|
||||||
} as Meta;
|
} as Meta;
|
||||||
|
|
||||||
|
@ -58,3 +65,10 @@ export const Modal = Template.bind({});
|
||||||
Modal.args = {
|
Modal.args = {
|
||||||
distributionLists: getFakeDistributionLists(),
|
distributionLists: getFakeDistributionLists(),
|
||||||
};
|
};
|
||||||
|
|
||||||
|
export const FirstTime = Template.bind({});
|
||||||
|
FirstTime.args = {
|
||||||
|
distributionLists: [getMyStories()],
|
||||||
|
groupStories: [],
|
||||||
|
hasFirstStoryPostExperience: true,
|
||||||
|
};
|
||||||
|
|
|
@ -9,13 +9,16 @@ import { filterAndSortConversationsByRecent } from '../util/filterAndSortConvers
|
||||||
import type { ConversationType } from '../state/ducks/conversations';
|
import type { ConversationType } from '../state/ducks/conversations';
|
||||||
import type { LocalizerType } from '../types/Util';
|
import type { LocalizerType } from '../types/Util';
|
||||||
import type { PreferredBadgeSelectorType } from '../state/selectors/badges';
|
import type { PreferredBadgeSelectorType } from '../state/selectors/badges';
|
||||||
|
import type { PropsType as StoriesSettingsModalPropsType } from './StoriesSettingsModal';
|
||||||
import type { StoryDistributionListDataType } from '../state/ducks/storyDistributionLists';
|
import type { StoryDistributionListDataType } from '../state/ducks/storyDistributionLists';
|
||||||
import type { UUIDStringType } from '../types/UUID';
|
import type { UUIDStringType } from '../types/UUID';
|
||||||
import { Avatar, AvatarSize } from './Avatar';
|
import { Avatar, AvatarSize } from './Avatar';
|
||||||
|
import { Button, ButtonVariant } from './Button';
|
||||||
import { Checkbox } from './Checkbox';
|
import { Checkbox } from './Checkbox';
|
||||||
import { ContextMenu } from './ContextMenu';
|
import { ContextMenu } from './ContextMenu';
|
||||||
import {
|
import {
|
||||||
EditDistributionList,
|
EditDistributionList,
|
||||||
|
EditMyStoriesPrivacy,
|
||||||
Page as StoriesSettingsPage,
|
Page as StoriesSettingsPage,
|
||||||
} from './StoriesSettingsModal';
|
} from './StoriesSettingsModal';
|
||||||
import { MY_STORIES_ID, getStoryDistributionListName } from '../types/Stories';
|
import { MY_STORIES_ID, getStoryDistributionListName } from '../types/Stories';
|
||||||
|
@ -30,6 +33,7 @@ export type PropsType = {
|
||||||
getPreferredBadge: PreferredBadgeSelectorType;
|
getPreferredBadge: PreferredBadgeSelectorType;
|
||||||
groupConversations: Array<ConversationType>;
|
groupConversations: Array<ConversationType>;
|
||||||
groupStories: Array<ConversationType>;
|
groupStories: Array<ConversationType>;
|
||||||
|
hasFirstStoryPostExperience: boolean;
|
||||||
i18n: LocalizerType;
|
i18n: LocalizerType;
|
||||||
me: ConversationType;
|
me: ConversationType;
|
||||||
onClose: () => unknown;
|
onClose: () => unknown;
|
||||||
|
@ -44,11 +48,24 @@ export type PropsType = {
|
||||||
) => unknown;
|
) => unknown;
|
||||||
signalConnections: Array<ConversationType>;
|
signalConnections: Array<ConversationType>;
|
||||||
tagGroupsAsNewGroupStory: (cids: Array<string>) => unknown;
|
tagGroupsAsNewGroupStory: (cids: Array<string>) => unknown;
|
||||||
};
|
} & Pick<
|
||||||
|
StoriesSettingsModalPropsType,
|
||||||
|
| 'onHideMyStoriesFrom'
|
||||||
|
| 'onViewersUpdated'
|
||||||
|
| 'setMyStoriesToAllSignalConnections'
|
||||||
|
| 'toggleSignalConnectionsModal'
|
||||||
|
>;
|
||||||
|
|
||||||
|
enum MyStoriesPrivacy {
|
||||||
|
AllSignalConnections = 'AllSignalConnections',
|
||||||
|
Exclude = 'Exclude',
|
||||||
|
OnlyShareWith = 'OnlyShareWith',
|
||||||
|
}
|
||||||
|
|
||||||
enum SendStoryPage {
|
enum SendStoryPage {
|
||||||
SendStory = 'SendStory',
|
|
||||||
ChooseGroups = 'ChooseGroups',
|
ChooseGroups = 'ChooseGroups',
|
||||||
|
SendStory = 'SendStory',
|
||||||
|
SetMyStoriesPrivacy = 'SetMyStoriesPrivacy',
|
||||||
}
|
}
|
||||||
|
|
||||||
const Page = {
|
const Page = {
|
||||||
|
@ -97,14 +114,19 @@ export const SendStoryModal = ({
|
||||||
getPreferredBadge,
|
getPreferredBadge,
|
||||||
groupConversations,
|
groupConversations,
|
||||||
groupStories,
|
groupStories,
|
||||||
|
hasFirstStoryPostExperience,
|
||||||
i18n,
|
i18n,
|
||||||
me,
|
me,
|
||||||
onClose,
|
onClose,
|
||||||
onDistributionListCreated,
|
onDistributionListCreated,
|
||||||
|
onHideMyStoriesFrom,
|
||||||
onSend,
|
onSend,
|
||||||
onSelectedStoryList,
|
onSelectedStoryList,
|
||||||
|
onViewersUpdated,
|
||||||
|
setMyStoriesToAllSignalConnections,
|
||||||
signalConnections,
|
signalConnections,
|
||||||
tagGroupsAsNewGroupStory,
|
tagGroupsAsNewGroupStory,
|
||||||
|
toggleSignalConnectionsModal,
|
||||||
}: PropsType): JSX.Element => {
|
}: PropsType): JSX.Element => {
|
||||||
const [page, setPage] = useState<PageType>(Page.SendStory);
|
const [page, setPage] = useState<PageType>(Page.SendStory);
|
||||||
|
|
||||||
|
@ -170,8 +192,63 @@ export const SendStoryModal = ({
|
||||||
Array<ConversationType>
|
Array<ConversationType>
|
||||||
>([]);
|
>([]);
|
||||||
|
|
||||||
|
const [myStoriesPrivacy, setMyStoriesPrivacy] = useState<MyStoriesPrivacy>(
|
||||||
|
MyStoriesPrivacy.AllSignalConnections
|
||||||
|
);
|
||||||
|
const [myStoriesPrivacyUuids, setMyStoriesPrivacyUuids] = useState<
|
||||||
|
Set<UUIDStringType>
|
||||||
|
>(new Set());
|
||||||
|
|
||||||
|
const myStories = useMemo(() => {
|
||||||
|
return {
|
||||||
|
allowsReplies: true,
|
||||||
|
id: MY_STORIES_ID,
|
||||||
|
name: MY_STORIES_ID,
|
||||||
|
isBlockList: myStoriesPrivacy !== MyStoriesPrivacy.OnlyShareWith,
|
||||||
|
members:
|
||||||
|
myStoriesPrivacy === MyStoriesPrivacy.AllSignalConnections
|
||||||
|
? []
|
||||||
|
: candidateConversations.filter(
|
||||||
|
convo => convo.uuid && myStoriesPrivacyUuids.has(convo.uuid)
|
||||||
|
),
|
||||||
|
};
|
||||||
|
}, [candidateConversations, myStoriesPrivacy, myStoriesPrivacyUuids]);
|
||||||
|
|
||||||
let content: JSX.Element;
|
let content: JSX.Element;
|
||||||
if (page === Page.ChooseViewers || page === Page.NameStory) {
|
if (page === Page.SetMyStoriesPrivacy) {
|
||||||
|
content = (
|
||||||
|
<EditMyStoriesPrivacy
|
||||||
|
hasDisclaimerAbove
|
||||||
|
i18n={i18n}
|
||||||
|
learnMore="SendStoryModal__privacy-disclaimer"
|
||||||
|
myStories={myStories}
|
||||||
|
onClickExclude={() => {
|
||||||
|
setMyStoriesPrivacy(MyStoriesPrivacy.Exclude);
|
||||||
|
setMyStoriesPrivacyUuids(new Set());
|
||||||
|
setSelectedContacts([]);
|
||||||
|
setPage(Page.HideStoryFrom);
|
||||||
|
}}
|
||||||
|
onClickOnlyShareWith={() => {
|
||||||
|
setMyStoriesPrivacy(MyStoriesPrivacy.OnlyShareWith);
|
||||||
|
setMyStoriesPrivacyUuids(new Set());
|
||||||
|
setSelectedContacts([]);
|
||||||
|
setPage(Page.AddViewer);
|
||||||
|
}}
|
||||||
|
setSelectedContacts={setSelectedContacts}
|
||||||
|
setMyStoriesToAllSignalConnections={() => {
|
||||||
|
setMyStoriesPrivacy(MyStoriesPrivacy.AllSignalConnections);
|
||||||
|
setMyStoriesPrivacyUuids(new Set());
|
||||||
|
setSelectedContacts([]);
|
||||||
|
}}
|
||||||
|
toggleSignalConnectionsModal={toggleSignalConnectionsModal}
|
||||||
|
/>
|
||||||
|
);
|
||||||
|
} else if (
|
||||||
|
page === Page.ChooseViewers ||
|
||||||
|
page === Page.NameStory ||
|
||||||
|
page === Page.AddViewer ||
|
||||||
|
page === Page.HideStoryFrom
|
||||||
|
) {
|
||||||
content = (
|
content = (
|
||||||
<EditDistributionList
|
<EditDistributionList
|
||||||
candidateConversations={candidateConversations}
|
candidateConversations={candidateConversations}
|
||||||
|
@ -181,9 +258,12 @@ export const SendStoryModal = ({
|
||||||
onDistributionListCreated(name, uuids);
|
onDistributionListCreated(name, uuids);
|
||||||
setPage(Page.SendStory);
|
setPage(Page.SendStory);
|
||||||
}}
|
}}
|
||||||
onViewersUpdated={() => {
|
onViewersUpdated={uuids => {
|
||||||
if (page === Page.ChooseViewers) {
|
if (page === Page.ChooseViewers) {
|
||||||
setPage(Page.NameStory);
|
setPage(Page.NameStory);
|
||||||
|
} else if (page === Page.HideStoryFrom || page === Page.AddViewer) {
|
||||||
|
setMyStoriesPrivacyUuids(new Set(uuids));
|
||||||
|
setPage(Page.SetMyStoriesPrivacy);
|
||||||
} else {
|
} else {
|
||||||
setPage(Page.SendStory);
|
setPage(Page.SendStory);
|
||||||
}
|
}
|
||||||
|
@ -310,6 +390,15 @@ export const SendStoryModal = ({
|
||||||
moduleClassName="SendStoryModal__distribution-list"
|
moduleClassName="SendStoryModal__distribution-list"
|
||||||
name="SendStoryModal__distribution-list"
|
name="SendStoryModal__distribution-list"
|
||||||
onChange={(value: boolean) => {
|
onChange={(value: boolean) => {
|
||||||
|
if (
|
||||||
|
list.id === MY_STORIES_ID &&
|
||||||
|
hasFirstStoryPostExperience &&
|
||||||
|
value
|
||||||
|
) {
|
||||||
|
setPage(Page.SetMyStoriesPrivacy);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
setSelectedListIds(listIds => {
|
setSelectedListIds(listIds => {
|
||||||
if (value) {
|
if (value) {
|
||||||
listIds.add(list.id);
|
listIds.add(list.id);
|
||||||
|
@ -358,7 +447,9 @@ export const SendStoryModal = ({
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="SendStoryModal__distribution-list__description">
|
<div className="SendStoryModal__distribution-list__description">
|
||||||
{getListViewers(list, i18n, signalConnections)}
|
{hasFirstStoryPostExperience && list.id === MY_STORIES_ID
|
||||||
|
? i18n('SendStoryModal__choose-who-can-view')
|
||||||
|
: getListViewers(list, i18n, signalConnections)}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</label>
|
</label>
|
||||||
|
@ -435,11 +526,15 @@ export const SendStoryModal = ({
|
||||||
}
|
}
|
||||||
|
|
||||||
let modalTitle: string;
|
let modalTitle: string;
|
||||||
if (page === Page.ChooseGroups) {
|
if (page === Page.SetMyStoriesPrivacy) {
|
||||||
|
modalTitle = i18n('SendStoryModal__my-stories-privacy');
|
||||||
|
} else if (page === Page.HideStoryFrom) {
|
||||||
|
modalTitle = i18n('StoriesSettings__hide-story');
|
||||||
|
} else if (page === Page.ChooseGroups) {
|
||||||
modalTitle = i18n('SendStoryModal__choose-groups');
|
modalTitle = i18n('SendStoryModal__choose-groups');
|
||||||
} else if (page === Page.NameStory) {
|
} else if (page === Page.NameStory) {
|
||||||
modalTitle = i18n('StoriesSettings__name-story');
|
modalTitle = i18n('StoriesSettings__name-story');
|
||||||
} else if (page === Page.ChooseViewers) {
|
} else if (page === Page.ChooseViewers || page === Page.AddViewer) {
|
||||||
modalTitle = i18n('StoriesSettings__choose-viewers');
|
modalTitle = i18n('StoriesSettings__choose-viewers');
|
||||||
} else {
|
} else {
|
||||||
modalTitle = i18n('SendStoryModal__title');
|
modalTitle = i18n('SendStoryModal__title');
|
||||||
|
@ -457,10 +552,16 @@ export const SendStoryModal = ({
|
||||||
const hasBackButton = page !== Page.SendStory;
|
const hasBackButton = page !== Page.SendStory;
|
||||||
|
|
||||||
let modalFooter: JSX.Element | undefined;
|
let modalFooter: JSX.Element | undefined;
|
||||||
if (page === Page.SendStory || page === Page.ChooseGroups) {
|
if (
|
||||||
|
page === Page.SendStory ||
|
||||||
|
page === Page.ChooseGroups ||
|
||||||
|
page === Page.SetMyStoriesPrivacy
|
||||||
|
) {
|
||||||
modalFooter = (
|
modalFooter = (
|
||||||
<Modal.ButtonFooter moduleClassName="SendStoryModal">
|
<Modal.ButtonFooter moduleClassName="SendStoryModal">
|
||||||
<div className="SendStoryModal__selected-lists">{selectedNames}</div>
|
{page !== Page.SetMyStoriesPrivacy && (
|
||||||
|
<div className="SendStoryModal__selected-lists">{selectedNames}</div>
|
||||||
|
)}
|
||||||
{page === Page.ChooseGroups && (
|
{page === Page.ChooseGroups && (
|
||||||
<button
|
<button
|
||||||
aria-label="SendStoryModal__ok"
|
aria-label="SendStoryModal__ok"
|
||||||
|
@ -485,6 +586,43 @@ export const SendStoryModal = ({
|
||||||
type="button"
|
type="button"
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
|
{page === Page.SetMyStoriesPrivacy && (
|
||||||
|
<>
|
||||||
|
<div />
|
||||||
|
<div>
|
||||||
|
<Button
|
||||||
|
onClick={() => setPage(Page.SendStory)}
|
||||||
|
variant={ButtonVariant.Secondary}
|
||||||
|
>
|
||||||
|
{i18n('cancel')}
|
||||||
|
</Button>
|
||||||
|
<Button
|
||||||
|
onClick={() => {
|
||||||
|
if (
|
||||||
|
myStoriesPrivacy === MyStoriesPrivacy.AllSignalConnections
|
||||||
|
) {
|
||||||
|
setMyStoriesToAllSignalConnections();
|
||||||
|
} else if (myStoriesPrivacy === MyStoriesPrivacy.Exclude) {
|
||||||
|
onHideMyStoriesFrom(Array.from(myStoriesPrivacyUuids));
|
||||||
|
} else if (
|
||||||
|
myStoriesPrivacy === MyStoriesPrivacy.OnlyShareWith
|
||||||
|
) {
|
||||||
|
onViewersUpdated(
|
||||||
|
MY_STORIES_ID,
|
||||||
|
Array.from(myStoriesPrivacyUuids)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
setMyStoriesPrivacyUuids(new Set());
|
||||||
|
setSelectedContacts([]);
|
||||||
|
setPage(Page.SendStory);
|
||||||
|
}}
|
||||||
|
variant={ButtonVariant.Primary}
|
||||||
|
>
|
||||||
|
{i18n('save')}
|
||||||
|
</Button>
|
||||||
|
</div>
|
||||||
|
</>
|
||||||
|
)}
|
||||||
</Modal.ButtonFooter>
|
</Modal.ButtonFooter>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -498,7 +636,19 @@ export const SendStoryModal = ({
|
||||||
onBackButtonClick={
|
onBackButtonClick={
|
||||||
hasBackButton
|
hasBackButton
|
||||||
? () => {
|
? () => {
|
||||||
if (page === Page.ChooseGroups) {
|
if (page === Page.SetMyStoriesPrivacy) {
|
||||||
|
setSelectedContacts([]);
|
||||||
|
setMyStoriesPrivacyUuids(new Set());
|
||||||
|
setMyStoriesPrivacy(MyStoriesPrivacy.AllSignalConnections);
|
||||||
|
setPage(Page.SendStory);
|
||||||
|
} else if (
|
||||||
|
page === Page.HideStoryFrom ||
|
||||||
|
page === Page.AddViewer
|
||||||
|
) {
|
||||||
|
setSelectedContacts([]);
|
||||||
|
setMyStoriesPrivacyUuids(new Set());
|
||||||
|
setPage(Page.SetMyStoriesPrivacy);
|
||||||
|
} else if (page === Page.ChooseGroups) {
|
||||||
setChosenGroupIds(new Set());
|
setChosenGroupIds(new Set());
|
||||||
setPage(Page.SendStory);
|
setPage(Page.SendStory);
|
||||||
} else if (page === Page.ChooseViewers) {
|
} else if (page === Page.ChooseViewers) {
|
||||||
|
|
|
@ -187,79 +187,22 @@ export const StoriesSettingsModal = ({
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{isMyStories && (
|
{isMyStories && (
|
||||||
<>
|
<EditMyStoriesPrivacy
|
||||||
<Checkbox
|
i18n={i18n}
|
||||||
checked={!listToEdit.members.length}
|
learnMore="StoriesSettings__mine_disclaimer"
|
||||||
description={i18n('StoriesSettings__mine__all--description')}
|
myStories={listToEdit}
|
||||||
isRadio
|
onClickExclude={() => {
|
||||||
label={i18n('StoriesSettings__mine__all--label')}
|
setPage(Page.HideStoryFrom);
|
||||||
moduleClassName="StoriesSettingsModal__checkbox"
|
}}
|
||||||
name="share"
|
onClickOnlyShareWith={() => {
|
||||||
onChange={() => {
|
setPage(Page.AddViewer);
|
||||||
setMyStoriesToAllSignalConnections();
|
}}
|
||||||
}}
|
setSelectedContacts={setSelectedContacts}
|
||||||
/>
|
setMyStoriesToAllSignalConnections={
|
||||||
|
setMyStoriesToAllSignalConnections
|
||||||
<Checkbox
|
}
|
||||||
checked={listToEdit.isBlockList && listToEdit.members.length > 0}
|
toggleSignalConnectionsModal={toggleSignalConnectionsModal}
|
||||||
description={i18n('StoriesSettings__mine__exclude--description', [
|
/>
|
||||||
listToEdit.isBlockList
|
|
||||||
? String(listToEdit.members.length)
|
|
||||||
: '0',
|
|
||||||
])}
|
|
||||||
isRadio
|
|
||||||
label={i18n('StoriesSettings__mine__exclude--label')}
|
|
||||||
moduleClassName="StoriesSettingsModal__checkbox"
|
|
||||||
name="share"
|
|
||||||
onChange={noop}
|
|
||||||
onClick={() => {
|
|
||||||
if (listToEdit.isBlockList) {
|
|
||||||
setSelectedContacts(listToEdit.members);
|
|
||||||
}
|
|
||||||
setPage(Page.HideStoryFrom);
|
|
||||||
}}
|
|
||||||
/>
|
|
||||||
|
|
||||||
<Checkbox
|
|
||||||
checked={!listToEdit.isBlockList && listToEdit.members.length > 0}
|
|
||||||
description={
|
|
||||||
!listToEdit.isBlockList && listToEdit.members.length
|
|
||||||
? i18n('StoriesSettings__mine__only--description--people', [
|
|
||||||
String(listToEdit.members.length),
|
|
||||||
])
|
|
||||||
: i18n('StoriesSettings__mine__only--description')
|
|
||||||
}
|
|
||||||
isRadio
|
|
||||||
label={i18n('StoriesSettings__mine__only--label')}
|
|
||||||
moduleClassName="StoriesSettingsModal__checkbox"
|
|
||||||
name="share"
|
|
||||||
onChange={noop}
|
|
||||||
onClick={() => {
|
|
||||||
if (!listToEdit.isBlockList) {
|
|
||||||
setSelectedContacts(listToEdit.members);
|
|
||||||
}
|
|
||||||
setPage(Page.AddViewer);
|
|
||||||
}}
|
|
||||||
/>
|
|
||||||
|
|
||||||
<div className="StoriesSettingsModal__disclaimer">
|
|
||||||
<Intl
|
|
||||||
components={{
|
|
||||||
learnMore: (
|
|
||||||
<button
|
|
||||||
className="StoriesSettingsModal__disclaimer__learn-more"
|
|
||||||
onClick={toggleSignalConnectionsModal}
|
|
||||||
type="button"
|
|
||||||
>
|
|
||||||
{i18n('StoriesSettings__mine__disclaimer--learn-more')}
|
|
||||||
</button>
|
|
||||||
),
|
|
||||||
}}
|
|
||||||
i18n={i18n}
|
|
||||||
id="StoriesSettings__mine__disclaimer"
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
</>
|
|
||||||
)}
|
)}
|
||||||
|
|
||||||
{!isMyStories && (
|
{!isMyStories && (
|
||||||
|
@ -532,6 +475,111 @@ export const StoriesSettingsModal = ({
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
type EditMyStoriesPrivacyPropsType = {
|
||||||
|
hasDisclaimerAbove?: boolean;
|
||||||
|
i18n: LocalizerType;
|
||||||
|
learnMore: string;
|
||||||
|
myStories: StoryDistributionListWithMembersDataType;
|
||||||
|
onClickExclude: () => unknown;
|
||||||
|
onClickOnlyShareWith: () => unknown;
|
||||||
|
setSelectedContacts: (contacts: Array<ConversationType>) => unknown;
|
||||||
|
} & Pick<
|
||||||
|
PropsType,
|
||||||
|
'setMyStoriesToAllSignalConnections' | 'toggleSignalConnectionsModal'
|
||||||
|
>;
|
||||||
|
|
||||||
|
export const EditMyStoriesPrivacy = ({
|
||||||
|
hasDisclaimerAbove,
|
||||||
|
i18n,
|
||||||
|
learnMore,
|
||||||
|
myStories,
|
||||||
|
onClickExclude,
|
||||||
|
onClickOnlyShareWith,
|
||||||
|
setSelectedContacts,
|
||||||
|
setMyStoriesToAllSignalConnections,
|
||||||
|
toggleSignalConnectionsModal,
|
||||||
|
}: EditMyStoriesPrivacyPropsType): JSX.Element => {
|
||||||
|
const disclaimerElement = (
|
||||||
|
<div className="StoriesSettingsModal__disclaimer">
|
||||||
|
<Intl
|
||||||
|
components={{
|
||||||
|
learnMore: (
|
||||||
|
<button
|
||||||
|
className="StoriesSettingsModal__disclaimer__learn-more"
|
||||||
|
onClick={toggleSignalConnectionsModal}
|
||||||
|
type="button"
|
||||||
|
>
|
||||||
|
{i18n('StoriesSettings__mine__disclaimer--learn-more')}
|
||||||
|
</button>
|
||||||
|
),
|
||||||
|
}}
|
||||||
|
i18n={i18n}
|
||||||
|
id={learnMore}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
|
||||||
|
return (
|
||||||
|
<>
|
||||||
|
{hasDisclaimerAbove && disclaimerElement}
|
||||||
|
|
||||||
|
<Checkbox
|
||||||
|
checked={!myStories.members.length}
|
||||||
|
description={i18n('StoriesSettings__mine__all--description')}
|
||||||
|
isRadio
|
||||||
|
label={i18n('StoriesSettings__mine__all--label')}
|
||||||
|
moduleClassName="StoriesSettingsModal__checkbox"
|
||||||
|
name="share"
|
||||||
|
onChange={() => {
|
||||||
|
setMyStoriesToAllSignalConnections();
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
|
||||||
|
<Checkbox
|
||||||
|
checked={myStories.isBlockList && myStories.members.length > 0}
|
||||||
|
description={i18n('StoriesSettings__mine__exclude--description', [
|
||||||
|
myStories.isBlockList ? String(myStories.members.length) : '0',
|
||||||
|
])}
|
||||||
|
isRadio
|
||||||
|
label={i18n('StoriesSettings__mine__exclude--label')}
|
||||||
|
moduleClassName="StoriesSettingsModal__checkbox"
|
||||||
|
name="share"
|
||||||
|
onChange={noop}
|
||||||
|
onClick={() => {
|
||||||
|
if (myStories.isBlockList) {
|
||||||
|
setSelectedContacts(myStories.members);
|
||||||
|
}
|
||||||
|
onClickExclude();
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
|
||||||
|
<Checkbox
|
||||||
|
checked={!myStories.isBlockList && myStories.members.length > 0}
|
||||||
|
description={
|
||||||
|
!myStories.isBlockList && myStories.members.length
|
||||||
|
? i18n('StoriesSettings__mine__only--description--people', [
|
||||||
|
String(myStories.members.length),
|
||||||
|
])
|
||||||
|
: i18n('StoriesSettings__mine__only--description')
|
||||||
|
}
|
||||||
|
isRadio
|
||||||
|
label={i18n('StoriesSettings__mine__only--label')}
|
||||||
|
moduleClassName="StoriesSettingsModal__checkbox"
|
||||||
|
name="share"
|
||||||
|
onChange={noop}
|
||||||
|
onClick={() => {
|
||||||
|
if (!myStories.isBlockList) {
|
||||||
|
setSelectedContacts(myStories.members);
|
||||||
|
}
|
||||||
|
onClickOnlyShareWith();
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
|
||||||
|
{!hasDisclaimerAbove && disclaimerElement}
|
||||||
|
</>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
type EditDistributionListPropsType = {
|
type EditDistributionListPropsType = {
|
||||||
onDone: (name: string, viewerUuids: Array<UUIDStringType>) => unknown;
|
onDone: (name: string, viewerUuids: Array<UUIDStringType>) => unknown;
|
||||||
onViewersUpdated: (viewerUuids: Array<UUIDStringType>) => unknown;
|
onViewersUpdated: (viewerUuids: Array<UUIDStringType>) => unknown;
|
||||||
|
|
|
@ -33,6 +33,9 @@ export default {
|
||||||
groupStories: {
|
groupStories: {
|
||||||
defaultValue: Array.from(Array(4), getDefaultGroup),
|
defaultValue: Array.from(Array(4), getDefaultGroup),
|
||||||
},
|
},
|
||||||
|
hasFirstStoryPostExperience: {
|
||||||
|
defaultValue: false,
|
||||||
|
},
|
||||||
i18n: { defaultValue: i18n },
|
i18n: { defaultValue: i18n },
|
||||||
installedPacks: {
|
installedPacks: {
|
||||||
defaultValue: [],
|
defaultValue: [],
|
||||||
|
@ -45,14 +48,18 @@ export default {
|
||||||
},
|
},
|
||||||
onClose: { action: true },
|
onClose: { action: true },
|
||||||
onDistributionListCreated: { action: true },
|
onDistributionListCreated: { action: true },
|
||||||
|
onHideMyStoriesFrom: { action: true },
|
||||||
onSend: { action: true },
|
onSend: { action: true },
|
||||||
|
onViewersUpdated: { action: true },
|
||||||
processAttachment: { action: true },
|
processAttachment: { action: true },
|
||||||
recentStickers: {
|
recentStickers: {
|
||||||
defaultValue: [],
|
defaultValue: [],
|
||||||
},
|
},
|
||||||
|
setMyStoriesToAllSignalConnections: { action: true },
|
||||||
signalConnections: {
|
signalConnections: {
|
||||||
defaultValue: Array.from(Array(42), getDefaultConversation),
|
defaultValue: Array.from(Array(42), getDefaultConversation),
|
||||||
},
|
},
|
||||||
|
toggleSignalConnectionsModal: { action: true },
|
||||||
},
|
},
|
||||||
} as Meta;
|
} as Meta;
|
||||||
|
|
||||||
|
@ -78,3 +85,11 @@ LinkPreview.args = {
|
||||||
LinkPreview.story = {
|
LinkPreview.story = {
|
||||||
name: 'with Link Preview ready to be applied',
|
name: 'with Link Preview ready to be applied',
|
||||||
};
|
};
|
||||||
|
|
||||||
|
export const FirstTime = Template.bind({});
|
||||||
|
FirstTime.args = {
|
||||||
|
hasFirstStoryPostExperience: true,
|
||||||
|
};
|
||||||
|
FirstTime.story = {
|
||||||
|
name: 'First time posting a story',
|
||||||
|
};
|
||||||
|
|
|
@ -8,13 +8,11 @@ import type {
|
||||||
AttachmentType,
|
AttachmentType,
|
||||||
InMemoryAttachmentDraftType,
|
InMemoryAttachmentDraftType,
|
||||||
} from '../types/Attachment';
|
} from '../types/Attachment';
|
||||||
import type { ConversationType } from '../state/ducks/conversations';
|
|
||||||
import type { LinkPreviewSourceType } from '../types/LinkPreview';
|
import type { LinkPreviewSourceType } from '../types/LinkPreview';
|
||||||
import type { LinkPreviewType } from '../types/message/LinkPreviews';
|
import type { LinkPreviewType } from '../types/message/LinkPreviews';
|
||||||
import type { LocalizerType } from '../types/Util';
|
import type { LocalizerType } from '../types/Util';
|
||||||
import type { PreferredBadgeSelectorType } from '../state/selectors/badges';
|
|
||||||
import type { Props as StickerButtonProps } from './stickers/StickerButton';
|
import type { Props as StickerButtonProps } from './stickers/StickerButton';
|
||||||
import type { StoryDistributionListDataType } from '../state/ducks/storyDistributionLists';
|
import type { PropsType as SendStoryModalPropsType } from './SendStoryModal';
|
||||||
import type { UUIDStringType } from '../types/UUID';
|
import type { UUIDStringType } from '../types/UUID';
|
||||||
|
|
||||||
import { IMAGE_JPEG, TEXT_ATTACHMENT } from '../types/MIME';
|
import { IMAGE_JPEG, TEXT_ATTACHMENT } from '../types/MIME';
|
||||||
|
@ -25,24 +23,14 @@ import { MediaEditor } from './MediaEditor';
|
||||||
import { TextStoryCreator } from './TextStoryCreator';
|
import { TextStoryCreator } from './TextStoryCreator';
|
||||||
|
|
||||||
export type PropsType = {
|
export type PropsType = {
|
||||||
candidateConversations: Array<ConversationType>;
|
|
||||||
debouncedMaybeGrabLinkPreview: (
|
debouncedMaybeGrabLinkPreview: (
|
||||||
message: string,
|
message: string,
|
||||||
source: LinkPreviewSourceType
|
source: LinkPreviewSourceType
|
||||||
) => unknown;
|
) => unknown;
|
||||||
distributionLists: Array<StoryDistributionListDataType>;
|
|
||||||
file?: File;
|
file?: File;
|
||||||
getPreferredBadge: PreferredBadgeSelectorType;
|
|
||||||
groupConversations: Array<ConversationType>;
|
|
||||||
groupStories: Array<ConversationType>;
|
|
||||||
i18n: LocalizerType;
|
i18n: LocalizerType;
|
||||||
linkPreview?: LinkPreviewType;
|
linkPreview?: LinkPreviewType;
|
||||||
me: ConversationType;
|
|
||||||
onClose: () => unknown;
|
onClose: () => unknown;
|
||||||
onDistributionListCreated: (
|
|
||||||
name: string,
|
|
||||||
viewerUuids: Array<UUIDStringType>
|
|
||||||
) => unknown;
|
|
||||||
onSelectedStoryList: (memberUuids: Array<string>) => unknown;
|
onSelectedStoryList: (memberUuids: Array<string>) => unknown;
|
||||||
onSend: (
|
onSend: (
|
||||||
listIds: Array<UUIDStringType>,
|
listIds: Array<UUIDStringType>,
|
||||||
|
@ -53,9 +41,24 @@ export type PropsType = {
|
||||||
file: File
|
file: File
|
||||||
) => Promise<void | InMemoryAttachmentDraftType>;
|
) => Promise<void | InMemoryAttachmentDraftType>;
|
||||||
sendStoryModalOpenStateChanged: (isOpen: boolean) => unknown;
|
sendStoryModalOpenStateChanged: (isOpen: boolean) => unknown;
|
||||||
signalConnections: Array<ConversationType>;
|
} & Pick<StickerButtonProps, 'installedPacks' | 'recentStickers'> &
|
||||||
tagGroupsAsNewGroupStory: (cids: Array<string>) => unknown;
|
Pick<
|
||||||
} & Pick<StickerButtonProps, 'installedPacks' | 'recentStickers'>;
|
SendStoryModalPropsType,
|
||||||
|
| 'candidateConversations'
|
||||||
|
| 'distributionLists'
|
||||||
|
| 'getPreferredBadge'
|
||||||
|
| 'groupConversations'
|
||||||
|
| 'groupStories'
|
||||||
|
| 'hasFirstStoryPostExperience'
|
||||||
|
| 'me'
|
||||||
|
| 'onDistributionListCreated'
|
||||||
|
| 'onHideMyStoriesFrom'
|
||||||
|
| 'onViewersUpdated'
|
||||||
|
| 'setMyStoriesToAllSignalConnections'
|
||||||
|
| 'signalConnections'
|
||||||
|
| 'tagGroupsAsNewGroupStory'
|
||||||
|
| 'toggleSignalConnectionsModal'
|
||||||
|
>;
|
||||||
|
|
||||||
export const StoryCreator = ({
|
export const StoryCreator = ({
|
||||||
candidateConversations,
|
candidateConversations,
|
||||||
|
@ -65,19 +68,24 @@ export const StoryCreator = ({
|
||||||
getPreferredBadge,
|
getPreferredBadge,
|
||||||
groupConversations,
|
groupConversations,
|
||||||
groupStories,
|
groupStories,
|
||||||
|
hasFirstStoryPostExperience,
|
||||||
i18n,
|
i18n,
|
||||||
installedPacks,
|
installedPacks,
|
||||||
linkPreview,
|
linkPreview,
|
||||||
me,
|
me,
|
||||||
onClose,
|
onClose,
|
||||||
onDistributionListCreated,
|
onDistributionListCreated,
|
||||||
|
onHideMyStoriesFrom,
|
||||||
onSelectedStoryList,
|
onSelectedStoryList,
|
||||||
onSend,
|
onSend,
|
||||||
|
onViewersUpdated,
|
||||||
processAttachment,
|
processAttachment,
|
||||||
recentStickers,
|
recentStickers,
|
||||||
sendStoryModalOpenStateChanged,
|
sendStoryModalOpenStateChanged,
|
||||||
|
setMyStoriesToAllSignalConnections,
|
||||||
signalConnections,
|
signalConnections,
|
||||||
tagGroupsAsNewGroupStory,
|
tagGroupsAsNewGroupStory,
|
||||||
|
toggleSignalConnectionsModal,
|
||||||
}: PropsType): JSX.Element => {
|
}: PropsType): JSX.Element => {
|
||||||
const [draftAttachment, setDraftAttachment] = useState<
|
const [draftAttachment, setDraftAttachment] = useState<
|
||||||
AttachmentType | undefined
|
AttachmentType | undefined
|
||||||
|
@ -129,18 +137,25 @@ export const StoryCreator = ({
|
||||||
getPreferredBadge={getPreferredBadge}
|
getPreferredBadge={getPreferredBadge}
|
||||||
groupConversations={groupConversations}
|
groupConversations={groupConversations}
|
||||||
groupStories={groupStories}
|
groupStories={groupStories}
|
||||||
|
hasFirstStoryPostExperience={hasFirstStoryPostExperience}
|
||||||
i18n={i18n}
|
i18n={i18n}
|
||||||
me={me}
|
me={me}
|
||||||
onClose={() => setDraftAttachment(undefined)}
|
onClose={() => setDraftAttachment(undefined)}
|
||||||
onDistributionListCreated={onDistributionListCreated}
|
onDistributionListCreated={onDistributionListCreated}
|
||||||
|
onHideMyStoriesFrom={onHideMyStoriesFrom}
|
||||||
onSelectedStoryList={onSelectedStoryList}
|
onSelectedStoryList={onSelectedStoryList}
|
||||||
onSend={(listIds, groupIds) => {
|
onSend={(listIds, groupIds) => {
|
||||||
onSend(listIds, groupIds, draftAttachment);
|
onSend(listIds, groupIds, draftAttachment);
|
||||||
setDraftAttachment(undefined);
|
setDraftAttachment(undefined);
|
||||||
onClose();
|
onClose();
|
||||||
}}
|
}}
|
||||||
|
onViewersUpdated={onViewersUpdated}
|
||||||
|
setMyStoriesToAllSignalConnections={
|
||||||
|
setMyStoriesToAllSignalConnections
|
||||||
|
}
|
||||||
signalConnections={signalConnections}
|
signalConnections={signalConnections}
|
||||||
tagGroupsAsNewGroupStory={tagGroupsAsNewGroupStory}
|
tagGroupsAsNewGroupStory={tagGroupsAsNewGroupStory}
|
||||||
|
toggleSignalConnectionsModal={toggleSignalConnectionsModal}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
{attachmentUrl && (
|
{attachmentUrl && (
|
||||||
|
|
|
@ -282,6 +282,8 @@ function hideMyStoriesFrom(
|
||||||
|
|
||||||
storageServiceUploadJob();
|
storageServiceUploadJob();
|
||||||
|
|
||||||
|
window.storage.put('hasSetMyStoriesPrivacy', true);
|
||||||
|
|
||||||
dispatch({
|
dispatch({
|
||||||
type: HIDE_MY_STORIES_FROM,
|
type: HIDE_MY_STORIES_FROM,
|
||||||
payload: memberUuids,
|
payload: memberUuids,
|
||||||
|
@ -378,6 +380,8 @@ function setMyStoriesToAllSignalConnections(): ThunkAction<
|
||||||
storageServiceUploadJob();
|
storageServiceUploadJob();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
window.storage.put('hasSetMyStoriesPrivacy', true);
|
||||||
|
|
||||||
dispatch({
|
dispatch({
|
||||||
type: RESET_MY_STORIES,
|
type: RESET_MY_STORIES,
|
||||||
});
|
});
|
||||||
|
@ -432,6 +436,10 @@ function updateStoryViewers(
|
||||||
|
|
||||||
storageServiceUploadJob();
|
storageServiceUploadJob();
|
||||||
|
|
||||||
|
if (listId === MY_STORIES_ID) {
|
||||||
|
window.storage.put('hasSetMyStoriesPrivacy', true);
|
||||||
|
}
|
||||||
|
|
||||||
dispatch({
|
dispatch({
|
||||||
type: VIEWERS_CHANGED,
|
type: VIEWERS_CHANGED,
|
||||||
payload: {
|
payload: {
|
||||||
|
@ -599,7 +607,7 @@ export function reducer(
|
||||||
state.distributionLists,
|
state.distributionLists,
|
||||||
MY_STORIES_ID,
|
MY_STORIES_ID,
|
||||||
() => ({
|
() => ({
|
||||||
isBlockList: false,
|
isBlockList: true,
|
||||||
memberUuids: [],
|
memberUuids: [],
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
|
|
|
@ -125,3 +125,8 @@ export const getHideMenuBar = createSelector(
|
||||||
getItems,
|
getItems,
|
||||||
(state: ItemsStateType): boolean => Boolean(state['hide-menu-bar'])
|
(state: ItemsStateType): boolean => Boolean(state['hide-menu-bar'])
|
||||||
);
|
);
|
||||||
|
|
||||||
|
export const getHasSetMyStoriesPrivacy = createSelector(
|
||||||
|
getItems,
|
||||||
|
(state: ItemsStateType): boolean => Boolean(state.hasSetMyStoriesPrivacy)
|
||||||
|
);
|
||||||
|
|
|
@ -21,10 +21,12 @@ import {
|
||||||
getInstalledStickerPacks,
|
getInstalledStickerPacks,
|
||||||
getRecentStickers,
|
getRecentStickers,
|
||||||
} from '../selectors/stickers';
|
} from '../selectors/stickers';
|
||||||
|
import { getHasSetMyStoriesPrivacy } from '../selectors/items';
|
||||||
import { getLinkPreview } from '../selectors/linkPreviews';
|
import { getLinkPreview } from '../selectors/linkPreviews';
|
||||||
import { getPreferredBadgeSelector } from '../selectors/badges';
|
import { getPreferredBadgeSelector } from '../selectors/badges';
|
||||||
import { processAttachment } from '../../util/processAttachment';
|
import { processAttachment } from '../../util/processAttachment';
|
||||||
import { useConversationsActions } from '../ducks/conversations';
|
import { useConversationsActions } from '../ducks/conversations';
|
||||||
|
import { useGlobalModalActions } from '../ducks/globalModals';
|
||||||
import { useLinkPreviewActions } from '../ducks/linkPreviews';
|
import { useLinkPreviewActions } from '../ducks/linkPreviews';
|
||||||
import { useStoriesActions } from '../ducks/stories';
|
import { useStoriesActions } from '../ducks/stories';
|
||||||
import { useStoryDistributionListsActions } from '../ducks/storyDistributionLists';
|
import { useStoryDistributionListsActions } from '../ducks/storyDistributionLists';
|
||||||
|
@ -45,13 +47,20 @@ export function SmartStoryCreator({
|
||||||
verifyStoryListMembers,
|
verifyStoryListMembers,
|
||||||
} = useStoriesActions();
|
} = useStoriesActions();
|
||||||
const { tagGroupsAsNewGroupStory } = useConversationsActions();
|
const { tagGroupsAsNewGroupStory } = useConversationsActions();
|
||||||
const { createDistributionList } = useStoryDistributionListsActions();
|
const {
|
||||||
|
createDistributionList,
|
||||||
|
hideMyStoriesFrom,
|
||||||
|
setMyStoriesToAllSignalConnections,
|
||||||
|
updateStoryViewers,
|
||||||
|
} = useStoryDistributionListsActions();
|
||||||
|
const { toggleSignalConnectionsModal } = useGlobalModalActions();
|
||||||
|
|
||||||
const candidateConversations = useSelector(getCandidateContactsForNewGroup);
|
const candidateConversations = useSelector(getCandidateContactsForNewGroup);
|
||||||
const distributionLists = useSelector(getDistributionLists);
|
const distributionLists = useSelector(getDistributionLists);
|
||||||
const getPreferredBadge = useSelector(getPreferredBadgeSelector);
|
const getPreferredBadge = useSelector(getPreferredBadgeSelector);
|
||||||
const groupConversations = useSelector(getNonGroupStories);
|
const groupConversations = useSelector(getNonGroupStories);
|
||||||
const groupStories = useSelector(getGroupStories);
|
const groupStories = useSelector(getGroupStories);
|
||||||
|
const hasSetMyStoriesPrivacy = useSelector(getHasSetMyStoriesPrivacy);
|
||||||
const i18n = useSelector<StateType, LocalizerType>(getIntl);
|
const i18n = useSelector<StateType, LocalizerType>(getIntl);
|
||||||
const installedPacks = useSelector(getInstalledStickerPacks);
|
const installedPacks = useSelector(getInstalledStickerPacks);
|
||||||
const linkPreviewForSource = useSelector(getLinkPreview);
|
const linkPreviewForSource = useSelector(getLinkPreview);
|
||||||
|
@ -68,19 +77,24 @@ export function SmartStoryCreator({
|
||||||
getPreferredBadge={getPreferredBadge}
|
getPreferredBadge={getPreferredBadge}
|
||||||
groupConversations={groupConversations}
|
groupConversations={groupConversations}
|
||||||
groupStories={groupStories}
|
groupStories={groupStories}
|
||||||
|
hasFirstStoryPostExperience={!hasSetMyStoriesPrivacy}
|
||||||
i18n={i18n}
|
i18n={i18n}
|
||||||
installedPacks={installedPacks}
|
installedPacks={installedPacks}
|
||||||
linkPreview={linkPreviewForSource(LinkPreviewSourceType.StoryCreator)}
|
linkPreview={linkPreviewForSource(LinkPreviewSourceType.StoryCreator)}
|
||||||
me={me}
|
me={me}
|
||||||
onClose={onClose}
|
onClose={onClose}
|
||||||
onDistributionListCreated={createDistributionList}
|
onDistributionListCreated={createDistributionList}
|
||||||
|
onHideMyStoriesFrom={hideMyStoriesFrom}
|
||||||
onSelectedStoryList={verifyStoryListMembers}
|
onSelectedStoryList={verifyStoryListMembers}
|
||||||
onSend={sendStoryMessage}
|
onSend={sendStoryMessage}
|
||||||
|
onViewersUpdated={updateStoryViewers}
|
||||||
processAttachment={processAttachment}
|
processAttachment={processAttachment}
|
||||||
recentStickers={recentStickers}
|
recentStickers={recentStickers}
|
||||||
sendStoryModalOpenStateChanged={sendStoryModalOpenStateChanged}
|
sendStoryModalOpenStateChanged={sendStoryModalOpenStateChanged}
|
||||||
|
setMyStoriesToAllSignalConnections={setMyStoriesToAllSignalConnections}
|
||||||
signalConnections={signalConnections}
|
signalConnections={signalConnections}
|
||||||
tagGroupsAsNewGroupStory={tagGroupsAsNewGroupStory}
|
tagGroupsAsNewGroupStory={tagGroupsAsNewGroupStory}
|
||||||
|
toggleSignalConnectionsModal={toggleSignalConnectionsModal}
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -65,6 +65,7 @@ export type StorageAccessType = {
|
||||||
customColors: CustomColorsItemType;
|
customColors: CustomColorsItemType;
|
||||||
device_name: string;
|
device_name: string;
|
||||||
hasRegisterSupportForUnauthenticatedDelivery: boolean;
|
hasRegisterSupportForUnauthenticatedDelivery: boolean;
|
||||||
|
hasSetMyStoriesPrivacy: boolean;
|
||||||
hasStoriesEnabled: boolean;
|
hasStoriesEnabled: boolean;
|
||||||
identityKeyMap: IdentityKeyMap;
|
identityKeyMap: IdentityKeyMap;
|
||||||
lastHeartbeat: number;
|
lastHeartbeat: number;
|
||||||
|
|
|
@ -8,6 +8,7 @@ import type { LocalizerType } from './Util';
|
||||||
import type { ReadStatus } from '../messages/MessageReadStatus';
|
import type { ReadStatus } from '../messages/MessageReadStatus';
|
||||||
import type { SendStatus } from '../messages/MessageSendState';
|
import type { SendStatus } from '../messages/MessageSendState';
|
||||||
import type { StoryDistributionListDataType } from '../state/ducks/storyDistributionLists';
|
import type { StoryDistributionListDataType } from '../state/ducks/storyDistributionLists';
|
||||||
|
import type { UUIDStringType } from './UUID';
|
||||||
|
|
||||||
export type ReplyType = {
|
export type ReplyType = {
|
||||||
author: Pick<
|
author: Pick<
|
||||||
|
@ -97,7 +98,8 @@ export type MyStoryType = {
|
||||||
stories: Array<StoryViewType>;
|
stories: Array<StoryViewType>;
|
||||||
};
|
};
|
||||||
|
|
||||||
export const MY_STORIES_ID = '00000000-0000-0000-0000-000000000000';
|
export const MY_STORIES_ID: UUIDStringType =
|
||||||
|
'00000000-0000-0000-0000-000000000000';
|
||||||
|
|
||||||
export enum StoryViewDirectionType {
|
export enum StoryViewDirectionType {
|
||||||
Next = 'Next',
|
Next = 'Next',
|
||||||
|
|
Loading…
Reference in New Issue