Merge remote-tracking branch 'origin/develop' into improve_settings_reusability

* origin/develop:
  Translated using Weblate (Chinese (Simplified))
  Generalize IntegerSetting into NumberSetting, add Integer/Float wrappers
  Allow custom emoji reactions: add option to scale reaction buttons
  Fix user-profile route crash on pinned favorites route
  Hide custom emoji in reaction picker when BE does not advertise pleroma_custom_emoji_reactions
  Allow custom emoji reactions
This commit is contained in:
Henry Jameson 2023-03-20 22:48:38 +02:00
commit 819cd41cf0
24 changed files with 233 additions and 237 deletions

View file

@ -0,0 +1,24 @@
import Setting from './setting.js'
export default {
...Setting,
props: {
...Setting.props,
truncate: {
type: Number,
required: false,
default: 1
}
},
methods: {
...Setting.methods,
getValue (e) {
if (!this.truncate === 1) {
return parseInt(e.target.value)
} else if (this.truncate > 1) {
return Math.trunc(e.target.value / this.truncate) * this.truncate
}
return parseFloat(e.target.value)
}
}
}