summaryrefslogtreecommitdiff
path: root/client/html
diff options
context:
space:
mode:
authorHunternif <hunternif@gmail.com>2021-08-04 01:56:00 +0100
committerHunternif <hunternif@gmail.com>2021-08-04 01:56:00 +0100
commitca861cdc44ca476cec2949f237bbc7503862ad58 (patch)
tree520f918a9a77432bf283b46b4296812eb4332ffe /client/html
parentdd03540398fcab11bfc2c3cebed2fb7a78592c16 (diff)
parent59452711668b9f7a7aeea3c57301b22882987c2b (diff)
Merge remote-tracking branch 'origin/master' into hunternif
# Conflicts: # client/css/post-content-control.styl # client/css/post-list-view.styl # client/html/post_edit_sidebar.tpl # client/js/controllers/post_list_controller.js # client/js/controllers/post_main_controller.js # client/js/controllers/post_upload_controller.js # client/js/controllers/tag_controller.js # client/js/controllers/user_list_controller.js # client/js/controls/expander_control.js # client/js/controls/post_content_control.js # client/js/controls/post_edit_sidebar_control.js # client/js/controls/post_readonly_sidebar_control.js # client/js/controls/tag_input_control.js # client/js/main.js # client/js/models/abstract_list.js # client/js/models/post.js # client/js/models/post_list.js # client/js/models/settings.js # client/js/models/tag.js # client/js/models/tag_list.js # client/js/tags.js # client/js/util/search.js # client/js/util/touch.js # client/js/util/uri.js # client/js/util/views.js # client/js/views/post_main_view.js # client/js/views/post_upload_view.js # client/js/views/posts_header_view.js # client/js/views/posts_page_view.js # client/js/views/settings_view.js # client/js/views/tag_view.js # client/package-lock.json # client/package.json # server/config.yaml.dist # server/szurubooru/api/__init__.py # server/szurubooru/api/post_api.py # server/szurubooru/api/tag_api.py # server/szurubooru/func/posts.py # server/szurubooru/func/tags.py # server/szurubooru/model/__init__.py # server/szurubooru/model/post.py # server/szurubooru/model/tag.py # server/szurubooru/search/configs/__init__.py # server/szurubooru/search/configs/post_search_config.py # server/szurubooru/search/executor.py # server/szurubooru/tests/api/test_post_retrieving.py # server/szurubooru/tests/api/test_post_updating.py # server/szurubooru/tests/api/test_tag_updating.py # server/szurubooru/tests/conftest.py # server/szurubooru/tests/func/test_posts.py # server/szurubooru/tests/func/test_tags.py # server/szurubooru/tests/search/configs/test_post_search_config.py
Diffstat (limited to 'client/html')
-rw-r--r--client/html/help_search.tpl1
-rw-r--r--client/html/help_search_pools.tpl97
-rw-r--r--client/html/help_search_posts.tpl10
-rw-r--r--client/html/pool.tpl18
-rw-r--r--client/html/pool_categories.tpl30
-rw-r--r--client/html/pool_category_row.tpl43
-rw-r--r--client/html/pool_create.tpl42
-rw-r--r--client/html/pool_delete.tpl21
-rw-r--r--client/html/pool_edit.tpl50
-rw-r--r--client/html/pool_input.tpl7
-rw-r--r--client/html/pool_merge.tpl22
-rw-r--r--client/html/pool_summary.tpl23
-rw-r--r--client/html/pools_header.tpl22
-rw-r--r--client/html/pools_page.tpl48
-rw-r--r--client/html/post_content.tpl1
-rw-r--r--client/html/post_edit_sidebar.tpl9
-rw-r--r--client/html/post_merge_side.tpl1
-rw-r--r--client/html/post_readonly_sidebar.tpl10
-rw-r--r--client/html/post_upload_row.tpl10
-rw-r--r--client/html/posts_page.tpl2
-rw-r--r--client/html/settings.tpl27
-rw-r--r--client/html/tag.tpl2
-rw-r--r--client/html/tag_categories.tpl3
-rw-r--r--client/html/tag_category_row.tpl7
-rw-r--r--client/html/tags_page.tpl10
25 files changed, 489 insertions, 27 deletions
diff --git a/client/html/help_search.tpl b/client/html/help_search.tpl
index 7073789..e382f2e 100644
--- a/client/html/help_search.tpl
+++ b/client/html/help_search.tpl
@@ -4,6 +4,7 @@
--><li data-name='posts'><a href='<%- ctx.formatClientLink('help', 'search', 'posts') %>'>Posts</a></li><!--
--><li data-name='users'><a href='<%- ctx.formatClientLink('help', 'search', 'users') %>'>Users</a></li><!--
--><li data-name='tags'><a href='<%- ctx.formatClientLink('help', 'search', 'tags') %>'>Tags</a></li><!--
+ --><li data-name='pools'><a href='<%- ctx.formatClientLink('help', 'search', 'pools') %>'>Pools</li><!--
--></ul><!--
--></nav>
diff --git a/client/html/help_search_pools.tpl b/client/html/help_search_pools.tpl
new file mode 100644
index 0000000..a1f0c80
--- /dev/null
+++ b/client/html/help_search_pools.tpl
@@ -0,0 +1,97 @@
+<p><strong>Anonymous tokens</strong></p>
+
+<p>Same as <code>name</code> token.</p>
+
+<p><strong>Named tokens</strong></p>
+
+<table>
+ <tbody>
+ <tr>
+ <td><code>name</code></td>
+ <td>having given name (accepts wildcards)</td>
+ </tr>
+ <tr>
+ <td><code>category</code></td>
+ <td>having given category (accepts wildcards)</td>
+ </tr>
+ <tr>
+ <td><code>creation-date</code></td>
+ <td>created at given date</td>
+ </tr>
+ <tr>
+ <td><code>creation-time</code></td>
+ <td>alias of <code>creation-date</code></td>
+ </tr>
+ <tr>
+ <td><code>last-edit-date</code></td>
+ <td>edited at given date</td>
+ </tr>
+ <tr>
+ <td><code>last-edit-time</code></td>
+ <td>alias of <code>last-edit-date</code></td>
+ </tr>
+ <tr>
+ <td><code>edit-date</code></td>
+ <td>alias of <code>last-edit-date</code></td>
+ </tr>
+ <tr>
+ <td><code>edit-time</code></td>
+ <td>alias of <code>last-edit-date</code></td>
+ </tr>
+ <tr>
+ <td><code>post-count</code></td>
+ <td>alias of <code>usages</code></td>
+ </tr>
+ </tbody>
+</table>
+
+<p><strong>Sort style tokens</strong></p>
+
+<table>
+ <tbody>
+ <tr>
+ <td><code>random</code></td>
+ <td>as random as it can get</td>
+ </tr>
+ <tr>
+ <td><code>name</code></td>
+ <td>A to Z</td>
+ </tr>
+ <tr>
+ <td><code>category</code></td>
+ <td>category (A to Z)</td>
+ </tr>
+ <tr>
+ <td><code>creation-date</code></td>
+ <td>recently created first</td>
+ </tr>
+ <tr>
+ <td><code>creation-time</code></td>
+ <td>alias of <code>creation-date</code></td>
+ </tr>
+ <tr>
+ <td><code>last-edit-date</code></td>
+ <td>recently edited first</td>
+ </tr>
+ <tr>
+ <td><code>last-edit-time</code></td>
+ <td>alias of <code>creation-time</code></td>
+ </tr>
+ <tr>
+ <td><code>edit-date</code></td>
+ <td>alias of <code>creation-time</code></td>
+ </tr>
+ <tr>
+ <td><code>edit-time</code></td>
+ <td>alias of <code>creation-time</code></td>
+ </tr>
+ <tr>
+ <td><code>post-count</code></td>
+ <td>number of posts</td>
+ </tr>
+ </tbody>
+</table>
+
+<p><strong>Special tokens</strong></p>
+
+<p>None.</p>
diff --git a/client/html/help_search_posts.tpl b/client/html/help_search_posts.tpl
index d1097b7..efcb7c1 100644
--- a/client/html/help_search_posts.tpl
+++ b/client/html/help_search_posts.tpl
@@ -20,15 +20,15 @@
</tr>
<tr>
<td><code>uploader</code></td>
- <td>uploaded by given use (accepts wildcards)r</td>
+ <td>uploaded by given user (accepts wildcards)</td>
</tr>
<tr>
<td><code>upload</code></td>
- <td>alias of <code>upload</code></td>
+ <td>alias of <code>uploader</code></td>
</tr>
<tr>
<td><code>submit</code></td>
- <td>alias of <code>upload</code></td>
+ <td>alias of <code>uploader</code></td>
</tr>
<tr>
<td><code>comment</code></td>
@@ -43,6 +43,10 @@
<td>having given source URL (accepts wildcards)</td>
</tr>
<tr>
+ <td><code>pool</code></td>
+ <td>belonging to the pool with the given ID</td>
+ </tr>
+ <tr>
<td><code>tag-count</code></td>
<td>having given number of tags</td>
</tr>
diff --git a/client/html/pool.tpl b/client/html/pool.tpl
new file mode 100644
index 0000000..831d07c
--- /dev/null
+++ b/client/html/pool.tpl
@@ -0,0 +1,18 @@
+<div class='content-wrapper' id='pool'>
+ <h1><%- ctx.getPrettyName(ctx.pool.names[0]) %></h1>
+ <nav class='buttons'><!--
+ --><ul><!--
+ --><li data-name='summary'><a href='<%- ctx.formatClientLink('pool', ctx.pool.id) %>'>Summary</a></li><!--
+ --><% if (ctx.canEditAnything) { %><!--
+ --><li data-name='edit'><a href='<%- ctx.formatClientLink('pool', ctx.pool.id, 'edit') %>'>Edit</a></li><!--
+ --><% } %><!--
+ --><% if (ctx.canMerge) { %><!--
+ --><li data-name='merge'><a href='<%- ctx.formatClientLink('pool', ctx.pool.id, 'merge') %>'>Merge with&hellip;</a></li><!--
+ --><% } %><!--
+ --><% if (ctx.canDelete) { %><!--
+ --><li data-name='delete'><a href='<%- ctx.formatClientLink('pool', ctx.pool.id, 'delete') %>'>Delete</a></li><!--
+ --><% } %><!--
+ --></ul><!--
+ --></nav>
+ <div class='pool-content-holder'></div>
+</div>
diff --git a/client/html/pool_categories.tpl b/client/html/pool_categories.tpl
new file mode 100644
index 0000000..b045038
--- /dev/null
+++ b/client/html/pool_categories.tpl
@@ -0,0 +1,30 @@
+<div class='content-wrapper pool-categories'>
+ <form>
+ <h1>Pool categories</h1>
+ <div class="table-wrap">
+ <table>
+ <thead>
+ <tr>
+ <th class='name'>Category name</th>
+ <th class='color'>CSS color</th>
+ <th class='usages'>Usages</th>
+ </tr>
+ </thead>
+ <tbody>
+ </tbody>
+ </table>
+ </div>
+
+ <% if (ctx.canCreate) { %>
+ <p><a href class='add'>Add new category</a></p>
+ <% } %>
+
+ <div class='messages'></div>
+
+ <% if (ctx.canCreate || ctx.canEditName || ctx.canEditColor || ctx.canDelete) { %>
+ <div class='buttons'>
+ <input type='submit' class='save' value='Save changes'>
+ </div>
+ <% } %>
+ </form>
+</div>
diff --git a/client/html/pool_category_row.tpl b/client/html/pool_category_row.tpl
new file mode 100644
index 0000000..5ff4456
--- /dev/null
+++ b/client/html/pool_category_row.tpl
@@ -0,0 +1,43 @@
+<% if (ctx.poolCategory.isDefault) { %><%
+ %><tr data-category='<%- ctx.poolCategory.name %>' class='default'><%
+%><% } else { %><%
+ %><tr data-category='<%- ctx.poolCategory.name %>'><%
+%><% } %>
+ <td class='name'>
+ <% if (ctx.canEditName) { %>
+ <%= ctx.makeTextInput({value: ctx.poolCategory.name, required: true}) %>
+ <% } else { %>
+ <%- ctx.poolCategory.name %>
+ <% } %>
+ </td>
+ <td class='color'>
+ <% if (ctx.canEditColor) { %>
+ <%= ctx.makeColorInput({value: ctx.poolCategory.color}) %>
+ <% } else { %>
+ <%- ctx.poolCategory.color %>
+ <% } %>
+ </td>
+ <td class='usages'>
+ <% if (ctx.poolCategory.name) { %>
+ <a href='<%- ctx.formatClientLink('pools', {query: 'category:' + ctx.poolCategory.name}) %>'>
+ <%- ctx.poolCategory.poolCount %>
+ </a>
+ <% } else { %>
+ <%- ctx.poolCategory.poolCount %>
+ <% } %>
+ </td>
+ <% if (ctx.canDelete) { %>
+ <td class='remove'>
+ <% if (ctx.poolCategory.poolCount) { %>
+ <a class='inactive' title="Can't delete category in use">Remove</a>
+ <% } else { %>
+ <a href>Remove</a>
+ <% } %>
+ </td>
+ <% } %>
+ <% if (ctx.canSetDefault) { %>
+ <td class='set-default'>
+ <a href>Make default</a>
+ </td>
+ <% } %>
+</tr>
diff --git a/client/html/pool_create.tpl b/client/html/pool_create.tpl
new file mode 100644
index 0000000..3c04545
--- /dev/null
+++ b/client/html/pool_create.tpl
@@ -0,0 +1,42 @@
+<div class='content-wrapper pool-create'>
+ <form>
+ <ul class='input'>
+ <li class='names'>
+ <%= ctx.makeTextInput({
+ text: 'Names',
+ value: '',
+ required: true,
+ }) %>
+ </li>
+ <li class='category'>
+ <%= ctx.makeSelect({
+ text: 'Category',
+ keyValues: ctx.categories,
+ selectedKey: 'default',
+ required: true,
+ }) %>
+ </li>
+ <li class='description'>
+ <%= ctx.makeTextarea({
+ text: 'Description',
+ value: '',
+ }) %>
+ </li>
+ <li class='posts'>
+ <%= ctx.makeTextInput({
+ text: 'Posts',
+ value: '',
+ placeholder: 'space-separated post IDs',
+ }) %>
+ </li>
+ </ul>
+
+ <% if (ctx.canCreate) { %>
+ <div class='messages'></div>
+
+ <div class='buttons'>
+ <input type='submit' class='save' value='Create pool'>
+ </div>
+ <% } %>
+ </form>
+</div>
diff --git a/client/html/pool_delete.tpl b/client/html/pool_delete.tpl
new file mode 100644
index 0000000..1ef7fb5
--- /dev/null
+++ b/client/html/pool_delete.tpl
@@ -0,0 +1,21 @@
+<div class='pool-delete'>
+ <form>
+ <p>This pool has <a href='<%- ctx.formatClientLink('posts', {query: 'pool:' + ctx.pool.id}) %>'><%- ctx.pool.postCount %> post(s)</a>.</p>
+
+ <ul class='input'>
+ <li>
+ <%= ctx.makeCheckbox({
+ name: 'confirm-deletion',
+ text: 'I confirm that I want to delete this pool.',
+ required: true,
+ }) %>
+ </li>
+ </ul>
+
+ <div class='messages'></div>
+
+ <div class='buttons'>
+ <input type='submit' value='Delete pool'/>
+ </div>
+ </form>
+</div>
diff --git a/client/html/pool_edit.tpl b/client/html/pool_edit.tpl
new file mode 100644
index 0000000..c9f2adb
--- /dev/null
+++ b/client/html/pool_edit.tpl
@@ -0,0 +1,50 @@
+<div class='content-wrapper pool-edit'>
+ <form>
+ <ul class='input'>
+ <li class='names'>
+ <% if (ctx.canEditNames) { %>
+ <%= ctx.makeTextInput({
+ text: 'Names',
+ value: ctx.pool.names.join(' '),
+ required: true,
+ }) %>
+ <% } %>
+ </li>
+ <li class='category'>
+ <% if (ctx.canEditCategory) { %>
+ <%= ctx.makeSelect({
+ text: 'Category',
+ keyValues: ctx.categories,
+ selectedKey: ctx.pool.category,
+ required: true,
+ }) %>
+ <% } %>
+ </li>
+ <li class='description'>
+ <% if (ctx.canEditDescription) { %>
+ <%= ctx.makeTextarea({
+ text: 'Description',
+ value: ctx.pool.description,
+ }) %>
+ <% } %>
+ </li>
+ <li class='posts'>
+ <% if (ctx.canEditPosts) { %>
+ <%= ctx.makeTextInput({
+ text: 'Posts',
+ placeholder: 'space-separated post IDs',
+ value: ctx.pool.posts.map(post => post.id).join(' ')
+ }) %>
+ <% } %>
+ </li>
+ </ul>
+
+ <% if (ctx.canEditAnything) { %>
+ <div class='messages'></div>
+
+ <div class='buttons'>
+ <input type='submit' class='save' value='Save changes'>
+ </div>
+ <% } %>
+ </form>
+</div>
diff --git a/client/html/pool_input.tpl b/client/html/pool_input.tpl
new file mode 100644
index 0000000..483e790
--- /dev/null
+++ b/client/html/pool_input.tpl
@@ -0,0 +1,7 @@
+<div class='pool-input'>
+ <div class='main-control'>
+ <input type='text' placeholder='type to add…'/>
+ </div>
+
+ <ul class='compact-pools'></ul>
+</div>
diff --git a/client/html/pool_merge.tpl b/client/html/pool_merge.tpl
new file mode 100644
index 0000000..ea5776a
--- /dev/null
+++ b/client/html/pool_merge.tpl
@@ -0,0 +1,22 @@
+<div class='pool-merge'>
+ <form>
+ <ul class='input'>
+ <li class='target'>
+ <%= ctx.makeTextInput({name: 'target-pool', required: true, text: 'Target pool', pattern: ctx.poolNamePattern}) %>
+ </li>
+
+ <li>
+ <p>Posts in the two pools will be combined.
+ Category needs to be handled manually.</p>
+
+ <%= ctx.makeCheckbox({required: true, text: 'I confirm that I want to merge this pool.'}) %>
+ </li>
+ </ul>
+
+ <div class='messages'></div>
+
+ <div class='buttons'>
+ <input type='submit' value='Merge pool'/>
+ </div>
+ </form>
+</div>
diff --git a/client/html/pool_summary.tpl b/client/html/pool_summary.tpl
new file mode 100644
index 0000000..8f4e27d
--- /dev/null
+++ b/client/html/pool_summary.tpl
@@ -0,0 +1,23 @@
+<div class='content-wrapper pool-summary'>
+ <section class='details'>
+ <section>
+ Category:
+ <span class='<%= ctx.makeCssName(ctx.pool.category, 'pool') %>'><%- ctx.pool.category %></span>
+ </section>
+
+ <section>
+ Aliases:<br/>
+ <ul><!--
+ --><% for (let name of ctx.pool.names.slice(1)) { %><!--
+ --><li><%= ctx.makePoolLink(ctx.pool.id, false, false, ctx.pool, name) %></li><!--
+ --><% } %><!--
+ --></ul>
+ </section>
+ </section>
+
+ <section class='description'>
+ <hr/>
+ <%= ctx.makeMarkdown(ctx.pool.description || 'This pool has no description yet.') %>
+ <p>This pool has <a href='<%- ctx.formatClientLink('posts', {query: 'pool:' + ctx.pool.id}) %>'><%- ctx.pool.postCount %> post(s)</a>.</p>
+ </section>
+</div>
diff --git a/client/html/pools_header.tpl b/client/html/pools_header.tpl
new file mode 100644
index 0000000..c54959f
--- /dev/null
+++ b/client/html/pools_header.tpl
@@ -0,0 +1,22 @@
+<div class='pool-list-header'>
+ <form class='horizontal'>
+ <ul class='input'>
+ <li>
+ <%= ctx.makeTextInput({text: 'Search query', id: 'search-text', name: 'search-text', value: ctx.parameters.query}) %>
+ </li>
+ </ul>
+
+ <div class='buttons'>
+ <input type='submit' value='Search'/>
+ <a class='button append' href='<%- ctx.formatClientLink('help', 'search', 'pools') %>'>Syntax help</a>
+
+ <% if (ctx.canCreate) { %>
+ <a class='append' href='<%- ctx.formatClientLink('pool', 'create') %>'>Add new pool</a>
+ <% } %>
+
+ <% if (ctx.canEditPoolCategories) { %>
+ <a class='append' href='<%- ctx.formatClientLink('pool-categories') %>'>Pool categories</a>
+ <% } %>
+ </div>
+ </form>
+</div>
diff --git a/client/html/pools_page.tpl b/client/html/pools_page.tpl
new file mode 100644
index 0000000..0d81180
--- /dev/null
+++ b/client/html/pools_page.tpl
@@ -0,0 +1,48 @@
+<div class='pool-list table-wrap'>
+ <% if (ctx.response.results.length) { %>
+ <table>
+ <thead>
+ <th class='names'>
+ <% if (ctx.parameters.query == 'sort:name' || !ctx.parameters.query) { %>
+ <a href='<%- ctx.formatClientLink('pools', {query: '-sort:name'}) %>'>Pool name(s)</a>
+ <% } else { %>
+ <a href='<%- ctx.formatClientLink('pools', {query: 'sort:name'}) %>'>Pool name(s)</a>
+ <% } %>
+ </th>
+ <th class='post-count'>
+ <% if (ctx.parameters.query == 'sort:post-count') { %>
+ <a href='<%- ctx.formatClientLink('pools', {query: '-sort:post-count'}) %>'>Post count</a>
+ <% } else { %>
+ <a href='<%- ctx.formatClientLink('pools', {query: 'sort:post-count'}) %>'>Post count</a>
+ <% } %>
+ </th>
+ <th class='creation-time'>
+ <% if (ctx.parameters.query == 'sort:creation-time') { %>
+ <a href='<%- ctx.formatClientLink('pools', {query: '-sort:creation-time'}) %>'>Created on</a>
+ <% } else { %>
+ <a href='<%- ctx.formatClientLink('pools', {query: 'sort:creation-time'}) %>'>Created on</a>
+ <% } %>
+ </th>
+ </thead>
+ <tbody>
+ <% for (let pool of ctx.response.results) { %>
+ <tr>
+ <td class='names'>
+ <ul>
+ <% for (let name of pool.names) { %>
+ <li><%= ctx.makePoolLink(pool.id, false, false, pool, name) %></li>
+ <% } %>
+ </ul>
+ </td>
+ <td class='post-count'>
+ <a href='<%- ctx.formatClientLink('posts', {query: 'pool:' + pool.id}) %>'><%- pool.postCount %></a>
+ </td>
+ <td class='creation-time'>
+ <%= ctx.makeRelativeTime(pool.creationTime) %>
+ </td>
+ </tr>
+ <% } %>
+ </tbody>
+ </table>
+ <% } %>
+</div>
diff --git a/client/html/post_content.tpl b/client/html/post_content.tpl
index 10bfb15..fd5b094 100644
--- a/client/html/post_content.tpl
+++ b/client/html/post_content.tpl
@@ -17,6 +17,7 @@
class: 'resize-listener',
controls: true,
loop: (ctx.post.flags || []).includes('loop'),
+ playsinline: true,
autoplay: ctx.autoplay,
},
ctx.makeElement('source', {
diff --git a/client/html/post_edit_sidebar.tpl b/client/html/post_edit_sidebar.tpl
index 85c039f..9408606 100644
--- a/client/html/post_edit_sidebar.tpl
+++ b/client/html/post_edit_sidebar.tpl
@@ -60,9 +60,8 @@
<% if (ctx.canEditPostSource) { %>
<section class='post-source'>
- <%= ctx.makeTextInput({
+ <%= ctx.makeTextarea({
text: 'Source',
- name: 'source',
value: ctx.post.source,
}) %>
</section>
@@ -74,6 +73,12 @@
</section>
<% } %>
+ <% if (ctx.canEditPoolPosts) { %>
+ <section class='pools'>
+ <%= ctx.makeTextInput({}) %>
+ </section>
+ <% } %>
+
<% if (ctx.canEditPostMetrics) { %>
<section class='metrics'>
<%= ctx.makeTextInput({}) %>
diff --git a/client/html/post_merge_side.tpl b/client/html/post_merge_side.tpl
index b2c1fc6..53dd31f 100644
--- a/client/html/post_merge_side.tpl
+++ b/client/html/post_merge_side.tpl
@@ -35,6 +35,7 @@
'image/gif': 'GIF',
'image/jpeg': 'JPEG',
'image/png': 'PNG',
+ 'image/webp': 'WEBP',
'video/webm': 'WEBM',
'video/mp4': 'MPEG-4',
'application/x-shockwave-flash': 'SWF',
diff --git a/client/html/post_readonly_sidebar.tpl b/client/html/post_readonly_sidebar.tpl
index 9f6c530..8dfafdc 100644
--- a/client/html/post_readonly_sidebar.tpl
+++ b/client/html/post_readonly_sidebar.tpl
@@ -8,6 +8,7 @@
'image/gif': 'GIF',
'image/jpeg': 'JPEG',
'image/png': 'PNG',
+ 'image/webp': 'WEBP',
'video/webm': 'WEBM',
'video/mp4': 'MPEG-4',
'application/x-shockwave-flash': 'SWF',
@@ -41,9 +42,10 @@
<% if (ctx.post.source) { %>
<section class='source'>
- Source: <a href='<%- ctx.post.source %>' title='<%- ctx.post.source %>'>
- <%- ctx.post.prettyPrintSource() %>
- </a>
+ Source: <% for (let i = 0; i < ctx.post.sourceSplit.length; i++) { %>
+ <% if (i != 0) { %>&middot;<% } %>
+ <a href='<%- ctx.post.sourceSplit[i] %>' title='<%- ctx.post.sourceSplit[i] %>'><%- ctx.extractRootDomain(ctx.post.sourceSplit[i]) %></a>
+ <% } %>
</section>
<% } %>
@@ -91,7 +93,7 @@
--><% if (ctx.canListPosts) { %><!--
--><a href='<%- ctx.formatClientLink('posts', {query: ctx.escapeColons(tag.names[0])}) %>' class='<%= ctx.makeCssName(tag.category, 'tag') %>'><!--
--><% } %><!--
- --><%- tag.names[0] %>&#32;<!--
+ --><%- ctx.getPrettyName(tag.names[0]) %>&#32;<!--
--><% if (ctx.canListPosts) { %><!--
--></a><!--
--><% } %><!--
diff --git a/client/html/post_upload_row.tpl b/client/html/post_upload_row.tpl
index d5875f2..559e935 100644
--- a/client/html/post_upload_row.tpl
+++ b/client/html/post_upload_row.tpl
@@ -64,16 +64,6 @@
}) %>
</div>
<% } %>
-
- <% if (['video'].includes(ctx.uploadable.type)) { %>
- <div class='loop-video'>
- <%= ctx.makeCheckbox({
- text: 'Loop video',
- name: 'loop-video',
- checked: ctx.uploadable.flags.includes('loop'),
- }) %>
- </div>
- <% } %>
</div>
<div class='messages'></div>
diff --git a/client/html/posts_page.tpl b/client/html/posts_page.tpl
index ea1bbfb..5336fe8 100644
--- a/client/html/posts_page.tpl
+++ b/client/html/posts_page.tpl
@@ -1,4 +1,4 @@
-<div class='post-list'>
+<% if (ctx.postFlow) { %><div class='post-list post-flow'><% } else { %><div class='post-list'><% } %>
<% if (ctx.response.results.length) { %>
<ul>
<% for (let post of ctx.response.results) { %>
diff --git a/client/html/settings.tpl b/client/html/settings.tpl
index f85b012..25ba63a 100644
--- a/client/html/settings.tpl
+++ b/client/html/settings.tpl
@@ -48,6 +48,15 @@
<li>
<%= ctx.makeCheckbox({
+ text: 'Use dark theme',
+ name: 'dark-theme',
+ checked: ctx.browsingSettings.darkTheme,
+ }) %>
+ <p class='hint'>Changing this setting will require you to refresh the page for it to apply.</p>
+ </li>
+
+ <li>
+ <%= ctx.makeCheckbox({
text: 'Upscale small posts',
name: 'upscale-small-posts',
checked: ctx.browsingSettings.upscaleSmallPosts}) %>
@@ -64,6 +73,15 @@
<li>
<%= ctx.makeCheckbox({
+ text: 'Use post flow',
+ name: 'post-flow',
+ checked: ctx.browsingSettings.postFlow,
+ }) %>
+ <p class='hint'>Use a content-aware flow for thumbnails on the post search page.</p>
+ </li>
+
+ <li>
+ <%= ctx.makeCheckbox({
text: 'Enable transparency grid',
name: 'transparency-grid',
checked: ctx.browsingSettings.transparencyGrid,
@@ -87,6 +105,15 @@
checked: ctx.browsingSettings.autoplayVideos,
}) %>
</li>
+
+ <li>
+ <%= ctx.makeCheckbox({
+ text: 'Display underscores as spaces',
+ name: 'underscores-as-spaces',
+ checked: ctx.browsingSettings.tagUnderscoresAsSpaces,
+ }) %>
+ <p class='hint'>Display all underscores as if they were spaces. This is only a visual change, which means that you'll still have to use underscores when searching or editing tags.</p>
+ </li>
</ul>
<div class='messages'></div>
diff --git a/client/html/tag.tpl b/client/html/tag.tpl
index 29c5ec5..56255e8 100644
--- a/client/html/tag.tpl
+++ b/client/html/tag.tpl
@@ -1,5 +1,5 @@
<div class='content-wrapper' id='tag'>
- <h1><%- ctx.tag.names[0] %></h1>
+ <h1><%- ctx.getPrettyName(ctx.tag.names[0]) %></h1>
<nav class='buttons'><!--
--><ul><!--
--><li data-name='summary'><a href='<%- ctx.formatClientLink('tag', ctx.tag.names[0]) %>'>Summary</a></li><!--
diff --git a/client/html/tag_categories.tpl b/client/html/tag_categories.tpl
index fe6b898..f9d28e1 100644
--- a/client/html/tag_categories.tpl
+++ b/client/html/tag_categories.tpl
@@ -7,6 +7,7 @@
<tr>
<th class='name'>Category name</th>
<th class='color'>CSS color</th>
+ <th class='order'>Order</th>
<th class='usages'>Usages</th>
</tr>
</thead>
@@ -21,7 +22,7 @@
<div class='messages'></div>
- <% if (ctx.canCreate || ctx.canEditName || ctx.canEditColor || ctx.canDelete) { %>
+ <% if (ctx.canCreate || ctx.canEditName || ctx.canEditColor || ctx.canEditOrder || ctx.canDelete) { %>
<div class='buttons'>
<input type='submit' class='save' value='Save changes'>
</div>
diff --git a/client/html/tag_category_row.tpl b/client/html/tag_category_row.tpl
index dcc8c16..ce7aa59 100644
--- a/client/html/tag_category_row.tpl
+++ b/client/html/tag_category_row.tpl
@@ -17,6 +17,13 @@
<%- ctx.tagCategory.color %>
<% } %>
</td>
+ <td class='order'>
+ <% if (ctx.canEditOrder) { %>
+ <%= ctx.makeNumericInput({value: ctx.tagCategory.order}) %>
+ <% } else { %>
+ <%- ctx.tagCategory.order %>
+ <% } %>
+ </td>
<td class='usages'>
<% if (ctx.tagCategory.name) { %>
<a href='<%- ctx.formatClientLink('tags', {query: 'category:' + ctx.tagCategory.name}) %>'>
diff --git a/client/html/tags_page.tpl b/client/html/tags_page.tpl
index 8c97398..2e08239 100644
--- a/client/html/tags_page.tpl
+++ b/client/html/tags_page.tpl
@@ -3,35 +3,35 @@
<table>
<thead>
<th class='names'>
- <% if (ctx.query == 'sort:name' || !ctx.query) { %>
+ <% if (ctx.parameters.query == 'sort:name' || !ctx.parameters.query) { %>
<a href='<%- ctx.formatClientLink('tags', {query: '-sort:name'}) %>'>Tag name(s)</a>
<% } else { %>
<a href='<%- ctx.formatClientLink('tags', {query: 'sort:name'}) %>'>Tag name(s)</a>
<% } %>
</th>
<th class='implications'>
- <% if (ctx.query == 'sort:implication-count') { %>
+ <% if (ctx.parameters.query == 'sort:implication-count') { %>
<a href='<%- ctx.formatClientLink('tags', {query: '-sort:implication-count'}) %>'>Implications</a>
<% } else { %>
<a href='<%- ctx.formatClientLink('tags', {query: 'sort:implication-count'}) %>'>Implications</a>
<% } %>
</th>
<th class='suggestions'>
- <% if (ctx.query == 'sort:suggestion-count') { %>
+ <% if (ctx.parameters.query == 'sort:suggestion-count') { %>
<a href='<%- ctx.formatClientLink('tags', {query: '-sort:suggestion-count'}) %>'>Suggestions</a>
<% } else { %>
<a href='<%- ctx.formatClientLink('tags', {query: 'sort:suggestion-count'}) %>'>Suggestions</a>
<% } %>
</th>
<th class='usages'>
- <% if (ctx.query == 'sort:usages') { %>
+ <% if (ctx.parameters.query == 'sort:usages') { %>
<a href='<%- ctx.formatClientLink('tags', {query: '-sort:usages'}) %>'>Usages</a>
<% } else { %>
<a href='<%- ctx.formatClientLink('tags', {query: 'sort:usages'}) %>'>Usages</a>
<% } %>
</th>
<th class='creation-time'>
- <% if (ctx.query == 'sort:creation-time') { %>
+ <% if (ctx.parameters.query == 'sort:creation-time') { %>
<a href='<%- ctx.formatClientLink('tags', {query: '-sort:creation-time'}) %>'>Created on</a>
<% } else { %>
<a href='<%- ctx.formatClientLink('tags', {query: 'sort:creation-time'}) %>'>Created on</a>