Feat(Docs): Added link to electrum methdos docs

This commit is contained in:
2025-05-30 05:13:09 +00:00
committed by Jim Hamill
parent 96a50f071d
commit 820c98c21c
3 changed files with 12 additions and 0 deletions
@@ -53,6 +53,10 @@
<select v-model="state.selectedMethod">
<option v-for="method of state.methods" :key="method.label" :value="method">{{ method.label }}</option>
</select>
<!-- Display a hint if the selected method has one -->
<div v-if="state.selectedMethod && state.selectedMethod.hint" class="hint-container">
<div v-html="state.selectedMethod.hint"></div>
</div>
</div>
<div v-if="state.selectedMethod" class="form-group input-group" :class="{ 'extended': state.selectedMethod.extendedInput }">
<template v-for="(_input, i) of state.selectedMethod.inputs" :key="i">
@@ -156,6 +160,9 @@ export interface Method<Primitive> {
// Whether the input is extended onto a new line
extendedInput?: boolean
// Hint for the input
hint?: string,
}
export interface Props<Primitive> {
@@ -171,6 +171,10 @@
color: #f46666;
}
.hint-container {
margin-top: 5px;
}
/* Mobile responsiveness */
@media (max-width: 768px) {
.select-group {
@@ -33,6 +33,7 @@ export const electrumClient = {
inputs: ['Method', 'Parameters'],
dynamicInputs: true,
models: ['', ''],
hint: '<div>For a list of supported methods, see the <a href="https://electrum-cash-protocol.readthedocs.io/en/latest/protocol-methods.html" target="_blank">Electrum Protocol Documentation</a></div>',
callback: async (
electrum: BlockchainElectrum,
args: [string, string],