diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/components/still-image/still-image.js | 3 | ||||
| -rw-r--r-- | src/components/still-image/still-image.vue | 2 | ||||
| -rw-r--r-- | src/components/user_avatar/user_avatar.vue | 7 | ||||
| -rw-r--r-- | src/components/user_card/user_card.vue | 4 | ||||
| -rw-r--r-- | src/components/user_settings/user_settings.js | 4 | ||||
| -rw-r--r-- | src/components/user_settings/user_settings.vue | 2 |
6 files changed, 16 insertions, 6 deletions
diff --git a/src/components/still-image/still-image.js b/src/components/still-image/still-image.js index 8f3a7206..02e98f19 100644 --- a/src/components/still-image/still-image.js +++ b/src/components/still-image/still-image.js @@ -24,6 +24,9 @@ const StillImage = { canvas.width = width canvas.height = height canvas.getContext('2d').drawImage(this.$refs.src, 0, 0, width, height) + }, + onError () { + this.imageLoadError && this.imageLoadError() } } } diff --git a/src/components/still-image/still-image.vue b/src/components/still-image/still-image.vue index 29c59e42..af824fa2 100644 --- a/src/components/still-image/still-image.vue +++ b/src/components/still-image/still-image.vue @@ -1,7 +1,7 @@ <template> <div class='still-image' :class='{ animated: animated }' > <canvas ref="canvas" v-if="animated"></canvas> - <img ref="src" :src="src" :referrerpolicy="referrerpolicy" v-on:load="onLoad" @error="imageLoadError"/> + <img ref="src" :src="src" :referrerpolicy="referrerpolicy" v-on:load="onLoad" @error="onError"/> </div> </template> diff --git a/src/components/user_avatar/user_avatar.vue b/src/components/user_avatar/user_avatar.vue index 3ec25b21..6bf7123d 100644 --- a/src/components/user_avatar/user_avatar.vue +++ b/src/components/user_avatar/user_avatar.vue @@ -1,5 +1,10 @@ <template> - <StillImage class="avatar" :class="{ 'avatar-compact': compact, 'better-shadow': betterShadow }" :src="imgSrc" :imageLoadError="imageLoadError"/> + <StillImage + class="avatar" + :class="{ 'avatar-compact': compact, 'better-shadow': betterShadow }" + :src="imgSrc" + :imageLoadError="imageLoadError" + /> </template> <script src="./user_avatar.js"></script> diff --git a/src/components/user_card/user_card.vue b/src/components/user_card/user_card.vue index 35b27319..7129430b 100644 --- a/src/components/user_card/user_card.vue +++ b/src/components/user_card/user_card.vue @@ -1,8 +1,8 @@ <template> <div class="card"> - <a href="#"> + <router-link :to="userProfileLink(user)"> <UserAvatar class="avatar" :compact="true" @click.prevent.native="toggleUserExpanded" :src="user.profile_image_url"/> - </a> + </router-link> <div class="usercard" v-if="userExpanded"> <user-card-content :user="user" :switcher="false"></user-card-content> </div> diff --git a/src/components/user_settings/user_settings.js b/src/components/user_settings/user_settings.js index 9bd8aa00..df757dfb 100644 --- a/src/components/user_settings/user_settings.js +++ b/src/components/user_settings/user_settings.js @@ -1,3 +1,5 @@ +import { unescape } from 'lodash' + import TabSwitcher from '../tab_switcher/tab_switcher.js' import StyleSwitcher from '../style_switcher/style_switcher.vue' import fileSizeFormatService from '../../services/file_size_format/file_size_format.js' @@ -6,7 +8,7 @@ const UserSettings = { data () { return { newName: this.$store.state.users.currentUser.name, - newBio: this.$store.state.users.currentUser.description, + newBio: unescape(this.$store.state.users.currentUser.description), newLocked: this.$store.state.users.currentUser.locked, newNoRichText: this.$store.state.users.currentUser.no_rich_text, newDefaultScope: this.$store.state.users.currentUser.default_scope, diff --git a/src/components/user_settings/user_settings.vue b/src/components/user_settings/user_settings.vue index be42cc4a..d0743ef0 100644 --- a/src/components/user_settings/user_settings.vue +++ b/src/components/user_settings/user_settings.vue @@ -33,7 +33,7 @@ <input type="checkbox" v-model="newHideNetwork" id="account-hide-network"> <label for="account-hide-network">{{$t('settings.hide_network_description')}}</label> </p> - <button :disabled='newName.length <= 0' class="btn btn-default" @click="updateProfile">{{$t('general.submit')}}</button> + <button :disabled='newName && newName.length === 0' class="btn btn-default" @click="updateProfile">{{$t('general.submit')}}</button> </div> <div class="setting-item"> <h2>{{$t('settings.avatar')}}</h2> |
