-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathindex.html
91 lines (82 loc) · 2.97 KB
/
index.html
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
<!doctype html>
<html lang="de-DE">
<head>
<meta charset="utf-8">
<meta http-equiv="x-ua-compatible" content="ie=edge">
<title>WhatsApp Chat</title>
<meta name="description" content="Shows WhatsApp Chat Export">
<meta name="author" content="Marco Krage (my-azur.de)">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="modern-normalize.1.1.0.min.css" />
<link rel="stylesheet" href="style.css" />
<link rel="stylesheet" href="style_background_pattern.css" />
<style>
[v-cloak] {
display: none;
}
html {
overflow-y: scroll;
}
</style>
</head>
<body>
<div id="app" v-cloak>
<h1>WhatsApp Chat</h1>
<div v-if="messages.length == 0">
loading ...
</div>
<template v-else v-for="(message, n) in pagedMessages" >
<div v-if="n == 0 || message.newDay" class="dateDivider">
<div class="date">{{message.date | formatDateDivider}}</div>
</div>
<div class="message" :class="{me: message.me}">
<div class="lines">
<div class="line" v-for="line in message.lines" v-html="line"></div>
</div>
<div class="meta">
<div class="username">{{message.username}}</div>
<div class="timestamp">{{message.timestamp}}</div>
</div>
</div>
</template>
<div class="help noprint">
Arrow Keys or Shift+Mousewheel to switch pages
</div>
<div class="noprint">
<ul class="pagination" v-if="pagedMessages.length != messagesCount">
<li v-if="false" @click="pageChange('previous')" class="page-item">«</li>
<li @click="pageChange(1)" :class="[currentPage==1 ? 'active' : '']" class="page-item">1</li>
<li v-if="currentPage > (navNum*2)-1">…</li>
<template v-for="n in range(currentPage-navNum, currentPage+navNum, 1)">
<li v-if="n > 1 && n < pageCount" @click="pageChange(n)" class="page-item" :class="[currentPage==n ? 'active' : '']">{{n}}</li>
</template>
<li v-if="currentPage < pageCount-navNum-1">…</li>
<li @click="pageChange(pageCount)" class="page-item" :class="[currentPage==pageCount ? 'active' : '']">{{pageCount}}</li>
<li v-if="false" @click="pageChange('next')" class="page-item">»</li>
</ul>
<p>
Pro Seite: <select @change="changePerPage(event.target.value)">
<option>5</option>
<option>50</option>
<option>100</option>
<option>1000</option>
<option value="-1">alle</option>
</select>
</p>
</div>
<p v-if="messages.length > 0">
Es wurden {{messagesCount}} Nachrichten über {{statsTimespan}} Tagen geladen.
Zeitraum: {{statsFirstMessageDate | formatDate}} bis {{statsLastMessageDate | formatDate}}
</p>
</div>
<script src="vue.2.6.14.min.js"></script>
<script src="axios.0.21.1.min.js"></script>
<script src="autolink-min.js"></script>
<script>
var myNames = ["Admin", "Marco"]; // Your Whats App Names in Messages
var perPage = 5;
var jumpToLastPage = true;
</script>
<script src="app.js"></script>
</body>
</html>