EmailList: let csv links be clickable, add combined.csv support, conditionally display elements
This commit is contained in:
@ -1,8 +1,10 @@
|
||||
// Detect backend features to conditionally render elements
|
||||
import gte from 'semver/functions/gte';
|
||||
import { List as ImmutableList } from 'immutable';
|
||||
|
||||
export const getFeatures = instance => {
|
||||
const v = parseVersion(instance.get('version'));
|
||||
const f = instance.getIn(['pleroma', 'metadata', 'features'], ImmutableList());
|
||||
return {
|
||||
suggestions: v.software === 'Mastodon' && gte(v.compatVersion, '2.4.3'),
|
||||
trends: v.software === 'Mastodon' && gte(v.compatVersion, '3.0.0'),
|
||||
@ -11,6 +13,7 @@ export const getFeatures = instance => {
|
||||
attachmentLimit: v.software === 'Pleroma' ? Infinity : 4,
|
||||
focalPoint: v.software === 'Mastodon' && gte(v.compatVersion, '2.3.0'),
|
||||
importMutes: v.software === 'Pleroma' && gte(v.version, '2.2.0'),
|
||||
emailList: f.includes('email_list'),
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user