Delete accounts.scss
This commit is contained in:
parent
63201c4acf
commit
a4fcbb9872
7 changed files with 7 additions and 101 deletions
|
@ -5,8 +5,6 @@ import { useSoapboxConfig } from 'soapbox/hooks';
|
||||||
|
|
||||||
import { getAcct } from '../utils/accounts';
|
import { getAcct } from '../utils/accounts';
|
||||||
|
|
||||||
import Icon from './icon';
|
|
||||||
import RelativeTimestamp from './relative-timestamp';
|
|
||||||
import { HStack, Text } from './ui';
|
import { HStack, Text } from './ui';
|
||||||
import VerificationBadge from './verification-badge';
|
import VerificationBadge from './verification-badge';
|
||||||
|
|
||||||
|
@ -15,19 +13,11 @@ import type { Account } from 'soapbox/types/entities';
|
||||||
interface IDisplayName {
|
interface IDisplayName {
|
||||||
account: Account
|
account: Account
|
||||||
withSuffix?: boolean
|
withSuffix?: boolean
|
||||||
withDate?: boolean
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const DisplayName: React.FC<IDisplayName> = ({ account, children, withSuffix = true, withDate = false }) => {
|
const DisplayName: React.FC<IDisplayName> = ({ account, children, withSuffix = true }) => {
|
||||||
const { displayFqn = false } = useSoapboxConfig();
|
const { displayFqn = false } = useSoapboxConfig();
|
||||||
const { created_at: createdAt, verified } = account;
|
const { verified } = account;
|
||||||
|
|
||||||
const joinedAt = createdAt ? (
|
|
||||||
<div className='account__joined-at'>
|
|
||||||
<Icon src={require('@tabler/icons/clock.svg')} />
|
|
||||||
<RelativeTimestamp timestamp={createdAt} />
|
|
||||||
</div>
|
|
||||||
) : null;
|
|
||||||
|
|
||||||
const displayName = (
|
const displayName = (
|
||||||
<HStack space={1} alignItems='center' grow>
|
<HStack space={1} alignItems='center' grow>
|
||||||
|
@ -39,7 +29,6 @@ const DisplayName: React.FC<IDisplayName> = ({ account, children, withSuffix = t
|
||||||
/>
|
/>
|
||||||
|
|
||||||
{verified && <VerificationBadge />}
|
{verified && <VerificationBadge />}
|
||||||
{withDate && joinedAt}
|
|
||||||
</HStack>
|
</HStack>
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
|
@ -117,14 +117,14 @@ const MediaItem: React.FC<IMediaItem> = ({ attachment, displayWidth, onOpenMedia
|
||||||
|
|
||||||
if (!visible) {
|
if (!visible) {
|
||||||
icon = (
|
icon = (
|
||||||
<span className='account-gallery__item__icons'>
|
<span className='media-gallery__item__icons'>
|
||||||
<Icon src={require('@tabler/icons/eye-off.svg')} />
|
<Icon src={require('@tabler/icons/eye-off.svg')} />
|
||||||
</span>
|
</span>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className='account-gallery__item' style={{ width, height }}>
|
<div style={{ width, height }}>
|
||||||
<a className='media-gallery__item-thumbnail' href={status.get('url')} target='_blank' onClick={handleClick} title={title}>
|
<a className='media-gallery__item-thumbnail' href={status.get('url')} target='_blank' onClick={handleClick} title={title}>
|
||||||
<Blurhash
|
<Blurhash
|
||||||
hash={attachment.get('blurhash')}
|
hash={attachment.get('blurhash')}
|
||||||
|
|
|
@ -140,7 +140,7 @@ const AccountGallery = () => {
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Column label={`@${accountUsername}`} transparent withHeader={false}>
|
<Column label={`@${accountUsername}`} transparent withHeader={false}>
|
||||||
<div role='feed' className='account-gallery__container' ref={handleRef}>
|
<div role='feed' className='flex flex-wrap gap-2' ref={handleRef}>
|
||||||
{attachments.map((attachment, index) => attachment === null ? (
|
{attachments.map((attachment, index) => attachment === null ? (
|
||||||
<LoadMoreMedia key={'more:' + attachments.get(index + 1)?.id} maxId={index > 0 ? (attachments.get(index - 1)?.id || null) : null} onLoadMore={handleLoadMore} />
|
<LoadMoreMedia key={'more:' + attachments.get(index + 1)?.id} maxId={index > 0 ? (attachments.get(index - 1)?.id || null) : null} onLoadMore={handleLoadMore} />
|
||||||
) : (
|
) : (
|
||||||
|
|
|
@ -13,7 +13,7 @@ interface IMovedNote {
|
||||||
}
|
}
|
||||||
|
|
||||||
const MovedNote: React.FC<IMovedNote> = ({ from, to }) => (
|
const MovedNote: React.FC<IMovedNote> = ({ from, to }) => (
|
||||||
<div className='account__moved-note'>
|
<div className='p-4'>
|
||||||
<HStack className='mb-2' alignItems='center' space={1.5}>
|
<HStack className='mb-2' alignItems='center' space={1.5}>
|
||||||
<Icon
|
<Icon
|
||||||
src={require('@tabler/icons/briefcase.svg')}
|
src={require('@tabler/icons/briefcase.svg')}
|
||||||
|
|
|
@ -52,7 +52,7 @@ const ProfileMediaPanel: React.FC<IProfileMediaPanel> = ({ account }) => {
|
||||||
|
|
||||||
if (!nineAttachments.isEmpty()) {
|
if (!nineAttachments.isEmpty()) {
|
||||||
return (
|
return (
|
||||||
<div className='flex flex-wrap'>
|
<div className='flex flex-wrap gap-1'>
|
||||||
{nineAttachments.map((attachment, _index) => (
|
{nineAttachments.map((attachment, _index) => (
|
||||||
<MediaItem
|
<MediaItem
|
||||||
key={`${attachment.getIn(['status', 'id'])}+${attachment.id}`}
|
key={`${attachment.getIn(['status', 'id'])}+${attachment.id}`}
|
||||||
|
|
|
@ -1,82 +0,0 @@
|
||||||
.card {
|
|
||||||
& > a {
|
|
||||||
display: block;
|
|
||||||
text-decoration: none;
|
|
||||||
color: inherit;
|
|
||||||
box-shadow: 0 0 3px 0 rgba(0, 0, 0, 0.3);
|
|
||||||
border-radius: 4px;
|
|
||||||
overflow: hidden;
|
|
||||||
|
|
||||||
@media screen and (max-width: $no-gap-breakpoint) {
|
|
||||||
box-shadow: none;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.account {
|
|
||||||
padding: 10px;
|
|
||||||
position: relative;
|
|
||||||
|
|
||||||
&:not(:last-of-type) {
|
|
||||||
border-bottom: 1px solid var(--brand-color--med);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.account-gallery__container {
|
|
||||||
display: flex;
|
|
||||||
flex-wrap: wrap;
|
|
||||||
|
|
||||||
.empty-column-indicator {
|
|
||||||
margin: -4px -2px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.account-gallery__item {
|
|
||||||
@apply rounded-lg p-1;
|
|
||||||
border: 0;
|
|
||||||
box-sizing: border-box;
|
|
||||||
display: block;
|
|
||||||
position: relative;
|
|
||||||
overflow: hidden;
|
|
||||||
|
|
||||||
a {
|
|
||||||
background: var(--brand-color--faint);
|
|
||||||
}
|
|
||||||
|
|
||||||
video,
|
|
||||||
img {
|
|
||||||
@apply rounded-lg;
|
|
||||||
}
|
|
||||||
|
|
||||||
&__icons {
|
|
||||||
position: absolute;
|
|
||||||
top: 50%;
|
|
||||||
left: 50%;
|
|
||||||
transform: translate(-50%, -50%);
|
|
||||||
|
|
||||||
.svg-icon {
|
|
||||||
@apply h-6 w-6;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.account__moved-note {
|
|
||||||
padding: 14px 10px;
|
|
||||||
padding-bottom: 16px;
|
|
||||||
background: var(--brand-color--faint);
|
|
||||||
border-top: 1px solid var(--brand-color--med);
|
|
||||||
border-bottom: 1px solid var(--brand-color--med);
|
|
||||||
}
|
|
||||||
|
|
||||||
.account__joined-at {
|
|
||||||
padding-left: 3px;
|
|
||||||
font-size: 14px;
|
|
||||||
display: flex;
|
|
||||||
white-space: nowrap;
|
|
||||||
flex-shrink: 0;
|
|
||||||
color: var(--primary-text-color--faint);
|
|
||||||
|
|
||||||
.svg-icon {
|
|
||||||
padding-right: 3px;
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -14,7 +14,6 @@
|
||||||
@import 'variables';
|
@import 'variables';
|
||||||
@import 'fonts';
|
@import 'fonts';
|
||||||
@import 'basics';
|
@import 'basics';
|
||||||
@import 'accounts';
|
|
||||||
@import 'loading';
|
@import 'loading';
|
||||||
@import 'ui';
|
@import 'ui';
|
||||||
@import 'emoji-picker';
|
@import 'emoji-picker';
|
||||||
|
|
Loading…
Reference in a new issue