wiz avatar spa
This commit is contained in:
parent
997fa43aad
commit
e3e0baed24
3 changed files with 26 additions and 16 deletions
BIN
static/img/xLightningPub.png
Normal file
BIN
static/img/xLightningPub.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 3.3 KiB |
|
|
@ -38,23 +38,27 @@
|
||||||
<input type="text" placeholder="Nodey McNodeFace" value="" style="width: 100%" id="nodeName" />
|
<input type="text" placeholder="Nodey McNodeFace" value="" style="width: 100%" id="nodeName" />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="input-group" style="margin-top: 38px">
|
|
||||||
<span>If you want to use a specific Nostr relay, enter it now:</span>
|
|
||||||
<input type="text" placeholder="wss://relay.lightning.pub" style="width: 100%" id="relayUrl" />
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="input-group" style="margin-top: 20px">
|
<div class="input-group" style="margin-top: 20px">
|
||||||
<span>Avatar URL (shown in wallet):</span>
|
<span>Avatar (shown in wallet):</span>
|
||||||
<input type="text" placeholder="https://example.com/avatar.png" style="width: 100%" id="avatarUrl" />
|
<div style="display:flex; align-items:center; gap:12px; width:100%;">
|
||||||
|
<img id="avatarPreview" src="" alt="avatar" style="width:56px;height:56px;border-radius:6px;object-fit:cover;box-shadow:0 0 2px rgba(0,0,0,1);" />
|
||||||
|
<input type="text" placeholder="" style="flex:1" id="avatarUrl" />
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="checkbox" style="margin-top: 12px">
|
<div class="input-group" style="margin-top: 28px">
|
||||||
<input type="checkbox" id="customCheckbox" />
|
<span>If you want to use a specific Nostr relay, enter it now:</span>
|
||||||
<div class="checkbox-shape"></div>
|
<div style="display:flex; flex-direction: column; gap:10px; width:100%;">
|
||||||
<label for="customCheckbox">
|
<input type="text" placeholder="wss://relay.lightning.pub" style="width: 100%" id="relayUrl" />
|
||||||
Use the default managed relay service and auto-pay 1000 sats
|
<div class="checkbox" style="margin-top: 0">
|
||||||
per month to support developers
|
<input type="checkbox" id="customCheckbox" />
|
||||||
</label>
|
<div class="checkbox-shape"></div>
|
||||||
|
<label for="customCheckbox">
|
||||||
|
Use the default managed relay service and auto-pay 1000 sats
|
||||||
|
per month to support developers
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
|
|
|
||||||
|
|
@ -10,6 +10,7 @@ $(() => {
|
||||||
const nodeNameInput = $("#nodeName");
|
const nodeNameInput = $("#nodeName");
|
||||||
const relayUrlInput = $("#relayUrl");
|
const relayUrlInput = $("#relayUrl");
|
||||||
const avatarUrlInput = $("#avatarUrl");
|
const avatarUrlInput = $("#avatarUrl");
|
||||||
|
const avatarPreview = $("#avatarPreview");
|
||||||
const customCheckbox = $("#customCheckbox");
|
const customCheckbox = $("#customCheckbox");
|
||||||
const automateLiquidityRadio = $("#automate");
|
const automateLiquidityRadio = $("#automate");
|
||||||
const manualLiquidityRadio = $("#manual");
|
const manualLiquidityRadio = $("#manual");
|
||||||
|
|
@ -130,10 +131,15 @@ $(() => {
|
||||||
} else {
|
} else {
|
||||||
relayUrlInput.val(state.relay_url);
|
relayUrlInput.val(state.relay_url);
|
||||||
}
|
}
|
||||||
const robo = state.app_id ? `https://robohash.org/${encodeURIComponent(state.app_id)}.png?size=256x256&set=set3` : ''
|
const robo = state.app_id ? `https://robohash.org/${encodeURIComponent(state.app_id)}.png?size=128x128&set=set3` : ''
|
||||||
avatarUrlInput.attr('placeholder', robo || 'https://example.com/avatar.png')
|
|
||||||
if (state.avatar_url) {
|
if (state.avatar_url) {
|
||||||
avatarUrlInput.val(state.avatar_url);
|
avatarUrlInput.val(state.avatar_url);
|
||||||
|
avatarPreview.attr('src', state.avatar_url)
|
||||||
|
} else if (robo) {
|
||||||
|
avatarPreview.attr('src', robo)
|
||||||
|
}
|
||||||
|
if (robo) {
|
||||||
|
avatarUrlInput.attr('placeholder', robo)
|
||||||
}
|
}
|
||||||
syncRelayState();
|
syncRelayState();
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue