Merge branch 'develop' of https://codeberg.org/mkljczk/pl-fe into develop

This commit is contained in:
2026-03-31 15:19:35 +00:00
17 changed files with 87 additions and 38 deletions

View File

@@ -906,6 +906,7 @@ const getFeatures = (instance: Instance) => {
v.software === AKKOMA,
v.software === FIREFISH,
v.software === GOTOSOCIAL,
v.software === HOLLO,
v.software === MASTODON,
v.software === MITRA,
v.software === PLEROMA,
@@ -1390,6 +1391,7 @@ const getFeatures = (instance: Instance) => {
polls: any([
v.software === FIREFISH,
v.software === GOTOSOCIAL,
v.software === HOLLO,
v.software === ICESHRIMP,
v.software === ICESHRIMP_NET,
v.software === MASTODON,
@@ -1407,6 +1409,7 @@ const getFeatures = (instance: Instance) => {
postLanguages: any([
v.software === AKKOMA,
v.software === GOTOSOCIAL,
v.software === HOLLO,
v.software === MASTODON,
v.software === MITRA && gte(v.version, '3.23.0'),
v.software === PLEROMA && gte(v.version, '2.9.0'),
@@ -1473,6 +1476,7 @@ const getFeatures = (instance: Instance) => {
v.software === FIREFISH,
v.software === FRIENDICA,
v.software === GOTOSOCIAL,
v.software === HOLLO,
v.software === ICESHRIMP,
v.software === ICESHRIMP_NET,
v.software === MASTODON,

View File

@@ -99,7 +99,7 @@ function request<T = any>(
params,
onUploadProgress,
signal,
contentType = 'application/json',
contentType,
formData,
idempotencyKey,
}: RequestBody = {},
@@ -113,7 +113,8 @@ function request<T = any>(
else if (this.accessToken) headers.set('Authorization', `Bearer ${this.accessToken}`);
else if (this.customAuthorizationToken)
headers.set('Authorization', this.customAuthorizationToken);
if (!formData) headers.set('Content-Type', contentType);
if ((!formData && body) || contentType)
headers.set('Content-Type', contentType || 'application/json');
if (idempotencyKey) headers.set('Idempotency-Key', idempotencyKey);
body = body && formData ? serialize(body, { indices: true }) : JSON.stringify(body);

View File

@@ -1,7 +1,7 @@
/** Default header filenames from various backends */
const DEFAULT_HEADERS: Array<string | RegExp> = [
'/assets/default_header.webp', // GoToSocial
'/headers/original/missing.png', // Mastodon
'/headers/original/missing.png', // Hollo, Mastodon
'/api/v1/accounts/identicon', // Mitra
/\/static\/img\/missing\.[a-z0-9]+\.png$/, // NeoDB
'/storage/headers/missing.png', // Pixelfed
@@ -19,7 +19,7 @@ const isDefaultHeader = (url: string = '') =>
/** Default avatar filenames from various backends */
const DEFAULT_AVATARS: Array<string | RegExp> = [
/\/assets\/default_avatars\/GoToSocial_icon[1-6]\.webp$/, // GoToSocial
'/avatars/original/missing.png', // Mastodon
'/avatars/original/missing.png', // Hollo, Mastodon
'/api/v1/accounts/identicon', // Mitra
'/s/img/avatar.svg', // NeoDB
'/avatars/default.jpg', // Pixelfed