mirror of
https://github.com/LBRYFoundation/Watch-on-LBRY.git
synced 2025-08-23 17:47:26 +00:00
🔥 New UI and Madiator Finder Features
This commit is contained in:
parent
3ee7e530d6
commit
f1f4c335e9
2 changed files with 49 additions and 69 deletions
|
@ -52,11 +52,29 @@ p {
|
||||||
|
|
||||||
header {
|
header {
|
||||||
display: grid;
|
display: grid;
|
||||||
|
gap: .5em;
|
||||||
|
padding: .75em;
|
||||||
position: sticky;
|
position: sticky;
|
||||||
top: 0;
|
top: 0;
|
||||||
justify-content: end;
|
background: rgba(19, 19, 19, 0.5);
|
||||||
background: rgba(19, 19, 19, 0.95);
|
}
|
||||||
padding: .5em .2em;
|
|
||||||
|
main {
|
||||||
|
display: grid;
|
||||||
|
gap: 2em;
|
||||||
|
padding: 1.5em 0.5em;
|
||||||
|
}
|
||||||
|
|
||||||
|
section {
|
||||||
|
display: grid;
|
||||||
|
justify-items: center;
|
||||||
|
gap: .75em;
|
||||||
|
}
|
||||||
|
|
||||||
|
#popup {
|
||||||
|
width: 35em;
|
||||||
|
max-width: 100%;
|
||||||
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
.button {
|
.button {
|
||||||
|
@ -105,10 +123,13 @@ header {
|
||||||
font-size: 1.5em;
|
font-size: 1.5em;
|
||||||
}
|
}
|
||||||
|
|
||||||
.popup {
|
.options {
|
||||||
width: 35em;
|
display: grid;
|
||||||
max-width: 100%;
|
width: 100%;
|
||||||
overflow: hidden;
|
grid-template-columns: repeat(auto-fit, minmax(3em, 1fr));
|
||||||
|
justify-content: center;
|
||||||
|
gap: .25em;
|
||||||
|
padding: 0 1.5em;
|
||||||
}
|
}
|
||||||
|
|
||||||
.overlay {
|
.overlay {
|
||||||
|
@ -126,54 +147,4 @@ header {
|
||||||
inset: 0;
|
inset: 0;
|
||||||
background-color: #0e1117;
|
background-color: #0e1117;
|
||||||
opacity: .75;
|
opacity: .75;
|
||||||
}
|
|
||||||
|
|
||||||
.profile {
|
|
||||||
display: grid;
|
|
||||||
grid-template-columns: auto auto;
|
|
||||||
align-items: center;
|
|
||||||
gap: .25em;
|
|
||||||
font-size: 1.5em;
|
|
||||||
}
|
|
||||||
|
|
||||||
.profile .name {
|
|
||||||
display: inline-flex;
|
|
||||||
gap: .5em;
|
|
||||||
place-items: center;
|
|
||||||
max-width: min(10em, 100%);
|
|
||||||
overflow: hidden;
|
|
||||||
text-overflow: ellipsis;
|
|
||||||
white-space: nowrap;
|
|
||||||
font-weight: bold;
|
|
||||||
color: currentColor;
|
|
||||||
}
|
|
||||||
|
|
||||||
.profile .name::before {
|
|
||||||
content: '';
|
|
||||||
display: inline-block;
|
|
||||||
width: 1ch;
|
|
||||||
aspect-ratio: 1/1;
|
|
||||||
background: var(--color-gradient-0);
|
|
||||||
border-radius: 100000%;
|
|
||||||
}
|
|
||||||
|
|
||||||
main {
|
|
||||||
display: grid;
|
|
||||||
gap: 2em;
|
|
||||||
padding: 1.5em 0.5em;
|
|
||||||
}
|
|
||||||
|
|
||||||
section {
|
|
||||||
display: grid;
|
|
||||||
justify-items: center;
|
|
||||||
gap: .75em;
|
|
||||||
}
|
|
||||||
|
|
||||||
.options {
|
|
||||||
display: grid;
|
|
||||||
width: 100%;
|
|
||||||
grid-template-columns: repeat(auto-fit, minmax(3em, 1fr));
|
|
||||||
justify-content: center;
|
|
||||||
gap: .25em;
|
|
||||||
padding: 0 1.5em;
|
|
||||||
}
|
}
|
|
@ -31,23 +31,32 @@ function WatchOnLbryPopup(params: { profile: Awaited<ReturnType<typeof getProfil
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return <div className='popup'>
|
return <div id='popup'>
|
||||||
<header>
|
|
||||||
<div className='profile'>
|
{
|
||||||
{publicKey
|
publicKey
|
||||||
? <span><b>Using As:</b> <a onClick={() => updateRoute('profile')} className='name link'>{nickname}</a></span>
|
? <header>
|
||||||
: <a className='button filled' onClick={() => updateRoute('profile')} href="#profile">Your Profile</a>}
|
<section>
|
||||||
</div>
|
<label>{nickname}</label>
|
||||||
</header>
|
<p>{friendlyPublicKey(publicKey)}</p>
|
||||||
|
<span><b>Score: {params.profile?.score ?? '...'}</b> - <a target='_blank' href="https://finder.madiator.com/leaderboard" class="filled">🔗Leaderboard</a></span>
|
||||||
|
</section>
|
||||||
|
<section>
|
||||||
|
{
|
||||||
|
popupRoute === 'profile'
|
||||||
|
? <a onClick={() => updateRoute('')} className="button filled">⇐ Back</a>
|
||||||
|
: <a className='button filled' onClick={() => updateRoute('profile')} href="#profile">Profile Settings</a>
|
||||||
|
}
|
||||||
|
</section>
|
||||||
|
</header>
|
||||||
|
: <header><a className='button filled' onClick={() => updateRoute('profile')} href="#profile">Your Profile</a>
|
||||||
|
</header>
|
||||||
|
}
|
||||||
{
|
{
|
||||||
popupRoute === 'profile' ?
|
popupRoute === 'profile' ?
|
||||||
publicKey ?
|
publicKey ?
|
||||||
<main>
|
<main>
|
||||||
<a onClick={() => updateRoute('')} className="go-back link">⇐ Back</a>
|
|
||||||
<section>
|
<section>
|
||||||
<label>{nickname}</label>
|
|
||||||
<p>{friendlyPublicKey(publicKey)}</p>
|
|
||||||
<span><b>Score: {params.profile?.score ?? '...'}</b> - <a target='_blank' href="https://finder.madiator.com/leaderboard" class="filled">🔗Leaderboard</a></span>
|
|
||||||
<div className='options'>
|
<div className='options'>
|
||||||
<a onClick={() => startAsyncOperation(generateProfileAndSetNickname()).then(() => renderPopup())} className={`button active`}>
|
<a onClick={() => startAsyncOperation(generateProfileAndSetNickname()).then(() => renderPopup())} className={`button active`}>
|
||||||
Change Nickname
|
Change Nickname
|
||||||
|
|
Loading…
Add table
Reference in a new issue