Merge branch 'dev' of github.com:Discours/discoursio-webapp into dev
This commit is contained in:
commit
2334c6b58c
|
@ -18,7 +18,7 @@ export const ProfilePopup = (props: ProfilePopupProps) => {
|
||||||
const { t } = useLocalize()
|
const { t } = useLocalize()
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Popup {...props} horizontalAnchor="right">
|
<Popup {...props} horizontalAnchor="right" popupCssClass={styles.profilePopup}>
|
||||||
<ul class="nodash">
|
<ul class="nodash">
|
||||||
<li>
|
<li>
|
||||||
<a class={styles.action} href={getPagePath(router, 'author', { slug: author().slug })}>
|
<a class={styles.action} href={getPagePath(router, 'author', { slug: author().slug })}>
|
||||||
|
|
|
@ -3,7 +3,10 @@
|
||||||
color: #fff;
|
color: #fff;
|
||||||
font-size: 2rem;
|
font-size: 2rem;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
|
left: 0;
|
||||||
transition: background-color 0.3s;
|
transition: background-color 0.3s;
|
||||||
|
position: absolute;
|
||||||
|
width: 100%;
|
||||||
|
|
||||||
&.error {
|
&.error {
|
||||||
background-color: #d00820;
|
background-color: #d00820;
|
||||||
|
|
|
@ -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()
|
||||||
}
|
}
|
||||||
|
|
|
@ -127,6 +127,12 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.profilePopup {
|
||||||
|
@include media-breakpoint-up(sm) {
|
||||||
|
min-width: 22rem;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// TODO: animation
|
// TODO: animation
|
||||||
// .popup {
|
// .popup {
|
||||||
// opacity: 1;
|
// opacity: 1;
|
||||||
|
|
|
@ -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