Skip to content

Commit 525c08f

Browse files
committed
simplify challenge sent page view and css
1 parent 70fd74a commit 525c08f

File tree

2 files changed

+8
-18
lines changed

2 files changed

+8
-18
lines changed

app/views/challenge/mine.scala

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,9 @@ object mine:
3939
c.destUserId.map { destId =>
4040
div(cls := "waiting")(
4141
userIdLink(destId.some, cssClass = "target".some),
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-
)
42+
if !c.hasClock then
43+
div(cls := "correspondence-waiting text", dataIcon := licon.Checkmark):
44+
"Challenge sent"
4745
else spinner,
4846
p(trans.waitingForOpponent())
4947
)

ui/challenge/css/_page.scss

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -62,19 +62,11 @@
6262
}
6363

6464
.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;
65+
font-size: 1.5em;
66+
margin: 2em auto;
67+
&::before {
68+
color: $c-good;
69+
}
7870
}
7971
}
8072

0 commit comments

Comments
 (0)