mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-12 00:30:11 +00:00
add banner button
This commit is contained in:
parent
a33b595d86
commit
d5ed5f98e0
7 changed files with 173 additions and 12 deletions
|
|
@ -305,6 +305,31 @@ export default function MemberCard(props) {
|
|||
{ member.color ? <BS.Col className="mb-lg-3" xs={12} lg={3}><b>Color:</b> {color}</BS.Col> : "" }
|
||||
{ privacyView ? "" : proxyView ? "" : <BS.Col className="mb-lg-3" xs={12} lg={3}><b>Privacy:</b> <BS.Button variant="light" size="sm" onClick={() => setPrivacyView(true)}>View</BS.Button></BS.Col> }
|
||||
{ privacyView ? "" : proxyView ? "" : <BS.Col className="mb-lg-3" xs={12} lg={3}><b>Proxy tags:</b> <BS.Button variant="light" size="sm" onClick={() => setProxyView(true)}>View</BS.Button></BS.Col> }
|
||||
{ privacyView || proxyView || !member.banner ? "" :
|
||||
<BS.Col className="mb-lg-3" xs={12} lg={3}>
|
||||
<b>Banner:</b>{" "}
|
||||
<Popup
|
||||
trigger={
|
||||
<BS.Button
|
||||
variant="light"
|
||||
size="sm"
|
||||
>
|
||||
View
|
||||
</BS.Button>
|
||||
}
|
||||
className="banner"
|
||||
modal
|
||||
>
|
||||
{(close) => (
|
||||
<div className="text-center w-100" onClick={() => close()}>
|
||||
<div className="m-auto" style={{maxWidth: '100%'}}>
|
||||
<BS.Image src={`${banner}`} style={{maxWidth: 'auto', maxHeight: '640px'}} thumbnail />
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
</Popup>
|
||||
</BS.Col>
|
||||
}
|
||||
<BS.Col className="mb-lg-3" xs={12} lg={3}><b>Created:</b> {created}</BS.Col>
|
||||
</BS.Row>
|
||||
{ privacyEdit ? <BS.Form id='Privacy' onSubmit={handleSubmitPrivacy(submitPrivacy)}>
|
||||
|
|
|
|||
|
|
@ -237,9 +237,9 @@ export default function MemberPage(props) {
|
|||
<BS.Button variant="primary" className="float-right" onClick={() => history.push("/dash/reload")}>Back</BS.Button>
|
||||
</BS.Card.Body></BS.Card> :
|
||||
<>
|
||||
{ member.banner && !localStorage.getItem("hidebanners") ? <div className="banner" style={{backgroundImage: `url(${banner})`}} alt=""/> : ""}
|
||||
{ localStorage.getItem('colorbg') && member.color ? "" : <><div className="backdrop" style={{backgroundColor: `#${color}`}}/>
|
||||
{ !localStorage.getItem('fullbg') ? <div className="backdrop-overlay"/> : "" }</> }
|
||||
{ member.banner && !localStorage.getItem("hidebanners") ? <div className="banner" style={{backgroundImage: `url(${banner})`}} alt=""/> : ""}
|
||||
<BS.Card className="mb-5">
|
||||
<BS.Card.Header className="d-flex align-items-center justify-content-between">
|
||||
<div> { member.visibility === 'public' ? <BS.OverlayTrigger placement="left" overlay={
|
||||
|
|
@ -332,6 +332,31 @@ export default function MemberPage(props) {
|
|||
{ member.color ? <BS.Col className="mb-lg-3" xs={12} lg={3}><b>Color:</b> {color}</BS.Col> : "" }
|
||||
{ privacyView ? "" : proxyView ? "" : <BS.Col className="mb-lg-3" xs={12} lg={3}><b>Privacy:</b> <BS.Button variant="light" size="sm" onClick={() => setPrivacyView(true)}>View</BS.Button></BS.Col> }
|
||||
{ privacyView ? "" : proxyView ? "" : <BS.Col className="mb-lg-3" xs={12} lg={3}><b>Proxy tags:</b> <BS.Button variant="light" size="sm" onClick={() => setProxyView(true)}>View</BS.Button></BS.Col> }
|
||||
{ privacyView || proxyView || !member.banner ? "" :
|
||||
<BS.Col className="mb-lg-3" xs={12} lg={3}>
|
||||
<b>Banner:</b>{" "}
|
||||
<Popup
|
||||
trigger={
|
||||
<BS.Button
|
||||
variant="light"
|
||||
size="sm"
|
||||
>
|
||||
View
|
||||
</BS.Button>
|
||||
}
|
||||
className="banner"
|
||||
modal
|
||||
>
|
||||
{(close) => (
|
||||
<div className="text-center w-100" onClick={() => close()}>
|
||||
<div className="m-auto" style={{maxWidth: '100%'}}>
|
||||
<BS.Image src={`${banner}`} style={{maxWidth: 'auto', maxHeight: '640px'}} thumbnail />
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
</Popup>
|
||||
</BS.Col>
|
||||
}
|
||||
<BS.Col className="mb-lg-3" xs={12} lg={3}><b>Created:</b> {created}</BS.Col>
|
||||
</BS.Row>
|
||||
{ privacyMode ? <BS.Form id='Privacy' onSubmit={handleSubmitPrivacy(submitPrivacy)}>
|
||||
|
|
|
|||
|
|
@ -108,11 +108,9 @@ export default function System(props) {
|
|||
>
|
||||
{(close) => (
|
||||
<div className="text-center w-100 m-0" onClick={() => close()}>
|
||||
<BS.Image
|
||||
src={`${avatar}`}
|
||||
style={{ "max-width": 640, height: "auto" }}
|
||||
thumbnail
|
||||
/>
|
||||
<div className="m-auto" style={{maxWidth: '640px'}}>
|
||||
<BS.Image src={`${avatar}`} style={{'maxWidth': '100%', height: 'auto'}} thumbnail />
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
</Popup>
|
||||
|
|
@ -161,6 +159,7 @@ export default function System(props) {
|
|||
{privacyView ? (
|
||||
""
|
||||
) : (
|
||||
<>
|
||||
<BS.Col className="mb-lg-3" xs={12} lg={3}>
|
||||
<b>Privacy:</b>{" "}
|
||||
<BS.Button
|
||||
|
|
@ -171,7 +170,33 @@ export default function System(props) {
|
|||
View
|
||||
</BS.Button>
|
||||
</BS.Col>
|
||||
)}
|
||||
{user.banner ?
|
||||
<BS.Col className="mb-lg-3" xs={12} lg={3}>
|
||||
<b>Banner:</b>{" "}
|
||||
<Popup
|
||||
trigger={
|
||||
<BS.Button
|
||||
variant="light"
|
||||
size="sm"
|
||||
>
|
||||
View
|
||||
</BS.Button>
|
||||
}
|
||||
className="banner"
|
||||
modal
|
||||
>
|
||||
{(close) => (
|
||||
<div className="text-center w-100" onClick={() => close()}>
|
||||
<div className="m-auto" style={{maxWidth: '100%'}}>
|
||||
<BS.Image src={`${banner}`} style={{maxWidth: 'auto', maxHeight: '640px'}} thumbnail />
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
</Popup>
|
||||
</BS.Col>
|
||||
: "" }
|
||||
</>
|
||||
)}
|
||||
</BS.Row>
|
||||
{privacyEdit ? (
|
||||
<EditSystemPrivacy
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue