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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
|
<!DOCTYPE html>
<!--suppress HtmlFormInputWithoutLabel, JSUndeclaredVariable -->
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Bits</title>
<script>
isNodeJS = typeof require === "function";
</script>
<!-- CSS -->
<link rel="stylesheet" href="./assets/global.css">
<link rel="stylesheet" href="./assets/black.css" disabled id="mobile-css">
<!-- Libs -->
<script src="./assets/chart.js"></script>
<script src="./assets/trendline.js"></script>
<!-- Components -->
<script src="./assets/load.js"></script>
<script src="./assets/refresh.js"></script>
<script src="./assets/create.js"></script>
<script src="./assets/misc.js"></script>
<script src="./assets/delete.js"></script>
<script src="./assets/easteregg.js"></script>
</head>
<body style="position:fixed;inset:0;">
<div id="loader" style="background:#222;transition:opacity 500ms;z-index:9999;position:fixed;inset:0;display:flex;align-items: center;justify-content: center;">
<img alt="" src="assets/logo.svg" style="width:96px;">
</div>
<script src="./assets/mobile-p1.js"></script>
<div id="app" style="display:none;position:fixed;z-index:3;">
<div id="header" style="z-index:5;background: #111;position: fixed;top: 0;padding: 8px 30px;left: 0;right: 0;height: 32px;">
<img alt="Bits" src="assets/logo.svg" style="width:32px;vertical-align: middle;">
<span style="vertical-align: middle;" id="menu-desktop">
<a class="ln" style="cursor:pointer;margin-left:20px;" onclick="document.getElementById('create-modal').style.display = isNodeJS ? 'flex' : '';">New transaction</a><a class="ln" id="tab-0" style="cursor:pointer;margin-left:20px;" onclick="document.getElementById('list').style.display = 'none';document.getElementById('tab-0').style.display = 'none';document.getElementById('tab-1').style.display = '';document.getElementById('graph').style.display = '';">Statistics</a><a class="ln" id="tab-1" style="display:none;cursor:pointer;margin-left:20px;" onclick="document.getElementById('list').style.display = '';document.getElementById('tab-0').style.display = '';document.getElementById('tab-1').style.display = 'none';document.getElementById('graph').style.display = 'none';">Transactions</a><a class="ln" onclick="document.getElementById('about-modal').style.display = isNodeJS ? 'flex' : '';" style="cursor:pointer;margin-left:20px;">About</a>
</span>
<span style="vertical-align: middle;display:none;" id="menu-mobile">
<a class="ln" style="cursor:pointer;margin-left:20px;" onclick="document.getElementById('create-modal').style.display = isNodeJS ? 'flex' : '';">Add</a><a class="ln" id="tab-0m" style="cursor:pointer;margin-left:20px;" onclick="document.getElementById('list').style.display = 'none';document.getElementById('tab-0m').style.display = 'none';document.getElementById('tab-1m').style.display = '';document.getElementById('graph').style.display = '';">Stats</a><a class="ln" id="tab-1m" style="display:none;cursor:pointer;margin-left:20px;" onclick="document.getElementById('list').style.display = '';document.getElementById('tab-0m').style.display = '';document.getElementById('tab-1m').style.display = 'none';document.getElementById('graph').style.display = 'none';">List</a><a class="ln" onclick="document.getElementById('about-modal').style.display = isNodeJS ? 'flex' : '';" style="cursor:pointer;margin-left:20px;">About</a>
</span>
<span style="float: right;margin-right: 10px;margin-top: 7px;" id="total-data">
<span id="balance" style="opacity: .5;">
<span id="balance-eur">%total_eur%</span>€, £<span id="balance-gbp">%total_gbp%</span>
</span><span id="username-desktop" style="opacity:.5;"> · <span id="username">%user%</span></span><span id="username-mobile" style="display:none;vertical-align: middle;"><img id="user-profile" alt="" style="border-radius: 999px;width: 32px;height: 32px;vertical-align: middle;position:relative;top:-6px;display:inline-block;margin-left:7px;" src=""></span>
</span>
</div>
<script src="./assets/mobile-p2.js"></script>
<div id="view" style="z-index:5;color:black;background:rgb(247, 249, 250);position:fixed;top:48px;left:0;right:0;bottom:64px;">
<div id="list" style="position: fixed;top: 48px;left: 0;bottom: 64px;right:0;border-right: 1px solid rgba(0, 0, 0, .25);">
<div id="demo-zone" style="display:none;">
<div class="transaction" data-transaction-id="%transactionId%" id="demo-transaction" style="padding:10px;border-bottom: 1px solid rgba(0, 0, 0, .25);display:grid;grid-template-columns: 48px 1fr;grid-column-gap: 15px;">
<div class="transaction-user" style="display:flex;align-items: center;justify-content: center;">
<img alt="%picture%" style="border-radius: 999px;width: 48px;height: 48px;">
</div>
<div class="transaction-details">
<b>%user%</b> %type% <span style="color:var(--perc-color);"><b>%amount_bc%</b> <i>(%amount_cc%)</i></span><br>
%time%<br>
<div style="text-overflow: ellipsis;white-space: nowrap;overflow: hidden;width: 100%;">%description%</div>
</div>
</div>
</div>
<div id="transactions" style="overflow: scroll;height: 100%;"></div>
</div>
<div id="graph" style="display:none;width:100%;height:100%;">
<p style="
font-size: 14px;
margin: 14px;
">
<span id="graph-insights-color" style="display: inline-block;width: 12px;height: 12px;border-radius: 999px;opacity: .75;background: black;vertical-align: middle;margin-right: 5px;"></span>
<span id="graph-insights-text" style="
display: inline-block;
vertical-align: middle;
">No insights available. Please try again later.</span>
</p>
<canvas id="graph-display" style="width:100%;height:100%;"></canvas>
<script src="./assets/graph.js"></script>
</div>
</div>
<div id="create-modal" style="
display: none;
position: fixed;
z-index: 999;
inset: 0;
background: rgba(0, 0, 0, .75);
backdrop-filter: blur(10px);
align-items: center;
justify-content: center;
color: black;
"><div id="create-modal-inner" style="
background: whitesmoke;
width: 500px;
padding: 10px;
border-radius: 5px;
box-shadow: 0 0 20px rgba(0, 0, 0, .5);
">
<h3 style="
margin: 0;
margin-bottom: 20px;
margin-left: -10px;
margin-right: -10px;
text-align: center;
margin-top: -10px;
padding: 10px;
background: rgba(0, 0, 0, .1);
">New transaction</h3>
Amount: <select id="create-action"><option>+</option><option>-</option></select>
<input id="create-amount" type="number" max="99999">
<select id="create-currency"><option>£</option><option>€</option></select><br><br>Description: <input maxlength="100" id="create-description" type="text" style="
display: block;
margin-top: 5px;
width: calc(100% - 10px);
">
<div style="
display: block;
margin-top: 20px;
margin-left: auto;
margin-right: auto;
width:max-content;">
<button id="create-button-create" onclick="createTransaction();">Create</button> <button id="create-button-cancel" onclick="document.getElementById('create-modal').style.display = 'none';document.getElementById('create-action').value='+';document.getElementById('create-currency').value='£';document.getElementById('create-description').value='';document.getElementById('create-amount').value='';">Cancel</button>
</div>
</div></div>
<div id="confirm-modal" style="
display: none;
position: fixed;
z-index: 999;
inset: 0;
background: rgba(0, 0, 0, .75);
backdrop-filter: blur(10px);
align-items: center;
justify-content: center;
color: black;
"><div id="confirm-modal-inner" style="
background: whitesmoke;
width: 500px;
padding: 10px;
border-radius: 5px;
box-shadow: 0 0 20px rgba(0, 0, 0, .5);
">
<h3 style="
margin: 0;
margin-bottom: 20px;
margin-left: -10px;
margin-right: -10px;
text-align: center;
margin-top: -10px;
padding: 10px;
background: rgba(0, 0, 0, .1);
">Confirm action</h3>
<p id="confirm-text">Are you sure you want to do this?</p>
<div style="
display: block;
margin-top: 20px;
margin-left: auto;
margin-right: auto;
width:max-content;">
<button id="confirm-button-ok" onclick="document.getElementById('confirm-button-cancel').disabled = true;document.getElementById('confirm-button-ok').disabled = true;confirmAction();">OK</button> <button id="confirm-button-cancel" onclick="document.getElementById('confirm-modal').style.display = 'none';">Cancel</button>
</div>
</div></div>
<div id="about-modal" style="
display: none;
position: fixed;
z-index: 999;
inset: 0;
background: rgba(0, 0, 0, .75);
backdrop-filter: blur(10px);
align-items: center;
justify-content: center;
color: black;
"><div id="about-modal-inner" style="
background: whitesmoke;
width: 500px;
padding: 10px;
border-radius: 5px;
box-shadow: 0 0 20px rgba(0, 0, 0, .5);
">
<h3 style="
margin: 0;
margin-bottom: 20px;
margin-left: -10px;
margin-right: -10px;
text-align: center;
margin-top: -10px;
padding: 10px;
background: rgba(0, 0, 0, .1);
">About Bits</h3>
<div id="about-text">
<div style="font-weight: bold;text-align:center;margin-bottom:5px;">Bits</div>
<b>Server:</b> money-v1.equestria.dev<br>
<b>Platform:</b> <span id="about-platform"></span><script>document.getElementById("about-platform").innerText = isNodeJS ? "Desktop (Electron, NodeJS)" : "Android (Chrome, Android WebView)";</script><br>
<b>User Agent:</b> <span id="about-useragent"></span><script>document.getElementById("about-useragent").innerText = navigator.userAgent;</script></div>
<div style="
display: block;
margin-top: 20px;
margin-left: auto;
margin-right: auto;
width:max-content;">
<button id="about-button-cancel" onclick="document.getElementById('about-modal').style.display = 'none';">Close</button>
</div>
</div></div>
<div id="goal" style="
position: fixed;
background: rgb(64, 64, 64);
bottom: 0;
left: 0;
right: 0;
padding: 10px;
z-index: 2;
"><b id="goal-name">%goal%</b> <span style="
float: right;
"><span id="goal-amount-eur">%goal_eur%</span>€, £<span id="goal-amount-gbp">%goal_gbp%</span> · <span id="goal-amount-percentage">%goal_percentage%</span>% completed</span><span id="goal-bar" style="
display: block;
height: 16px;
margin-top: 10px;
border-radius: 999px;
background: rgba(0, 0, 0, .25);
"><span id="goal-bar-fill" style="
height: 16px;
background: linear-gradient(90deg, rgba(183,153,201,1) 0%, rgba(87,58,152,1) 25%, rgba(204,129,148,1) 50%, rgba(235,186,115,1) 75%, rgba(169,83,144,1) 100%);
width: 0;
display: block;
border-radius: 999px;
"></span></span></div>
</div>
<script src="./assets/mobile-p3.js"></script>
</body>
</html>
|