app avatar
This commit is contained in:
parent
e4d9eae241
commit
0afe29b99b
12 changed files with 139 additions and 48 deletions
|
|
@ -19,7 +19,7 @@
|
|||
<body>
|
||||
<header>
|
||||
<img src="img/pub_logo.png" width="38px" height="auto" alt="Lightning Pub logo" />
|
||||
<img src="img/LightningPub.png" height="33px" alt="Lightning Pub logo" />
|
||||
<img src="img/LightningPub.png" height="26px" alt="Lightning Pub logo" />
|
||||
</header>
|
||||
|
||||
<main>
|
||||
|
|
@ -43,6 +43,11 @@
|
|||
<input type="text" placeholder="wss://relay.lightning.pub" style="width: 100%" id="relayUrl" />
|
||||
</div>
|
||||
|
||||
<div class="input-group" style="margin-top: 20px">
|
||||
<span>Avatar URL (shown in wallet):</span>
|
||||
<input type="text" placeholder="https://example.com/avatar.png" style="width: 100%" id="avatarUrl" />
|
||||
</div>
|
||||
|
||||
<div class="checkbox" style="margin-top: 12px">
|
||||
<input type="checkbox" id="customCheckbox" />
|
||||
<div class="checkbox-shape"></div>
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@ $(() => {
|
|||
// Inputs
|
||||
const nodeNameInput = $("#nodeName");
|
||||
const relayUrlInput = $("#relayUrl");
|
||||
const avatarUrlInput = $("#avatarUrl");
|
||||
const customCheckbox = $("#customCheckbox");
|
||||
const automateLiquidityRadio = $("#automate");
|
||||
const manualLiquidityRadio = $("#manual");
|
||||
|
|
@ -80,6 +81,7 @@ $(() => {
|
|||
relay_url: relayUrl,
|
||||
automate_liquidity: automateLiquidityRadio.prop('checked'),
|
||||
push_backups_to_nostr: backupNostrRadio.prop('checked'),
|
||||
avatar_url: avatarUrlInput.val()
|
||||
};
|
||||
|
||||
try {
|
||||
|
|
@ -128,6 +130,11 @@ $(() => {
|
|||
} else {
|
||||
relayUrlInput.val(state.relay_url);
|
||||
}
|
||||
const robo = state.app_id ? `https://robohash.org/${encodeURIComponent(state.app_id)}.png?size=256x256&set=set3` : ''
|
||||
avatarUrlInput.attr('placeholder', robo || 'https://example.com/avatar.png')
|
||||
if (state.avatar_url) {
|
||||
avatarUrlInput.val(state.avatar_url);
|
||||
}
|
||||
syncRelayState();
|
||||
|
||||
if (state.automate_liquidity) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue