Merge branch 'electrum-request-link' into 'development'
Feat(Docs): Added link to electrum methdos docs See merge request GeneralProtocols/xo/stack!89
This commit is contained in:
@@ -53,6 +53,10 @@
|
|||||||
<select v-model="state.selectedMethod">
|
<select v-model="state.selectedMethod">
|
||||||
<option v-for="method of state.methods" :key="method.label" :value="method">{{ method.label }}</option>
|
<option v-for="method of state.methods" :key="method.label" :value="method">{{ method.label }}</option>
|
||||||
</select>
|
</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>
|
||||||
<div v-if="state.selectedMethod" class="form-group input-group" :class="{ 'extended': state.selectedMethod.extendedInput }">
|
<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">
|
<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
|
// Whether the input is extended onto a new line
|
||||||
extendedInput?: boolean
|
extendedInput?: boolean
|
||||||
|
|
||||||
|
// Hint for the input
|
||||||
|
hint?: string,
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface Props<Primitive> {
|
export interface Props<Primitive> {
|
||||||
|
|||||||
@@ -171,6 +171,10 @@
|
|||||||
color: #f46666;
|
color: #f46666;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.hint-container {
|
||||||
|
margin-top: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
/* Mobile responsiveness */
|
/* Mobile responsiveness */
|
||||||
@media (max-width: 768px) {
|
@media (max-width: 768px) {
|
||||||
.select-group {
|
.select-group {
|
||||||
|
|||||||
@@ -33,6 +33,7 @@ export const electrumClient = {
|
|||||||
inputs: ['Method', 'Parameters'],
|
inputs: ['Method', 'Parameters'],
|
||||||
dynamicInputs: true,
|
dynamicInputs: true,
|
||||||
models: ['', ''],
|
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 (
|
callback: async (
|
||||||
electrum: BlockchainElectrum,
|
electrum: BlockchainElectrum,
|
||||||
args: [string, string],
|
args: [string, string],
|
||||||
|
|||||||
Reference in New Issue
Block a user