]>
Commit | Line | Data |
---|---|---|
1 | import { writable } from 'svelte/store'; | |
2 | ||
3 | const internals = {}; | |
4 | ||
5 | internals.forums = [ | |
6 | { | |
7 | id: 'life', | |
8 | glyph: '☆', | |
9 | label: 'Life' | |
10 | }, | |
11 | { | |
12 | id: 'the-world', | |
13 | glyph: '◯', | |
14 | label: 'The World' | |
15 | }, | |
16 | { | |
17 | id: 'online', | |
18 | glyph: '⏀', | |
19 | label: 'Online' | |
20 | }, | |
21 | { | |
22 | id: 'experience', | |
23 | glyph: '♢', | |
24 | label: 'Experience' | |
25 | }, | |
26 | { | |
27 | id: 'belief', | |
28 | glyph: '⏃', | |
29 | label: 'Belief' | |
30 | }, | |
31 | { | |
32 | id: 'movement', | |
33 | glyph: '▷', | |
34 | label: 'Movement' | |
35 | }, | |
36 | { | |
37 | id: 'emotion', | |
38 | glyph: '☽', | |
39 | label: 'Emotion' | |
40 | }, | |
41 | { | |
42 | id: 'interaction', | |
43 | glyph: '〒', | |
44 | label: 'Interaction' | |
45 | }, | |
46 | { | |
47 | id: 'structure', | |
48 | glyph: '▢', | |
49 | label: 'Structure' | |
50 | }, | |
51 | { | |
52 | id: 'sound', | |
53 | glyph: '〰', | |
54 | label: 'Sound' | |
55 | }, | |
56 | { | |
57 | id: 'words', | |
58 | glyph: '╳', | |
59 | label: 'Words' | |
60 | }, | |
61 | { | |
62 | id: 'us', | |
63 | glyph: '╱', | |
64 | label: 'Us' | |
65 | }, | |
66 | { | |
67 | id: 'everything', | |
68 | glyph: '♡', | |
69 | label: 'Everything' | |
70 | } | |
71 | ]; | |
72 | ||
73 | export const forums = writable(internals.forums); | |
74 | ||
75 | export const addForum = function addForum() { | |
76 | ||
77 | const id = Math.random(); | |
78 | ||
79 | forums.update((originalForums) => ([...originalForums, | |
80 | { | |
81 | id, | |
82 | glyph: 'の', | |
83 | label: `Woah ${id}` | |
84 | } | |
85 | ])); | |
86 | }; |