Merge branch 'dev' of github.com:Discours/discoursio-webapp into dev

This commit is contained in:
Untone 2024-05-11 17:55:05 +03:00
commit 2334c6b58c
7 changed files with 13 additions and 16 deletions

View File

@ -18,7 +18,7 @@ export const ProfilePopup = (props: ProfilePopupProps) => {
const { t } = useLocalize()
return (
<Popup {...props} horizontalAnchor="right">
<Popup {...props} horizontalAnchor="right" popupCssClass={styles.profilePopup}>
<ul class="nodash">
<li>
<a class={styles.action} href={getPagePath(router, 'author', { slug: author().slug })}>

View File

@ -3,7 +3,10 @@
color: #fff;
font-size: 2rem;
font-weight: 500;
left: 0;
transition: background-color 0.3s;
position: absolute;
width: 100%;
&.error {
background-color: #d00820;

View File

@ -59,7 +59,7 @@ export const PublishSettings = (props: Props) => {
const composeDescription = () => {
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, ' ')
return shorten(leadText, DESCRIPTION_MAX_LENGTH).trim()
}

View File

@ -127,6 +127,12 @@
}
}
.profilePopup {
@include media-breakpoint-up(sm) {
min-width: 22rem;
}
}
// TODO: animation
// .popup {
// opacity: 1;

View File

@ -8,18 +8,6 @@
}
}
.unswiped {
width: 100%;
margin: 2rem 0;
margin-bottom: 6rem;
padding-bottom: 2rem;
display: block;
h2 {
text-align: center;
}
}
.Swiper {
display: block;
margin: 2rem 0;

View File

@ -1,6 +1,5 @@
import type {
Author,
AuthorFollowsResult,
CommonResult,
FollowingEntity,
LoadShoutsOptions,
@ -134,7 +133,7 @@ export const apiClient = {
slug?: string
author_id?: number
user?: string
}): Promise<AuthorFollowsResult> => {
}): Promise<CommonResult> => {
const response = await publicGraphQLClient.query(authorFollows, params).toPromise()
return response.data.get_author_follows
},

View File

@ -3,6 +3,7 @@ import { gql } from '@urql/core'
export default gql`
query GetAuthorFollows($slug: String, $user: String, $author_id: Int) {
get_author_follows(slug: $slug, user: $user, author_id: $author_id) {
error
authors {
id
slug