Merge branch 'develop' into drive-bulk
This commit is contained in:
commit
d448f262d6
|
|
@ -18,7 +18,7 @@ type RateLimitInfo = {
|
||||||
} | {
|
} | {
|
||||||
code: 'RATE_LIMIT_EXCEEDED',
|
code: 'RATE_LIMIT_EXCEEDED',
|
||||||
info: Limiter.LimiterInfo,
|
info: Limiter.LimiterInfo,
|
||||||
}
|
};
|
||||||
|
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class RateLimiterService {
|
export class RateLimiterService {
|
||||||
|
|
@ -68,7 +68,6 @@ export class RateLimiterService {
|
||||||
this.logger.debug(`${actor} ${limitation.key} min remaining: ${info.remaining}`);
|
this.logger.debug(`${actor} ${limitation.key} min remaining: ${info.remaining}`);
|
||||||
|
|
||||||
if (info.remaining === 0) {
|
if (info.remaining === 0) {
|
||||||
// eslint-disable-next-line no-throw-literal
|
|
||||||
return { code: 'BRIEF_REQUEST_INTERVAL', info };
|
return { code: 'BRIEF_REQUEST_INTERVAL', info };
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -85,7 +84,6 @@ export class RateLimiterService {
|
||||||
this.logger.debug(`${actor} ${limitation.key} max remaining: ${info.remaining}`);
|
this.logger.debug(`${actor} ${limitation.key} max remaining: ${info.remaining}`);
|
||||||
|
|
||||||
if (info.remaining === 0) {
|
if (info.remaining === 0) {
|
||||||
// eslint-disable-next-line no-throw-literal
|
|
||||||
return { code: 'RATE_LIMIT_EXCEEDED', info };
|
return { code: 'RATE_LIMIT_EXCEEDED', info };
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -18,6 +18,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
}"
|
}"
|
||||||
>
|
>
|
||||||
<MkImgWithBlurhash
|
<MkImgWithBlurhash
|
||||||
|
v-if="prefer.s.enableHighQualityImagePlaceholders"
|
||||||
:hash="image.blurhash"
|
:hash="image.blurhash"
|
||||||
:src="(prefer.s.dataSaver.media && hide) ? null : url"
|
:src="(prefer.s.dataSaver.media && hide) ? null : url"
|
||||||
:forceBlurhash="hide"
|
:forceBlurhash="hide"
|
||||||
|
|
@ -27,6 +28,20 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
:width="image.properties.width"
|
:width="image.properties.width"
|
||||||
:height="image.properties.height"
|
:height="image.properties.height"
|
||||||
:style="hide ? 'filter: brightness(0.7);' : null"
|
: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>
|
</component>
|
||||||
<template v-if="hide">
|
<template v-if="hide">
|
||||||
|
|
@ -300,4 +315,12 @@ html[data-color-scheme=light] .visible {
|
||||||
font-size: 0.8em;
|
font-size: 0.8em;
|
||||||
padding: 2px 5px;
|
padding: 2px 5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.image {
|
||||||
|
display: block;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
object-fit: contain;
|
||||||
|
object-position: center;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
||||||
|
|
@ -83,7 +83,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</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"/>
|
<MkMediaList ref="galleryEl" :mediaList="appearNote.files"/>
|
||||||
</div>
|
</div>
|
||||||
<MkPoll
|
<MkPoll
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue