@burh/nuxt-core 1.1.8 → 1.1.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,10 +1,10 @@
1
- {
2
- "editor.rulers": [120, 140],
3
- "editor.formatOnSave": false,
4
-
5
- "eslint.packageManager": "yarn",
6
-
7
- "editor.codeActionsOnSave": {
8
- "source.fixAll.eslint": "explicit"
9
- },
10
- }
1
+ {
2
+ "editor.rulers": [120, 140],
3
+ "editor.formatOnSave": false,
4
+
5
+ "eslint.packageManager": "yarn",
6
+
7
+ "editor.codeActionsOnSave": {
8
+ "source.fixAll.eslint": "explicit"
9
+ },
10
+ }
@@ -0,0 +1,156 @@
1
+ <template>
2
+ <div class="user__note__baloon">
3
+ <div class="notes-baloon fullsize">
4
+ <div class="notes-text mx-3 pt-1">
5
+ <p class="mt-3">{{ comment.comment }}</p>
6
+ </div>
7
+
8
+ <div
9
+ class="d-flex justify-content-between align-items-center mx-3"
10
+ >
11
+ <p v-if="hasAction" @click.prevent="hasCommentRemove = !hasCommentRemove" class="notes-date remove-baloon">
12
+ Excluir
13
+ </p>
14
+
15
+ <p class="notes-date">
16
+ {{ comment.created_at | convertDate }}
17
+ </p>
18
+ </div>
19
+ </div>
20
+
21
+ <div v-if="hasAction && hasCommentRemove" class="archive-remove">
22
+ <p>Você tem certeza que deseja apagar este comentário?</p>
23
+ <div class="d-flex">
24
+ <base-button
25
+ @click="removeComment(comment.id)"
26
+ size="sm"
27
+ class="btn-outline-primary col-6 p-1"
28
+ >
29
+ Apagar
30
+ </base-button>
31
+ <base-button
32
+ @click="hasCommentRemove = false"
33
+ size="sm"
34
+ class="btn-outline-danger col-6 p-1"
35
+ >
36
+ Cancelar
37
+ </base-button>
38
+ </div>
39
+ </div>
40
+
41
+ <div class="notes-owner d-flex mt-2">
42
+ <avatar
43
+ :src="userData.urlAvatar"
44
+ :alt="userData.name"
45
+ :fallbackText="userData.name"
46
+ />
47
+
48
+ <p class="ml-1">
49
+ {{ userData.name }}
50
+ </p>
51
+ </div>
52
+ </div>
53
+ </template>
54
+
55
+ <script>
56
+ import Avatar from '../../../Img/ImageWithFallback.vue';
57
+
58
+ export default {
59
+ name: 'user-note-baloon',
60
+ components: {
61
+ Avatar
62
+ },
63
+ props: {
64
+ comment: {
65
+ type: Object,
66
+ default: () => ({})
67
+ },
68
+ hasAction: {
69
+ type: Boolean,
70
+ default: true
71
+ }
72
+ },
73
+ data() {
74
+ return {
75
+ hasCommentRemove: false
76
+ };
77
+ },
78
+ computed: {
79
+ userData() {
80
+ if (this.comment.user) {
81
+ return this.comment.user;
82
+ }
83
+
84
+ return {
85
+ urlAvatar: null,
86
+ name: 'Anônimo'
87
+ };
88
+ }
89
+ },
90
+ filters: {
91
+ convertDate(data) {
92
+ if (typeof data !== 'string') {
93
+ data = '2020-01-01 12:00:00';
94
+ }
95
+ let d = new Date(data);
96
+ let options = { hour: '2-digit', minute: '2-digit' };
97
+ return d.toLocaleDateString('pt-BR', options);
98
+ }
99
+ },
100
+ methods: {
101
+ removeComment(commentId) {
102
+ this.$emit('remove-comment', commentId);
103
+ this.hasCommentRemove = false;
104
+ }
105
+ }
106
+ };
107
+ </script>
108
+
109
+ <style lang="scss" scoped>
110
+ .user__note__baloon {
111
+ margin-bottom: 16px;
112
+
113
+ .notes {
114
+ &-baloon {
115
+ width: 231px;
116
+ height: auto;
117
+ border-radius: 10px 10px 10px 0;
118
+ background: #eff5fd;
119
+ &.fullsize {
120
+ width: 80%!important;
121
+ min-width: 280px;
122
+ }
123
+ }
124
+ &-text {
125
+ p {
126
+ font-size: 13px;
127
+ color: #62778c;
128
+ }
129
+ }
130
+ &-date {
131
+ font-size: 11px;
132
+ text-align: right;
133
+ color: #8da2b5;
134
+ top: calc(50% - 17px / 2 - 444.5px);
135
+ }
136
+ &-owner {
137
+ img {
138
+ width: 23px;
139
+ height: 23px;
140
+ border-radius: 50%;
141
+ }
142
+ p {
143
+ font-size: 13px;
144
+ font-weight: 600;
145
+ text-transform: uppercase;
146
+
147
+ color: #62778c;
148
+ }
149
+ }
150
+ }
151
+
152
+ .remove-baloon{
153
+ cursor: pointer;
154
+ }
155
+ }
156
+ </style>