Merge branch 'develop' into drive-bulk

This commit is contained in:
syuilo 2025-05-11 19:47:13 +09:00
commit d448f262d6
3 changed files with 25 additions and 4 deletions

View File

@ -18,7 +18,7 @@ type RateLimitInfo = {
} | {
code: 'RATE_LIMIT_EXCEEDED',
info: Limiter.LimiterInfo,
}
};
@Injectable()
export class RateLimiterService {
@ -68,7 +68,6 @@ export class RateLimiterService {
this.logger.debug(`${actor} ${limitation.key} min remaining: ${info.remaining}`);
if (info.remaining === 0) {
// eslint-disable-next-line no-throw-literal
return { code: 'BRIEF_REQUEST_INTERVAL', info };
}
}
@ -85,7 +84,6 @@ export class RateLimiterService {
this.logger.debug(`${actor} ${limitation.key} max remaining: ${info.remaining}`);
if (info.remaining === 0) {
// eslint-disable-next-line no-throw-literal
return { code: 'RATE_LIMIT_EXCEEDED', info };
}
}

View File

@ -18,6 +18,7 @@ SPDX-License-Identifier: AGPL-3.0-only
}"
>
<MkImgWithBlurhash
v-if="prefer.s.enableHighQualityImagePlaceholders"
:hash="image.blurhash"
:src="(prefer.s.dataSaver.media && hide) ? null : url"
:forceBlurhash="hide"
@ -27,6 +28,20 @@ SPDX-License-Identifier: AGPL-3.0-only
:width="image.properties.width"
:height="image.properties.height"
:style="hide ? 'filter: brightness(0.7);' : null"
:class="$style.image"
/>
<div
v-else-if="prefer.s.dataSaver.media || hide"
:title="image.comment || image.name"
:style="hide ? 'background: #888;' : null"
:class="$style.image"
></div>
<img
v-else
:src="url"
:alt="image.comment || image.name"
:title="image.comment || image.name"
:class="$style.image"
/>
</component>
<template v-if="hide">
@ -300,4 +315,12 @@ html[data-color-scheme=light] .visible {
font-size: 0.8em;
padding: 2px 5px;
}
.image {
display: block;
width: 100%;
height: 100%;
object-fit: contain;
object-position: center;
}
</style>

View File

@ -83,7 +83,7 @@ SPDX-License-Identifier: AGPL-3.0-only
</div>
</div>
</div>
<div v-if="appearNote.files && appearNote.files.length > 0">
<div v-if="appearNote.files && appearNote.files.length > 0" style="margin-top: 8px;">
<MkMediaList ref="galleryEl" :mediaList="appearNote.files"/>
</div>
<MkPoll