diff --git a/src/lib/client/client.js b/src/lib/client/client.js index 44e7b53..e540622 100644 --- a/src/lib/client/client.js +++ b/src/lib/client/client.js @@ -90,6 +90,7 @@ export class Client { } const user = await api.parseUser(data); console.log(`Logged in as @${user.username}@${user.host}`); + console.log(`You have ${data.source.follow_request_count} follow request${data.source.follow_request_count === 1 ? '' : 's'}!`); return user; } diff --git a/src/lib/ui/Navigation.svelte b/src/lib/ui/Navigation.svelte index ef16b70..607a14d 100644 --- a/src/lib/ui/Navigation.svelte +++ b/src/lib/ui/Navigation.svelte @@ -7,7 +7,6 @@ import { getTimeline } from '$lib/timeline.js'; import { goto } from '$app/navigation'; import { get } from 'svelte/store'; - import { onMount } from 'svelte'; import TimelineIcon from '../../img/icons/timeline.svg'; import NotificationsIcon from '../../img/icons/notifications.svg'; @@ -21,33 +20,21 @@ import SettingsIcon from '../../img/icons/settings.svg'; import LogoutIcon from '../../img/icons/logout.svg'; - export let path; - const VERSION = APP_VERSION; let notification_count = 0; if (notification_count > 99) notification_count = "99+"; - function handle_btn(name) { - let route; - switch (name) { - case "timeline": - route = "/"; - break; - case "notifcations": - case "explore": - case "lists": - case "favourites": - case "bookmarks": - case "hashtags": - return; + function goTimeline() { + if (location.pathname === "/") { + getTimeline(true); + window.scrollTo({ + top: 0, + behavior: "smooth" + }); + return; } - if (!route) return; - window.scrollTo({ - top: 0, - behavior: "smooth" - }); - goto(route); + goto("/"); } async function log_out() { @@ -65,18 +52,13 @@