1
0
Fork 0
mirror of https://github.com/anyproto/anytype-ts.git synced 2025-06-09 09:35:02 +09:00

JS-3902: revoke confirm

This commit is contained in:
Andrew Simachev 2024-02-02 10:21:08 +01:00
parent f73a9ac8a6
commit bed2b8873e
No known key found for this signature in database
GPG key ID: 49A163D0D14E6FD8
2 changed files with 13 additions and 1 deletions

View file

@ -274,6 +274,9 @@ const PopupSettingsSpaceShare = observer(class PopupSettingsSpaceShare extends R
};
onStopSharing () {
const { space } = commonStore;
const { onPage } = this.props;
popupStore.open('confirm', {
data: {
title: translate('popupConfirmStopSharingSpaceTitle'),
@ -281,7 +284,8 @@ const PopupSettingsSpaceShare = observer(class PopupSettingsSpaceShare extends R
textConfirm: translate('popupConfirmStopSharingSpaceConfirm'),
colorConfirm: 'red',
onConfirm: () => {
// stop sharing logic goes here
C.SpaceInviteRevoke(space);
onPage('spaceIndex');
},
},
});

View file

@ -1883,6 +1883,14 @@ export const SpaceInviteView = (cid: string, key: string, callBack?: (message: a
dispatcher.request(SpaceInviteView.name, request, callBack);
};
export const SpaceInviteRevoke = (spaceId: string, callBack?: (message: any) => void) => {
const request = new Rpc.Space.InviteRevoke.Request();
request.setSpaceid(spaceId);
dispatcher.request(SpaceInviteRevoke.name, request, callBack);
};
export const SpaceJoin = (networkId: string, spaceId: string, cid: string, key: string, callBack?: (message: any) => void) => {
const request = new Rpc.Space.Join.Request();