mirror of
https://github.com/fabianonline/telegram_backup.git
synced 2025-11-05 01:38:14 +00:00
Added pagination for the output.
This commit is contained in:
17
src/main/resources/templates/html/_messages.mustache
Normal file
17
src/main/resources/templates/html/_messages.mustache
Normal file
@@ -0,0 +1,17 @@
|
||||
<ul class="messages">
|
||||
{{#messages}}
|
||||
{{#is_new_date}}
|
||||
<li class="date">
|
||||
{{formatted_date}}
|
||||
</li>
|
||||
{{/is_new_date}}
|
||||
<li class="message {{#from_me}}from-me{{/from_me}} {{odd_even}} {{#same_user}}same-user{{/same_user}}" data-message-id="{{message_id}}" data-media="{{media_type}}">
|
||||
<span class="time">{{formatted_time}}</span>
|
||||
<span class="sender">{{user_first_name}}</span>
|
||||
{{#text}}<span class="text">{{text}}</span>{{/text}}
|
||||
{{#media_sticker}}<span class="sticker"><img src="../stickers/{{media_file}}" /></span>{{/media_sticker}}
|
||||
{{#media_photo}}<span class="photo"><img src="../{{media_file}}" /></span>{{/media_photo}}
|
||||
{{#media_document}}<span class="document"><a href="../{{media_file}}">{{media_file}}</a></span>{{/media_document}}
|
||||
</li>
|
||||
{{/messages}}
|
||||
</ul>
|
||||
@@ -121,7 +121,7 @@
|
||||
|
||||
var author_data = [
|
||||
{{#authors.all}}
|
||||
['{{key.name}}', {{value}}],
|
||||
['{{name}}', {{count}}],
|
||||
{{/authors.all}}
|
||||
];
|
||||
author_data.sort(function(a, b) { return b[1]-a[1]; });
|
||||
|
||||
@@ -17,24 +17,17 @@
|
||||
|
||||
<a href="../index.html">Back to the overview</a>
|
||||
|
||||
<ul class="messages">
|
||||
{{#messages}}
|
||||
{{#is_new_date}}
|
||||
<li class="date">
|
||||
{{formatted_date}}
|
||||
</li>
|
||||
{{/is_new_date}}
|
||||
<li class="message {{#from_me}}from-me{{/from_me}} {{odd_even}} {{#same_user}}same-user{{/same_user}}" data-message-id="{{message_id}}" data-media="{{media_type}}">
|
||||
<span class="time">{{formatted_time}}</span>
|
||||
<span class="sender">{{user_first_name}}</span>
|
||||
{{#text}}<span class="text">{{text}}</span>{{/text}}
|
||||
{{#media_sticker}}<span class="sticker"><img src="../stickers/{{media_file}}" /></span>{{/media_sticker}}
|
||||
{{#media_photo}}<span class="photo"><img src="../{{media_file}}" /></span>{{/media_photo}}
|
||||
{{#media_document}}<span class="document"><a href="../{{media_file}}">{{media_file}}</a></span>{{/media_document}}
|
||||
</li>
|
||||
{{/messages}}
|
||||
</ul>
|
||||
|
||||
{{#paginated}}
|
||||
<h3>{{pages}} Pages</h3>
|
||||
<ul>
|
||||
{{#pages_data}}
|
||||
<li><a href="{{filename}}">Page {{page}}</a> (starting {{start_date}} {{start_time}})</li>
|
||||
{{/pages_data}}
|
||||
</ul>
|
||||
{{/paginated}}
|
||||
{{^paginated}}
|
||||
{{> _messages }}
|
||||
{{/paginated}}
|
||||
<a href="../index.html">Back to the overview</a>
|
||||
|
||||
{{> _stats }}
|
||||
|
||||
33
src/main/resources/templates/html/page.mustache
Normal file
33
src/main/resources/templates/html/page.mustache
Normal file
@@ -0,0 +1,33 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Telegram Backup for {{user.getUserString}}</title>
|
||||
<meta charset="UTF-8">
|
||||
<link rel="stylesheet" href="../style.css" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<h1>Telegram Backup</h1>
|
||||
{{#dialog}}
|
||||
<h2>Dialog with {{first_name}} {{last_name}} {{#username}}(@{{username}}){{/username}}</h2>
|
||||
{{/dialog}}
|
||||
{{#chat}}
|
||||
<h2>Chat {{name}}</h2>
|
||||
{{/chat}}
|
||||
<h3>Page {{page}} of {{pages}}</h3>
|
||||
|
||||
{{#previous_page}}
|
||||
<a href="{{previous_page}}">Previous page</a>
|
||||
{{/previous_page}}
|
||||
{{#next_page}}
|
||||
<a href="{{next_page}}">Next page</a>
|
||||
{{/next_page}}
|
||||
|
||||
{{> _messages }}
|
||||
|
||||
{{#previous_page}}
|
||||
<a href="{{previous_page}}">Previous page</a>
|
||||
{{/previous_page}}
|
||||
{{#next_page}}
|
||||
<a href="{{next_page}}">Next page</a>
|
||||
{{/next_page}}
|
||||
Reference in New Issue
Block a user