-
-
Notifications
You must be signed in to change notification settings - Fork 393
/
DeprecatedFeatures.ts
131 lines (124 loc) · 5.62 KB
/
DeprecatedFeatures.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
import { ContentType, SubscriptionName } from '@standardnotes/common'
import {
EditorFeatureDescription,
IframeComponentFeatureDescription,
FeatureDescription,
} from '../Feature/FeatureDescription'
import { PermissionName } from '../Permission/PermissionName'
import { FeatureIdentifier } from '../Feature/FeatureIdentifier'
import { NoteType } from '../Component/NoteType'
import { FillEditorComponentDefaults } from './Utilities/FillEditorComponentDefaults'
import { ComponentAction } from '../Component/ComponentAction'
import { ComponentArea } from '../Component/ComponentArea'
import { RoleName } from '@standardnotes/domain-core'
export function GetDeprecatedFeatures(): FeatureDescription[] {
const bold: EditorFeatureDescription = FillEditorComponentDefaults({
availableInSubscriptions: [SubscriptionName.PlusPlan, SubscriptionName.ProPlan],
name: 'Alternative Rich Text',
identifier: FeatureIdentifier.DeprecatedBoldEditor,
note_type: NoteType.RichText,
file_type: 'html',
component_permissions: [
{
name: ComponentAction.StreamContextItem,
content_types: [ContentType.Note],
},
{
name: ComponentAction.StreamItems,
content_types: [
ContentType.FilesafeCredentials,
ContentType.FilesafeFileMetadata,
ContentType.FilesafeIntegration,
],
},
],
spellcheckControl: true,
deprecated: true,
permission_name: PermissionName.BoldEditor,
description: 'A simple and peaceful rich editor that helps you write and think clearly.',
thumbnail_url: 'https://s3.amazonaws.com/standard-notes/screenshots/models/editors/bold.jpg',
availableInRoles: [RoleName.NAMES.PlusUser, RoleName.NAMES.ProUser],
})
const markdownBasic: EditorFeatureDescription = FillEditorComponentDefaults({
availableInSubscriptions: [SubscriptionName.PlusPlan, SubscriptionName.ProPlan],
name: 'Basic Markdown',
identifier: FeatureIdentifier.DeprecatedMarkdownBasicEditor,
note_type: NoteType.Markdown,
spellcheckControl: true,
file_type: 'md',
deprecated: true,
permission_name: PermissionName.MarkdownBasicEditor,
description: 'A Markdown editor with dynamic split-pane preview.',
thumbnail_url: 'https://s3.amazonaws.com/standard-notes/screenshots/models/editors/simple-markdown.jpg',
availableInRoles: [RoleName.NAMES.PlusUser, RoleName.NAMES.ProUser],
})
const markdownAlt: EditorFeatureDescription = FillEditorComponentDefaults({
availableInSubscriptions: [SubscriptionName.PlusPlan, SubscriptionName.ProPlan],
name: 'Markdown Alternative',
identifier: FeatureIdentifier.DeprecatedMarkdownVisualEditor,
note_type: NoteType.Markdown,
file_type: 'md',
deprecated: true,
permission_name: PermissionName.MarkdownVisualEditor,
spellcheckControl: true,
description:
'A WYSIWYG-style Markdown editor that renders Markdown in preview-mode while you type without displaying any syntax.',
index_path: 'build/index.html',
availableInRoles: [RoleName.NAMES.PlusUser, RoleName.NAMES.ProUser],
})
const markdownMinimist: EditorFeatureDescription = FillEditorComponentDefaults({
availableInSubscriptions: [SubscriptionName.PlusPlan, SubscriptionName.ProPlan],
name: 'Minimal Markdown',
identifier: FeatureIdentifier.DeprecatedMarkdownMinimistEditor,
note_type: NoteType.Markdown,
file_type: 'md',
index_path: 'index.html',
permission_name: PermissionName.MarkdownMinimistEditor,
spellcheckControl: true,
deprecated: true,
description: 'A minimal Markdown editor with live rendering and in-text search via Ctrl/Cmd + F',
thumbnail_url: 'https://s3.amazonaws.com/standard-notes/screenshots/models/editors/min-markdown.jpg',
availableInRoles: [RoleName.NAMES.PlusUser, RoleName.NAMES.ProUser],
})
const markdownMath: EditorFeatureDescription = FillEditorComponentDefaults({
availableInSubscriptions: [SubscriptionName.PlusPlan, SubscriptionName.ProPlan],
name: 'Markdown with Math',
identifier: FeatureIdentifier.DeprecatedMarkdownMathEditor,
spellcheckControl: true,
permission_name: PermissionName.MarkdownMathEditor,
note_type: NoteType.Markdown,
file_type: 'md',
deprecated: true,
index_path: 'index.html',
description: 'A beautiful split-pane Markdown editor with synced-scroll, LaTeX support, and colorful syntax.',
thumbnail_url: 'https://s3.amazonaws.com/standard-notes/screenshots/models/editors/fancy-markdown.jpg',
availableInRoles: [RoleName.NAMES.PlusUser, RoleName.NAMES.ProUser],
})
const filesafe: IframeComponentFeatureDescription = FillEditorComponentDefaults({
availableInSubscriptions: [SubscriptionName.PlusPlan, SubscriptionName.ProPlan],
name: 'FileSafe',
identifier: FeatureIdentifier.DeprecatedFileSafe,
component_permissions: [
{
name: ComponentAction.StreamContextItem,
content_types: [ContentType.Note],
},
{
name: ComponentAction.StreamItems,
content_types: [
ContentType.FilesafeCredentials,
ContentType.FilesafeFileMetadata,
ContentType.FilesafeIntegration,
],
},
],
permission_name: PermissionName.ComponentFilesafe,
area: ComponentArea.EditorStack,
deprecated: true,
description:
'Encrypted attachments for your notes using your Dropbox, Google Drive, or WebDAV server. Limited to 50MB per file.',
thumbnail_url: 'https://s3.amazonaws.com/standard-notes/screenshots/models/FileSafe-banner.png',
availableInRoles: [RoleName.NAMES.PlusUser, RoleName.NAMES.ProUser],
})
return [bold, markdownBasic, markdownMinimist, markdownMath, markdownAlt, filesafe]
}