mirror of
https://github.com/urbit/shrub.git
synced 2024-12-19 08:32:39 +03:00
Merge pull request #2282 from urbit/fix-remove
contacts: improve remove from group experience in UI and terminal log
This commit is contained in:
commit
f316d0f118
@ -189,13 +189,7 @@
|
||||
?~ saw
|
||||
[~ state]
|
||||
?> ?=(^ wir)
|
||||
:_ state(synced (~(del by synced) t.wir))
|
||||
%. ~
|
||||
%- slog
|
||||
:* leaf+"contact-hook failed subscribe on {(spud t.wir)}"
|
||||
leaf+"stack trace:"
|
||||
u.saw
|
||||
==
|
||||
[~ state(synced (~(del by synced) t.wir))]
|
||||
::
|
||||
++ kick
|
||||
|= wir=wire
|
||||
@ -208,9 +202,7 @@
|
||||
[%pass /group %agent [our.bol %group-store] %watch /updates]~
|
||||
::
|
||||
[%contacts @ *]
|
||||
~& contacts-kick+wir
|
||||
?. (~(has by synced) t.wir) ~
|
||||
~& %contact-hook-resubscribe
|
||||
=/ =ship (~(got by synced) t.wir)
|
||||
?: =(ship our.bol)
|
||||
[%pass wir %agent [our.bol %contact-store] %watch wir]~
|
||||
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -480,9 +480,11 @@ export class ContactCard extends Component {
|
||||
let localOpt =
|
||||
((props.ship === window.ship) && (props.path === "/~/default"))
|
||||
? "dib" : "dn";
|
||||
|
||||
let adminOpt =
|
||||
(props.path.includes(window.ship) || (props.ship === window.ship))
|
||||
? "dib" : "dn";
|
||||
( (props.path.includes(window.ship) || (props.ship === window.ship)) &&
|
||||
!(props.path.includes('/~/default'))
|
||||
) ? "dib" : "dn";
|
||||
|
||||
let card = state.edit ? this.renderEditCard() : this.renderCard();
|
||||
|
||||
@ -512,7 +514,10 @@ export class ContactCard extends Component {
|
||||
`ml3 mt2 mb2 f9 pa1 ba red2 br2 b--red2 pointer ` + adminOpt
|
||||
}
|
||||
onClick={this.removeFromGroup}>
|
||||
Remove from Group
|
||||
{(
|
||||
props.ship === window.ship && props.path.includes(window.ship)
|
||||
? "Delete Group" : "Remove from Group"
|
||||
)}
|
||||
</button>
|
||||
</div>
|
||||
<div className="h-100 w-100 overflow-x-hidden pb8">{card}</div>
|
||||
|
Loading…
Reference in New Issue
Block a user