mirror of
https://github.com/baserow/baserow.git
synced 2026-12-04 16:28:31 +00:00
Update the nuxt3 version. Co-authored-by: Jonathan Adeline <jonathan@baserow.io> Co-authored-by: Bram Wiepjes <bramw@protonmail.com> Co-authored-by: Cezary <cezary@baserow.io> Co-authored-by: Tsering Paljor <tsering@baserow.io> Co-authored-by: Przemyslaw Kukulski <przemyslaw+gh@baserow.io> Co-authored-by: Bram <bram2w@users.noreply.github.com>
79 lines
1.7 KiB
Vue
79 lines
1.7 KiB
Vue
<template>
|
|
<div>
|
|
<div
|
|
class="auth-provider-with-modal"
|
|
:class="{ 'auth-provider-with-modal--error': inError }"
|
|
>
|
|
<Presentation
|
|
class="flex-grow-1"
|
|
:title="authProviderType.getProviderName(authProvider)"
|
|
size="medium"
|
|
avatar-color="neutral"
|
|
:image="authProviderType.getIcon()"
|
|
@click="onEdit"
|
|
/>
|
|
<div class="auth-provider-with-modal__actions">
|
|
<ButtonIcon
|
|
type="secondary"
|
|
icon="iconoir-edit"
|
|
@click.prevent="onEdit"
|
|
/>
|
|
<ButtonIcon
|
|
type="secondary"
|
|
icon="iconoir-bin"
|
|
@click.prevent="onDelete"
|
|
/>
|
|
</div>
|
|
</div>
|
|
<div v-if="inError" class="error">
|
|
{{ $t('authProviderWithModal.authProviderInError') }}
|
|
</div>
|
|
<Modal ref="modal" keep-content @hidden="onHide">
|
|
<h2 class="box__title">
|
|
{{ $t('authProviderWithModal.title', { name: authProviderType.name }) }}
|
|
</h2>
|
|
<div>
|
|
<slot name="default"></slot>
|
|
<div class="actions actions--right">
|
|
<Button size="large" @click.prevent="$refs.modal.hide()">
|
|
{{ $t('action.close') }}
|
|
</Button>
|
|
</div>
|
|
</div>
|
|
</Modal>
|
|
</div>
|
|
</template>
|
|
|
|
<script>
|
|
export default {
|
|
name: 'AuthProviderWithModal',
|
|
props: {
|
|
authProviderType: {
|
|
type: Object,
|
|
required: true,
|
|
},
|
|
authProvider: {
|
|
type: Object,
|
|
required: true,
|
|
},
|
|
inError: {
|
|
type: Boolean,
|
|
required: false,
|
|
default: false,
|
|
},
|
|
},
|
|
emits: ['delete', 'hidden'],
|
|
methods: {
|
|
onEdit() {
|
|
this.$refs.modal.show()
|
|
},
|
|
onDelete() {
|
|
this.$emit('delete')
|
|
},
|
|
onHide() {
|
|
this.$emit('hidden')
|
|
},
|
|
},
|
|
}
|
|
</script>
|