mirror of
https://github.com/onsonr/sonr.git
synced 2025-03-10 21:09:11 +00:00
* fix: correct HTTP error handling in gateway * refactor: migrate database and ORM to internal modules * feat: introduce taskfile build system for improved workflow management * refactor: update taskfiles to use relative paths * feat: add profile status field * refactor: move rendering logic to context package * fix: improve error handling in credentials retrieval * refactor: optimize HTTP request handling in Wasm environment * refactor: refactor config loading in motr command * chore: add process-compose for service management * chore: remove default task and update gum format command * fix: update project dependencies * refactor: improve code readability and maintainability * refactor: consolidate error handling components * refactor: update index handler to use new context package * refactor: consolidate database scripts and move to deploy directory * feat: Update flake.nix with development tools and environment configuration * fix: ignore flake.lock file * refactor: migrate build process to use taskfiles for improved modularity and maintainability * refactor: improve GatewayContext and reorganize handlers * refactor: Remove unused profile creation functions * (chore): templ generation * test: add test file for vaults.go * maintenance: remove defunct Discord server link * docs: update checks workflow documentation * test: remove obsolete vaults test file * refactor: move version bumping logic to release workflow
46 lines
1.4 KiB
Plaintext
46 lines
1.4 KiB
Plaintext
package islands
|
|
|
|
type HandleState string
|
|
|
|
const (
|
|
HandleStateInitial HandleState = "inital"
|
|
HandleStateValid HandleState = "valid"
|
|
HandleStateInvalid HandleState = "invalid"
|
|
)
|
|
|
|
func (s HandleState) string() string {
|
|
return string(s)
|
|
}
|
|
|
|
templ InputHandle() {
|
|
<div hx-target="this" hx-swap="outerHTML">
|
|
<sl-input name="handle" placeholder="digitalgold" type="text" label="Handle" minlength="4" maxlength="12" required hx-post="/register/profile" hx-indicator="#handle-indicator" autofocus>
|
|
<div slot="prefix">
|
|
<sl-icon name="at-sign" library="sonr"></sl-icon>
|
|
</div>
|
|
</sl-input>
|
|
</div>
|
|
<br/>
|
|
}
|
|
|
|
templ InputHandleError(value string, helpText string) {
|
|
<sl-input name="handle" placeholder="digitalgold" type="text" label="Handle" minlength="4" maxlength="12" required class="border-red-500" value={ value } help-text={ helpText }>
|
|
<div slot="prefix">
|
|
<sl-icon name="at-sign" library="sonr"></sl-icon>
|
|
</div>
|
|
<div slot="suffix" style="color: #B54549;">
|
|
<sl-icon name="x"></sl-icon>
|
|
</div>
|
|
</sl-input>
|
|
<br/>
|
|
}
|
|
|
|
templ InputHandleSuccess(value string) {
|
|
<sl-input name="handle" placeholder="digitalgold" type="text" label="Handle" minlength="4" maxlength="12" required class="border-green-500" value={ value } disabled>
|
|
<div slot="prefix" style="color: #46A758;">
|
|
<sl-icon name="at-sign" library="sonr"></sl-icon>
|
|
</div>
|
|
</sl-input>
|
|
<br/>
|
|
}
|