UserBox.vue 1.04 KB
Newer Older
abergavenny's avatar
abergavenny committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
<script setup>
import SectionTitle from '@/components/SectionTitle.vue'
import { useApartmentStore } from '@/stores/apartments'

defineEmits(['onChangePassword'])

const apartments = useApartmentStore()
</script>

<template>
  <div class="user-box basic">
    <div class="user-box__content">
      <SectionTitle value="Benutzername für die Wohneinheit" />
      <span>{{ apartments.owner.username }}</span>
    </div>
    <div class="user-box__content">
      <button class="button primary" type="button" @click="$emit('onChangePassword')">
        <span>Passwort ändern</span>
      </button>
    </div>
  </div>
</template>

<style scoped>
.user-box {
  padding: var(--spacing);
  display: flex;
  flex-direction: column;
  gap: var(--spacing);
  align-items: center;
  border-radius: var(--radius);
}

@media (min-width: 48em) {
  .user-box {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
  }
}

.user-box__content {
  width: 100%;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
</style>