/
awareness.ts
116 lines (113 loc) · 2 KB
/
awareness.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
/**
* From https://en.wikipedia.org/wiki/Moons_of_Jupiter
*
* @deprecated in favor of user service. Will be removed in v4.0
*/
export const moonsOfJupyter = [
'Metis',
'Adrastea',
'Amalthea',
'Thebe',
'Io',
'Europa',
'Ganymede',
'Callisto',
'Themisto',
'Leda',
'Ersa',
'Pandia',
'Himalia',
'Lysithea',
'Elara',
'Dia',
'Carpo',
'Valetudo',
'Euporie',
'Eupheme',
// 'S/2003 J 18',
// 'S/2010 J 2',
'Helike',
// 'S/2003 J 16',
// 'S/2003 J 2',
'Euanthe',
// 'S/2017 J 7',
'Hermippe',
'Praxidike',
'Thyone',
'Thelxinoe',
// 'S/2017 J 3',
'Ananke',
'Mneme',
// 'S/2016 J 1',
'Orthosie',
'Harpalyke',
'Iocaste',
// 'S/2017 J 9',
// 'S/2003 J 12',
// 'S/2003 J 4',
'Erinome',
'Aitne',
'Herse',
'Taygete',
// 'S/2017 J 2',
// 'S/2017 J 6',
'Eukelade',
'Carme',
// 'S/2003 J 19',
'Isonoe',
// 'S/2003 J 10',
'Autonoe',
'Philophrosyne',
'Cyllene',
'Pasithee',
// 'S/2010 J 1',
'Pasiphae',
'Sponde',
// 'S/2017 J 8',
'Eurydome',
// 'S/2017 J 5',
'Kalyke',
'Hegemone',
'Kale',
'Kallichore',
// 'S/2011 J 1',
// 'S/2017 J 1',
'Chaldene',
'Arche',
'Eirene',
'Kore',
// 'S/2011 J 2',
// 'S/2003 J 9',
'Megaclite',
'Aoede',
// 'S/2003 J 23',
'Callirrhoe',
'Sinope'
];
/**
* Get a random user-name based on the moons of Jupyter.
* This function returns names like "Anonymous Io" or "Anonymous Metis".
*
* @deprecated in favor of user service. Will be removed in v4.0
*/
export const getAnonymousUserName = (): string =>
'Anonymous ' +
moonsOfJupyter[Math.floor(Math.random() * moonsOfJupyter.length)];
/**
* @deprecated in favor of user service. Will be removed in v4.0
*/
export const userColors = [
'#12A0D3',
'#17AB30',
'#CC8500',
'#A79011',
'#ee6352',
'#609DA9',
'#4BA749',
'#00A1B3'
];
/**
* @deprecated in favor of user service. Will be removed in v4.0
*/
export const getRandomColor = (): string =>
userColors[Math.floor(Math.random() * userColors.length)];