|
@@ -59,7 +59,19 @@
|
|
v-model="user.bio"
|
|
v-model="user.bio"
|
|
/>
|
|
/>
|
|
</p>
|
|
</p>
|
|
- <button class="button is-primary" @click="saveChangesProfile()">
|
|
|
|
|
|
+ <div class="control is-expanded avatar-select">
|
|
|
|
+ <label>Avatar</label>
|
|
|
|
+ <div class="select">
|
|
|
|
+ <select v-model="user.avatar.type">
|
|
|
|
+ <option value="gravatar">Using Gravatar</option>
|
|
|
|
+ <option value="initials">Based on initials</option>
|
|
|
|
+ </select>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ <button
|
|
|
|
+ class="button is-primary"
|
|
|
|
+ @click="saveChangesToProfile()"
|
|
|
|
+ >
|
|
Save changes
|
|
Save changes
|
|
</button>
|
|
</button>
|
|
</div>
|
|
</div>
|
|
@@ -84,7 +96,10 @@
|
|
v-model="user.email.address"
|
|
v-model="user.email.address"
|
|
/>
|
|
/>
|
|
</p>
|
|
</p>
|
|
- <button class="button is-primary" @click="saveChangesAccount()">
|
|
|
|
|
|
+ <button
|
|
|
|
+ class="button is-primary"
|
|
|
|
+ @click="saveChangesToAccount()"
|
|
|
|
+ >
|
|
Save changes
|
|
Save changes
|
|
</button>
|
|
</button>
|
|
</div>
|
|
</div>
|
|
@@ -277,12 +292,13 @@ export default {
|
|
switchTab(tabName) {
|
|
switchTab(tabName) {
|
|
this.activeTab = tabName;
|
|
this.activeTab = tabName;
|
|
},
|
|
},
|
|
- saveChangesProfile() {
|
|
|
|
|
|
+ saveChangesToProfile() {
|
|
this.changeName();
|
|
this.changeName();
|
|
this.changeLocation();
|
|
this.changeLocation();
|
|
this.changeBio();
|
|
this.changeBio();
|
|
|
|
+ this.changeAvatarType();
|
|
},
|
|
},
|
|
- saveChangesAccount() {
|
|
|
|
|
|
+ saveChangesToAccount() {
|
|
this.changeUsername();
|
|
this.changeUsername();
|
|
this.changeEmail();
|
|
this.changeEmail();
|
|
},
|
|
},
|
|
@@ -418,6 +434,18 @@ export default {
|
|
}
|
|
}
|
|
);
|
|
);
|
|
},
|
|
},
|
|
|
|
+ changeAvatarType() {
|
|
|
|
+ const { type } = this.user.avatar;
|
|
|
|
+
|
|
|
|
+ return this.socket.emit(
|
|
|
|
+ "users.updateAvatarType",
|
|
|
|
+ this.userId,
|
|
|
|
+ type,
|
|
|
|
+ res => {
|
|
|
|
+ new Toast({ content: res.message, timeout: 8000 });
|
|
|
|
+ }
|
|
|
|
+ );
|
|
|
|
+ },
|
|
changePassword() {
|
|
changePassword() {
|
|
const { newPassword } = this;
|
|
const { newPassword } = this;
|
|
if (!validation.isLength(newPassword, 6, 200))
|
|
if (!validation.isLength(newPassword, 6, 200))
|
|
@@ -618,6 +646,16 @@ export default {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+.avatar-select {
|
|
|
|
+ display: flex;
|
|
|
|
+ flex-direction: column;
|
|
|
|
+ align-items: flex-start;
|
|
|
|
+
|
|
|
|
+ .select:after {
|
|
|
|
+ border-color: $musareBlue;
|
|
|
|
+ }
|
|
|
|
+}
|
|
|
|
+
|
|
.night-mode {
|
|
.night-mode {
|
|
label {
|
|
label {
|
|
color: #ddd !important;
|
|
color: #ddd !important;
|