Better transaction pending state UI

This commit is contained in:
sairaj mote 2024-01-22 02:40:20 +05:30
parent fb8184b41d
commit 8df66c737d
5 changed files with 466 additions and 25 deletions

View File

@ -969,6 +969,35 @@ aside h4 {
margin-bottom: 2rem; margin-bottom: 2rem;
} }
.transaction__phase {
display: flex;
align-items: center;
gap: 1rem;
}
.transaction__phase:not(:last-of-type) {
position: relative;
margin-bottom: 2rem;
}
.transaction__phase:not(:last-of-type)::after {
content: "";
position: absolute;
width: 0.1rem;
height: 100%;
left: 0.3rem;
border-right: dashed 0.1rem rgba(var(--text-color), 0.5);
top: calc(100% + 0.4rem);
}
.transaction__phase .icon {
height: 1rem;
width: 1rem;
}
.transaction__phase sm-spinner {
--size: 1rem;
}
.transaction__phase .confirmed {
fill: var(--green);
}
.user-action-result__icon { .user-action-result__icon {
justify-self: center; justify-self: center;
height: 4rem; height: 4rem;

2
css/main.min.css vendored

File diff suppressed because one or more lines are too long

View File

@ -38,10 +38,12 @@ body[data-theme="dark"] {
--danger-color: rgb(255, 106, 106); --danger-color: rgb(255, 106, 106);
--green: #00e676; --green: #00e676;
--yellow: rgb(255, 213, 5); --yellow: rgb(255, 213, 5);
::-webkit-calendar-picker-indicator { ::-webkit-calendar-picker-indicator {
filter: invert(1); filter: invert(1);
} }
} }
h1, h1,
h2, h2,
h3, h3,
@ -52,6 +54,7 @@ h6 {
font-weight: 700; font-weight: 700;
// font-family: "Rubik", sans-serif; // font-family: "Rubik", sans-serif;
} }
p, p,
strong { strong {
line-height: 1.7; line-height: 1.7;
@ -72,6 +75,7 @@ a:where([class]) {
box-shadow: 0 0 0 0.1rem rgba(var(--text-color), 1) inset; box-shadow: 0 0 0 0.1rem rgba(var(--text-color), 1) inset;
} }
} }
a { a {
color: var(--accent-color); color: var(--accent-color);
} }
@ -79,6 +83,7 @@ a {
a:any-link:focus-visible { a:any-link:focus-visible {
outline: rgba(var(--text-color), 1) 0.1rem solid; outline: rgba(var(--text-color), 1) 0.1rem solid;
} }
input[type="datetime-local"] { input[type="datetime-local"] {
width: 100%; width: 100%;
padding: 0.8rem 0.6rem; padding: 0.8rem 0.6rem;
@ -89,11 +94,13 @@ input[type="datetime-local"] {
font-size: inherit; font-size: inherit;
color: inherit; color: inherit;
background-color: rgba(var(--text-color), 0.06); background-color: rgba(var(--text-color), 0.06);
&:focus { &:focus {
outline: none; outline: none;
box-shadow: 0 0 0 0.1rem var(--accent-color); box-shadow: 0 0 0 0.1rem var(--accent-color);
} }
} }
button, button,
.button { .button {
user-select: none; user-select: none;
@ -112,6 +119,7 @@ button,
border-radius: 0.5rem; border-radius: 0.5rem;
justify-content: center; justify-content: center;
flex-shrink: 0; flex-shrink: 0;
&:focus-visible { &:focus-visible {
outline: var(--accent-color) solid medium; outline: var(--accent-color) solid medium;
} }
@ -124,6 +132,7 @@ button,
.button { .button {
background-color: rgba(var(--text-color), 0.02); background-color: rgba(var(--text-color), 0.02);
border: solid thin rgba(var(--text-color), 0.06); border: solid thin rgba(var(--text-color), 0.06);
&--primary { &--primary {
padding: 0.8rem 1rem; padding: 0.8rem 1rem;
color: rgba(var(--background-color), 1); color: rgba(var(--background-color), 1);
@ -133,15 +142,19 @@ button,
fill: rgba(var(--background-color), 1); fill: rgba(var(--background-color), 1);
} }
} }
&--colored { &--colored {
color: var(--accent-color); color: var(--accent-color);
.icon { .icon {
fill: var(--accent-color); fill: var(--accent-color);
} }
} }
&--danger { &--danger {
background-color: #ff737310; background-color: #ff737310;
color: var(--danger-color); color: var(--danger-color);
.icon { .icon {
fill: var(--danger-color); fill: var(--danger-color);
} }
@ -155,14 +168,17 @@ button,
border: solid var(--accent-color) 1px; border: solid var(--accent-color) 1px;
background-color: transparent; background-color: transparent;
color: var(--accent-color); color: var(--accent-color);
.icon { .icon {
fill: var(--accent-color); fill: var(--accent-color);
} }
} }
&--transparent { &--transparent {
background-color: transparent; background-color: transparent;
} }
} }
button:disabled { button:disabled {
opacity: 0.4; opacity: 0.4;
cursor: not-allowed; cursor: not-allowed;
@ -190,6 +206,7 @@ button:disabled {
padding: 0.4rem; padding: 0.4rem;
border-radius: 0.3rem; border-radius: 0.3rem;
aspect-ratio: 1/1; aspect-ratio: 1/1;
.icon { .icon {
height: 1em; height: 1em;
width: 1em; width: 1em;
@ -214,13 +231,15 @@ details[open] {
margin-bottom: 1rem; margin-bottom: 1rem;
} }
& > summary .down-arrow { &>summary .down-arrow {
transform: rotate(180deg); transform: rotate(180deg);
} }
} }
fieldset { fieldset {
border: none; border: none;
} }
sm-input { sm-input {
--border-radius: 0.5rem; --border-radius: 0.5rem;
--background-color: rgba(var(--foreground-color), 1); --background-color: rgba(var(--foreground-color), 1);
@ -243,28 +262,34 @@ sm-chip {
--background: rgba(var(--text-color), 0.06); --background: rgba(var(--text-color), 0.06);
user-select: none; user-select: none;
font-weight: 500; font-weight: 500;
&[selected] { &[selected] {
--background: var(--accent-color); --background: var(--accent-color);
color: rgba(var(--background-color), 1); color: rgba(var(--background-color), 1);
} }
} }
sm-select { sm-select {
font-size: 0.9rem; font-size: 0.9rem;
font-weight: 500; font-weight: 500;
--padding: 0.6rem 0.3rem 0.6rem 0.6rem; --padding: 0.6rem 0.3rem 0.6rem 0.6rem;
} }
sm-option { sm-option {
font-size: 0.9rem; font-size: 0.9rem;
} }
ul { ul {
list-style: none; list-style: none;
} }
.interact { .interact {
position: relative; position: relative;
overflow: hidden; overflow: hidden;
cursor: pointer; cursor: pointer;
-webkit-tap-highlight-color: transparent; -webkit-tap-highlight-color: transparent;
} }
.overflow-ellipsis { .overflow-ellipsis {
width: 100%; width: 100%;
overflow: hidden; overflow: hidden;
@ -309,6 +334,7 @@ ul {
.flex-1 { .flex-1 {
flex: 1; flex: 1;
} }
.flex-shrink-0 { .flex-shrink-0 {
flex-shrink: 0; flex-shrink: 0;
} }
@ -348,6 +374,7 @@ ul {
.text-align-right { .text-align-right {
text-align: right; text-align: right;
} }
.text-align-left { .text-align-left {
text-align: left; text-align: left;
} }
@ -355,9 +382,11 @@ ul {
.align-items-start { .align-items-start {
align-items: flex-start; align-items: flex-start;
} }
.align-items-center { .align-items-center {
align-items: center; align-items: center;
} }
.align-content-start { .align-content-start {
align-content: flex-start; align-content: flex-start;
} }
@ -381,6 +410,7 @@ ul {
.justify-start { .justify-start {
justify-items: start; justify-items: start;
} }
.justify-content-start { .justify-content-start {
justify-content: start; justify-content: start;
} }
@ -388,6 +418,7 @@ ul {
.justify-content-center { .justify-content-center {
justify-content: center; justify-content: center;
} }
.justify-items-center { .justify-items-center {
justify-items: center; justify-items: center;
} }
@ -395,9 +426,11 @@ ul {
.justify-right { .justify-right {
margin-left: auto; margin-left: auto;
} }
.align-self-start { .align-self-start {
align-self: start; align-self: start;
} }
.align-self-center { .align-self-center {
align-self: center; align-self: center;
} }
@ -425,6 +458,7 @@ ul {
.space-between { .space-between {
justify-content: space-between; justify-content: space-between;
} }
.space-evenly { .space-evenly {
justify-content: space-evenly; justify-content: space-evenly;
} }
@ -444,9 +478,11 @@ ul {
.margin-right-0-3 { .margin-right-0-3 {
margin-right: 0.3rem; margin-right: 0.3rem;
} }
.margin-right-0-5 { .margin-right-0-5 {
margin-right: 0.5rem; margin-right: 0.5rem;
} }
.margin-right-1 { .margin-right-1 {
margin-right: 1rem; margin-right: 1rem;
} }
@ -458,18 +494,23 @@ ul {
.margin-left-auto { .margin-left-auto {
margin-left: auto; margin-left: auto;
} }
.margin-right-auto { .margin-right-auto {
margin-right: auto; margin-right: auto;
} }
.margin-top-1 { .margin-top-1 {
margin-top: 1rem; margin-top: 1rem;
} }
.margin-bottom-0-5 { .margin-bottom-0-5 {
margin-bottom: 0.5rem; margin-bottom: 0.5rem;
} }
.margin-bottom-1 { .margin-bottom-1 {
margin-bottom: 1rem; margin-bottom: 1rem;
} }
.margin-bottom-2 { .margin-bottom-2 {
margin-bottom: 2rem; margin-bottom: 2rem;
} }
@ -477,6 +518,7 @@ ul {
.margin-block-0-5 { .margin-block-0-5 {
margin-block: 0.5rem; margin-block: 0.5rem;
} }
.margin-block-1 { .margin-block-1 {
margin-block: 1rem; margin-block: 1rem;
} }
@ -524,6 +566,7 @@ ul {
.flow-column { .flow-column {
grid-auto-flow: column; grid-auto-flow: column;
} }
.w-100 { .w-100 {
width: 100%; width: 100%;
} }
@ -539,6 +582,7 @@ ul {
.weight-500 { .weight-500 {
font-weight: 500; font-weight: 500;
} }
.ws-pre-line { .ws-pre-line {
white-space: pre-line; white-space: pre-line;
} }
@ -555,13 +599,12 @@ ul {
position: absolute; position: absolute;
border-radius: 50%; border-radius: 50%;
transform: scale(0); transform: scale(0);
background: radial-gradient( background: radial-gradient(circle,
circle, rgba(var(--text-color), 0.3) 0%,
rgba(var(--text-color), 0.3) 0%, rgba(0, 0, 0, 0) 50%);
rgba(0, 0, 0, 0) 50%
);
pointer-events: none; pointer-events: none;
} }
.interactive { .interactive {
position: relative; position: relative;
overflow: hidden; overflow: hidden;
@ -573,30 +616,36 @@ ul {
display: none; display: none;
} }
.observe-empty-state:not(:empty) ~ .empty-state { .observe-empty-state:not(:empty)~.empty-state {
display: none; display: none;
} }
.password-field { .password-field {
label { label {
display: flex; display: flex;
flex-shrink: 0; flex-shrink: 0;
input:checked ~ .visible {
input:checked~.visible {
display: none; display: none;
} }
input:not(:checked) ~ .invisible {
input:not(:checked)~.invisible {
display: none; display: none;
} }
} }
} }
.multi-state-button { .multi-state-button {
display: grid; display: grid;
text-align: center; text-align: center;
align-items: center; align-items: center;
justify-items: center; justify-items: center;
isolation: isolate; isolation: isolate;
& > * {
&>* {
grid-area: 1/1/2/2; grid-area: 1/1/2/2;
} }
button { button {
z-index: 1; z-index: 1;
width: 100%; width: 100%;
@ -606,21 +655,26 @@ ul {
#confirmation_popup, #confirmation_popup,
#prompt_popup { #prompt_popup {
flex-direction: column; flex-direction: column;
h4 { h4 {
margin-bottom: 1rem; margin-bottom: 1rem;
} }
sm-button { sm-button {
margin: 0; margin: 0;
} }
.flex { .flex {
padding: 0; padding: 0;
margin-top: 1rem; margin-top: 1rem;
sm-button:first-of-type { sm-button:first-of-type {
margin-right: 0.6rem; margin-right: 0.6rem;
margin-left: auto; margin-left: auto;
} }
} }
} }
#prompt_message { #prompt_message {
margin-bottom: 1.5rem; margin-bottom: 1.5rem;
} }
@ -632,37 +686,45 @@ ul {
width: 100%; width: 100%;
padding: 0 1.5rem; padding: 0 1.5rem;
align-items: center; align-items: center;
& > * {
&>* {
grid-row: 1; grid-row: 1;
} }
h3, h3,
h4 { h4 {
grid-column: 1/-1; grid-column: 1/-1;
justify-self: center; justify-self: center;
align-self: center; align-self: center;
} }
&__close { &__close {
grid-column: 1; grid-column: 1;
margin-left: -1rem; margin-left: -1rem;
justify-self: flex-start; justify-self: flex-start;
} }
} }
ul, ul,
menu { menu {
&[type="circle"] { &[type="circle"] {
padding: 1.5rem 2.5rem; padding: 1.5rem 2.5rem;
list-style: circle; list-style: circle;
li { li {
margin-bottom: 1rem; margin-bottom: 1rem;
&:last-of-type { &:last-of-type {
margin-bottom: 0; margin-bottom: 0;
} }
} }
} }
& { & {
list-style: none; list-style: none;
} }
} }
#main_header { #main_header {
grid-area: header; grid-area: header;
display: grid; display: grid;
@ -673,19 +735,23 @@ menu {
border-bottom: solid thin rgba(var(--text-color), 0.3); border-bottom: solid thin rgba(var(--text-color), 0.3);
grid-column: 1/-1; grid-column: 1/-1;
} }
#logo { #logo {
color: inherit; color: inherit;
margin-right: auto; margin-right: auto;
} }
.app-brand { .app-brand {
display: flex; display: flex;
gap: 0.3rem; gap: 0.3rem;
align-items: center; align-items: center;
.icon { .icon {
height: 1.2rem; height: 1.2rem;
width: 1.2rem; width: 1.2rem;
} }
} }
.app-name { .app-name {
&__company { &__company {
font-size: 0.8rem; font-size: 0.8rem;
@ -693,16 +759,19 @@ menu {
color: rgba(var(--text-color), 0.8); color: rgba(var(--text-color), 0.8);
} }
} }
#meta_mask_status_button { #meta_mask_status_button {
gap: 0.3rem; gap: 0.3rem;
border-radius: 2rem; border-radius: 2rem;
background-color: rgba(var(--text-color), 0.06); background-color: rgba(var(--text-color), 0.06);
padding: 0.3rem 0.6rem; padding: 0.3rem 0.6rem;
font-weight: 500; font-weight: 500;
.icon-wrapper { .icon-wrapper {
position: relative; position: relative;
display: grid; display: grid;
place-content: center; place-content: center;
&::after { &::after {
content: ""; content: "";
position: absolute; position: absolute;
@ -712,24 +781,30 @@ menu {
top: 0; top: 0;
right: 0; right: 0;
} }
& > * {
&>* {
grid-area: 1/1; grid-area: 1/1;
} }
} }
&[data-status="connected"] { &[data-status="connected"] {
pointer-events: none; pointer-events: none;
.icon-wrapper::after { .icon-wrapper::after {
background-color: var(--green); background-color: var(--green);
} }
} }
&[data-status="disconnected"] .icon-wrapper::after { &[data-status="disconnected"] .icon-wrapper::after {
background-color: var(--danger-color); background-color: var(--danger-color);
} }
} }
theme-toggle { theme-toggle {
justify-self: end; justify-self: end;
align-self: center; align-self: center;
} }
.label { .label {
text-transform: capitalize; text-transform: capitalize;
font-size: 0.8rem; font-size: 0.8rem;
@ -737,35 +812,43 @@ theme-toggle {
color: rgba(var(--text-color), 0.8); color: rgba(var(--text-color), 0.8);
margin-top: 1.5rem; margin-top: 1.5rem;
font-weight: 500; font-weight: 500;
&:first-of-type { &:first-of-type {
margin-top: 0; margin-top: 0;
} }
& + :is(h1, h2, h3, h4, h5, h6, p, span, sm-copy, a) {
&+ :is(h1, h2, h3, h4, h5, h6, p, span, sm-copy, a) {
font-weight: 700; font-weight: 700;
} }
} }
main { main {
display: grid; display: grid;
height: 100%; height: 100%;
grid-template-rows: auto 1fr auto; grid-template-rows: auto 1fr auto;
grid-template-areas: "header" "pages" "navbar"; grid-template-areas: "header" "pages" "navbar";
} }
#main_navbar { #main_navbar {
grid-area: navbar; grid-area: navbar;
display: flex; display: flex;
background: rgba(var(--text-color), 0.03); background: rgba(var(--text-color), 0.03);
&.hide-away { &.hide-away {
position: absolute; position: absolute;
} }
ul { ul {
display: flex; display: flex;
height: 100%; height: 100%;
width: 100%; width: 100%;
li { li {
width: 100%; width: 100%;
} }
} }
} }
.nav-item { .nav-item {
position: relative; position: relative;
display: flex; display: flex;
@ -780,20 +863,25 @@ main {
font-size: 0.8rem; font-size: 0.8rem;
border-radius: 0.3rem; border-radius: 0.3rem;
font-weight: 500; font-weight: 500;
.icon { .icon {
width: 2rem; width: 2rem;
transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275); transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
} }
&__title { &__title {
transition: opacity 0.2s, transition: opacity 0.2s,
transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275); transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
} }
&--active { &--active {
color: var(--accent-color); color: var(--accent-color);
.icon { .icon {
fill: var(--accent-color); fill: var(--accent-color);
} }
} }
&__indicator { &__indicator {
position: absolute; position: absolute;
bottom: 0; bottom: 0;
@ -804,6 +892,7 @@ main {
view-transition-name: indicator; view-transition-name: indicator;
} }
} }
// body.loaded .nav-item { // body.loaded .nav-item {
// &__indicator { // &__indicator {
// view-transition-name: indicator; // view-transition-name: indicator;
@ -813,18 +902,22 @@ main {
display: flex; display: flex;
overflow: auto; overflow: auto;
grid-area: pages; grid-area: pages;
&[data-page="home"] { &[data-page="home"] {
& > :nth-child(2) { &> :nth-child(2) {
flex: 1; flex: 1;
} }
} }
&[data-page="send"] { &[data-page="send"] {
align-items: flex-start; align-items: flex-start;
& > * {
&>* {
padding: 1rem; padding: 1rem;
margin: 0 auto; margin: 0 auto;
} }
} }
&[data-page="create"] { &[data-page="create"] {
margin: 0 auto; margin: 0 auto;
padding: 4vw 1rem; padding: 4vw 1rem;
@ -833,16 +926,21 @@ main {
width: min(100%, 42rem); width: min(100%, 42rem);
} }
} }
aside { aside {
view-transition-name: search-history; view-transition-name: search-history;
& > * {
&>* {
padding: 0 1rem; padding: 0 1rem;
} }
h4 { h4 {
padding: 1rem; padding: 1rem;
} }
padding-bottom: 1.5rem; padding-bottom: 1.5rem;
} }
.contact { .contact {
display: grid; display: grid;
gap: 0.5rem; gap: 0.5rem;
@ -850,40 +948,48 @@ aside {
border: solid thin rgba(var(--text-color), 0.3); border: solid thin rgba(var(--text-color), 0.3);
padding: 0.5rem; padding: 0.5rem;
border-radius: 0.5rem; border-radius: 0.5rem;
sm-chips { sm-chips {
background-color: rgba(var(--text-color), 0.06); background-color: rgba(var(--text-color), 0.06);
padding: 0.2rem 0.3rem; padding: 0.2rem 0.3rem;
border-radius: 0.5rem; border-radius: 0.5rem;
width: fit-content; width: fit-content;
} }
sm-chip { sm-chip {
--padding: 0.3rem 0.5rem; --padding: 0.3rem 0.5rem;
font-size: 0.8rem; font-size: 0.8rem;
--border-radius: 0.3rem; --border-radius: 0.3rem;
} }
sm-copy { sm-copy {
font-size: 0.9rem; font-size: 0.9rem;
font-weight: 500; font-weight: 500;
} }
} }
#balance_section { #balance_section {
margin-top: 3vw; margin-top: 3vw;
align-content: start; align-content: start;
padding: 1.5rem; padding: 1.5rem;
& > * {
&>* {
max-width: 36rem; max-width: 36rem;
margin: 0 auto; margin: 0 auto;
} }
} }
#input_wrapper { #input_wrapper {
display: grid; display: grid;
gap: 0.5rem; gap: 0.5rem;
} }
#eth_balance_wrapper { #eth_balance_wrapper {
background-color: rgba(var(--text-color), 0.06); background-color: rgba(var(--text-color), 0.06);
padding: max(1rem, 1.5vw); padding: max(1rem, 1.5vw);
border-radius: 0.5rem; border-radius: 0.5rem;
width: 100%; width: 100%;
li { li {
&:not(:last-of-type) { &:not(:last-of-type) {
border-bottom: solid thin rgba(var(--text-color), 0.3); border-bottom: solid thin rgba(var(--text-color), 0.3);
@ -891,6 +997,7 @@ aside {
} }
} }
} }
#error_section { #error_section {
display: grid; display: grid;
height: 100%; height: 100%;
@ -899,6 +1006,7 @@ aside {
place-items: center; place-items: center;
text-align: center; text-align: center;
grid-column: 1/-1; grid-column: 1/-1;
.icon { .icon {
height: 8rem; height: 8rem;
width: 8rem; width: 8rem;
@ -908,6 +1016,42 @@ aside {
margin-bottom: 2rem; margin-bottom: 2rem;
} }
} }
.transaction__phase {
display: flex;
align-items: center;
gap: 1rem;
&:not(:last-of-type) {
position: relative;
margin-bottom: 2rem;
&::after {
content: '';
position: absolute;
width: 0.1rem;
height: 100%;
left: 0.3rem;
border-right: dashed 0.1rem rgba(var(--text-color), 0.5);
top: calc(100% + 0.4rem);
}
}
.icon {
height: 1rem;
width: 1rem;
}
sm-spinner {
--size: 1rem;
}
.confirmed {
fill: var(--green);
}
}
.user-action-result__icon { .user-action-result__icon {
justify-self: center; justify-self: center;
height: 4rem; height: 4rem;
@ -915,38 +1059,47 @@ aside {
border-radius: 5rem; border-radius: 5rem;
animation: popup 1s; animation: popup 1s;
padding: 1rem; padding: 1rem;
&.pending { &.pending {
fill: var(--yellow); fill: var(--yellow);
background-color: rgba(var(--text-color), 0.03); background-color: rgba(var(--text-color), 0.03);
} }
&.confirmed { &.confirmed {
fill: rgba(var(--background-color), 1); fill: rgba(var(--background-color), 1);
background-color: #0bbe56; background-color: #0bbe56;
} }
&.failed { &.failed {
background-color: rgba(var(--text-color), 0.03); background-color: rgba(var(--text-color), 0.03);
fill: var(--danger-color); fill: var(--danger-color);
} }
} }
@keyframes popup { @keyframes popup {
0% { 0% {
opacity: 0; opacity: 0;
transform: scale(0.2) translateY(600%); transform: scale(0.2) translateY(600%);
} }
10% { 10% {
transform: scale(0.2) translateY(5rem); transform: scale(0.2) translateY(5rem);
opacity: 1; opacity: 1;
} }
40% { 40% {
transform: scale(0.2) translateY(0); transform: scale(0.2) translateY(0);
} }
80% { 80% {
transform: scale(1.1) translateY(0); transform: scale(1.1) translateY(0);
} }
100% { 100% {
transform: scale(1) translateY(0); transform: scale(1) translateY(0);
} }
} }
#generated_addresses { #generated_addresses {
background-color: rgba(var(--text-color), 0.06); background-color: rgba(var(--text-color), 0.06);
padding: max(1rem, 1.5vw); padding: max(1rem, 1.5vw);
@ -959,47 +1112,57 @@ aside {
} }
} }
} }
@media only screen and (max-width: 640px) { @media only screen and (max-width: 640px) {
.hide-on-small { .hide-on-small {
display: none; display: none;
} }
#page_container { #page_container {
&[data-page="home"] { &[data-page="home"] {
flex-direction: column; flex-direction: column;
& > :first-child {
&> :first-child {
order: 1; order: 1;
} }
} }
} }
} }
@media only screen and (min-width: 640px) { @media only screen and (min-width: 640px) {
sm-popup { sm-popup {
--width: 24rem; --width: 24rem;
} }
.popup__header { .popup__header {
padding: 1rem 1.5rem 0 1.5rem; padding: 1rem 1.5rem 0 1.5rem;
} }
main { main {
grid-template-columns: 10rem 1fr; grid-template-columns: 10rem 1fr;
grid-template-areas: "header header" "navbar pages"; grid-template-areas: "header header" "navbar pages";
grid-template-rows: auto 1fr; grid-template-rows: auto 1fr;
} }
#main_navbar { #main_navbar {
border-top: none; border-top: none;
flex-direction: column; flex-direction: column;
background-color: transparent; background-color: transparent;
border-right: solid thin rgba(var(--text-color), 0.3); border-right: solid thin rgba(var(--text-color), 0.3);
ul { ul {
flex-direction: column; flex-direction: column;
gap: 0.5rem; gap: 0.5rem;
padding: 0.3rem; padding: 0.3rem;
} }
} }
.nav-item { .nav-item {
flex-direction: row; flex-direction: row;
justify-content: flex-start; justify-content: flex-start;
padding: 0.8rem 1rem 0.8rem 0.5rem; padding: 0.8rem 1rem 0.8rem 0.5rem;
flex: 1; flex: 1;
&__indicator { &__indicator {
width: 0.25rem; width: 0.25rem;
height: 50%; height: 50%;
@ -1008,9 +1171,11 @@ aside {
bottom: auto; bottom: auto;
} }
} }
aside { aside {
border-right: solid thin rgba(var(--text-color), 0.3); border-right: solid thin rgba(var(--text-color), 0.3);
overflow-y: auto; overflow-y: auto;
h4 { h4 {
position: sticky; position: sticky;
top: 0; top: 0;
@ -1018,19 +1183,23 @@ aside {
z-index: 1; z-index: 1;
} }
} }
#input_wrapper { #input_wrapper {
grid-template-columns: 1fr auto; grid-template-columns: 1fr auto;
} }
} }
@media only screen and (min-width: 1280px) { @media only screen and (min-width: 1280px) {
.page { .page {
margin: 0 8vw; margin: 0 8vw;
} }
} }
@media (hover: hover) { @media (hover: hover) {
.hover { .hover {
cursor: pointer; cursor: pointer;
} }
::-webkit-scrollbar { ::-webkit-scrollbar {
width: 0.5rem; width: 0.5rem;
height: 0.5rem; height: 0.5rem;
@ -1044,20 +1213,26 @@ aside {
background: rgba(var(--text-color), 0.5); background: rgba(var(--text-color), 0.5);
} }
} }
.interact:not([disabled], .button--primary) { .interact:not([disabled], .button--primary) {
transition: background-color 0.3s; transition: background-color 0.3s;
&:hover { &:hover {
background-color: rgba(var(--text-color), 0.06); background-color: rgba(var(--text-color), 0.06);
} }
} }
.button:not([disabled]) { .button:not([disabled]) {
transition: background-color 0.3s, filter 0.3s; transition: background-color 0.3s, filter 0.3s;
&:hover { &:hover {
filter: contrast(2); filter: contrast(2);
} }
} }
} }
@media (prefers-reduced-motion) { @media (prefers-reduced-motion) {
::view-transition-group(*), ::view-transition-group(*),
::view-transition-old(*), ::view-transition-old(*),
::view-transition-new(*) { ::view-transition-new(*) {

View File

@ -923,11 +923,16 @@
switch (status) { switch (status) {
case 'pending': case 'pending':
renderElem(getRef('transaction_result_popup__content'), html` renderElem(getRef('transaction_result_popup__content'), html`
<svg class="icon user-action-result__icon pending" xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="#000000"><path d="M0 0h24v24H0V0z" fill="none"/><path d="M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8zm.5-13H11v6l5.25 3.15.75-1.23-4.5-2.67z"/></svg> <ul>
<div class="grid gap-0-5 justify-center text-center"> <li class="transaction__phase">
<h4>Transaction sent</h4> <svg class="icon confirmed" xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="#000000"> <path d="M0 0h24v24H0V0z" fill="none" /> <path d="M9 16.2L4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4L9 16.2z" /> </svg>
<p>Waiting for confirmation from blockchain</p> <h4>Transaction sent</h4>
</div> </li>
<li class="transaction__phase">
<sm-spinner></sm-spinner>
<p>Waiting for transaction to be confirmed</p>
</li>
</ul>
<div class="grid"> <div class="grid">
<span class="label">Transaction ID</span> <span class="label">Transaction ID</span>
<sm-copy value=${txHash}></sm-copy> <sm-copy value=${txHash}></sm-copy>

232
index.min.html Normal file

File diff suppressed because one or more lines are too long