diff --git a/apps/ssb.json b/apps/ssb.json
index b8609e1d..04a69c85 100644
--- a/apps/ssb.json
+++ b/apps/ssb.json
@@ -1,5 +1,5 @@
{
"type": "tildefriends-app",
"emoji": "🦀",
- "previous": "&9egAArMLNHQzp1yniwnxD41e4T7qXWAfLNJdH4LrXS8=.sha256"
+ "previous": "&Eg9WyDY1CmakDJYw0+fk0PDW1EOW3gS/Np10dAJZM7c=.sha256"
}
diff --git a/apps/ssb/tf-app.js b/apps/ssb/tf-app.js
index 11cfc8fd..dbf70046 100644
--- a/apps/ssb/tf-app.js
+++ b/apps/ssb/tf-app.js
@@ -601,9 +601,13 @@ class TfElement extends LitElement {
.channels_latest=${this.channels_latest}
.channels_unread=${this.channels_unread}
@channelsetunread=${this.channel_set_unread}
+ @refresh=${this.refresh}
+ @toggle_stay_connected=${this.toggle_stay_connected}
.connections=${this.connections}
.private_messages=${this.private_messages}
.recent_reactions=${this.recent_reactions}
+ ?is_administrator=${this.is_administrator}
+ ?stay_connected=${this.stay_connected}
>
`;
} else if (this.tab === 'connections') {
diff --git a/apps/ssb/tf-tab-news.js b/apps/ssb/tf-tab-news.js
index 4fae6cc6..237ffa55 100644
--- a/apps/ssb/tf-tab-news.js
+++ b/apps/ssb/tf-tab-news.js
@@ -26,6 +26,8 @@ class TfTabNewsElement extends LitElement {
private_messages: {type: Array},
recent_reactions: {type: Array},
peer_exchange: {type: Boolean},
+ is_administrator: {type: Boolean},
+ stay_connected: {type: Boolean},
};
}
@@ -174,10 +176,6 @@ class TfTabNewsElement extends LitElement {
.map((x) => x[0]);
}
- refresh() {
- tfrpc.rpc.sync();
- }
-
async enable_peer_exchange() {
await tfrpc.rpc.globalSettingsSet('peer_exchange', true);
await this.check_peer_exchange();
@@ -196,6 +194,32 @@ class TfTabNewsElement extends LitElement {
>
×
+ ${this.is_administrator
+ ? html`
+
+
+ `
+ : undefined}
${this.hash.startsWith('##') &&
this.channels.indexOf(this.hash.substring(2)) == -1
? html`
@@ -266,7 +290,10 @@ class TfTabNewsElement extends LitElement {
(this.connections?.some((x) => x.flags.one_shot)
? ' w3-spin'
: '')}
- @click=${this.refresh}
+ @click=${() =>
+ this.dispatchEvent(
+ new Event('refresh', {bubbles: true, composed: true})
+ )}
>
↻ Sync now