Skip to content

Commit 514fe72

Browse files
committed
Removed spinner from correspondence challenges
1 parent 560d31d commit 514fe72

File tree

2 files changed

+28
-1
lines changed

2 files changed

+28
-1
lines changed

app/views/challenge/mine.scala

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,12 @@ object mine:
3939
c.destUserId.map { destId =>
4040
div(cls := "waiting")(
4141
userIdLink(destId.some, cssClass = "target".some),
42-
spinner,
42+
if c.unlimited || c.daysPerTurn != none then
43+
div(cls := "correspondence-waiting")(
44+
p(cls := "challenge-successful")("Challenge sent"),
45+
p("Challenge can be canceled in the sword menu")
46+
)
47+
else spinner,
4348
p(trans.waitingForOpponent())
4449
)
4550
} getOrElse {

ui/challenge/css/_page.scss

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,17 +27,20 @@
2727
@include breakpoint($mq-x-small) {
2828
grid-area: 1 / 2 / 3 / 2;
2929
}
30+
3031
&__recent {
3132
@extend %flex-center;
3233
margin-top: 1em;
3334
gap: 0.5em;
35+
3436
.button {
3537
background: none;
3638
border: $border;
3739
text-align: $start-direction;
3840
text-transform: none;
3941
}
4042
}
43+
4144
.error {
4245
color: $c-bad;
4346
margin-top: 1em;
@@ -57,6 +60,22 @@
5760
height: 13em;
5861
margin: 2em auto;
5962
}
63+
64+
.correspondence-waiting {
65+
padding: 15px;
66+
border-radius: 8px;
67+
position: relative;
68+
}
69+
70+
.challenge-successful::before {
71+
content: '\2714 ';
72+
font-size: 1.2em;
73+
color: green;
74+
}
75+
76+
.correspondence-waiting > p {
77+
margin-bottom: 0.5em;
78+
}
6079
}
6180

6281
.cancel {
@@ -74,9 +93,11 @@
7493
padding: $block-gap 4vw;
7594
margin-bottom: 4rem;
7695
font-size: 1.5em;
96+
7797
@include breakpoint($mq-xx-small) {
7898
font-size: 2em;
7999
}
100+
80101
background: var(--c-bg);
81102
border: 1px solid var(--c-font);
82103

@@ -88,6 +109,7 @@
88109
color: var(--c-font);
89110
font-size: 6rem;
90111
margin-#{$end-direction}: 0.2em;
112+
91113
@include breakpoint($mq-not-xx-small) {
92114
display: none;
93115
}

0 commit comments

Comments
 (0)