Merge remote-tracking branch 'origin/develop' into vue3-again

* origin/develop:
  improve the looks of bot indicator
  fix bot indicator appearing on retweeter avatar
  Update dependency localforage to v1.10.0
  Update dependency http-proxy-middleware to v0.21.0
  Update dependency eslint-plugin-standard to v4.1.0
  Update dependency eslint-plugin-import to v2.25.4
  Update babel monorepo to v7.17.8
  Update dependency iso-639-1 to v2.1.13
  Update dependency express to v4.17.3
  Update dependency eslint-plugin-promise to v4.3.1
  Update dependency eslint-loader to v2.2.1
This commit is contained in:
Henry Jameson 2022-03-21 21:09:48 +02:00
commit 54fd7e2be6
5 changed files with 651 additions and 410 deletions

View file

@ -16,7 +16,7 @@
"lint-fix": "eslint --fix --ext .js,.vue src test/unit/specs test/e2e/specs" "lint-fix": "eslint --fix --ext .js,.vue src test/unit/specs test/e2e/specs"
}, },
"dependencies": { "dependencies": {
"@babel/runtime": "7.17.7", "@babel/runtime": "7.17.8",
"@chenfengyuan/vue-qrcode": "1.0.2", "@chenfengyuan/vue-qrcode": "1.0.2",
"@fortawesome/fontawesome-svg-core": "1.3.0", "@fortawesome/fontawesome-svg-core": "1.3.0",
"@fortawesome/free-regular-svg-icons": "5.15.4", "@fortawesome/free-regular-svg-icons": "5.15.4",
@ -28,7 +28,7 @@
"cropperjs": "1.5.12", "cropperjs": "1.5.12",
"diff": "3.5.0", "diff": "3.5.0",
"escape-html": "1.0.3", "escape-html": "1.0.3",
"localforage": "1.7.3", "localforage": "1.10.0",
"parse-link-header": "1.0.1", "parse-link-header": "1.0.1",
"phoenix": "1.4.0", "phoenix": "1.4.0",
"portal-vue": "2.1.7", "portal-vue": "2.1.7",
@ -44,7 +44,7 @@
"vuex": "4.0.2" "vuex": "4.0.2"
}, },
"devDependencies": { "devDependencies": {
"@babel/core": "7.17.7", "@babel/core": "7.17.8",
"@babel/plugin-transform-runtime": "7.17.0", "@babel/plugin-transform-runtime": "7.17.0",
"@babel/preset-env": "7.16.11", "@babel/preset-env": "7.16.11",
"@babel/register": "7.17.7", "@babel/register": "7.17.7",
@ -69,20 +69,20 @@
"eslint": "5.16.0", "eslint": "5.16.0",
"eslint-config-standard": "12.0.0", "eslint-config-standard": "12.0.0",
"eslint-friendly-formatter": "2.0.7", "eslint-friendly-formatter": "2.0.7",
"eslint-loader": "2.1.2", "eslint-loader": "2.2.1",
"eslint-plugin-import": "2.17.2", "eslint-plugin-import": "2.25.4",
"eslint-plugin-node": "7.0.1", "eslint-plugin-node": "7.0.1",
"eslint-plugin-promise": "4.1.1", "eslint-plugin-promise": "4.3.1",
"eslint-plugin-standard": "4.0.0", "eslint-plugin-standard": "4.1.0",
"eslint-plugin-vue": "5.2.3", "eslint-plugin-vue": "5.2.3",
"eventsource-polyfill": "0.9.6", "eventsource-polyfill": "0.9.6",
"express": "4.16.4", "express": "4.17.3",
"file-loader": "3.0.1", "file-loader": "3.0.1",
"function-bind": "1.1.1", "function-bind": "1.1.1",
"html-webpack-plugin": "3.2.0", "html-webpack-plugin": "3.2.0",
"http-proxy-middleware": "0.17.4", "http-proxy-middleware": "0.21.0",
"inject-loader": "2.0.1", "inject-loader": "2.0.1",
"iso-639-1": "2.0.3", "iso-639-1": "2.1.13",
"isparta-loader": "2.0.0", "isparta-loader": "2.0.0",
"json-loader": "0.5.7", "json-loader": "0.5.7",
"karma": "3.1.4", "karma": "3.1.4",

View file

@ -225,12 +225,18 @@ const Status = {
muteWordHits () { muteWordHits () {
return muteWordHits(this.status, this.muteWords) return muteWordHits(this.status, this.muteWords)
}, },
rtBotStatus () {
return this.statusoid.user.bot
},
botStatus () { botStatus () {
return this.status.user.bot return this.status.user.bot
}, },
botIndicator () { botIndicator () {
return this.botStatus && !this.hideBotIndication return this.botStatus && !this.hideBotIndication
}, },
rtBotIndicator () {
return this.rtBotStatus && !this.hideBotIndication
},
mentionsLine () { mentionsLine () {
if (!this.headTailLinks) return [] if (!this.headTailLinks) return []
const writtenSet = new Set(this.headTailLinks.writtenMentions.map(_ => _.url)) const writtenSet = new Set(this.headTailLinks.writtenMentions.map(_ => _.url))

View file

@ -78,7 +78,7 @@
<UserAvatar <UserAvatar
v-if="retweet" v-if="retweet"
class="left-side repeater-avatar" class="left-side repeater-avatar"
:bot="botIndicator" :bot="rtBotIndicator"
:better-shadow="betterShadow" :better-shadow="betterShadow"
:user="statusoid.user" :user="statusoid.user"
/> />

View file

@ -1,24 +1,28 @@
<template> <template>
<span
class="Avatar"
:class="{ '-compact': compact }"
>
<StillImage <StillImage
v-if="user" v-if="user"
class="Avatar" class="avatar"
:alt="user.screen_name_ui" :alt="user.screen_name_ui"
:title="user.screen_name_ui" :title="user.screen_name_ui"
:src="imgSrc(user.profile_image_url_original)" :src="imgSrc(user.profile_image_url_original)"
:class="{ 'avatar-compact': compact, 'better-shadow': betterShadow }"
:image-load-error="imageLoadError" :image-load-error="imageLoadError"
> :class="{ '-compact': compact, '-better-shadow': betterShadow }"
/>
<div
v-else
class="avatar -placeholder"
:class="{ '-compact': compact }"
/>
<FAIcon <FAIcon
v-if="bot" v-if="bot"
icon="robot" icon="robot"
class="bot-indicator" class="bot-indicator"
/> />
</StillImage> </span>
<div
v-else
class="Avatar -placeholder"
:class="{ 'avatar-compact': compact }"
/>
</template> </template>
<script src="./user_avatar.js"></script> <script src="./user_avatar.js"></script>
@ -31,35 +35,35 @@
--_avatarShadowInset: var(--avatarStatusShadowInset); --_avatarShadowInset: var(--avatarStatusShadowInset);
--_still-image-label-visibility: hidden; --_still-image-label-visibility: hidden;
display: inline-block;
position: relative;
width: 48px; width: 48px;
height: 48px; height: 48px;
&.-compact {
width: 32px;
height: 32px;
border-radius: $fallback--avatarAltRadius;
border-radius: var(--avatarAltRadius, $fallback--avatarAltRadius);
}
.avatar {
width: 100%;
height: 100%;
box-shadow: var(--_avatarShadowBox); box-shadow: var(--_avatarShadowBox);
border-radius: $fallback--avatarRadius; border-radius: $fallback--avatarRadius;
border-radius: var(--avatarRadius, $fallback--avatarRadius); border-radius: var(--avatarRadius, $fallback--avatarRadius);
img { &.-better-shadow {
width: 100%;
height: 100%;
}
& > .bot-indicator {
position: absolute;
bottom: 0;
right: 0;
}
&.better-shadow {
box-shadow: var(--_avatarShadowInset); box-shadow: var(--_avatarShadowInset);
filter: var(--_avatarShadowFilter); filter: var(--_avatarShadowFilter);
} }
&.animated::before { &.-animated::before {
display: none; display: none;
} }
&.avatar-compact { &.-compact {
width: 32px;
height: 32px;
border-radius: $fallback--avatarAltRadius; border-radius: $fallback--avatarAltRadius;
border-radius: var(--avatarAltRadius, $fallback--avatarAltRadius); border-radius: var(--avatarAltRadius, $fallback--avatarAltRadius);
} }
@ -69,4 +73,22 @@
background-color: var(--fg, $fallback--fg); background-color: var(--fg, $fallback--fg);
} }
} }
img {
width: 100%;
height: 100%;
}
.bot-indicator {
position: absolute;
bottom: 0;
right: 0;
margin: -0.2em;
padding: 0.2em;
background: rgba(127, 127, 127, 0.5);
color: #fff;
border-radius: var(--tooltipRadius);
}
}
</style> </style>

929
yarn.lock

File diff suppressed because it is too large Load diff