1
Fork 0
tildes-reextended/source/options/features.ts

97 lines
2.1 KiB
TypeScript
Raw Normal View History

2022-02-25 00:34:11 +00:00
import Settings from '../settings.js';
import {
AboutSetting,
AnonymizeUsernamesSetting,
AutocompleteSetting,
BackToTopSetting,
HideVotesSetting,
JumpToNewCommentSetting,
MarkdownToolbarSetting,
2022-02-27 21:51:54 +00:00
ThemedLogoSetting,
UserLabelsSetting,
2022-02-25 00:06:24 +00:00
UsernameColorsSetting,
} from './components/exports.js';
2022-02-25 00:34:11 +00:00
type Feature = {
2022-02-25 13:47:20 +00:00
availableSince: Date;
2022-02-25 00:34:11 +00:00
index: number;
key: keyof RemoveIndexSignature<Settings['features']>;
title: string;
component: () => any;
};
export const features: Feature[] = [
{
2022-02-25 13:47:20 +00:00
availableSince: new Date('2022-02-23'),
index: 0,
key: 'anonymizeUsernames',
2022-02-25 00:34:11 +00:00
title: 'Anonymize Usernames',
component: () => AnonymizeUsernamesSetting,
},
{
2022-02-25 13:47:20 +00:00
availableSince: new Date('2020-10-03'),
index: 0,
key: 'autocomplete',
2022-02-25 00:34:11 +00:00
title: 'Autocomplete',
component: () => AutocompleteSetting,
},
{
2022-02-25 13:47:20 +00:00
availableSince: new Date('2019-11-10'),
index: 0,
key: 'backToTop',
2022-02-25 00:34:11 +00:00
title: 'Back To Top',
component: () => BackToTopSetting,
},
{
2022-02-25 13:47:20 +00:00
availableSince: new Date('2019-11-12'),
index: 0,
key: 'hideVotes',
2022-02-25 00:34:11 +00:00
title: 'Hide Votes',
component: () => HideVotesSetting,
},
{
2022-02-25 13:47:20 +00:00
availableSince: new Date('2019-11-10'),
index: 0,
key: 'jumpToNewComment',
2022-02-25 00:34:11 +00:00
title: 'Jump To New Comment',
component: () => JumpToNewCommentSetting,
},
{
2022-02-25 13:47:20 +00:00
availableSince: new Date('2019-11-12'),
index: 0,
key: 'markdownToolbar',
2022-02-25 00:34:11 +00:00
title: 'Markdown Toolbar',
component: () => MarkdownToolbarSetting,
},
2022-02-27 21:51:54 +00:00
{
availableSince: new Date('2022-02-27'),
index: 0,
key: 'themedLogo',
title: 'Themed Logo',
component: () => ThemedLogoSetting,
},
{
2022-02-25 13:47:20 +00:00
availableSince: new Date('2019-11-10'),
index: 0,
key: 'userLabels',
2022-02-25 00:34:11 +00:00
title: 'User Labels',
component: () => UserLabelsSetting,
},
2022-02-25 00:06:24 +00:00
{
2022-02-25 13:47:20 +00:00
availableSince: new Date('2022-02-25'),
2022-02-25 00:06:24 +00:00
index: 0,
key: 'usernameColors',
2022-02-25 00:34:11 +00:00
title: 'Username Colors',
2022-02-25 00:06:24 +00:00
component: () => UsernameColorsSetting,
},
{
2022-02-25 13:47:20 +00:00
availableSince: new Date('2019-11-10'),
index: 1,
key: 'debug',
2022-02-25 00:34:11 +00:00
title: 'About & Info',
component: () => AboutSetting,
},
2022-02-25 00:34:11 +00:00
];
features.sort((a, b) => a.index - b.index);