mirror of
https://github.com/ilyakooo0/urbit.git
synced 2025-01-05 22:03:50 +03:00
Merge branch 'mp/os1/group/me-header' (#2408)
* origin/mp/os1/group/me-header: groups: hide back to channels mav on /me card groups: tweak contact card header Signed-off-by: Jared Tobin <jared@tlon.io>
This commit is contained in:
commit
65bcf85ab9
@ -482,7 +482,7 @@ export class ContactCard extends Component {
|
|||||||
let editInfoText =
|
let editInfoText =
|
||||||
state.edit ? "Finish" : "Edit";
|
state.edit ? "Finish" : "Edit";
|
||||||
if (props.share && state.edit) {
|
if (props.share && state.edit) {
|
||||||
editInfoText = "Share with Group";
|
editInfoText = "Share";
|
||||||
}
|
}
|
||||||
|
|
||||||
let ourOpt = (props.ship === window.ship) ? "dib" : "dn";
|
let ourOpt = (props.ship === window.ship) ? "dib" : "dn";
|
||||||
@ -495,13 +495,21 @@ export class ContactCard extends Component {
|
|||||||
!(props.path.includes('/~/default'))
|
!(props.path.includes('/~/default'))
|
||||||
) ? "dib" : "dn";
|
) ? "dib" : "dn";
|
||||||
|
|
||||||
|
let hiddenonMe = (props.path === "/~/default")
|
||||||
|
? "dn" : "";
|
||||||
|
|
||||||
let card = state.edit ? this.renderEditCard() : this.renderCard();
|
let card = state.edit ? this.renderEditCard() : this.renderCard();
|
||||||
return (
|
return (
|
||||||
<div className="w-100 h-100 overflow-hidden">
|
<div className="w-100 h-100 overflow-hidden">
|
||||||
<div className={"flex justify-between w-100 bg-white bg-gray0-d " +
|
<div
|
||||||
"bb b--gray4 b--gray2-d "}>
|
className={
|
||||||
<div className="ml3 f9 pt4 w-100">
|
"flex justify-between w-100 bg-white bg-gray0-d " +
|
||||||
<Link to={"/~groups/detail" + props.path}>{"⟵ Channels"}</Link>
|
"bb b--gray4 b--gray2-d "
|
||||||
|
}>
|
||||||
|
<div className="f9 mv4 mh3 pt1 dib w-100">
|
||||||
|
<Link className={hiddenonMe} to={"/~groups/detail" + props.path}>
|
||||||
|
{"⟵ Channels"}
|
||||||
|
</Link>
|
||||||
</div>
|
</div>
|
||||||
<div className="flex">
|
<div className="flex">
|
||||||
<button
|
<button
|
||||||
@ -512,19 +520,21 @@ export class ContactCard extends Component {
|
|||||||
this.editToggle();
|
this.editToggle();
|
||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
className={`white-d bg-gray0-d ml3 mt2 mb2 f9 pa1 pointer flex-shrink-0 ` + ourOpt}>
|
className={
|
||||||
|
`white-d bg-gray0-d mv4 mh3 f9 pa1 pointer flex-shrink-0 ` +
|
||||||
|
ourOpt
|
||||||
|
}>
|
||||||
{editInfoText}
|
{editInfoText}
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<button
|
<button
|
||||||
className={
|
className={
|
||||||
`bg-gray0-d ph4 mt4 mb4 f9 red2 pointer flex-shrink-0 ` + adminOpt
|
`bg-gray0-d mv4 mh3 pa1 f9 red2 pointer flex-shrink-0 ` + adminOpt
|
||||||
}
|
}
|
||||||
onClick={this.removeFromGroup}>
|
onClick={this.removeFromGroup}>
|
||||||
{(
|
{props.ship === window.ship && props.path.includes(window.ship)
|
||||||
props.ship === window.ship && props.path.includes(window.ship)
|
? "Leave Group"
|
||||||
? "Leave Group" : "Remove from Group"
|
: "Remove from Group"}
|
||||||
)}
|
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<div className="h-100 w-100 overflow-x-hidden pb8 white-d">{card}</div>
|
<div className="h-100 w-100 overflow-x-hidden pb8 white-d">{card}</div>
|
||||||
|
Loading…
Reference in New Issue
Block a user