blob: 1ecb87992ec98ad6bc6f0c7e6ab58ad091097ba3 (
plain)
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
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
|
/- b=boke
/+ const=constants
|_ him=@p
++ tags
|= in=(list @t) ^- (list @t)
%+ skim in tag-filter
++ tag-map
|= tt=tags-table:b ^- tags-table:b
=/ tag-list ~(tap by tt)
%- malt
%+ skim tag-list |= [t=@t *] (tag-filter t)
++ post-filter
|= tags=(set @t) ^- ?
?^ (~(int in public-tags) tags) .y
=/ l ~(tap in tags)
|-
?~ l .y
?. (tag-filter i.l) .n
$(l t.l)
++ display-filter
|= t=@t ^- ?
?: .=('blog' t) .n
(tag-filter t)
++ tag-filter
|= t=@t ^- ?
?: .=('blog' t) .n
?: is-admin .y
?: is-comet (~(has in public-tags) t)
=/ group (~(get by groups) t)
?~ group .y
(~(has in u.group) him)
::?: .=('vip' t) (~(has in subscribers) him)
:: Where are tags shown
:: 1. Blog postlists
:: 2. Blog post headers
:: 3. Board index
:: 4. Thread index :: actually not yet
:: 5. Thread show, below the main post
:: 6. People can jump in
:: need a list of routes that expose tags
++ public-tags ^- (set @t)
%- silt
:~ 'wyb'
'public'
'ngmi'
'blog'
==
++ boards ^- (set @t)
?: is-comet public-tags
~(key by categories:const)
++ is-comet ?=(%pawn (clan:title him))
++ is-admin ^- ?
?| .=(him ~docteg-mothep)
.=((^sein:title him) ~docteg-mothep)
==
++ groups ^- (map @t (set @p))
|^
%- malt
:~ :- 'oldtianming' tianming
:- 'ogs' ogs
==
::
++ tianming ^- (set @p)
%- silt
:~ ~locpyl-tidnyd
~torwes-minput
==
++ ogs ^- (set @p)
%- silt
:~ ~sorwet
~finnem
~tiller-tolbus
~torwes-minput
~wispem-wantex
~sogsyt-rammer
~sivner-figbus
~simtex-poster
~libhut-samwes
~sarlev-sarsen
~samtyd-lodhet
~wolrex-sabdun
~ritpub-sipsyl
~rignet-bicteg
~ribben-donnyl
~ribfel-lodfep
~radbus-tactyl
~pathus-hiddyn
~mopfel-winrux
~molsur-winnel
~moddus-sorted
~midlyx-hatrys
~millyt-dorsen
~midsum-salrux
~micdeg-rinryl
~master-morzod
~locpyl-tidnyd
~hansel-ribbur
~fonner-batmul
~fiprys
~finned-palmer
~datder-sonnet
~bidhec-lopwyc
~mirtyl-wacdec
~polwex
~mogtus-sanlux
==
--
++ subscribers ^- (set @p)
%- silt
:~ ~polwex
~wolrex-sabdun
~mogtus-sanlux
~sollyd-ritnux
~bidhec-lopwyc
==
+$ substype $?(%base %urbit %full)
+$ subscription
$: started=@da
type=substype
period=$?(%monthly %yearly)
paid=payment
==
+$ payment
$% [%btc amount=@ud address=@t]
[%eth amount=@ud address=@ux]
[%other curr=@tas amount=@ud address=@t]
==
+$ subscription-map (map @p subscription)
++ subs ^- subscription-map
%- malt
:~ :- ~mogtus-sanlux `subscription`[~2024.3.1 %base %yearly %btc 0 '']
:- ~wolrex-sabdun `subscription`[~2024.3.4 %base %yearly %eth 14 0x0] :: TODO get the currency unit right
:- ~sollyd-ritnux `subscription`[~2024.3.13 %base %yearly %other %sol 0 ''] :: TODO get the currency unit right
:- ~bidhec-lopwyc `subscription`[~2024.3.18 %base %yearly %other %btc 74 ''] :: TODO get the currency unit right
:- ~fiprys `subscription`[~2024.3.24 %full %yearly %other %eth 6 ''] :: TODO get the currency unit right
:- ~molsur-winnel `subscription`[~2024.8.1 %full %yearly %other %eth 6 ''] :: TODO get the currency unit right
:- ~sigmes-modfyn `subscription`[~2024.1.6 %base %yearly %other %usdt 50 ''] :: TODO get the currency unit right
==
++ subscription-type
|= now=@da ^- (unit substype)
?: is-admin `%full
=/ sub (~(get by subs) him)
?~ sub ~
=/ expired %+ gte now
?: ?=(%yearly period.u.sub)
(add ~d365 started.u.sub)
(add ~d30 started.u.sub) :: TODO use yore for this
?: expired ~ %- some type.u.sub
--
|