-
Notifications
You must be signed in to change notification settings - Fork 4
/
followed-accounts.html
66 lines (62 loc) · 2.28 KB
/
followed-accounts.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
<!DOCTYPE html>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Followed Accounts</title>
<style>
@import url("./followed-accounts.css");
@import url("./actor-mini-profile.css");
@import url("./common.css");
@import url("./theme.css");
@import url("./index.css");
@import url("./timeline.css");
@import url("./post.css");
</style>
<div class="container">
<sidebar-nav></sidebar-nav>
<div class="followed-container main-content">
<p>
You're following
<b> <followed-count id="followCount"></followed-count> accounts </b>on the
fediverse.<br />
<span
>To sync your list of followed accounts across multiple devices, be sure
to ⬆️ export your followed list from one device and 📥 import it on the
other.</span
>
</p>
<div class="imp-exp-btn">
<button id="exportFollowedList">Export</button>
<button id="importFollowedList">Import</button>
<input type="file" id="fileInput" style="display: none" accept=".json" />
</div>
<followed-actors-list></followed-actors-list>
<span class="cache-warning-msg"
>⚠️ Before clearing your browser's cache, ensure you export your followed
list.</span
>
</div>
<div class="right-column">
<!-- This is an empty column to balance the layout -->
</div>
</div>
<script type="module">
import { FollowedActorsList } from './followed-accounts.js';
const exportBtn = document.getElementById("exportFollowedList");
const importBtn = document.getElementById("importFollowedList");
const fileInput = document.getElementById("fileInput");
exportBtn.addEventListener("click", FollowedActorsList.exportFollowedList);
importBtn.addEventListener("click", () => {
fileInput.click();
});
fileInput.addEventListener("change", function () {
if (this.files[0]) {
FollowedActorsList.importFollowedList(this.files[0]);
this.value = ""; // Clear the file input after importing
}
});
</script>
<script type="module" src="./sidebar.js"></script>
<script type="module" src="./followed-accounts.js"></script>
<script type="module" src="./actor-mini-profile.js"></script>
<script type="module" src="./p2p-media.js"></script>
<script type="module" src="./theme-selector.js"></script>