Skip to content

Commit

Permalink
Simplify code
Browse files Browse the repository at this point in the history
Signed-off-by: Florian Hotze <dev@florianhotze.com>
  • Loading branch information
florian-h05 committed Oct 27, 2024
1 parent 3b58c1b commit 1124d28
Showing 1 changed file with 1 addition and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,8 @@
<!-- Render result as a list item, works without action output definition from REST -->
<f7-list-item v-if="key === 'result'" :key="key" :floating-label="$theme.md" :title="action.outputs.find(o => o.name === key)?.label || 'Result'" :footer="action.outputs.find(o => o.name === key)?.description" :after="actionOutput[key].toString()" />
<!-- Render QR code if the key is qrCode -->
<f7-list-item v-else-if="key === 'qrCode'" :key="key" :floating-label="$theme.md" :title="action.outputs.find(o => o.name === key)?.label || 'QR Code'" :footer="action.outputs.find(o => o.name === key)?.description">
<vue-qrcode :value="actionOutput[key]" slot="after" />
</f7-list-item>
<!-- Render QR code if the action output type is qrCode in the action output definition from REST -->
<f7-list-item v-else-if="action.outputs.find(o => o.name === key)?.type === 'qrCode'" :key="key" :floating-label="$theme.md" :title="action.outputs.find(o => o.name === key).label" :footer="action.outputs.find(o => o.name === key)?.description">
<f7-list-item v-else-if="key === 'qrCode' || action.outputs.find(o => o.name === key)?.type === 'qrCode'" :key="key" :floating-label="$theme.md" :title="action.outputs.find(o => o.name === key)?.label || 'QR Code'" :footer="action.outputs.find(o => o.name === key)?.description">
<vue-qrcode :value="actionOutput[key]" slot="after" />
</f7-list-item>
<!-- Render other keys as list items with the label defined by the action output definition from REST or the key as label -->
Expand Down

0 comments on commit 1124d28

Please sign in to comment.