Skip to content
This repository was archived by the owner on May 11, 2026. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 1 addition & 15 deletions convertedClient/main.html
Original file line number Diff line number Diff line change
Expand Up @@ -102,21 +102,7 @@ <h2 class="text-center">Create post</h2>
</div>
</div>
</div>
<button id="synchro">Get Posts</button>
<!-- Post Section Start -->
<div class="d-flex justify-content-end mb-2" style="padding-right: 15px;">
<div class="form-check">
<input class="form-check-input" type="checkbox" id="only-friends-toggle">
<label class="form-check-label" for="only-friends-toggle">
Only friends' posts
</label>
</div>
<div class="ml-3">
<button id="sort-toggle-btn" class="btn btn-outline-secondary btn-sm" data-sort="desc">
<i class="fas fa-arrow-down"></i> <span id="sort-label">Newest first</span>
</button>
</div>
</div>

<div id="card-block">
<!--- One Post Start -->
<div class="card gedf-card post-card">
Expand Down
6 changes: 0 additions & 6 deletions convertedClient/script/main-js.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,6 @@ function followHandler(event) {
di.socialGraphHandler.FollowWithUsername(username, follweeeName);
}

const button = document.getElementById("synchro");

button.addEventListener("click", (event) => {
di.postStorageHandler.ShowPostsPresence();
});

async function fillLoggedUser() {
const annuaireService = di.annuaireService;
const users = annuaireService.getListOfUsers();
Expand Down
29 changes: 0 additions & 29 deletions convertedClient/script/timeline.js
Original file line number Diff line number Diff line change
Expand Up @@ -107,13 +107,6 @@ function initTimeline() {

showTimeline("main");

const toggle = document.getElementById("only-friends-toggle");
if (toggle) {
toggle.addEventListener("change", () => {
showTimeline("main");
});
}

$("#confirmDeletePostBtn").on("click", () => {
const postId = $("#deletePostModal").data("post-id");
if (postId) {
Expand All @@ -134,28 +127,6 @@ function initTimeline() {
//setTimeout(() => { showTimeline("main"); }, 500);
}
});
const sortBtn = document.getElementById("sort-toggle-btn");
if (sortBtn) {
sortBtn.addEventListener("click", () => {
const currentSort = sortBtn.getAttribute("data-sort");
const newSort = currentSort === "desc" ? "asc" : "desc";
sortBtn.setAttribute("data-sort", newSort);

// Update UI
const icon = sortBtn.querySelector("i");
const label = document.getElementById("sort-label");

if (newSort === "asc") {
icon.className = "fas fa-arrow-up";
label.innerText = "Oldest first";
} else {
icon.className = "fas fa-arrow-down";
label.innerText = "Newest first";
}

showTimeline("main");
});
}

const logoutBtn = document.getElementById("logout-btn");
if (logoutBtn) {
Expand Down
Loading
Loading