@@ -18,9 +18,14 @@ const d = Object.fromEntries(Object.entries(data.doveadm).filter(([k, v]) =>
1818 (v .tags .includes (props .tag ))))
1919).sort ())
2020
21- let apiComponent = ref ({})
22- function httpApiClick (k ) {
23- apiComponent .value [k] = ' DoveadmHttpApiComponent'
21+ const cliComponent = ref ({})
22+ function cliClick (k ) {
23+ cliComponent .value [k] = ' DoveadmCliComponent'
24+ }
25+
26+ const httpComponent = ref ({})
27+ function httpClick (k ) {
28+ httpComponent .value [k] = ' DoveadmHttpApiComponent'
2429}
2530 </script >
2631
@@ -99,41 +104,15 @@ function httpApiClick(k) {
99104
100105 <div v-if =" v.text" v-html =" v.text" />
101106
102- <div class =" info custom-block" >
103- <p class =" custom-block-title" >CLI</p >
104- <div >
105- <ul >
106- <li >Usage: <code >doveadm {{ v.usage }}</code ></li >
107- </ul >
108-
109- <table v-if =" v.args" >
110- <thead >
111- <tr >
112- <th >Argument(s)</th >
113- <th >Type</th >
114- <th >Description</th >
115- <th >Example</th >
116- </tr >
117- </thead >
118- <tbody >
119- <template v-for =" elem in v .args " >
120- <tr >
121- <td ><code >{{ elem.flag }}</code ></td >
122- <td >{{ elem.type }}</td >
123- <td v-html =" elem.text" />
124- <td ><code v-if =" elem.example !== undefined" >{{ JSON.stringify(elem.example) }}</code ></td >
125- </tr >
126- </template >
127- </tbody >
128- </table >
129- </div >
130- </div >
107+ <details @click.capture.once =" cliClick(k)" class =" details custom-block" >
108+ <summary >CLI</summary >
109+ <component v-if =" cliComponent[k]" :is =" cliComponent[k]" :data =" v" />
110+ </details >
131111
132- <details v-if =" v.args" @click.capture.once =" httpApiClick (k)" class =" details custom-block" >
112+ <details v-if =" v.args" @click.capture.once =" httpClick (k)" class =" details custom-block" >
133113 <summary v-html =" data.http_api_link" />
134- <component v-if =" apiComponent [k]" :is =" apiComponent [k]" :data =" v" />
114+ <component v-if =" httpComponent [k]" :is =" httpComponent [k]" :data =" v" />
135115 </details >
136-
137116 </article >
138117 </section >
139118</template >
0 commit comments