UI improvements
This commit is contained in:
parent
4ffa565626
commit
d70663b898
@ -87,7 +87,7 @@ class UserController(
|
|||||||
Response(OK).html(html)
|
Response(OK).html(html)
|
||||||
},
|
},
|
||||||
{ token ->
|
{ token ->
|
||||||
Response.redirect("/").loginCookie(token, request.isSecure())
|
Response.redirect("/notes").loginCookie(token, request.isSecure())
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
@ -29,7 +29,7 @@ class BaseView(staticFileResolver: StaticFileResolver) : View(staticFileResolver
|
|||||||
<div class="flex justify-between mb-4">
|
<div class="flex justify-between mb-4">
|
||||||
<h1 class="text-2xl underline">Notes</h1>
|
<h1 class="text-2xl underline">Notes</h1>
|
||||||
<span>
|
<span>
|
||||||
<span class="underline font-semibold">Trash (3)</span>
|
<span class="btn btn-teal pointer-events-none">Trash (3)</span>
|
||||||
<span class="ml-2 btn btn-green pointer-events-none">New</span>
|
<span class="ml-2 btn btn-green pointer-events-none">New</span>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -24,7 +24,7 @@ class UserView(staticFileResolver: StaticFileResolver) : View(staticFileResolver
|
|||||||
"Register"
|
"Register"
|
||||||
) {
|
) {
|
||||||
+"Already have an account? "
|
+"Already have an account? "
|
||||||
a(href = "/login", classes = "no-underline text-blue-500 font-bold") { +"Sign In" }
|
a(href = "/login", classes = "no-underline text-blue-500 hover:text-blue-400 font-bold") { +"Sign In" }
|
||||||
}
|
}
|
||||||
|
|
||||||
fun login(
|
fun login(
|
||||||
@ -34,7 +34,9 @@ class UserView(staticFileResolver: StaticFileResolver) : View(staticFileResolver
|
|||||||
new: Boolean = false,
|
new: Boolean = false,
|
||||||
) = accountForm("Login", "Login page", jwtPayload, error, validationErrors, "Sign In", "Sign In", new) {
|
) = accountForm("Login", "Login page", jwtPayload, error, validationErrors, "Sign In", "Sign In", new) {
|
||||||
+"Don't have an account yet? "
|
+"Don't have an account yet? "
|
||||||
a(href = "/register", classes = "no-underline text-blue-500 font-bold") { +"Create an account" }
|
a(href = "/register", classes = "no-underline text-blue-500 hover:text-blue-400 font-bold") {
|
||||||
|
+"Create an account"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun accountForm(
|
private fun accountForm(
|
||||||
@ -50,8 +52,8 @@ class UserView(staticFileResolver: StaticFileResolver) : View(staticFileResolver
|
|||||||
) = renderPage(title = title, description, jwtPayload = jwtPayload) {
|
) = renderPage(title = title, description, jwtPayload = jwtPayload) {
|
||||||
div("centered container mx-auto flex justify-center items-center") {
|
div("centered container mx-auto flex justify-center items-center") {
|
||||||
div("w-full md:w-1/2 lg:w-1/3 m-4") {
|
div("w-full md:w-1/2 lg:w-1/3 m-4") {
|
||||||
h1("font-semibold text-lg mb-6 text-center") { +h1 }
|
|
||||||
div("p-8 mb-6") {
|
div("p-8 mb-6") {
|
||||||
|
h1("font-semibold text-lg mb-6 text-center") { +h1 }
|
||||||
if (new) alert(Alert.Success, "Your account has been created")
|
if (new) alert(Alert.Success, "Your account has been created")
|
||||||
error?.let { alert(Alert.Warning, error) }
|
error?.let { alert(Alert.Warning, error) }
|
||||||
form(method = FormMethod.post) {
|
form(method = FormMethod.post) {
|
||||||
|
|||||||
@ -10,7 +10,7 @@ fun DIV.noteListHeader(numberOfDeletedNotes: Int, query: String = "") {
|
|||||||
span {
|
span {
|
||||||
a(
|
a(
|
||||||
href = "/notes/trash",
|
href = "/notes/trash",
|
||||||
classes = "underline font-semibold"
|
classes = "btn btn-teal"
|
||||||
) { +"Trash ($numberOfDeletedNotes)" }
|
) { +"Trash ($numberOfDeletedNotes)" }
|
||||||
a(
|
a(
|
||||||
href = "/notes/new",
|
href = "/notes/new",
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
@apply text-2xl text-gray-100 font-bold;
|
@apply text-2xl text-gray-100 font-bold;
|
||||||
|
|
||||||
&:hover {
|
&:hover {
|
||||||
@apply text-blue-300 underline font-extrabold;
|
@apply text-blue-300 font-extrabold;
|
||||||
--CASL: 1;
|
--CASL: 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -26,7 +26,7 @@
|
|||||||
@apply text-gray-100 font-semibold;
|
@apply text-gray-100 font-semibold;
|
||||||
|
|
||||||
&:hover {
|
&:hover {
|
||||||
@apply underline text-blue-300 font-bold;
|
@apply text-blue-300 font-bold;
|
||||||
--CASL: 1;
|
--CASL: 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user