[web] Warn the user when deleting a chat that has contained chats
Summary:
Part of ENG-4319.
Before deletion, the user is warned about possible contained chats. For subchannel deletion, the modal looks like this:
When deleting a whole community, message changes:
When there are no contained chats, the confirmation modal does not pop up.
Depends on D8526.
Test Plan:
This modal should pop up when deleting:
- Non-empty community
- Subchannel with threads
Modal should not pop up when deleting:
- Empty community
- Empty subchannel
- Thread
Note: right now we don't support deleting subchannels when the parent channel is deleted. What I mean is this situation:
-> Community
--> Subchannel 1
---> Subchannel 2
If we delete Subchannel 1, right now Subchannel 2 is not deleted, thus modal should not pop up.
Reviewers: bartek, tomek, inka, michal, ashoat
Reviewed By: ashoat
Subscribers: ashoat, tomek
Differential Revision: https://phab.comm.dev/D8530