Narindra ezway 3cb45b67d3 wip
2025-03-25 18:15:05 +03:00

49 lines
981 B
Vue

<template>
<div v-if="!isReadOnly" class="property-title-time-picker">
<div class="property-title-time-picker__all-day">
<NcCheckboxRadioSwitch :checked="isPrivate"
@update:checked="toggleIsPrivate">
{{ $t('calendar', 'Privé') }}
</NcCheckboxRadioSwitch>
</div>
</div>
<div v-else>
{{ getIsPrivateLabel }}
</div>
</template>
<script>
import { NcCheckboxRadioSwitch } from '@nextcloud/vue'
export default {
name: "PropertyIsPrivate",
components: {
NcCheckboxRadioSwitch,
},
props: {
isPrivate: {
type: Boolean,
default: false
},
},
computed: {
getIsPrivateLabel() {
return this.isPrivate ? this.$t('calendar', 'Privé') : this.$t('calendar', 'Mettre en privé');
}
},
methods: {
toggleIsPrivate() {
const newState = !this.isPrivate;
this.$emit('toggle-is-private',newState)
},
}
};
</script>
<style scoped>
.checkbox-container {
display: flex;
align-items: center;
gap: 8px;
}
</style>