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