Signup/Login + styling adjustments
- Modified SearchBar styling - Modified TopBar to display blank circle if the user has no networks (previously missing image icon) - Refactored Login into AuthPage.js - AuthPage contains a tab selector for switching between Signup and Login - Both Login/Signup send the request and either receive an auth_token or an error message - If auth_token, user will be logged in as usual, in both cases - Signup validates user input before sending request - Added /signup target in vite config file
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
css(`
|
||||
searchbar- input::placeholder {
|
||||
color: #5C504D
|
||||
color: #5C504D;
|
||||
}
|
||||
`)
|
||||
|
||||
@@ -36,7 +36,7 @@ class SearchBar extends Shadow {
|
||||
.paddingVertical(0.75, em)
|
||||
.boxSizing("border-box")
|
||||
.paddingHorizontal(1, em)
|
||||
.background("var(--darkaccent)")
|
||||
.background("var(--searchbackground)")
|
||||
.color("var(--accent)")
|
||||
.marginBottom(1, em)
|
||||
.border("1px solid var(--accent)")
|
||||
|
||||
@@ -3,19 +3,28 @@ import util from "../util.js"
|
||||
class TopBar extends Shadow {
|
||||
render() {
|
||||
HStack(() => {
|
||||
img(`${util.HOST}/db/images/${global.currentNetwork.logo}`, "2.5em", "2.5em")
|
||||
.borderRadius("50", pct)
|
||||
.objectFit("cover")
|
||||
.padding(0.3, em)
|
||||
.background("var(--accent)")
|
||||
.onTouch(function (start) {
|
||||
if(start) {
|
||||
this.style.scale = "0.8"
|
||||
} else if(start === false) {
|
||||
this.style.scale = ""
|
||||
$("sidebar-").toggle()
|
||||
}
|
||||
})
|
||||
if (global.currentNetwork.logo) {
|
||||
img(`${util.HOST}/db/images/${global.currentNetwork.logo}`, "2.5em", "2.5em")
|
||||
.borderRadius("50", pct)
|
||||
.objectFit("cover")
|
||||
.padding(0.3, em)
|
||||
.background("var(--accent)")
|
||||
.onTouch(function (start) {
|
||||
if(start) {
|
||||
this.style.scale = "0.8"
|
||||
} else if(start === false) {
|
||||
this.style.scale = ""
|
||||
$("sidebar-").toggle()
|
||||
}
|
||||
})
|
||||
} else {
|
||||
HStack(() => { })
|
||||
.height(2.5, em)
|
||||
.width(2.5, em)
|
||||
.padding(0.3, em)
|
||||
.background("var(--accent)")
|
||||
.borderRadius("50", pct)
|
||||
}
|
||||
|
||||
p(global.currentApp())
|
||||
.color("var(--headertext)")
|
||||
|
||||
Reference in New Issue
Block a user