diff --git a/src/lang/en_GB.json b/src/lang/en_GB.json
index 5ff5657..38b7f75 100644
--- a/src/lang/en_GB.json
+++ b/src/lang/en_GB.json
@@ -85,16 +85,17 @@
},
"profile": {
- "locked": "This is a private account.",
- "bot": "This is an automated account.",
- "followers": "Followers",
- "following": "Following",
"follow": "Follow",
"home_instance": "View on home instance",
"more": "More",
+
+ "followers": "Followers",
+ "following": "Following",
+
"posts": "Posts",
"replies": "Replies",
"media": "Media",
+
"loading": "loading profile..."
},
diff --git a/src/lib/account.js b/src/lib/account.js
index 6580e21..50ff0b3 100644
--- a/src/lib/account.js
+++ b/src/lib/account.js
@@ -33,8 +33,6 @@ export function parseAccount(data) {
account.following_count = data.following_count;
account.posts_count = data.statuses_count;
account.bio = data.note;
- account.bot = data.bot;
- account.locked = data.locked;
if (data.acct.includes('@'))
account.host = data.acct.split('@')[1];
diff --git a/src/lib/ui/Button.svelte b/src/lib/ui/Button.svelte
index 91039e5..788828f 100644
--- a/src/lib/ui/Button.svelte
+++ b/src/lib/ui/Button.svelte
@@ -5,62 +5,62 @@
const dispatch = createEventDispatcher();
- let className = "";
- export { className as class };
export let active = false;
export let filled = false;
export let disabled = false;
export let centered = false;
export let label = undefined;
export let sound = "default";
- export let href = undefined;
- export let onClick = undefined;
+ export let href = false;
let classes = [];
function click() {
if (disabled) return;
+ if (href) {
+ const link = document.createElement('a');
+ link.href = href;
+ link.dispatchEvent(new MouseEvent('click', {
+ bubbles: true,
+ cancelable: true,
+ view: window,
+ ctrlKey: event.ctrlKey,
+ metaKey: event.metaKey,
+ shiftKey: event.shiftKey,
+ altKey: event.altKey,
+ button: event.button,
+ }));
+ return;
+ }
+
playSound(sound);
dispatch('click');
}
afterUpdate(() => {
- classes = className.split(' ');
- if (active) classes.push("active");
- if (filled) classes.push("filled");
- if (disabled) classes.push("disabled");
+ classes = [];
+ if (active) classes = ["active"];
+ if (filled) classes = ["filled"];
+ if (disabled) classes = ["disabled"];
if (centered) classes.push("centered");
});
-{#if href}
- click()}>
-
-
-
-
-
-{:else}
-
-{/if}
+