Merge branch 'vue3-again' into vue3-no-compat

* vue3-again:
  fix warning about custom component
  fix?
  fix some issues with trees
  removing uselsess stuff
  fix reset buttons in profile again
  fix spacing in poll expiration label
  registration fixes
This commit is contained in:
Henry Jameson 2022-03-29 20:00:59 +03:00
commit 2179054384
8 changed files with 35 additions and 21 deletions

View File

@ -61,6 +61,16 @@ module.exports = {
{ {
test: /\.vue$/, test: /\.vue$/,
loader: 'vue-loader', loader: 'vue-loader',
options: {
compilerOptions: {
isCustomElement(tag) {
if (tag === 'pinch-zoom') {
return true
}
return false
}
}
}
}, },
{ {
test: /\.jsx?$/, test: /\.jsx?$/,

View File

@ -22,7 +22,6 @@
class="gallery-item" class="gallery-item"
:nsfw="nsfw" :nsfw="nsfw"
:attachment="attachment" :attachment="attachment"
:allow-play="false"
:size="size" :size="size"
:editable="editable" :editable="editable"
:remove="removeAttachment" :remove="removeAttachment"

View File

@ -71,16 +71,18 @@
{{ $tc("polls.votes_count", poll.votes_count, { count: poll.votes_count }) }} ·  {{ $tc("polls.votes_count", poll.votes_count, { count: poll.votes_count }) }} · 
</template> </template>
</div> </div>
<i18n-t <span>
scope="global" <i18n-t
:keypath="expired ? 'polls.expired' : 'polls.expires_in'" scope="global"
> :keypath="expired ? 'polls.expired' : 'polls.expires_in'"
<Timeago >
:time="expiresAt" <Timeago
:auto-update="60" :time="expiresAt"
:now-threshold="0" :auto-update="60"
/> :now-threshold="0"
</i18n-t> />
</i18n-t>
</span>
</div> </div>
</div> </div>
</template> </template>

View File

@ -24,7 +24,7 @@ const registration = {
password: { required }, password: { required },
confirm: { confirm: {
required, required,
sameAs: sameAs(this.password) sameAs: sameAs(this.user.password)
}, },
reason: { required: requiredIf(() => this.accountApprovalRequired) } reason: { required: requiredIf(() => this.accountApprovalRequired) }
} }
@ -65,9 +65,9 @@ const registration = {
this.user.captcha_token = this.captcha.token this.user.captcha_token = this.captcha.token
this.user.captcha_answer_data = this.captcha.answer_data this.user.captcha_answer_data = this.captcha.answer_data
this.$v.$touch() this.v$.$touch()
if (!this.$v.$invalid) { if (!this.v$.$invalid) {
try { try {
await this.signUp(this.user) await this.signUp(this.user)
this.$router.push({ name: 'friends' }) this.$router.push({ name: 'friends' })

View File

@ -54,16 +54,20 @@
border-radius: var(--tooltipRadius, $fallback--tooltipRadius); border-radius: var(--tooltipRadius, $fallback--tooltipRadius);
background-color: rgba(0, 0, 0, 0.6); background-color: rgba(0, 0, 0, 0.6);
opacity: 0.7; opacity: 0.7;
color: white;
width: 1.5em; width: 1.5em;
height: 1.5em; height: 1.5em;
text-align: center; text-align: center;
line-height: 1.5em; line-height: 1.5em;
font-size: 1.5em; font-size: 1.5em;
cursor: pointer; cursor: pointer;
&:hover { &:hover {
opacity: 1; opacity: 1;
} }
svg {
color: white;
}
} }
.oauth-tokens { .oauth-tokens {

View File

@ -111,9 +111,9 @@
v-if="!isDefaultAvatar && pickAvatarBtnVisible" v-if="!isDefaultAvatar && pickAvatarBtnVisible"
:title="$t('settings.reset_avatar')" :title="$t('settings.reset_avatar')"
@click="resetAvatar" @click="resetAvatar"
class="button-unstyled reset-button"
> >
<FAIcon <FAIcon
class="reset-button"
icon="times" icon="times"
type="button" type="button"
/> />
@ -141,11 +141,11 @@
<img :src="user.cover_photo"> <img :src="user.cover_photo">
<button <button
v-if="!isDefaultBanner" v-if="!isDefaultBanner"
class="button-unstyled reset-button"
:title="$t('settings.reset_profile_banner')" :title="$t('settings.reset_profile_banner')"
@click="resetBanner" @click="resetBanner"
> >
<FAIcon <FAIcon
class="reset-button"
icon="times" icon="times"
type="button" type="button"
/> />
@ -183,12 +183,11 @@
<img :src="user.background_image"> <img :src="user.background_image">
<button <button
v-if="!isDefaultBackground" v-if="!isDefaultBackground"
class="button-unstyled" class="button-unstyled reset-button"
:title="$t('settings.reset_profile_background')" :title="$t('settings.reset_profile_background')"
@click="resetBackground" @click="resetBackground"
> >
<FAIcon <FAIcon
class="reset-button"
icon="times" icon="times"
type="button" type="button"
/> />

View File

@ -69,7 +69,7 @@ const controlledOrUncontrolledGetters = list => list.reduce((res, name) => {
const controlledName = `controlled${camelized}` const controlledName = `controlled${camelized}`
const uncontrolledName = `uncontrolled${camelized}` const uncontrolledName = `uncontrolled${camelized}`
res[name] = function () { res[name] = function () {
return (this.$props[toggle] && this[toggle]) ? this[controlledName] : this[uncontrolledName] return ((this.$data[toggle] !== undefined || this.$props[toggle] !== undefined) && this[toggle]) ? this[controlledName] : this[uncontrolledName]
} }
return res return res
}, {}) }, {})

View File

@ -31,7 +31,7 @@ const controlledOrUncontrolledGetters = list => list.reduce((res, name) => {
const controlledName = `controlled${camelized}` const controlledName = `controlled${camelized}`
const uncontrolledName = `uncontrolled${camelized}` const uncontrolledName = `uncontrolled${camelized}`
res[name] = function () { res[name] = function () {
return (this.$props[toggle] && this[toggle]) ? this[controlledName] : this[uncontrolledName] return ((this.$data[toggle] !== undefined || this.$props[toggle] !== undefined) && this[toggle]) ? this[controlledName] : this[uncontrolledName]
} }
return res return res
}, {}) }, {})