Compare commits
7 Commits
ec4b15ce33
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| 5a195b8f5a | |||
| e4d6ff6ad1 | |||
| 4c5ab2411e | |||
| 11c31c4c56 | |||
| 40c2bdb563 | |||
| 1374f90397 | |||
| 33733720c5 |
24
.eslintrc
24
.eslintrc
@@ -1,7 +1,9 @@
|
||||
{
|
||||
"root": true,
|
||||
"extends": [
|
||||
"airbnb-base"
|
||||
"airbnb-base",
|
||||
"plugin:import/errors",
|
||||
"plugin:vue/recommended"
|
||||
],
|
||||
"parserOptions": {
|
||||
"parser": "@babel/eslint-parser",
|
||||
@@ -19,12 +21,30 @@
|
||||
"no-console": 0,
|
||||
"no-param-reassign": ["error", {
|
||||
"props": true,
|
||||
"ignorePropertyModificationsFor": ["state", "acc"]
|
||||
"ignorePropertyModificationsFor": ["state", "acc", "req"]
|
||||
}],
|
||||
"vue/multi-word-component-names": 0,
|
||||
"vue/no-reserved-component-names": 0,
|
||||
"no-tabs": "off",
|
||||
"no-unused-vars": ["error", {"argsIgnorePattern": "^_"}],
|
||||
"prefer-destructuring": 0,
|
||||
"template-curly-spacing": "off",
|
||||
"vue/html-indent": ["error", "tab"],
|
||||
"vue/multiline-html-element-content-newline": 0,
|
||||
"vue/no-v-html": 0,
|
||||
"vue/singleline-html-element-content-newline": 0,
|
||||
"vue/comment-directive": 0,
|
||||
},
|
||||
"settings": {
|
||||
"import/resolver": {
|
||||
"alias": {
|
||||
"extensions": [".js"],
|
||||
"map": [
|
||||
["#", "."],
|
||||
["#root", "."]
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"globals": {
|
||||
"CONFIG": true
|
||||
|
||||
@@ -164,14 +164,14 @@ export async function interpolateProfiles(actorIdsOrNames, context, options = {}
|
||||
|
||||
profile.avatar_media_id = actorProfiles
|
||||
.map((actorProfile) => actorProfile.avatar)
|
||||
.filter((avatar) => avatar && (avatar.entropy === null || avatar.entropy > 5.5))
|
||||
.filter((avatar) => avatar && (avatar.entropy === null || avatar.entropy > 5.5) && !options.avoidAvatarCredits?.includes(avatar.credit) && !options.excludeAvatarCredits?.includes(avatar.credit))
|
||||
.sort((avatarA, avatarB) => avatarB.height - avatarA.height)[0]?.id || null;
|
||||
|
||||
if (!profile.avatar_media_id) {
|
||||
// try to settle for low quality avatar
|
||||
profile.avatar_media_id = actorProfiles
|
||||
.map((actorProfile) => actorProfile.avatar)
|
||||
.filter((avatar) => avatar)
|
||||
.filter((avatar) => !!avatar && !options?.excludeAvatarCredits?.includes(avatar.credit))
|
||||
.sort((avatarA, avatarB) => avatarB.height - avatarA.height)[0]?.id || null;
|
||||
}
|
||||
|
||||
|
||||
4
package-lock.json
generated
4
package-lock.json
generated
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "traxxx-utils",
|
||||
"version": "1.3.2",
|
||||
"version": "1.3.4",
|
||||
"lockfileVersion": 2,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "traxxx-utils",
|
||||
"version": "1.3.2",
|
||||
"version": "1.3.4",
|
||||
"license": "ISC",
|
||||
"devDependencies": {
|
||||
"@babel/cli": "^7.25.7",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "traxxx-common",
|
||||
"version": "1.3.2",
|
||||
"version": "1.3.4",
|
||||
"description": "Common utilities for traxxx core and web.",
|
||||
"main": "src/app.js",
|
||||
"scripts": {
|
||||
|
||||
Reference in New Issue
Block a user