diff --git a/apps/cory/apps.json b/apps/cory/apps.json
index 4e9ac099a..408747ebf 100644
--- a/apps/cory/apps.json
+++ b/apps/cory/apps.json
@@ -1 +1 @@
-{"type":"tildefriends-app","files":{"app.js":"&C82YfV2CQsreGCcY0FHR4owqVOaN10yvVW7OZxFC8sE=.sha256"}}
\ No newline at end of file
+{"type":"tildefriends-app","files":{"app.js":"&OMzy1V2Z53ARpvUnFZ1BxsQr/Z8oQmFC678s/Hh6Gtc=.sha256"}}
\ No newline at end of file
diff --git a/apps/cory/apps/app.js b/apps/cory/apps/app.js
index bd856fd0e..48e4a1c1b 100644
--- a/apps/cory/apps/app.js
+++ b/apps/cory/apps/app.js
@@ -12,7 +12,7 @@ async function main() {
@@ -34,29 +35,30 @@
Tilde Scuttlebutt
-
-
-
- Broadcasts
- {{broadcast.address}}:{{broadcast.port}}
- Connections
-
- Connect
-
-
-
+
+
Refresh
{{unread}} unread item{{unread == 1 ? '' : 's'}}
- Welcome, .
-
- Loaded in {{load_time}} seconds.
-
- {{key}}: {{times[key]}}
-
-
-
+
+
+ Welcome, .
+
+
+
+ Loaded in {{load_time}} seconds.
+
+ {{key}}: {{times[key]}}
+
+
+
+ Loading...
+
+
+
+
+
What's up?
@@ -123,6 +125,7 @@
+ Total Message Size: {{human_size(users[selected].size)}}
{{selected}}
@@ -154,7 +157,6 @@
-
-
-
+
+
+
+ Broadcasts
+ {{broadcast.address}}:{{broadcast.port}}
+ Connections
+
+ Connect
+
+
+
diff --git a/apps/cory/ssb/tf-message.js b/apps/cory/ssb/tf-message.js
index 99bf419ff..4aac628c5 100644
--- a/apps/cory/ssb/tf-message.js
+++ b/apps/cory/ssb/tf-message.js
@@ -126,6 +126,9 @@ Vue.component('tf-message', {
{{mention.name}}
+
@@ -143,7 +146,7 @@ Vue.component('tf-message', {
{{v + (votes[message.id][v].length > 1 ? ' (' + votes[message.id][v].length + ')' : '')}}
-
+
diff --git a/apps/cory/ssb/tf.js b/apps/cory/ssb/tf.js
index 95f98d2ae..d5a51e6b1 100644
--- a/apps/cory/ssb/tf.js
+++ b/apps/cory/ssb/tf.js
@@ -305,6 +305,22 @@ window.addEventListener('load', function() {
break;
}
}
+ },
+ human_size(bytes) {
+ if (typeof bytes == 'number') {
+ let value = bytes;
+ let unit = 'B';
+ const k_units = ['kB', 'MB', 'GB', 'TB'];
+ for (let u of k_units) {
+ if (value > 1024) {
+ value /= 1024;
+ unit = u;
+ }
+ }
+ return Math.round(value * 10) / 10 + ' ' + unit;
+ } else {
+ return bytes;
+ }
}
}
});