mirror of https://github.com/hykilpikonna/AquaDX
[S] Style existing cards
parent
e7058cf3c8
commit
fce5ca592a
|
@ -59,7 +59,7 @@ button
|
||||||
font-size: 1em
|
font-size: 1em
|
||||||
font-weight: 500
|
font-weight: 500
|
||||||
font-family: inherit
|
font-family: inherit
|
||||||
background-color: rgba(white, 0.08)
|
background-color: $ov-lighter
|
||||||
opacity: 0.9
|
opacity: 0.9
|
||||||
cursor: pointer
|
cursor: pointer
|
||||||
transition: all 0.25s
|
transition: all 0.25s
|
||||||
|
@ -95,7 +95,7 @@ input
|
||||||
font-size: 1em
|
font-size: 1em
|
||||||
font-weight: 500
|
font-weight: 500
|
||||||
font-family: inherit
|
font-family: inherit
|
||||||
background-color: rgba(white, 0.08)
|
background-color: $ov-lighter
|
||||||
transition: all 0.25s
|
transition: all 0.25s
|
||||||
box-sizing: border-box
|
box-sizing: border-box
|
||||||
|
|
||||||
|
|
|
@ -67,6 +67,10 @@
|
||||||
// Ghost card
|
// Ghost card
|
||||||
return luid
|
return luid
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function isGhostCard(luid: string) {
|
||||||
|
return luid.length === 18
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div class="bind-card">
|
<div class="bind-card">
|
||||||
|
@ -74,13 +78,15 @@
|
||||||
<p>Here are the cards you have linked to your account:</p>
|
<p>Here are the cards you have linked to your account:</p>
|
||||||
|
|
||||||
{#if me}
|
{#if me}
|
||||||
|
<div class="existing-cards">
|
||||||
{#each me.cards as card}
|
{#each me.cards as card}
|
||||||
<div>
|
<div class={clz({ghost: isGhostCard(card.luid)}, 'existing-card')}>
|
||||||
<span class="register">Registered: {moment(card.registerTime).format("YYYY MMM DD")}</span>
|
<span class="register">Registered: {moment(card.registerTime).format("YYYY MMM DD")}</span>
|
||||||
<span class="last">Last used: {moment(card.accessTime).format("YYYY MMM DD")}</span>
|
<span class="last">Last used: {moment(card.accessTime).format("YYYY MMM DD")}</span>
|
||||||
<span class="id">ID: {formatLUID(card.luid)}</span>
|
<span class="id">ID: {formatLUID(card.luid)}</span>
|
||||||
</div>
|
</div>
|
||||||
{/each}
|
{/each}
|
||||||
|
</div>
|
||||||
{:else if error}
|
{:else if error}
|
||||||
<p>{error}</p>
|
<p>{error}</p>
|
||||||
{:else}
|
{:else}
|
||||||
|
@ -127,6 +133,8 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<style lang="sass">
|
<style lang="sass">
|
||||||
|
@import "../vars"
|
||||||
|
|
||||||
.bind-card
|
.bind-card
|
||||||
input
|
input
|
||||||
width: 100%
|
width: 100%
|
||||||
|
@ -136,4 +144,23 @@
|
||||||
|
|
||||||
button
|
button
|
||||||
margin-left: 1rem
|
margin-left: 1rem
|
||||||
|
|
||||||
|
.existing-cards
|
||||||
|
display: grid
|
||||||
|
grid-template-columns: repeat(auto-fill, minmax(300px, 1fr))
|
||||||
|
gap: 1rem
|
||||||
|
|
||||||
|
.existing-card
|
||||||
|
display: flex
|
||||||
|
flex-direction: column
|
||||||
|
|
||||||
|
border-radius: 5px
|
||||||
|
padding: 12px 16px
|
||||||
|
background: $ov-light
|
||||||
|
|
||||||
|
.id
|
||||||
|
font-size: 0.8rem
|
||||||
|
opacity: 0.5
|
||||||
|
|
||||||
|
|
||||||
</style>
|
</style>
|
|
@ -5,6 +5,9 @@ $c-darker: #646cff
|
||||||
$c-bg: #242424
|
$c-bg: #242424
|
||||||
$c-error: #ff6b6b
|
$c-error: #ff6b6b
|
||||||
|
|
||||||
|
$ov-light: rgba(white, 0.04)
|
||||||
|
$ov-lighter: rgba(white, 0.08)
|
||||||
|
|
||||||
$nav-height: 4rem
|
$nav-height: 4rem
|
||||||
$w-mobile: 560px
|
$w-mobile: 560px
|
||||||
$w-max: 900px
|
$w-max: 900px
|
||||||
|
|
Loading…
Reference in New Issue