|
68 | 68 | :loaders="{
|
69 | 69 | 'no-initial-content no-error-content no-loading-content': [caller],
|
70 | 70 | }"
|
| 71 | + :show-success="methodMeta.return.type == 'void' || !!caller.message" |
71 | 72 | style="min-height: 55px"
|
72 | 73 | >
|
73 |
| - <h3> |
74 |
| - Result: |
75 |
| - <v-btn |
76 |
| - v-if="caller.result && methodMeta.return.type == 'file'" |
77 |
| - color="primary" |
78 |
| - @click="downloadFileResult" |
79 |
| - :loading="caller.isLoading" |
80 |
| - size="x-small" |
81 |
| - outlined |
82 |
| - > |
83 |
| - <v-icon start small>fa fa-download</v-icon> |
84 |
| - Save to Disk |
85 |
| - </v-btn> |
86 |
| - </h3> |
87 |
| - |
88 |
| - <span |
89 |
| - v-if=" |
90 |
| - caller.wasSuccessful && |
91 |
| - (methodMeta.return.type == 'void' || caller.message) |
92 |
| - " |
93 |
| - class="c-method--result-success" |
94 |
| - > |
95 |
| - <v-alert type="success" dense> |
96 |
| - <span |
97 |
| - class="text-pre-wrap" |
98 |
| - v-text="caller.message || 'Success'" |
99 |
| - ></span> |
100 |
| - </v-alert> |
101 |
| - </span> |
| 74 | + <template v-if="methodMeta.return.type !== 'void'"> |
| 75 | + <h3> |
| 76 | + Result: |
| 77 | + <v-btn |
| 78 | + v-if="caller.result && methodMeta.return.type == 'file'" |
| 79 | + color="primary" |
| 80 | + @click="downloadFileResult" |
| 81 | + :loading="caller.isLoading" |
| 82 | + size="x-small" |
| 83 | + outlined |
| 84 | + > |
| 85 | + <v-icon start small>fa fa-download</v-icon> |
| 86 | + Save to Disk |
| 87 | + </v-btn> |
| 88 | + </h3> |
102 | 89 |
|
103 |
| - <div v-if="caller.result && methodMeta.return.type == 'file'"> |
104 |
| - <pre |
105 |
| - >{{ caller.result.name }} • {{ caller.result.type }} • {{ |
106 |
| - caller.result.size.toLocaleString() |
107 |
| - }} bytes</pre |
108 |
| - > |
| 90 | + <div v-if="caller.result && methodMeta.return.type == 'file'"> |
| 91 | + <pre |
| 92 | + >{{ caller.result.name }} • {{ caller.result.type }} • {{ |
| 93 | + caller.result.size.toLocaleString() |
| 94 | + }} bytes</pre |
| 95 | + > |
109 | 96 |
|
110 |
| - <br /> |
| 97 | + <br /> |
111 | 98 |
|
112 |
| - <template |
113 |
| - v-if=" |
114 |
| - fileDownloadKind == 'preview' && 'getResultObjectUrl' in caller |
115 |
| - " |
116 |
| - > |
117 |
| - <img |
118 |
| - v-if="caller.result.type.indexOf('image') >= 0" |
119 |
| - :src="caller.getResultObjectUrl(instance.proxy)" |
120 |
| - :alt="caller.result.name" |
121 |
| - class="elevation-1" |
122 |
| - style="max-width: 100%" |
123 |
| - /> |
124 |
| - <video |
125 |
| - v-else-if="caller.result.type.indexOf('video') >= 0" |
126 |
| - :src="caller.getResultObjectUrl(instance.proxy)" |
127 |
| - :alt="caller.result.name" |
128 |
| - class="elevation-1" |
129 |
| - controls |
130 |
| - style="max-width: 100%" |
131 |
| - /> |
132 |
| - <pre v-else>Unable to show preview.</pre> |
133 |
| - </template> |
134 |
| - </div> |
| 99 | + <template |
| 100 | + v-if=" |
| 101 | + fileDownloadKind == 'preview' && |
| 102 | + 'getResultObjectUrl' in caller |
| 103 | + " |
| 104 | + > |
| 105 | + <img |
| 106 | + v-if="caller.result.type.indexOf('image') >= 0" |
| 107 | + :src="caller.getResultObjectUrl(instance.proxy)" |
| 108 | + :alt="caller.result.name" |
| 109 | + class="elevation-1" |
| 110 | + style="max-width: 100%" |
| 111 | + /> |
| 112 | + <video |
| 113 | + v-else-if="caller.result.type.indexOf('video') >= 0" |
| 114 | + :src="caller.getResultObjectUrl(instance.proxy)" |
| 115 | + :alt="caller.result.name" |
| 116 | + class="elevation-1" |
| 117 | + controls |
| 118 | + style="max-width: 100%" |
| 119 | + /> |
| 120 | + <pre v-else>Unable to show preview.</pre> |
| 121 | + </template> |
| 122 | + </div> |
135 | 123 |
|
136 |
| - <c-display |
137 |
| - v-else-if=" |
138 |
| - caller.result != null && methodMeta.return.type !== 'void' |
139 |
| - " |
140 |
| - element="pre" |
141 |
| - class="c-method--result-value" |
142 |
| - v-model="caller.result" |
143 |
| - :for="methodMeta.return" |
144 |
| - :options="resultDisplayOptions" |
145 |
| - /> |
| 124 | + <c-display |
| 125 | + v-else-if="caller.result != null" |
| 126 | + element="pre" |
| 127 | + class="c-method--result-value" |
| 128 | + v-model="caller.result" |
| 129 | + :for="methodMeta.return" |
| 130 | + :options="resultDisplayOptions" |
| 131 | + /> |
146 | 132 |
|
147 |
| - <span |
148 |
| - v-else-if=" |
149 |
| - caller.wasSuccessful != null && |
150 |
| - caller.result == null && |
151 |
| - methodMeta.return.type !== 'void' |
152 |
| - " |
153 |
| - class="c-method--result-null" |
154 |
| - > |
155 |
| - <pre>{{ "" + caller.result }}</pre> |
156 |
| - </span> |
| 133 | + <span |
| 134 | + v-else-if="caller.wasSuccessful != null && caller.result == null" |
| 135 | + class="c-method--result-null" |
| 136 | + > |
| 137 | + <pre>{{ "" + caller.result }}</pre> |
| 138 | + </span> |
| 139 | + </template> |
157 | 140 | </c-loader-status>
|
158 | 141 | </v-col>
|
159 | 142 | </v-row>
|
|
0 commit comments