feat: Cleanup any references to Niami
All checks were successful
Build Docker / Build Image (push) Successful in 2m38s

Niami has closed down so links to it no longer work
This commit is contained in:
2025-07-07 12:43:55 +10:00
parent 0164a9c3f2
commit 67e5276a13
5 changed files with 14 additions and 34 deletions

Binary file not shown.

View File

@@ -210,34 +210,35 @@ def dns(data, edit=False):
html_output = "" html_output = ""
index = 0 index = 0
for entry in data: for entry in data:
print(entry, flush=True)
html_output += f"<tr><td>{entry['type']}</td>\n" html_output += f"<tr><td>{entry['type']}</td>\n"
if entry['type'] != 'DS' and not entry['type'].startswith("GLUE") and not entry['type'].startswith("SYNTH"): if entry['type'] != 'DS' and not entry['type'].startswith("GLUE") and not entry['type'].startswith("SYNTH"):
for key, value in entry.items(): for key, value in entry.items():
if key != 'type': if key != 'type':
if isinstance(value, list): if isinstance(value, list):
html_output += "<td>\n" if len(value) > 1:
for val in value: html_output += '<td style="white-space: pre-wrap; font-family: monospace;">\n'
html_output += f"{val}<br>\n" for val in value:
html_output += f"{val}<br>\n"
html_output += "</td>\n" html_output += "</td>\n"
else:
html_output += f'<td style="white-space: pre-wrap; font-family: monospace;">{value[0]}</td>\n'
else: else:
html_output += f"<td>{value}</td>\n" html_output += f'<td style="white-space: pre-wrap; font-family: monospace;">{value}</td>\n'
elif entry['type'] == 'DS': elif entry['type'] == 'DS':
ds = f"{entry['keyTag']} {entry['algorithm']} {entry['digestType']} {entry['digest']}" ds = f"{entry['keyTag']} {entry['algorithm']} {entry['digestType']} {entry['digest']}"
html_output += f"<td>{ds}</td>\n" html_output += f'<td style="white-space: pre-wrap; font-family: monospace;">{ds}</td>\n'
else: else:
value = "" value = ""
for key, val in entry.items(): for key, val in entry.items():
if key != 'type': if key != 'type':
value += f'{val} ' value += f'{val} '
html_output += f"<td>{value}</td>\n" html_output += f'<td style="white-space: pre-wrap; font-family: monospace;">{value.strip()}</td>\n'
if edit: if edit:
# Remove the current entry from the list
keptRecords = str(data[:index] + data[index+1:]).replace("'", '"') keptRecords = str(data[:index] + data[index+1:]).replace("'", '"')
keptRecords = urllib.parse.quote(keptRecords) keptRecords = urllib.parse.quote(keptRecords)
html_output += f"<td><a href='edit?dns={keptRecords}'>Remove</a></td>\n" html_output += f"<td><a href='edit?dns={keptRecords}'>Remove</a></td>\n"
@@ -246,6 +247,7 @@ def dns(data, edit=False):
index += 1 index += 1
return html_output return html_output
def txs(data): def txs(data):
data = data[::-1] data = data[::-1]

View File

@@ -1,5 +1,4 @@
<span style="display: block;font-size: 12px;">TX: {{tx}}</span> <span style="display: block;font-size: 12px;">TX: {{tx}}</span>
<span style="display: block;">Check your transaction on a block explorer</span> <span style="display: block;">Check your transaction on a block explorer</span>
<a class="card-link" href="https://niami.io/tx/{{tx}}" target="_blank">Niami</a> <a class="card-link" href="https://shakeshift.com/transaction/{{tx}}" target="_blank">ShakeShift</a>
<a class="card-link" href="https://3xpl.com/handshake/transaction/{{tx}}" target="_blank">3xpl</a> <a class="card-link" href="https://3xpl.com/handshake/transaction/{{tx}}" target="_blank">3xpl</a>
<a class="card-link" href="https://shakeshift.com/transaction/{{tx}}" target="_blank">ShakeShift</a>

View File

@@ -87,27 +87,6 @@
{{dns | safe}} {{dns | safe}}
</tbody> </tbody>
</table> </table>
</div>
</div>
</div>
</div>
<div class="container-fluid" style="margin-top: 50px;">
<div class="card">
<div class="card-body">
<h4 class="card-title">History</h4><div class="table-responsive">
<table class="table">
<thead>
<tr>
<th>Action</th>
<th>TX</th>
<th>Amount</th>
<th>Time</th>
</tr>
</thead>
<tbody>
{{txs | safe}}
</tbody>
</table>
</div> </div>
</div> </div>
</div> </div>

View File

@@ -67,7 +67,7 @@
</div> </div>
<div class="card" style="max-width: 500px;margin: auto;margin-top: 50px;"> <div class="card" style="max-width: 500px;margin: auto;margin-top: 50px;">
<div class="card-body"> <div class="card-body">
<h4 class="card-title">Your transaction has been sent and will be mined soon.</h4><span style="display: block;font-size: 12px;">TX: {{tx}}</span><span style="display: block;">Check your transaction on a block explorer</span><a class="card-link" href="https://niami.io/tx/{{tx}}" target="_blank">Niami</a><a class="card-link" href="https://3xpl.com/handshake/transaction/{{tx}}" target="_blank">3xpl</a><a class="card-link" href="https://shakeshift.com/transaction/{{tx}}" target="_blank">ShakeShift</a> <h4 class="card-title">Your transaction has been sent and will be mined soon.</h4><span style="display: block;font-size: 12px;">TX: {{tx}}</span><span style="display: block;">Check your transaction on a block explorer</span><a class="card-link" href="https://shakeshift.com/transaction/{{tx}}" target="_blank">ShakeShift</a><a class="card-link" href="https://3xpl.com/handshake/transaction/{{tx}}" target="_blank">3xpl</a>
</div> </div>
</div> </div>
</div> </div>