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
71 lines
2.0 KiB
Plaintext
71 lines
2.0 KiB
Plaintext
package islands
|
|
|
|
type Coin struct {
|
|
Ticker string
|
|
Name string
|
|
IsDefault bool
|
|
}
|
|
|
|
var defaultCoins = []Coin{
|
|
{Ticker: "SNR", Name: "Sonr", IsDefault: true},
|
|
{Ticker: "BTC", Name: "Bitcoin", IsDefault: true},
|
|
{Ticker: "ETH", Name: "Ethereum", IsDefault: true},
|
|
{Ticker: "SOL", Name: "Solana", IsDefault: false},
|
|
{Ticker: "LTC", Name: "Litecoin", IsDefault: false},
|
|
{Ticker: "DOGE", Name: "Dogecoin", IsDefault: false},
|
|
{Ticker: "XRP", Name: "Ripple", IsDefault: false},
|
|
{Ticker: "OSMO", Name: "Osmosis", IsDefault: false},
|
|
{Ticker: "ATOM", Name: "Cosmos", IsDefault: false},
|
|
{Ticker: "STARZ", Name: "Stargaze", IsDefault: false},
|
|
{Ticker: "AKT", Name: "Akash", IsDefault: false},
|
|
{Ticker: "EVMOS", Name: "Evmos", IsDefault: false},
|
|
{Ticker: "FIL", Name: "Filecoin", IsDefault: false},
|
|
{Ticker: "AXL", Name: "Axelar", IsDefault: false},
|
|
}
|
|
|
|
templ CoinSelect() {
|
|
<sl-select
|
|
label="Accounts"
|
|
name="selected_assets"
|
|
value="SNR BTC ETH"
|
|
help-text="Select Blockchains to connect with your Vault"
|
|
multiple
|
|
class="custom-tag py-2"
|
|
>
|
|
for _, a := range defaultCoins {
|
|
@CoinOption(a)
|
|
}
|
|
</sl-select>
|
|
<script>
|
|
const select = document.querySelector('.custom-tag');
|
|
select.getTag = (option, index) => {
|
|
// Use the same icon used in the <sl-option>
|
|
const name = option.querySelector('sl-icon[slot="prefix"]').name;
|
|
|
|
// You can return a string, a Lit Template, or an HTMLElement here
|
|
return `
|
|
<sl-tag removable>
|
|
<sl-icon name="${name}" library="crypto" style="padding-inline-end: .5rem;"></sl-icon>
|
|
${option.getTextLabel()}
|
|
</sl-tag>
|
|
`;
|
|
};
|
|
</script>
|
|
}
|
|
|
|
templ CoinOption(a Coin) {
|
|
if a.IsDefault {
|
|
<sl-option value={ a.Ticker } selected disabled>
|
|
<sl-icon slot="prefix" name={ a.Ticker } library="crypto"></sl-icon>
|
|
{ a.Name }
|
|
</sl-option>
|
|
<sl-divider></sl-divider>
|
|
} else {
|
|
<sl-option value={ a.Ticker }>
|
|
<sl-icon slot="prefix" name={ a.Ticker } library="crypto"></sl-icon>
|
|
{ a.Name }
|
|
</sl-option>
|
|
<sl-divider></sl-divider>
|
|
}
|
|
}
|