mirror of
https://github.com/urbit/shrub.git
synced 2024-12-19 16:51:42 +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
|
?~ saw
|
||||||
[~ state]
|
[~ state]
|
||||||
?> ?=(^ wir)
|
?> ?=(^ wir)
|
||||||
:_ state(synced (~(del by synced) t.wir))
|
[~ state(synced (~(del by synced) t.wir))]
|
||||||
%. ~
|
|
||||||
%- slog
|
|
||||||
:* leaf+"contact-hook failed subscribe on {(spud t.wir)}"
|
|
||||||
leaf+"stack trace:"
|
|
||||||
u.saw
|
|
||||||
==
|
|
||||||
::
|
::
|
||||||
++ kick
|
++ kick
|
||||||
|= wir=wire
|
|= wir=wire
|
||||||
@ -208,9 +202,7 @@
|
|||||||
[%pass /group %agent [our.bol %group-store] %watch /updates]~
|
[%pass /group %agent [our.bol %group-store] %watch /updates]~
|
||||||
::
|
::
|
||||||
[%contacts @ *]
|
[%contacts @ *]
|
||||||
~& contacts-kick+wir
|
|
||||||
?. (~(has by synced) t.wir) ~
|
?. (~(has by synced) t.wir) ~
|
||||||
~& %contact-hook-resubscribe
|
|
||||||
=/ =ship (~(got by synced) t.wir)
|
=/ =ship (~(got by synced) t.wir)
|
||||||
?: =(ship our.bol)
|
?: =(ship our.bol)
|
||||||
[%pass wir %agent [our.bol %contact-store] %watch wir]~
|
[%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 =
|
let localOpt =
|
||||||
((props.ship === window.ship) && (props.path === "/~/default"))
|
((props.ship === window.ship) && (props.path === "/~/default"))
|
||||||
? "dib" : "dn";
|
? "dib" : "dn";
|
||||||
|
|
||||||
let adminOpt =
|
let adminOpt =
|
||||||
(props.path.includes(window.ship) || (props.ship === window.ship))
|
( (props.path.includes(window.ship) || (props.ship === window.ship)) &&
|
||||||
? "dib" : "dn";
|
!(props.path.includes('/~/default'))
|
||||||
|
) ? "dib" : "dn";
|
||||||
|
|
||||||
let card = state.edit ? this.renderEditCard() : this.renderCard();
|
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
|
`ml3 mt2 mb2 f9 pa1 ba red2 br2 b--red2 pointer ` + adminOpt
|
||||||
}
|
}
|
||||||
onClick={this.removeFromGroup}>
|
onClick={this.removeFromGroup}>
|
||||||
Remove from Group
|
{(
|
||||||
|
props.ship === window.ship && props.path.includes(window.ship)
|
||||||
|
? "Delete Group" : "Remove from Group"
|
||||||
|
)}
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<div className="h-100 w-100 overflow-x-hidden pb8">{card}</div>
|
<div className="h-100 w-100 overflow-x-hidden pb8">{card}</div>
|
||||||
|
Loading…
Reference in New Issue
Block a user