Skip to content

Commit 0b5ce4e

Browse files
authored
Merge pull request #59423 from nextcloud/fix/webauthn-list
fix(settings): hide list of webauthn devices if empty
2 parents 13583e8 + 2fd8961 commit 0b5ce4e

3 files changed

Lines changed: 16 additions & 14 deletions

File tree

apps/settings/src/components/WebAuthn/WebAuthnSection.vue

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -9,20 +9,22 @@
99
<p class="settings-hint hidden-when-empty">
1010
{{ t('settings', 'Set up your account for passwordless authentication following the FIDO2 standard.') }}
1111
</p>
12+
1213
<NcNoteCard v-if="devices.length === 0" type="info">
1314
{{ t('settings', 'No devices configured.') }}
1415
</NcNoteCard>
15-
16-
<h3 v-else id="security-webauthn__active-devices">
17-
{{ t('settings', 'The following devices are configured for your account:') }}
18-
</h3>
19-
<ul aria-labelledby="security-webauthn__active-devices" class="security-webauthn__device-list">
20-
<WebAuthnDevice
21-
v-for="device in sortedDevices"
22-
:key="device.id"
23-
:name="device.name"
24-
@delete="deleteDevice(device.id)" />
25-
</ul>
16+
<template v-else>
17+
<h3 id="security-webauthn__active-devices">
18+
{{ t('settings', 'The following devices are configured for your account:') }}
19+
</h3>
20+
<ul aria-labelledby="security-webauthn__active-devices" class="security-webauthn__device-list">
21+
<WebAuthnDevice
22+
v-for="device in sortedDevices"
23+
:key="device.id"
24+
:name="device.name"
25+
@delete="deleteDevice(device.id)" />
26+
</ul>
27+
</template>
2628

2729
<NcNoteCard v-if="!supportsWebauthn" type="warning">
2830
{{ t('settings', 'Your browser does not support WebAuthn.') }}

dist/settings-vue-settings-personal-webauthn.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/settings-vue-settings-personal-webauthn.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)