diff --git a/src/lang/en_GB.json b/src/lang/en_GB.json
index 38b7f75..5ff5657 100644
--- a/src/lang/en_GB.json
+++ b/src/lang/en_GB.json
@@ -85,17 +85,16 @@
},
"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 50ff0b3..6580e21 100644
--- a/src/lib/account.js
+++ b/src/lib/account.js
@@ -33,6 +33,8 @@ 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 788828f..91039e5 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 = false;
+ export let href = undefined;
+ export let onClick = undefined;
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 = [];
- if (active) classes = ["active"];
- if (filled) classes = ["filled"];
- if (disabled) classes = ["disabled"];
+ classes = className.split(' ');
+ if (active) classes.push("active");
+ if (filled) classes.push("filled");
+ if (disabled) classes.push("disabled");
if (centered) classes.push("centered");
});
-
+{#if href}
+ click()}>
+
+
+
+
+
+{:else}
+
+{/if}