Update README.md
[KisSync.git] / templates / channeloptions.pug
blob23c7889199414177acb6d54b4b1dd8b7da1621a6
1 mixin lcheckbox(id, label)
2   .form-group
3     label.control-label.col-sm-4(for=id)= label
4     .col-sm-8
5       .checkbox
6         input(type="checkbox", id=id)
8 mixin rcheckbox(id, label)
9   .form-group
10     .col-sm-8.col-sm-offset-4
11       .checkbox
12         label(for=id)
13           input(type="checkbox", id=id)
14           = label
16 mixin textbox(id, label, placeholder)
17   .form-group
18     label.control-label.col-sm-4(for=id)= label
19     .col-sm-8
20       if placeholder
21         input.form-control(id=id, type="text", placeholder=placeholder)
22       else
23         input.form-control(id=id, type="text")
25 mixin lcheckbox-auto(id, label)
26   .form-group
27     label.control-label.col-sm-4(for=id)= label
28     .col-sm-8
29       .checkbox
30         input.cs-checkbox(type="checkbox", id=id)
32 mixin rcheckbox-auto(id, label)
33   .form-group
34     .col-sm-8.col-sm-offset-4
35       .checkbox
36         label(for=id)
37           input.cs-checkbox(type="checkbox", id=id)
38           = label
40 mixin textbox-auto(id, label, placeholder)
41   .form-group
42     label.control-label.col-sm-4(for=id)= label
43     .col-sm-8
44       if placeholder
45         input.form-control.cs-textbox(id=id, type="text", placeholder=placeholder)
46       else
47         input.form-control.cs-textbox(id=id, type="text")
49 mixin textbox-timeinput-auto(id, label, placeholder)
50   .form-group
51     label.control-label.col-sm-4(for=id)= label
52     .col-sm-8
53       if placeholder
54         input.form-control.cs-textbox-timeinput(id=id, type="text", placeholder=placeholder)
55       else
56         input.form-control.cs-textbox-timeinput(id=id, type="text")
58 mixin miscoptions
59   #cs-miscoptions.tab-pane.active
60     h4 General Settings
61     form.form-horizontal(action="javascript:void(0)")
62       +rcheckbox-auto("cs-allow_voteskip", "Allow voteskip")
63       +rcheckbox-auto("cs-allow_dupes", "Allow duplicate videos on the playlist")
64       +textbox-auto("cs-voteskip_ratio", "Voteskip ratio", "0.5")
65       +textbox-auto("cs-maxlength", "Max video length", "HH:MM:SS")
66       +textbox-timeinput-auto("cs-playlist_max_duration_per_user", "Max total queue time per user", "HH:MM:SS")
67       +textbox-auto("cs-afk_timeout", "Auto-AFK Delay", "0 (disabled)")
68       .form-group
69         .col-sm-offset-4
70     h4 Chat Settings
71     form.form-horizontal(action="javascript:void(0)")
72       +rcheckbox-auto("cs-enable_link_regex", "Convert URLs in chat to links")
73       +rcheckbox-auto("cs-chat_antiflood", "Throttle chat")
74       +textbox-auto("cs-chat_antiflood_burst", "# of messages allowed before throttling")
75       +textbox-auto("cs-chat_antiflood_sustained", "# of messages (after burst) allowed per second")
76       +textbox-timeinput-auto("cs-new_user_chat_delay", "Delay before new accounts can chat", "0")
77       .form-group
78         .col-sm-8.col-sm-offset-4
79           span.text-info Restrictions to new accounts can be disabled by setting the delay to 0.
80       +textbox-timeinput-auto("cs-new_user_chat_link_delay", "Delay before new accounts can post links in chat", "0")
81       .form-group
82         .col-sm-8.col-sm-offset-4
83           span.text-info Changes are automatically saved.
85 mixin adminoptions
86   #cs-adminoptions.tab-pane
87     h4 Admin-Only Settings
88     form.form-horizontal(action="javascript:void(0)")
89       - var defname = `CyTube - /${channelPath}/${channelName}`
90       +textbox-auto("cs-pagetitle", "Page title", defname)
91       +textbox-auto("cs-password", "Password", "leave blank to disable")
92       +textbox-auto("cs-externalcss", "External CSS", "Stylesheet URL")
93       +textbox-auto("cs-externaljs", "External Javascript", "Script URL")
94       +rcheckbox-auto("cs-show_public", "List channel publicly")
95       +rcheckbox-auto("cs-allow_anon_chat", "Allow anonymous chat")
96       +rcheckbox-auto("cs-torbanned", "Block connections from Tor")
97       +rcheckbox-auto("cs-block_anonymous_users", "Block anonymous users")
98       +rcheckbox-auto("cs-allow_ascii_control", "Allow ASCII control characters (e.g. newlines)")
99       +textbox-auto("cs-playlist_max_per_user", "Maximum # of videos per user")
100       .form-group
101         .col-sm-8.col-sm-offset-4
102           span.text-info Set to 0 for no limit
103       .form-group
104         .col-sm-8.col-sm-offset-4
105           span.text-info Changes are automatically saved.
107 mixin motdeditor
108   #cs-motdeditor.tab-pane
109     h4 MOTD editor
110     p The MOTD can be formatted using a subset of HTML.  Tags which attempt to execute Javascript will be removed.
111     textarea.form-control#cs-motdtext(rows="10")
112     button.btn.btn-primary#cs-motdsubmit Save MOTD
114 mixin csseditor
115   #cs-csseditor.tab-pane
116     h4 CSS editor
117     p Maximum size 20KB.  If more space is required, use the External CSS option under General Settings to link to an externally hosted stylesheet.
118     textarea.form-control#cs-csstext(rows="10")
119     button.btn.btn-primary#cs-csssubmit Save CSS
121 mixin jseditor
122   #cs-jseditor.tab-pane
123     h4 JS editor
124     p Maximum size 20KB.  If more space is required, use the External JS option under General Settings to link to an externally hosted stylesheet.
125     textarea.form-control#cs-jstext(rows="10")
126     button.btn.btn-primary#cs-jssubmit Save JS
128 mixin banlist
129   #cs-banlist.tab-pane
130     h4 Ban list
131     table.table.table-striped
132       thead
133         tr
134           th Unban
135           th IP
136           th Name
137           th Banned by
139 mixin recentjoins
140   #cs-recentjoins.tab-pane
141     h4 Recent connections
142     table.table.table-striped
143       thead
144         tr
145           th Name
146           th Aliases
147           th Time
149 mixin chanranks
150   #cs-chanranks.tab-pane
151     h4 Moderator List
152     form.form-inline(action="javascript:void(0)", role="form")
153       .input-group
154         input#cs-chanranks-name.form-control(type="text", placeholder="Name")
155         span.input-group-btn
156           button#cs-chanranks-mod.btn.btn-success +Mod
157           button#cs-chanranks-adm.btn.btn-info +Admin
158           button#cs-chanranks-owner.btn.btn-info +Owner
159     table.table.table-striped
160       thead
161         tr
162           th Name
163           th Rank
165 mixin chatfilters
166   #cs-chatfilters.tab-pane
167     h4 Chat Filters
168     form.form-horizontal(action="javascript:void(0)", role="form")
169       +textbox("cs-chatfilters-newname", "Filter name")
170       +textbox("cs-chatfilters-newregex", "Filter regex")
171       .form-group
172         label.control-label.col-sm-4(for="cs-chatfilters-newflags") Flags
173         .col-sm-8
174           input#cs-chatfilters-newflags.form-control.cs-textbox(type="text", value="g")
175       +textbox("cs-chatfilters-newreplace", "Replacement")
176       .form-group
177         .col-sm-8.col-sm-offset-4
178           button#cs-chatfilters-newsubmit.btn.btn-primary Create Filter
179     table.table.table-striped.table-condensed
180       thead
181         tr
182           th Control
183           th Name
184           th Active
186     button#cs-chatfilters-export.btn.btn-default Export filter list
187     button#cs-chatfilters-import.btn.btn-default Import filter list
188     textarea#cs-chatfilters-exporttext.form-control(rows="5")
190 mixin emotes
191   #cs-emotes.tab-pane
192     h4 Emotes
193     form.form-horizontal(action="javascript:void(0)", role="form")
194       +textbox("cs-emotes-newname", "Emote name")
195       +textbox("cs-emotes-newimage", "Emote image")
196       .form-group
197         .col-sm-8.col-sm-offset-4
198           button#cs-emotes-newsubmit.btn.btn-primary Create Emote
199     form.form-inline
200       .form-group
201         input.emotelist-search.form-control(type="text", placeholder="Search")
202       .form-group
203         .checkbox
204           label
205             input.emotelist-alphabetical(type="checkbox")
206             | Sort alphabetically
207     .emotelist-paginator-container
208     table.emotelist-table.table.table-striped.table-condensed
209       thead
210         tr
211           th Delete
212           th Name
213           th Image
214       tbody
216     button#cs-emotes-export.btn.btn-default Export emote list
217     button#cs-emotes-import.btn.btn-default Import emote list
218     textarea#cs-emotes-exporttext.form-control(rows="5")
220 mixin chanlog
221   #cs-chanlog.tab-pane
222     h4 Channel Log
223     strong Filter Log:
224     select#cs-chanlog-filter.form-control(multiple="multiple")
225     pre#cs-chanlog-text
226     button.btn.btn-default#cs-chanlog-refresh Refresh
228 mixin permeditor
229   #cs-permedit.tab-pane