Skip to content

Commit

Permalink
Merge pull request #210 from silinternational/fix-safari-bug
Browse files Browse the repository at this point in the history
Fix remove mfa bug and breakpoints
  • Loading branch information
hobbitronics authored Jan 27, 2025
2 parents e06db7a + 3978328 commit 5e11d69
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/global/mfa.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ export const verifyWebauthn = async (id, verification = '', label = '') => {

export const removeWebauthn = async (mfaId, webauthnId) => {
await api.delete(`mfa/${mfaId}/webauthn/${webauthnId}`)
const index = mfa.keys.data.findIndex((m) => m.id === mfaId)
const index = mfa.keys.data.findIndex((m) => m.id === webauthnId)
if (index > -1) {
mfa.keys.data.splice(index, 1)
}
Expand Down
9 changes: 9 additions & 0 deletions src/plugins/vuetify.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,15 @@ import * as directives from 'vuetify/directives'

const vuetify = createVuetify({
theme: {
breakpoints: {
thresholds: {
xs: 0,
sm: 600,
md: 960,
lg: 1264,
xl: 1904, // Match Vuetify 2 breakpoints
},
},
themes: {
light: {
colors: {
Expand Down
21 changes: 19 additions & 2 deletions src/profile/ProfileWizard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,13 @@
<template v-for="_step in steps" :key="`step-${_step.id}`">
<v-stepper-item
:value="_step.id"
:icon="toIcon(_step.state)"
:complete-icon="toIcon(_step.state)"
:color="toColor(_step.state)"
:complete="_step.state === 'complete'"
:title="$t(`${_step.nameKey}`)"
>
<template #title>
<span :class="{ 'max-width text-truncate d-inline-block': isMd }">{{ $t(`${_step.nameKey}`) }}</span>
</template>
</v-stepper-item>

<v-divider v-if="hasMoreSteps(_step)" :key="`divider-${_step.id}`" />
Expand All @@ -29,8 +31,17 @@

<script>
import Steps from './steps'
import { useDisplay } from 'vuetify'
export default {
setup() {
const { mdAndDown, smAndDown } = useDisplay()
return {
isMd: mdAndDown,
isSm: smAndDown,
}
},
data: () => ({
steps: Steps.steps,
currentStep: {},
Expand Down Expand Up @@ -74,3 +85,9 @@ export default {
},
}
</script>

<style>
.max-width {
max-width: 120px;
}
</style>

0 comments on commit 5e11d69

Please sign in to comment.