mirror of
https://github.com/fluxerapp/fluxer
synced 2026-10-18 21:45:31 +09:00
fix(app): backport rendering improvements (#1580)
This commit is contained in:
1 parent
0c291a01da
commit
42cdc1f877
513 files changed
+98743
-70397
No files matched your search
@@ -21,8 +21,8 @@ const DEFAULT_GIF_SERVICE_TIMEOUT_MS = 12_000;
|
||||
const DEFAULT_GIF_SERVICE_REGISTER_SHARE_TIMEOUT_MS = 3_000;
|
||||
const GIF_PROVIDER_META: GifProviderMeta = {
|
||||
name: 'klipy',
|
||||
displayName: 'KLIPY',
|
||||
attributionRequired: true,
|
||||
displayName: 'Klipy',
|
||||
attributionRequired: false,
|
||||
};
|
||||
const KLIPY_SHARE_ORIGIN = 'https://klipy.com';
|
||||
const KLIPY_SHARE_HOSTS = new Set(['klipy.com', 'www.klipy.com']);
|
||||
|
||||
@@ -7,6 +7,7 @@ import {WellKnownFluxerResponse} from '@fluxer/schema/src/domains/instance/Insta
|
||||
import type {Hono} from 'hono';
|
||||
import {Config} from '../Config';
|
||||
import type {GifService} from '../gif/GifService';
|
||||
import type {IGifProvider} from '../gif/IGifProvider';
|
||||
import type {LimitConfigService} from '../limits/LimitConfigService';
|
||||
import {RateLimitMiddleware} from '../middleware/RateLimitMiddleware';
|
||||
import {OpenAPI} from '../middleware/ResponseTypeMiddleware';
|
||||
@@ -24,7 +25,18 @@ function buildDiscoveryStaticInput(
|
||||
): DiscoveryStaticInput {
|
||||
const apiClientEndpoint = Config.endpoints.apiClient;
|
||||
const apiPublicEndpoint = Config.endpoints.apiPublic;
|
||||
const gifProvider = gifService?.getProvider();
|
||||
let gifProvider: IGifProvider | undefined;
|
||||
if (gifService !== undefined) {
|
||||
gifProvider = gifService.getProvider();
|
||||
}
|
||||
let gifProviderName = 'klipy';
|
||||
let gifDisplayName = 'Klipy';
|
||||
let gifAttributionRequired = false;
|
||||
if (gifProvider !== undefined) {
|
||||
gifProviderName = gifProvider.meta.name;
|
||||
gifDisplayName = gifProvider.meta.displayName;
|
||||
gifAttributionRequired = gifProvider.meta.attributionRequired;
|
||||
}
|
||||
return {
|
||||
apiCodeVersion: API_CODE_VERSION,
|
||||
endpoints: {
|
||||
@@ -53,9 +65,9 @@ function buildDiscoveryStaticInput(
|
||||
emails_enabled: runtime.emailEnabled,
|
||||
},
|
||||
gif: {
|
||||
provider: gifProvider?.meta.name ?? 'klipy',
|
||||
display_name: gifProvider?.meta.displayName ?? 'KLIPY',
|
||||
attribution_required: gifProvider?.meta.attributionRequired ?? true,
|
||||
provider: gifProviderName,
|
||||
display_name: gifDisplayName,
|
||||
attribution_required: gifAttributionRequired,
|
||||
},
|
||||
push: {
|
||||
public_vapid_key: Config.push.publicVapidKey ?? null,
|
||||
|
||||
Reference in new issue
Block a user