Remove debug logs and fix Google button dark mode
🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
7
main.go
7
main.go
@@ -28,16 +28,11 @@ var (
|
||||
)
|
||||
|
||||
func init() {
|
||||
log.Println("starting up")
|
||||
|
||||
templates = template.Must(template.New("").ParseGlob("static/*.html"))
|
||||
template.Must(templates.ParseGlob("static/*.js"))
|
||||
|
||||
pgconn := os.Getenv("PGCONN")
|
||||
log.Println("connecting to database:", pgconn[:min(len(pgconn), 30)]+"...")
|
||||
|
||||
var err error
|
||||
db, err = sql.Open("postgres", pgconn)
|
||||
db, err = sql.Open("postgres", os.Getenv("PGCONN"))
|
||||
if err != nil {
|
||||
log.Fatal("[ERROR] failed to open database: ", err)
|
||||
}
|
||||
|
||||
@@ -81,10 +81,11 @@ export async function auth() {
|
||||
}
|
||||
});
|
||||
|
||||
const isDark = window.matchMedia('(prefers-color-scheme: dark)').matches;
|
||||
google.accounts.id.renderButton(signin, {
|
||||
type: 'standard',
|
||||
size: 'large',
|
||||
theme: 'outline',
|
||||
theme: isDark ? 'filled_black' : 'outline',
|
||||
text: 'sign_in_with',
|
||||
shape: 'rectangular',
|
||||
logo_alignment: 'left'
|
||||
|
||||
Reference in New Issue
Block a user