feat: add v0.19.0 support

This commit is contained in:
Xyphyn committed 2023-09-28 17:09:09 -07:00
1 parent b3b8a10e44
commit 119ab53946
62 files changed
+188 -157

No files matched your search

@@ -30,7 +30,6 @@
data.person_blocks = data.person_blocks
await getClient().blockPerson({
auth: $profile.jwt,
block: false,
person_id: item.target.id,
})
@@ -50,7 +49,6 @@
data.community_blocks = data.community_blocks
await getClient().blockCommunity({
auth: $profile.jwt,
block: false,
community_id: item.community.id,
})
@@ -15,6 +15,7 @@
newPasswordVerify = ''
let loading = false
// @ts-ignore
$: totpLink = data.my_user?.local_user_view?.local_user?.totp_2fa_url
async function changePassword() {
@@ -22,7 +23,6 @@
if (!$profile?.jwt) return
loading = true
const res = await getClient().changePassword({
auth: $profile?.jwt,
new_password: newPassword,
new_password_verify: newPasswordVerify,
old_password: oldPassword,
@@ -56,8 +56,8 @@
await getClient().saveUserSettings({
...data.my_user?.local_user_view.local_user,
...data.my_user?.local_user_view.person,
// @ts-ignore
generate_totp_2fa: enabled,
auth: $profile?.jwt,
})
goto($page.url, { invalidateAll: true })
toast({
@@ -28,7 +28,6 @@
: undefined
const res = await getClient().saveUserSettings({
auth: $profile.jwt,
...formData,
avatar: pfp,
})
@@ -104,9 +103,10 @@
try {
const { jwt } = $profile
// TODO - add option to delete content
await getClient().deleteAccount({
auth: jwt,
password: deletion.password,
delete_content: false,
})
profileData.update((pd) => {
+1 -2
View File
@@ -5,8 +5,7 @@ import type { SortType } from 'lemmy-js-client'
import { get } from 'svelte/store'
export async function load({ params, url, fetch }) {
const my_user = (await getClient().getSite({ auth: get(profile)?.jwt }))
.my_user
const my_user = (await getClient().getSite()).my_user
return {
my_user: my_user,
-1
View File
@@ -17,7 +17,6 @@ export async function load({ url, fetch, parent }) {
page: page,
username: my_user?.local_user_view.person.name,
sort: sort,
auth: get(profile)?.jwt,
})
const items = [...user.posts, ...user.comments]