Fixed code style
This commit is contained in:
parent
ce86896c1d
commit
b7f19353f3
|
@ -5,11 +5,11 @@ import { getPagePath } from '@nanostores/router'
|
|||
import { useLocalize } from '../../context/localize'
|
||||
import { useSession } from '../../context/session'
|
||||
import { router } from '../../stores/router'
|
||||
import { Popup } from '../_shared/Popup'
|
||||
import { Icon } from '../_shared/Icon'
|
||||
import { Popup } from '../_shared/Popup'
|
||||
|
||||
import { clsx } from 'clsx'
|
||||
import styles from '../_shared/Popup/Popup.module.scss'
|
||||
import {clsx} from 'clsx';
|
||||
|
||||
type ProfilePopupProps = Omit<PopupProps, 'children'>
|
||||
|
||||
|
@ -22,43 +22,49 @@ export const ProfilePopup = (props: ProfilePopupProps) => {
|
|||
<ul class="nodash">
|
||||
<li>
|
||||
<a class={styles.action} href={getPagePath(router, 'author', { slug: author().slug })}>
|
||||
<Icon name="profile" class={styles.icon}/>
|
||||
<Icon name="profile" class={styles.icon} />
|
||||
{t('Profile')}
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a class={styles.action} href={getPagePath(router, 'drafts')}>
|
||||
<Icon name="pencil-outline" class={styles.icon}/>
|
||||
<Icon name="pencil-outline" class={styles.icon} />
|
||||
{t('Drafts')}
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a class={styles.action} href={`${getPagePath(router, 'author', { slug: author().slug })}?m=following`}>
|
||||
<Icon name="feed-all" class={styles.icon}/>
|
||||
<a
|
||||
class={styles.action}
|
||||
href={`${getPagePath(router, 'author', { slug: author().slug })}?m=following`}
|
||||
>
|
||||
<Icon name="feed-all" class={styles.icon} />
|
||||
{t('Subscriptions')}
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a class={styles.action} href={`${getPagePath(router, 'authorComments', { slug: author().slug })}`}>
|
||||
<Icon name="comment" class={styles.icon}/>
|
||||
<a
|
||||
class={styles.action}
|
||||
href={`${getPagePath(router, 'authorComments', { slug: author().slug })}`}
|
||||
>
|
||||
<Icon name="comment" class={styles.icon} />
|
||||
{t('Comments')}
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a class={styles.action} href="#">
|
||||
<Icon name="bookmark" class={styles.icon}/>
|
||||
<Icon name="bookmark" class={styles.icon} />
|
||||
{t('Bookmarks')}
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a class={styles.action} href={getPagePath(router, 'profileSettings')}>
|
||||
<Icon name="settings" class={styles.icon}/>
|
||||
<Icon name="settings" class={styles.icon} />
|
||||
{t('Settings')}
|
||||
</a>
|
||||
</li>
|
||||
<li class={styles.topBorderItem}>
|
||||
<span class={clsx(styles.action, 'link')} onClick={() => signOut()}>
|
||||
<Icon name="logout" class={styles.icon}/>
|
||||
<Icon name="logout" class={styles.icon} />
|
||||
{t('Logout')}
|
||||
</span>
|
||||
</li>
|
||||
|
|
|
@ -5,8 +5,8 @@ import { For, Show, createSignal } from 'solid-js'
|
|||
|
||||
import { Popup } from '../Popup'
|
||||
|
||||
import styles from './DropDown.module.scss'
|
||||
import popupStyles from '../Popup/Popup.module.scss'
|
||||
import styles from './DropDown.module.scss'
|
||||
|
||||
export type Option = {
|
||||
value: string | number
|
||||
|
@ -62,7 +62,9 @@ export const DropDown = <TOption extends Option = Option>(props: Props<TOption>)
|
|||
{(option) => (
|
||||
<li>
|
||||
<button
|
||||
class={clsx(popupStyles.action, {[styles.active]: props.currentOption.value === option.value})}
|
||||
class={clsx(popupStyles.action, {
|
||||
[styles.active]: props.currentOption.value === option.value,
|
||||
})}
|
||||
onClick={() => props.onChange(option)}
|
||||
>
|
||||
{option.title}
|
||||
|
|
|
@ -7,8 +7,8 @@ import { useSnackbar } from '../../../context/snackbar'
|
|||
import { Icon } from '../Icon'
|
||||
import { Popover } from '../Popover'
|
||||
|
||||
import styles from './ShareLinks.module.scss'
|
||||
import popupStyles from '../Popup/Popup.module.scss'
|
||||
import styles from './ShareLinks.module.scss'
|
||||
|
||||
type Props = {
|
||||
title: string
|
||||
|
@ -54,25 +54,41 @@ export const ShareLinks = (props: Props) => {
|
|||
<div class={clsx(styles.ShareLinks, props.class, { [styles.inModal]: props.variant === 'inModal' })}>
|
||||
<ul class="nodash">
|
||||
<li>
|
||||
<button role="button" class={clsx(styles.shareControl, popupStyles.action)} onClick={() => handleShare(FACEBOOK)}>
|
||||
<button
|
||||
role="button"
|
||||
class={clsx(styles.shareControl, popupStyles.action)}
|
||||
onClick={() => handleShare(FACEBOOK)}
|
||||
>
|
||||
<Icon name="facebook-white" class={clsx(styles.icon, popupStyles.icon)} />
|
||||
Facebook
|
||||
</button>
|
||||
</li>
|
||||
<li>
|
||||
<button role="button" class={clsx(styles.shareControl, popupStyles.action)} onClick={() => handleShare(TWITTER)}>
|
||||
<button
|
||||
role="button"
|
||||
class={clsx(styles.shareControl, popupStyles.action)}
|
||||
onClick={() => handleShare(TWITTER)}
|
||||
>
|
||||
<Icon name="twitter-white" class={clsx(styles.icon, popupStyles.icon)} />
|
||||
Twitter
|
||||
</button>
|
||||
</li>
|
||||
<li>
|
||||
<button role="button" class={clsx(styles.shareControl, popupStyles.action)} onClick={() => handleShare(TELEGRAM)}>
|
||||
<button
|
||||
role="button"
|
||||
class={clsx(styles.shareControl, popupStyles.action)}
|
||||
onClick={() => handleShare(TELEGRAM)}
|
||||
>
|
||||
<Icon name="telegram-white" class={clsx(styles.icon, popupStyles.icon)} />
|
||||
Telegram
|
||||
</button>
|
||||
</li>
|
||||
<li>
|
||||
<button role="button" class={clsx(styles.shareControl, popupStyles.action)} onClick={() => handleShare(VK)}>
|
||||
<button
|
||||
role="button"
|
||||
class={clsx(styles.shareControl, popupStyles.action)}
|
||||
onClick={() => handleShare(VK)}
|
||||
>
|
||||
<Icon name="vk-white" class={clsx(styles.icon, popupStyles.icon)} />
|
||||
VK
|
||||
</button>
|
||||
|
@ -81,7 +97,11 @@ export const ShareLinks = (props: Props) => {
|
|||
<Show
|
||||
when={props.variant === 'inModal'}
|
||||
fallback={
|
||||
<button role="button" class={clsx(styles.shareControl, popupStyles.action)} onClick={copyLink}>
|
||||
<button
|
||||
role="button"
|
||||
class={clsx(styles.shareControl, popupStyles.action)}
|
||||
onClick={copyLink}
|
||||
>
|
||||
<Icon name="link-white" class={clsx(styles.icon, popupStyles.icon)} />
|
||||
{t('Copy link')}
|
||||
</button>
|
||||
|
|
Loading…
Reference in New Issue
Block a user