]> git.r.bdr.sh - rbdr/forum/blob - app/stores/forums.js
adc8758d1fc9e20a1efda07f1058b1d4bc09c880
[rbdr/forum] / app / stores / forums.js
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 function addForum() {
76 const id = Math.random();
77
78 forums.update((forums) => ([...forums,
79 {
80 id,
81 glyph: 'の',
82 label: `Woah ${id}`
83 }
84 ]));
85 };