List Item: Add divider on mobiles
This commit is contained in:
parent
a3d00dbb39
commit
84bf1db026
@ -6,7 +6,6 @@
|
|||||||
--color-text-meta: var(--color-text-meta-apple);
|
--color-text-meta: var(--color-text-meta-apple);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 0;
|
top: 0;
|
||||||
left: 0;
|
left: 0;
|
||||||
@ -70,6 +69,12 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@media (max-width: 600px) {
|
||||||
|
.ListItem-button {
|
||||||
|
border-radius: 0 !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.status {
|
.status {
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
}
|
}
|
||||||
@ -102,6 +107,7 @@
|
|||||||
|
|
||||||
.LastMessageMeta {
|
.LastMessageMeta {
|
||||||
margin-left: auto;
|
margin-left: auto;
|
||||||
|
|
||||||
body.is-ios & {
|
body.is-ios & {
|
||||||
font-size: .875rem;
|
font-size: .875rem;
|
||||||
margin-right: 0;
|
margin-right: 0;
|
||||||
@ -133,6 +139,7 @@
|
|||||||
content: ': ';
|
content: ': ';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.colon {
|
.colon {
|
||||||
margin-inline-end: .25rem;
|
margin-inline-end: .25rem;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -85,7 +85,7 @@ const AudioResults: FC<OwnProps & StateProps & DispatchProps> = ({
|
|||||||
|| toYearMonth(message.date) !== toYearMonth(foundMessages[index - 1].date);
|
|| toYearMonth(message.date) !== toYearMonth(foundMessages[index - 1].date);
|
||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
className="ListItem"
|
className="ListItem small-icon"
|
||||||
key={message.id}
|
key={message.id}
|
||||||
>
|
>
|
||||||
{shouldDrawDateDivider && (
|
{shouldDrawDateDivider && (
|
||||||
|
|||||||
@ -80,7 +80,7 @@ const FileResults: FC<OwnProps & StateProps & DispatchProps> = ({
|
|||||||
|| toYearMonth(message.date) !== toYearMonth(foundMessages[index - 1].date);
|
|| toYearMonth(message.date) !== toYearMonth(foundMessages[index - 1].date);
|
||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
className="ListItem"
|
className="ListItem small-icon"
|
||||||
key={message.id}
|
key={message.id}
|
||||||
>
|
>
|
||||||
{shouldDrawDateDivider && (
|
{shouldDrawDateDivider && (
|
||||||
|
|||||||
@ -17,8 +17,8 @@
|
|||||||
.documents-list {
|
.documents-list {
|
||||||
padding: 0 1.25rem 1.25rem;
|
padding: 0 1.25rem 1.25rem;
|
||||||
|
|
||||||
.ListItem + .ListItem {
|
.ListItem {
|
||||||
margin-top: 1.25rem;
|
padding: 0.625rem 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -77,7 +77,7 @@ const LinkResults: FC<OwnProps & StateProps & DispatchProps> = ({
|
|||||||
|| toYearMonth(message.date) !== toYearMonth(foundMessages[index - 1].date);
|
|| toYearMonth(message.date) !== toYearMonth(foundMessages[index - 1].date);
|
||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
className="ListItem"
|
className="ListItem small-icon"
|
||||||
dir={lang.isRtl ? 'rtl' : undefined}
|
dir={lang.isRtl ? 'rtl' : undefined}
|
||||||
key={message.id}
|
key={message.id}
|
||||||
>
|
>
|
||||||
|
|||||||
@ -132,6 +132,7 @@ const SettingsPrivacy: FC<OwnProps & StateProps & DispatchProps> = ({
|
|||||||
|
|
||||||
<ListItem
|
<ListItem
|
||||||
narrow
|
narrow
|
||||||
|
className="no-icon"
|
||||||
onClick={() => onScreenSelect(SettingsScreens.PrivacyPhoneNumber)}
|
onClick={() => onScreenSelect(SettingsScreens.PrivacyPhoneNumber)}
|
||||||
>
|
>
|
||||||
<div className="multiline-menu-item">
|
<div className="multiline-menu-item">
|
||||||
@ -143,6 +144,7 @@ const SettingsPrivacy: FC<OwnProps & StateProps & DispatchProps> = ({
|
|||||||
</ListItem>
|
</ListItem>
|
||||||
<ListItem
|
<ListItem
|
||||||
narrow
|
narrow
|
||||||
|
className="no-icon"
|
||||||
onClick={() => onScreenSelect(SettingsScreens.PrivacyLastSeen)}
|
onClick={() => onScreenSelect(SettingsScreens.PrivacyLastSeen)}
|
||||||
>
|
>
|
||||||
<div className="multiline-menu-item">
|
<div className="multiline-menu-item">
|
||||||
@ -154,6 +156,7 @@ const SettingsPrivacy: FC<OwnProps & StateProps & DispatchProps> = ({
|
|||||||
</ListItem>
|
</ListItem>
|
||||||
<ListItem
|
<ListItem
|
||||||
narrow
|
narrow
|
||||||
|
className="no-icon"
|
||||||
onClick={() => onScreenSelect(SettingsScreens.PrivacyProfilePhoto)}
|
onClick={() => onScreenSelect(SettingsScreens.PrivacyProfilePhoto)}
|
||||||
>
|
>
|
||||||
<div className="multiline-menu-item">
|
<div className="multiline-menu-item">
|
||||||
@ -165,6 +168,7 @@ const SettingsPrivacy: FC<OwnProps & StateProps & DispatchProps> = ({
|
|||||||
</ListItem>
|
</ListItem>
|
||||||
<ListItem
|
<ListItem
|
||||||
narrow
|
narrow
|
||||||
|
className="no-icon"
|
||||||
onClick={() => onScreenSelect(SettingsScreens.PrivacyForwarding)}
|
onClick={() => onScreenSelect(SettingsScreens.PrivacyForwarding)}
|
||||||
>
|
>
|
||||||
<div className="multiline-menu-item">
|
<div className="multiline-menu-item">
|
||||||
@ -176,6 +180,7 @@ const SettingsPrivacy: FC<OwnProps & StateProps & DispatchProps> = ({
|
|||||||
</ListItem>
|
</ListItem>
|
||||||
<ListItem
|
<ListItem
|
||||||
narrow
|
narrow
|
||||||
|
className="no-icon"
|
||||||
onClick={() => onScreenSelect(SettingsScreens.PrivacyGroupChats)}
|
onClick={() => onScreenSelect(SettingsScreens.PrivacyGroupChats)}
|
||||||
>
|
>
|
||||||
<div className="multiline-menu-item">
|
<div className="multiline-menu-item">
|
||||||
|
|||||||
@ -72,7 +72,7 @@ const SettingsPrivacyActiveSessions: FC<OwnProps & StateProps & DispatchProps> =
|
|||||||
{lang('AuthSessions.CurrentSession')}
|
{lang('AuthSessions.CurrentSession')}
|
||||||
</h4>
|
</h4>
|
||||||
|
|
||||||
<ListItem narrow inactive>
|
<ListItem narrow inactive className="no-icon">
|
||||||
<div className="multiline-menu-item" dir="auto">
|
<div className="multiline-menu-item" dir="auto">
|
||||||
<span className="title" dir="auto">{session.appName}</span>
|
<span className="title" dir="auto">{session.appName}</span>
|
||||||
<span className="subtitle black tight">{getDeviceEnvironment(session)}</span>
|
<span className="subtitle black tight">{getDeviceEnvironment(session)}</span>
|
||||||
@ -81,7 +81,7 @@ const SettingsPrivacyActiveSessions: FC<OwnProps & StateProps & DispatchProps> =
|
|||||||
</ListItem>
|
</ListItem>
|
||||||
|
|
||||||
<ListItem
|
<ListItem
|
||||||
className="destructive mb-0"
|
className="destructive mb-0 no-icon"
|
||||||
icon="stop"
|
icon="stop"
|
||||||
ripple
|
ripple
|
||||||
narrow
|
narrow
|
||||||
@ -118,6 +118,7 @@ const SettingsPrivacyActiveSessions: FC<OwnProps & StateProps & DispatchProps> =
|
|||||||
handleTerminateSessionClick(session.hash);
|
handleTerminateSessionClick(session.hash);
|
||||||
},
|
},
|
||||||
}]}
|
}]}
|
||||||
|
className="no-icon"
|
||||||
>
|
>
|
||||||
<div className="multiline-menu-item full-size" dir="auto">
|
<div className="multiline-menu-item full-size" dir="auto">
|
||||||
<span className="date">{formatPastTimeShort(lang, session.dateActive * 1000)}</span>
|
<span className="date">{formatPastTimeShort(lang, session.dateActive * 1000)}</span>
|
||||||
|
|||||||
@ -60,7 +60,7 @@ const SettingsPrivacyBlockedUsers: FC<OwnProps & StateProps & DispatchProps> = (
|
|||||||
const chat = !isPrivate ? chatsByIds[contactId] : undefined;
|
const chat = !isPrivate ? chatsByIds[contactId] : undefined;
|
||||||
|
|
||||||
const className = buildClassName(
|
const className = buildClassName(
|
||||||
'Chat chat-item-clickable blocked-list-item',
|
'Chat chat-item-clickable blocked-list-item small-icon',
|
||||||
isPrivate ? 'private' : 'group',
|
isPrivate ? 'private' : 'group',
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@ -174,7 +174,7 @@ const SettingsFoldersMain: FC<OwnProps & StateProps & DispatchProps> = ({
|
|||||||
|
|
||||||
{userFolders && userFolders.length ? userFolders.map((folder) => (
|
{userFolders && userFolders.length ? userFolders.map((folder) => (
|
||||||
<ListItem
|
<ListItem
|
||||||
className="mb-2"
|
className="mb-2 no-icon"
|
||||||
narrow
|
narrow
|
||||||
multiline
|
multiline
|
||||||
onClick={() => onEditFolder(foldersById[folder.id])}
|
onClick={() => onEditFolder(foldersById[folder.id])}
|
||||||
|
|||||||
@ -333,7 +333,7 @@ const Profile: FC<OwnProps & StateProps & DispatchProps> = ({
|
|||||||
<ListItem
|
<ListItem
|
||||||
key={id}
|
key={id}
|
||||||
teactOrderKey={i}
|
teactOrderKey={i}
|
||||||
className="chat-item-clickable scroll-item"
|
className="chat-item-clickable scroll-item small-icon"
|
||||||
onClick={() => handleMemberClick(id)}
|
onClick={() => handleMemberClick(id)}
|
||||||
contextActions={getMemberContextAction(id)}
|
contextActions={getMemberContextAction(id)}
|
||||||
>
|
>
|
||||||
|
|||||||
@ -1,6 +1,26 @@
|
|||||||
.ListItem {
|
.ListItem {
|
||||||
position: relative;
|
position: relative;
|
||||||
|
|
||||||
|
@media (max-width: 600px) {
|
||||||
|
&:not(:last-of-type)::after {
|
||||||
|
content: "";
|
||||||
|
position: absolute;
|
||||||
|
bottom: 0;
|
||||||
|
left: 4.5rem;
|
||||||
|
right: 0;
|
||||||
|
height: 0.03125rem;
|
||||||
|
background: var(--color-dividers);
|
||||||
|
}
|
||||||
|
|
||||||
|
&.small-icon::after {
|
||||||
|
left: 3.875rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
&.no-icon::after {
|
||||||
|
left: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.ListItem-button {
|
.ListItem-button {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
background-color: var(--background-color);
|
background-color: var(--background-color);
|
||||||
@ -48,7 +68,7 @@
|
|||||||
.ListItem-button {
|
.ListItem-button {
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
|
|
||||||
@media (hover:hover) {
|
@media (hover: hover) {
|
||||||
&:hover, &:focus {
|
&:hover, &:focus {
|
||||||
--background-color: var(--color-chat-hover);
|
--background-color: var(--color-chat-hover);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -15,13 +15,14 @@
|
|||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
unicode-bidi: plaintext;
|
unicode-bidi: plaintext;
|
||||||
|
|
||||||
@media (hover:hover) {
|
@media (hover: hover) {
|
||||||
&:hover, &:focus {
|
&:hover, &:focus {
|
||||||
background-color: var(--color-chat-hover);
|
background-color: var(--color-chat-hover);
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
color: inherit;
|
color: inherit;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@media (max-width: 600px) {
|
@media (max-width: 600px) {
|
||||||
&:focus, &:hover, &:active {
|
&:focus, &:hover, &:active {
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
@ -80,7 +81,7 @@
|
|||||||
margin-right: 0;
|
margin-right: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
> .Switcher {
|
> .Switcher {
|
||||||
margin-left: 0;
|
margin-left: 0;
|
||||||
margin-right: auto;
|
margin-right: auto;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -37,7 +37,8 @@ $color-text-secondary: #707579;
|
|||||||
$color-text-secondary-apple: #8A8A90;
|
$color-text-secondary-apple: #8A8A90;
|
||||||
$color-text-meta: #686c72;
|
$color-text-meta: #686c72;
|
||||||
$color-text-meta-apple: #8C8C91;
|
$color-text-meta-apple: #8C8C91;
|
||||||
$color-borders: #dadce0;
|
$color-borders: #DADCE0;
|
||||||
|
$color-dividers: #C8C6CC;
|
||||||
$color-item-active: #ededed;
|
$color-item-active: #ededed;
|
||||||
$color-chat-hover: #f4f4f5;
|
$color-chat-hover: #f4f4f5;
|
||||||
$color-chat-active: #5B90E0;
|
$color-chat-active: #5B90E0;
|
||||||
@ -76,6 +77,7 @@ $color-user-8: #faa774;
|
|||||||
--color-text-green-rgb: #{toRGB($color-text-green)};
|
--color-text-green-rgb: #{toRGB($color-text-green)};
|
||||||
--color-borders: #{$color-borders};
|
--color-borders: #{$color-borders};
|
||||||
--color-borders-input: #{$color-borders};
|
--color-borders-input: #{$color-borders};
|
||||||
|
--color-dividers: #{$color-dividers};
|
||||||
--color-webpage-initial-background: #{$color-dark-gray};
|
--color-webpage-initial-background: #{$color-dark-gray};
|
||||||
--color-interactive-active: var(--color-primary);
|
--color-interactive-active: var(--color-primary);
|
||||||
--color-interactive-inactive: rgba(var(--color-text-secondary-rgb), 0.25);
|
--color-interactive-inactive: rgba(var(--color-text-secondary-rgb), 0.25);
|
||||||
|
|||||||
@ -15,8 +15,9 @@
|
|||||||
"--color-text": ["#000000", "#FFFFFF"],
|
"--color-text": ["#000000", "#FFFFFF"],
|
||||||
"--color-text-secondary": ["#707579", "#AAAAAA"],
|
"--color-text-secondary": ["#707579", "#AAAAAA"],
|
||||||
"--color-text-secondary-apple": ["#8E8E92", "#AAAAAA"],
|
"--color-text-secondary-apple": ["#8E8E92", "#AAAAAA"],
|
||||||
"--color-borders": ["#DADCE0", "#100F10"],
|
"--color-borders": ["#DADCE0", "#303030"],
|
||||||
"--color-borders-input": ["#DADCE0", "#5B5B5A"],
|
"--color-borders-input": ["#DADCE0", "#5B5B5A"],
|
||||||
|
"--color-dividers": ["#C8C6CC", "#404040"],
|
||||||
"--color-links": ["#52A1EF", "#868DF6"],
|
"--color-links": ["#52A1EF", "#868DF6"],
|
||||||
"--color-links-hover": ["#2d8dec", "#6b5fcc"],
|
"--color-links-hover": ["#2d8dec", "#6b5fcc"],
|
||||||
"--color-gray": ["#C4C9CC", "#717579"],
|
"--color-gray": ["#C4C9CC", "#717579"],
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user