forked from WorldBrain/Memex
-
Notifications
You must be signed in to change notification settings - Fork 0
/
notifications.ts
94 lines (90 loc) · 2.83 KB
/
notifications.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
// Use these keys in case of action buttons, import the keys in the storage-keys-notif module
import * as storageKeys from './storage-keys-notif'
import * as actionTypes from './action-types'
import { NotifDefinition } from './types'
/** Time when create the notif, get the current unix time (Date.now()) - Important, the notif insertation in db depends on it */
export const releaseTime: number = 1542240979258
/* Example Notification:
{
id: 'direct_links_inital_notification',
search: {
title: 'New Feature: Memex.Link',
message:
'Test Message',
buttons: [
{
action: {
type: actionTypes.OPEN_URL,
url: 'https://worldbrain.io',
context: 'new-tab',
},
label: 'Learn More',
},
],
},
system: {
title: 'New Feature: Memex.Link',
message:
'Test Message',
buttons: [
{
action: {
type: actionTypes.OPEN_URL,
url: 'https://worldbrain.io',
context: 'new-tab',
},
label: 'Learn More',
},
],
},
overview: {
title: 'New Feature: Memex.Link',
message:
'Test Message',
buttons: [
{
action: {
type: actionTypes.OPEN_URL,
url: 'https://worldbrain.io',
context: 'new-tab',
},
label: 'Learn More',
},
],
},
},
*/
export const NOTIFS: NotifDefinition[] = [
{
id: 'backups_launch',
search: {
title: "Don't lose your knowledge!",
message: 'Backup your data to Google Drive',
buttons: [
{
action: {
type: actionTypes.OPEN_URL,
url: 'https://worldbrain.io/pricing',
context: 'new-tab',
},
label: 'Backup Now',
},
],
},
overview: {
title: "Don't lose your knowledge!",
message:
'Backup your data for free with our new Google Drive backup.',
buttons: [
{
action: {
type: actionTypes.OPEN_URL,
url: '/options.html#/backup',
context: 'new-tab',
},
label: 'Backup Now',
},
],
},
},
]