mirror of
https://git.wownero.com/lza_menace/suchwow.git
synced 2024-08-15 01:03:19 +00:00
improve export and slight ux
This commit is contained in:
parent
12758c5bb5
commit
c5d0b4a9ff
2 changed files with 10 additions and 3 deletions
|
@ -12,7 +12,7 @@ if not wallet.connected:
|
||||||
print('Wallet not connected')
|
print('Wallet not connected')
|
||||||
exit()
|
exit()
|
||||||
|
|
||||||
all_posts = Post.select().order_by(Post.timestamp.desc())
|
all_posts = Post.select().order_by(Post.timestamp.asc())
|
||||||
all_mods = Moderator.select()
|
all_mods = Moderator.select()
|
||||||
all_profiles = Profile.select()
|
all_profiles = Profile.select()
|
||||||
all_bans = Ban.select()
|
all_bans = Ban.select()
|
||||||
|
@ -49,8 +49,11 @@ for post in all_posts:
|
||||||
'out': True
|
'out': True
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
txes = 0
|
||||||
all_data['posts'].append(post_data)
|
all_data['posts'].append(post_data)
|
||||||
print(f'Exporting post {post.id}')
|
if 'in' in post_data['txes']:
|
||||||
|
txes = len(post_data['txes']['in'])
|
||||||
|
print(f'Exporting post {post.id}. Found {txes} txes')
|
||||||
|
|
||||||
for mod in all_mods:
|
for mod in all_mods:
|
||||||
all_data['moderators'].append(mod.username)
|
all_data['moderators'].append(mod.username)
|
||||||
|
|
|
@ -35,7 +35,7 @@
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<!-- Post Info -->
|
<!-- Post Info -->
|
||||||
<section class="section">
|
<section class="section" style="padding: 0;">
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<h1>{{ post.title }}</h1>
|
<h1>{{ post.title }}</h1>
|
||||||
<p>{{ post.text }}</p>
|
<p>{{ post.text }}</p>
|
||||||
|
@ -44,15 +44,19 @@
|
||||||
<a href="{{ url_for('post.delete', id=post.id) }}" class="button is-danger">Reject</a>
|
<a href="{{ url_for('post.delete', id=post.id) }}" class="button is-danger">Reject</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<p class="mt-2">Submitted by <i><u><a href="/?submitter={{ post.user.username }}">{{ post.user.username }}</a></u></i> at <i>{{ post.timestamp }}</i></p>
|
<p class="mt-2">Submitted by <i><u><a href="/?submitter={{ post.user.username }}">{{ post.user.username }}</a></u></i> at <i>{{ post.timestamp }}</i></p>
|
||||||
|
<div style="max-width: 80vh; margin: 0 auto;">
|
||||||
{% if post.get_image_path().endswith('mp4') %}
|
{% if post.get_image_path().endswith('mp4') %}
|
||||||
<video style="max-height: 100vh!important;" controls>
|
<video style="max-height: 100vh!important;" controls>
|
||||||
<source src="{{ url_for('post.uploaded_file', filename=post.image_name) }}" type="video/mp4">
|
<source src="{{ url_for('post.uploaded_file', filename=post.image_name) }}" type="video/mp4">
|
||||||
Your browser does not support the video tag.
|
Your browser does not support the video tag.
|
||||||
</video>
|
</video>
|
||||||
{% else %}
|
{% else %}
|
||||||
|
<a href="{{ url_for('post.uploaded_file', filename=post.image_name, _external=True) }}">
|
||||||
<img alt="SuchWow #{{ post.id }} - {{ post.title }} by {{ post.user.username }}" src="{{ url_for('post.uploaded_file', filename=post.image_name) }}" />
|
<img alt="SuchWow #{{ post.id }} - {{ post.title }} by {{ post.user.username }}" src="{{ url_for('post.uploaded_file', filename=post.image_name) }}" />
|
||||||
|
</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<!-- Payments -->
|
<!-- Payments -->
|
||||||
|
|
Loading…
Reference in a new issue