2022-01-26 17:08:48 +02:00
|
|
|
// ブラウザで直接表示することを許可するファイルの種類のリスト
|
|
|
|
// ここに含まれないものは application/octet-stream としてレスポンスされる
|
|
|
|
// SVGはXSSを生むので許可しない
|
|
|
|
export const FILE_TYPE_BROWSERSAFE = [
|
|
|
|
// Images
|
|
|
|
'image/png',
|
|
|
|
'image/gif',
|
|
|
|
'image/jpeg',
|
|
|
|
'image/webp',
|
2022-12-08 07:49:49 +02:00
|
|
|
'image/avif',
|
2022-01-26 17:08:48 +02:00
|
|
|
'image/apng',
|
|
|
|
'image/bmp',
|
|
|
|
'image/tiff',
|
|
|
|
'image/x-icon',
|
|
|
|
|
|
|
|
// OggS
|
|
|
|
'audio/opus',
|
|
|
|
'video/ogg',
|
|
|
|
'audio/ogg',
|
|
|
|
'application/ogg',
|
|
|
|
|
|
|
|
// ISO/IEC base media file format
|
|
|
|
'video/quicktime',
|
|
|
|
'video/mp4',
|
|
|
|
'audio/mp4',
|
|
|
|
'video/x-m4v',
|
|
|
|
'audio/x-m4a',
|
|
|
|
'video/3gpp',
|
|
|
|
'video/3gpp2',
|
|
|
|
|
|
|
|
'video/mpeg',
|
|
|
|
'audio/mpeg',
|
|
|
|
|
|
|
|
'video/webm',
|
|
|
|
'audio/webm',
|
|
|
|
|
|
|
|
'audio/aac',
|
|
|
|
'audio/x-flac',
|
|
|
|
'audio/vnd.wave',
|
|
|
|
];
|
|
|
|
/*
|
|
|
|
https://github.com/sindresorhus/file-type/blob/main/supported.js
|
|
|
|
https://github.com/sindresorhus/file-type/blob/main/core.js
|
|
|
|
https://developer.mozilla.org/en-US/docs/Web/Media/Formats/Containers
|
|
|
|
*/
|
2023-02-23 13:46:14 +02:00
|
|
|
|
|
|
|
export const notificationTypes = ['follow', 'mention', 'reply', 'renote', 'quote', 'reaction', 'pollEnded', 'receiveFollowRequest', 'followRequestAccepted', 'achievementEarned', 'app'] as const;
|
|
|
|
export const obsoleteNotificationTypes = ['pollVote', 'groupInvited'] as const;
|
2023-03-02 11:40:43 +02:00
|
|
|
|
2023-03-02 13:47:24 +02:00
|
|
|
export const ROLE_POLICIES = [
|
|
|
|
'gtlAvailable',
|
|
|
|
'ltlAvailable',
|
|
|
|
'canPublicNote',
|
|
|
|
'canInvite',
|
|
|
|
'canManageCustomEmojis',
|
2023-03-13 10:52:24 +02:00
|
|
|
'canSearchNotes',
|
2023-03-02 13:47:24 +02:00
|
|
|
'canHideAds',
|
|
|
|
'driveCapacityMb',
|
|
|
|
'pinLimit',
|
|
|
|
'antennaLimit',
|
|
|
|
'wordMuteLimit',
|
|
|
|
'webhookLimit',
|
|
|
|
'clipLimit',
|
|
|
|
'noteEachClipsLimit',
|
|
|
|
'userListLimit',
|
|
|
|
'userEachUserListsLimit',
|
|
|
|
'rateLimitFactor',
|
|
|
|
] as const;
|
|
|
|
|
2023-03-02 11:40:43 +02:00
|
|
|
// なんか動かない
|
|
|
|
//export const CURRENT_STICKY_TOP = Symbol('CURRENT_STICKY_TOP');
|
|
|
|
//export const CURRENT_STICKY_BOTTOM = Symbol('CURRENT_STICKY_BOTTOM');
|
|
|
|
export const CURRENT_STICKY_TOP = 'CURRENT_STICKY_TOP';
|
|
|
|
export const CURRENT_STICKY_BOTTOM = 'CURRENT_STICKY_BOTTOM';
|