fix being unable to set/reset background (and possibly avatar/banner)

This commit is contained in:
Henry Jameson 2022-03-28 15:01:34 +03:00
parent 805615d52b
commit f706234d77

View file

@ -68,8 +68,9 @@
class="delete-field button-unstyled -hover-highlight" class="delete-field button-unstyled -hover-highlight"
@click="deleteField(i)" @click="deleteField(i)"
> >
<!-- TODO something is wrong with v-show here -->
<FAIcon <FAIcon
v-show="newFields.length > 1" v-if="newFields.length > 1"
icon="times" icon="times"
/> />
</button> </button>
@ -106,14 +107,17 @@
:src="user.profile_image_url_original" :src="user.profile_image_url_original"
class="current-avatar" class="current-avatar"
> >
<FAIcon <button
v-if="!isDefaultAvatar && pickAvatarBtnVisible" v-if="!isDefaultAvatar && pickAvatarBtnVisible"
:title="$t('settings.reset_avatar')" :title="$t('settings.reset_avatar')"
@click="resetAvatar"
>
<FAIcon
class="reset-button" class="reset-button"
icon="times" icon="times"
type="button" type="button"
@click="resetAvatar"
/> />
</button>
</div> </div>
<p>{{ $t('settings.set_new_avatar') }}</p> <p>{{ $t('settings.set_new_avatar') }}</p>
<button <button
@ -135,14 +139,17 @@
<h2>{{ $t('settings.profile_banner') }}</h2> <h2>{{ $t('settings.profile_banner') }}</h2>
<div class="banner-background-preview"> <div class="banner-background-preview">
<img :src="user.cover_photo"> <img :src="user.cover_photo">
<FAIcon <button
v-if="!isDefaultBanner" v-if="!isDefaultBanner"
:title="$t('settings.reset_profile_banner')" :title="$t('settings.reset_profile_banner')"
@click="resetBanner"
>
<FAIcon
class="reset-button" class="reset-button"
icon="times" icon="times"
type="button" type="button"
@click="resetBanner"
/> />
</button>
</div> </div>
<p>{{ $t('settings.set_new_profile_banner') }}</p> <p>{{ $t('settings.set_new_profile_banner') }}</p>
<img <img
@ -174,14 +181,18 @@
<h2>{{ $t('settings.profile_background') }}</h2> <h2>{{ $t('settings.profile_background') }}</h2>
<div class="banner-background-preview"> <div class="banner-background-preview">
<img :src="user.background_image"> <img :src="user.background_image">
<FAIcon <button
v-if="!isDefaultBackground" v-if="!isDefaultBackground"
class="button-unstyled"
@click="resetBackground"
:title="$t('settings.reset_profile_background')" :title="$t('settings.reset_profile_background')"
>
<FAIcon
class="reset-button" class="reset-button"
icon="times" icon="times"
type="button" type="button"
@click="resetBackground"
/> />
</button>
</div> </div>
<p>{{ $t('settings.set_new_profile_background') }}</p> <p>{{ $t('settings.set_new_profile_background') }}</p>
<img <img