Merge branch 'dev' of https://github.com/Discours/discoursio-webapp into feature/empty-feed
This commit is contained in:
commit
399deaec86
|
@ -11,7 +11,7 @@
|
||||||
"deploy": "graphql-codegen && npm run typecheck && vite build && vercel",
|
"deploy": "graphql-codegen && npm run typecheck && vite build && vercel",
|
||||||
"dev": "vite",
|
"dev": "vite",
|
||||||
"e2e": "npx playwright test --project=chromium",
|
"e2e": "npx playwright test --project=chromium",
|
||||||
"fix": "npm run lint:code:fix && stylelint **/*.{scss,css} --fix",
|
"fix": "npm run check:code:fix && stylelint **/*.{scss,css} --fix",
|
||||||
"format": "npx @biomejs/biome format src/. --write",
|
"format": "npx @biomejs/biome format src/. --write",
|
||||||
"hygen": "HYGEN_TMPLS=gen hygen",
|
"hygen": "HYGEN_TMPLS=gen hygen",
|
||||||
"postinstall": "npm run codegen && npx patch-package",
|
"postinstall": "npm run codegen && npx patch-package",
|
||||||
|
|
|
@ -3,10 +3,10 @@ import type { Author, Reaction, Shout, Topic } from '../../../graphql/schema/cor
|
||||||
import { getPagePath } from '@nanostores/router'
|
import { getPagePath } from '@nanostores/router'
|
||||||
import { clsx } from 'clsx'
|
import { clsx } from 'clsx'
|
||||||
import { For, Match, Show, Switch, createEffect, createMemo, createSignal, on, onMount } from 'solid-js'
|
import { For, Match, Show, Switch, createEffect, createMemo, createSignal, on, onMount } from 'solid-js'
|
||||||
import { Meta, Title } from '../../../context/meta'
|
|
||||||
|
|
||||||
import { useFollowing } from '../../../context/following'
|
import { useFollowing } from '../../../context/following'
|
||||||
import { useLocalize } from '../../../context/localize'
|
import { useLocalize } from '../../../context/localize'
|
||||||
|
import { Meta, Title } from '../../../context/meta'
|
||||||
import { useSession } from '../../../context/session'
|
import { useSession } from '../../../context/session'
|
||||||
import { apiClient } from '../../../graphql/client/core'
|
import { apiClient } from '../../../graphql/client/core'
|
||||||
import { router, useRouter } from '../../../stores/router'
|
import { router, useRouter } from '../../../stores/router'
|
||||||
|
@ -87,7 +87,7 @@ export const AuthorView = (props: Props) => {
|
||||||
setFollowing([...(authors || []), ...(topics || [])])
|
setFollowing([...(authors || []), ...(topics || [])])
|
||||||
setFollowers(followersResult || [])
|
setFollowers(followersResult || [])
|
||||||
|
|
||||||
console.debug('[components.Author] following data loaded', subscriptionsResult)
|
console.info('[components.Author] data loaded')
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error('[components.Author] fetch error', error)
|
console.error('[components.Author] fetch error', error)
|
||||||
}
|
}
|
||||||
|
@ -244,7 +244,7 @@ export const AuthorView = (props: Props) => {
|
||||||
class={styles.longBio}
|
class={styles.longBio}
|
||||||
classList={{ [styles.longBioExpanded]: isBioExpanded() }}
|
classList={{ [styles.longBioExpanded]: isBioExpanded() }}
|
||||||
>
|
>
|
||||||
<div ref={(el) => (bioContainerRef.current = el)} innerHTML={author().about} />
|
<div ref={(el) => (bioContainerRef.current = el)} innerHTML={author()?.about || ''} />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<Show when={showExpandBioControl()}>
|
<Show when={showExpandBioControl()}>
|
||||||
|
|
|
@ -59,7 +59,7 @@ export const PublishSettings = (props: Props) => {
|
||||||
|
|
||||||
const composeDescription = () => {
|
const composeDescription = () => {
|
||||||
if (!props.form.description) {
|
if (!props.form.description) {
|
||||||
const cleanFootnotes = props.form.body.replaceAll(/<footnote data-value=".*?">.*?<\/footnote>/g, '')
|
const cleanFootnotes = props.form.body.replaceAll(/<footnote data-value=".*?">(.*?)<\/footnote>/g, '')
|
||||||
const leadText = cleanFootnotes.replaceAll(/<\/?[^>]+(>|$)/gi, ' ')
|
const leadText = cleanFootnotes.replaceAll(/<\/?[^>]+(>|$)/gi, ' ')
|
||||||
return shorten(leadText, DESCRIPTION_MAX_LENGTH).trim()
|
return shorten(leadText, DESCRIPTION_MAX_LENGTH).trim()
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,18 +8,6 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.unswiped {
|
|
||||||
width: 100%;
|
|
||||||
margin: 2rem 0;
|
|
||||||
margin-bottom: 6rem;
|
|
||||||
padding-bottom: 2rem;
|
|
||||||
display: block;
|
|
||||||
|
|
||||||
h2 {
|
|
||||||
text-align: center;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.Swiper {
|
.Swiper {
|
||||||
display: block;
|
display: block;
|
||||||
margin: 2rem 0;
|
margin: 2rem 0;
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
import type {
|
import type {
|
||||||
Author,
|
Author,
|
||||||
AuthorFollowsResult,
|
|
||||||
CommonResult,
|
CommonResult,
|
||||||
FollowingEntity,
|
FollowingEntity,
|
||||||
LoadShoutsOptions,
|
LoadShoutsOptions,
|
||||||
|
@ -134,7 +133,7 @@ export const apiClient = {
|
||||||
slug?: string
|
slug?: string
|
||||||
author_id?: number
|
author_id?: number
|
||||||
user?: string
|
user?: string
|
||||||
}): Promise<AuthorFollowsResult> => {
|
}): Promise<CommonResult> => {
|
||||||
const response = await publicGraphQLClient.query(authorFollows, params).toPromise()
|
const response = await publicGraphQLClient.query(authorFollows, params).toPromise()
|
||||||
return response.data.get_author_follows
|
return response.data.get_author_follows
|
||||||
},
|
},
|
||||||
|
|
|
@ -3,6 +3,7 @@ import { gql } from '@urql/core'
|
||||||
export default gql`
|
export default gql`
|
||||||
query GetAuthorFollows($slug: String, $user: String, $author_id: Int) {
|
query GetAuthorFollows($slug: String, $user: String, $author_id: Int) {
|
||||||
get_author_follows(slug: $slug, user: $user, author_id: $author_id) {
|
get_author_follows(slug: $slug, user: $user, author_id: $author_id) {
|
||||||
|
error
|
||||||
authors {
|
authors {
|
||||||
id
|
id
|
||||||
slug
|
slug
|
||||||
|
|
Loading…
Reference in New Issue
Block a user