77 v-ripple
88 >
99 <v-icon start >mdi-shield-account</v-icon >
10- Privacidade
10+ {{ $t("privacy.title") }}
1111 <v-spacer ></v-spacer >
1212 <v-btn
1313 size =" small"
2929 <v-select
3030 v-model =" privacyData.last"
3131 :items =" WAPrivacyValue"
32- label =" Visto por último"
33- :rules =" [(v) => !!v || 'Visto por último é obrigatório']"
32+ :label =" $t('privacy.lastSeen')"
33+ :rules =" [
34+ (v) => !!v || $t('required', { field: $t('privacy.lastSeen') }),
35+ ]"
3436 density =" comfortable"
3537 prepend-inner-icon =" mdi-clock-outline"
3638 ></v-select >
3739 <v-select
3840 v-model =" privacyData.online"
3941 :items =" WAPrivacyOnlineValue"
40- label =" Online"
41- :rules =" [(v) => !!v || 'Online é obrigatório']"
42+ :label =" $t('privacy.online')"
43+ :rules =" [
44+ (v) => !!v || $t('required', { field: $t('privacy.online') }),
45+ ]"
4246 density =" comfortable"
4347 prepend-inner-icon =" mdi-cellphone"
4448 ></v-select >
4549 <v-select
4650 v-model =" privacyData.profile"
4751 :items =" WAPrivacyValue"
48- label =" Foto do Perfil"
49- :rules =" [(v) => !!v || 'Foto de Perfil é obrigatório']"
52+ :label =" $t('privacy.profilePhoto')"
53+ :rules =" [
54+ (v) => !!v || $t('required', { field: $t('privacy.profilePhoto') }),
55+ ]"
5056 density =" comfortable"
5157 prepend-inner-icon =" mdi-account-box"
5258 ></v-select >
5359 <v-select
5460 v-model =" privacyData.status"
5561 :items =" WAPrivacyValue"
56- label =" Recado (Status)"
57- :rules =" [(v) => !!v || 'Recado é obrigatório']"
62+ :label =" $t('privacy.status')"
63+ :rules =" [
64+ (v) => !!v || $t('required', { field: $t('privacy.status') }),
65+ ]"
5866 density =" comfortable"
5967 prepend-inner-icon =" mdi-text-short"
6068 ></v-select >
6169 <v-select
6270 v-model =" privacyData.readreceipts"
6371 :items =" WAReadReceiptsValue"
64- label =" Confirmação de leitura"
65- :rules =" [(v) => !!v || 'Confirmação de leitura é obrigatório']"
72+ :label =" $t('privacy.readreceipts')"
73+ :rules =" [
74+ (v) => !!v || $t('required', { field: $t('privacy.readreceipts') }),
75+ ]"
6676 density =" comfortable"
6777 prepend-inner-icon =" mdi-check-all"
6878 ></v-select >
6979 <v-select
7080 v-model =" privacyData.groupadd"
7181 :items =" WAPrivacyValue"
72- label =" Ser adicionado em grupos"
73- :rules =" [(v) => !!v || 'Ser adicionado em grupos é obrigatório']"
82+ :label =" $t('privacy.groupadd')"
83+ :rules =" [
84+ (v) => !!v || $t('required', { field: $t('privacy.groupadd') }),
85+ ]"
7486 density =" comfortable"
7587 prepend-inner-icon =" mdi-account-multiple-plus"
7688 ></v-select >
97109 @click =" savePrivacy"
98110 variant =" tonal"
99111 >
100- Salvar
112+ {{ $t("save") }}
101113 </v-btn >
102114 </v-card-actions >
103115 </v-card >
@@ -125,46 +137,54 @@ export default {
125137 required: true ,
126138 },
127139 },
128- data : () => ({
129- AppStore: useAppStore (),
130- expanded: false ,
131- loading: false ,
132- error: false ,
133- valid: false ,
134- WAPrivacyValue: [
135- { value: " all" , title: " Todos" },
136- { value: " contacts" , title: " Contatos" },
137- { value: " contact_blacklist" , title: " Contatos exeto os da lista negra" },
138- { value: " none" , title: " Ninguém" },
139- ],
140- WAPrivacyOnlineValue: [
141- { value: " all" , title: " Todos" },
142- { value: " match_last_seen" , title: " Igual ao visto por último" },
143- ],
144- WAReadReceiptsValue: [
145- { value: " all" , title: " Todos" },
146- { value: " none" , title: " Ninguém" },
147- ],
140+ data () {
141+ return {
142+ AppStore: useAppStore (),
143+ expanded: false ,
144+ loading: false ,
145+ error: false ,
146+ valid: false ,
147+ WAPrivacyValue: [
148+ { value: " all" , title: this .$t (" privacy.options.all" ) },
149+ { value: " contacts" , title: this .$t (" privacy.options.contacts" ) },
150+ {
151+ value: " contact_blacklist" ,
152+ title: this .$t (" privacy.options.contactBlacklist" ),
153+ },
154+ { value: " none" , title: this .$t (" privacy.options.none" ) },
155+ ],
156+ WAPrivacyOnlineValue: [
157+ { value: " all" , title: this .$t (" privacy.options.all" ) },
158+ {
159+ value: " match_last_seen" ,
160+ title: this .$t (" privacy.options.matchLastSeen" ),
161+ },
162+ ],
163+ WAReadReceiptsValue: [
164+ { value: " all" , title: this .$t (" privacy.options.all" ) },
165+ { value: " none" , title: this .$t (" privacy.options.none" ) },
166+ ],
148167
149- privacyData: {
150- readreceipts: " all" ,
151- profile: " all" ,
152- status: " all" ,
153- online: " all" ,
154- last: " all" ,
155- groupadd: " all" ,
156- calladd: " all" ,
157- },
158- defaultChatwootData: {
159- readreceipts: " all" ,
160- profile: " all" ,
161- status: " all" ,
162- online: " all" ,
163- last: " all" ,
164- groupadd: " all" ,
165- calladd: " all" ,
166- },
167- }),
168+ privacyData: {
169+ readreceipts: " all" ,
170+ profile: " all" ,
171+ status: " all" ,
172+ online: " all" ,
173+ last: " all" ,
174+ groupadd: " all" ,
175+ calladd: " all" ,
176+ },
177+ defaultChatwootData: {
178+ readreceipts: " all" ,
179+ profile: " all" ,
180+ status: " all" ,
181+ online: " all" ,
182+ last: " all" ,
183+ groupadd: " all" ,
184+ calladd: " all" ,
185+ },
186+ };
187+ },
168188 methods: {
169189 toggleExpanded () {
170190 if (this .loading ) return ;
@@ -190,7 +210,7 @@ export default {
190210 },
191211 async loadPrivacy () {
192212 try {
193- if (! this .isOpen ) return ;
213+ if (! this .isOpen ) return ;
194214 this .loading = true ;
195215 this .error = false ;
196216 const privacyData = await instanceController .profile .getPrivacy (
0 commit comments