Feat(Docs): Added link to electrum methdos docs
This commit is contained in:
@@ -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],
|
||||
|
||||
Reference in New Issue
Block a user