mirror of
https://github.com/cinnyapp/cinny.git
synced 2025-11-14 19:20:28 +03:00
Added space nesting (#52)
This commit is contained in:
parent
6c1a602bdc
commit
4efc320f23
18 changed files with 368 additions and 91 deletions
|
|
@ -32,9 +32,11 @@
|
|||
}
|
||||
}
|
||||
}
|
||||
&:focus {
|
||||
outline: none;
|
||||
&:focus-within {
|
||||
background-color: var(--bg-surface-hover);
|
||||
& button {
|
||||
outline: none;
|
||||
}
|
||||
}
|
||||
&:active {
|
||||
background-color: var(--bg-surface-active);
|
||||
|
|
|
|||
|
|
@ -17,13 +17,13 @@ function Directs() {
|
|||
|
||||
const [, forceUpdate] = useState({});
|
||||
|
||||
function selectorChanged(activeRoomID, prevActiveRoomId) {
|
||||
function selectorChanged(selectedRoomId, prevSelectedRoomId) {
|
||||
if (!drawerPostie.hasTopic('selector-change')) return;
|
||||
const addresses = [];
|
||||
if (drawerPostie.hasSubscriber('selector-change', activeRoomID)) addresses.push(activeRoomID);
|
||||
if (drawerPostie.hasSubscriber('selector-change', prevActiveRoomId)) addresses.push(prevActiveRoomId);
|
||||
if (drawerPostie.hasSubscriber('selector-change', selectedRoomId)) addresses.push(selectedRoomId);
|
||||
if (drawerPostie.hasSubscriber('selector-change', prevSelectedRoomId)) addresses.push(prevSelectedRoomId);
|
||||
if (addresses.length === 0) return;
|
||||
drawerPostie.post('selector-change', addresses, activeRoomID);
|
||||
drawerPostie.post('selector-change', addresses, selectedRoomId);
|
||||
}
|
||||
|
||||
function unreadChanged(roomId) {
|
||||
|
|
@ -35,9 +35,9 @@ function Directs() {
|
|||
function roomListUpdated() {
|
||||
const { spaces, rooms, directs } = initMatrix.roomList;
|
||||
if (!(
|
||||
spaces.has(navigation.getActiveRoomId())
|
||||
|| rooms.has(navigation.getActiveRoomId())
|
||||
|| directs.has(navigation.getActiveRoomId()))
|
||||
spaces.has(navigation.selectedRoomId)
|
||||
|| rooms.has(navigation.selectedRoomId)
|
||||
|| directs.has(navigation.selectedRoomId))
|
||||
) {
|
||||
selectRoom(null);
|
||||
}
|
||||
|
|
@ -62,6 +62,7 @@ function Directs() {
|
|||
key={id}
|
||||
roomId={id}
|
||||
drawerPostie={drawerPostie}
|
||||
onClick={() => selectRoom(id)}
|
||||
/>
|
||||
));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,45 +7,40 @@ import navigation from '../../../client/state/navigation';
|
|||
import ScrollView from '../../atoms/scroll/ScrollView';
|
||||
|
||||
import DrawerHeader from './DrawerHeader';
|
||||
import DrawerBreadcrumb from './DrawerBreadcrumb';
|
||||
import Home from './Home';
|
||||
import Directs from './Directs';
|
||||
|
||||
function DrawerBradcrumb() {
|
||||
return (
|
||||
<div className="breadcrumb__wrapper">
|
||||
<ScrollView horizontal vertical={false}>
|
||||
<div>
|
||||
{/* TODO: bradcrumb space paths when spaces become a thing */}
|
||||
</div>
|
||||
</ScrollView>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
function Drawer() {
|
||||
const [activeTab, setActiveTab] = useState('home');
|
||||
const [selectedTab, setSelectedTab] = useState('home');
|
||||
const [spaceId, setSpaceId] = useState(navigation.selectedSpaceId);
|
||||
|
||||
function onTabChanged(tabId) {
|
||||
setActiveTab(tabId);
|
||||
setSelectedTab(tabId);
|
||||
}
|
||||
function onSpaceSelected(roomId) {
|
||||
setSpaceId(roomId);
|
||||
}
|
||||
|
||||
useEffect(() => {
|
||||
navigation.on(cons.events.navigation.TAB_CHANGED, onTabChanged);
|
||||
navigation.on(cons.events.navigation.SPACE_SELECTED, onSpaceSelected);
|
||||
return () => {
|
||||
navigation.removeListener(cons.events.navigation.TAB_CHANGED, onTabChanged);
|
||||
navigation.removeListener(cons.events.navigation.SPACE_SELECTED, onSpaceSelected);
|
||||
};
|
||||
}, []);
|
||||
return (
|
||||
<div className="drawer">
|
||||
<DrawerHeader activeTab={activeTab} />
|
||||
<DrawerHeader selectedTab={selectedTab} spaceId={spaceId} />
|
||||
<div className="drawer__content-wrapper">
|
||||
<DrawerBradcrumb />
|
||||
{selectedTab === 'home' && <DrawerBreadcrumb />}
|
||||
<div className="rooms__wrapper">
|
||||
<ScrollView autoHide>
|
||||
<div className="rooms-container">
|
||||
{
|
||||
activeTab === 'home'
|
||||
? <Home />
|
||||
selectedTab === 'home'
|
||||
? <Home spaceId={spaceId} />
|
||||
: <Directs />
|
||||
}
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -23,18 +23,28 @@
|
|||
@extend .drawer-flexBox;
|
||||
}
|
||||
}
|
||||
|
||||
.breadcrumb__wrapper {
|
||||
display: none;
|
||||
height: var(--header-height);
|
||||
}
|
||||
.rooms__wrapper {
|
||||
@extend .drawer-flexItem;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.rooms-container {
|
||||
padding-bottom: var(--sp-extra-loose);
|
||||
|
||||
&::before {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
|
||||
content: '';
|
||||
display: inline-block;
|
||||
width: 100%;
|
||||
height: 8px;
|
||||
background-image: linear-gradient(
|
||||
to bottom,
|
||||
var(--bg-surface-low),
|
||||
var(--bg-surface-low-transparent));
|
||||
}
|
||||
|
||||
& > .room-selector {
|
||||
width: calc(100% - var(--sp-extra-tight));
|
||||
margin-left: auto;
|
||||
|
|
|
|||
68
src/app/organisms/navigation/DrawerBreadcrumb.jsx
Normal file
68
src/app/organisms/navigation/DrawerBreadcrumb.jsx
Normal file
|
|
@ -0,0 +1,68 @@
|
|||
import React, { useState, useEffect, useRef } from 'react';
|
||||
import './DrawerBreadcrumb.scss';
|
||||
|
||||
import initMatrix from '../../../client/initMatrix';
|
||||
import cons from '../../../client/state/cons';
|
||||
import { selectSpace } from '../../../client/action/navigation';
|
||||
import navigation from '../../../client/state/navigation';
|
||||
|
||||
import Text from '../../atoms/text/Text';
|
||||
import RawIcon from '../../atoms/system-icons/RawIcon';
|
||||
import Button from '../../atoms/button/Button';
|
||||
import ScrollView from '../../atoms/scroll/ScrollView';
|
||||
|
||||
import ChevronRightIC from '../../../../public/res/ic/outlined/chevron-right.svg';
|
||||
|
||||
function DrawerBreadcrumb() {
|
||||
const [, forceUpdate] = useState({});
|
||||
const scrollRef = useRef(null);
|
||||
const mx = initMatrix.matrixClient;
|
||||
const spacePath = navigation.selectedSpacePath;
|
||||
|
||||
function onSpaceSelected() {
|
||||
forceUpdate({});
|
||||
requestAnimationFrame(() => {
|
||||
if (scrollRef?.current === null) return;
|
||||
scrollRef.current.scrollLeft = scrollRef.current.scrollWidth;
|
||||
});
|
||||
}
|
||||
|
||||
useEffect(() => {
|
||||
navigation.on(cons.events.navigation.SPACE_SELECTED, onSpaceSelected);
|
||||
return () => {
|
||||
navigation.removeListener(cons.events.navigation.SPACE_SELECTED, onSpaceSelected);
|
||||
};
|
||||
}, []);
|
||||
|
||||
if (spacePath.length === 0) return null;
|
||||
|
||||
return (
|
||||
<div className="breadcrumb__wrapper">
|
||||
<ScrollView ref={scrollRef} horizontal vertical={false} invisible>
|
||||
<div className="breadcrumb">
|
||||
<Button onClick={() => selectSpace(null)}>
|
||||
<Text variant="b2">Home</Text>
|
||||
</Button>
|
||||
{
|
||||
spacePath.map((spaceId, index) => (
|
||||
<React.Fragment
|
||||
key={spaceId}
|
||||
>
|
||||
<RawIcon size="extra-small" src={ChevronRightIC} />
|
||||
<Button
|
||||
className={index === spacePath.length - 1 ? 'breadcrumb__btn--selected' : ''}
|
||||
onClick={() => selectSpace(spaceId)}
|
||||
>
|
||||
<Text variant="b2">{ mx.getRoom(spaceId).name }</Text>
|
||||
</Button>
|
||||
</React.Fragment>
|
||||
))
|
||||
}
|
||||
<div style={{ width: 'var(--sp-extra-tight)', height: '100%' }} />
|
||||
</div>
|
||||
</ScrollView>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
export default DrawerBreadcrumb;
|
||||
60
src/app/organisms/navigation/DrawerBreadcrumb.scss
Normal file
60
src/app/organisms/navigation/DrawerBreadcrumb.scss
Normal file
|
|
@ -0,0 +1,60 @@
|
|||
.breadcrumb__wrapper {
|
||||
height: var(--header-height);
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.breadcrumb {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
height: 100%;
|
||||
margin: 0 var(--sp-extra-tight);
|
||||
|
||||
&::before,
|
||||
&::after {
|
||||
flex-shrink: 0;
|
||||
position: absolute;
|
||||
right: 0;
|
||||
z-index: 99;
|
||||
|
||||
content: '';
|
||||
display: inline-block;
|
||||
min-width: 8px;
|
||||
width: 8px;
|
||||
height: 100%;
|
||||
background-image: linear-gradient(
|
||||
to right,
|
||||
var(--bg-surface-low-transparent),
|
||||
var(--bg-surface-low)
|
||||
);
|
||||
}
|
||||
&::before {
|
||||
left: 0;
|
||||
right: unset;
|
||||
background-image: linear-gradient(
|
||||
to left,
|
||||
var(--bg-surface-low-transparent),
|
||||
var(--bg-surface-low)
|
||||
);
|
||||
}
|
||||
|
||||
& > * {
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
& > .btn-surface {
|
||||
min-width: 0;
|
||||
padding: var(--sp-extra-tight) 10px;
|
||||
white-space: nowrap;
|
||||
box-shadow: none;
|
||||
& p {
|
||||
max-width: 86px;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
}
|
||||
|
||||
&__btn--selected {
|
||||
box-shadow: var(--bs-surface-border) !important;
|
||||
background-color: var(--bg-surface);
|
||||
}
|
||||
}
|
||||
|
|
@ -1,9 +1,11 @@
|
|||
import React from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
|
||||
import initMatrix from '../../../client/initMatrix';
|
||||
import {
|
||||
openPublicRooms, openCreateRoom, openInviteUser,
|
||||
selectSpace, openPublicRooms, openCreateRoom, openInviteUser,
|
||||
} from '../../../client/action/navigation';
|
||||
import navigation from '../../../client/state/navigation';
|
||||
|
||||
import Text from '../../atoms/text/Text';
|
||||
import Header, { TitleWrapper } from '../../atoms/header/Header';
|
||||
|
|
@ -13,16 +15,33 @@ import ContextMenu, { MenuItem, MenuHeader } from '../../atoms/context-menu/Cont
|
|||
import PlusIC from '../../../../public/res/ic/outlined/plus.svg';
|
||||
import HashPlusIC from '../../../../public/res/ic/outlined/hash-plus.svg';
|
||||
import HashSearchIC from '../../../../public/res/ic/outlined/hash-search.svg';
|
||||
import ChevronLeftIC from '../../../../public/res/ic/outlined/chevron-left.svg';
|
||||
|
||||
function DrawerHeader({ selectedTab, spaceId }) {
|
||||
const mx = initMatrix.matrixClient;
|
||||
const tabName = selectedTab === 'home' ? 'Home' : 'Direct messages';
|
||||
|
||||
const room = mx.getRoom(spaceId);
|
||||
const spaceName = selectedTab === 'dm' ? null : (room?.name || null);
|
||||
|
||||
function handleBackClick() {
|
||||
const spacePath = navigation.selectedSpacePath;
|
||||
if (spacePath.length === 1) {
|
||||
selectSpace(null);
|
||||
return;
|
||||
}
|
||||
selectSpace(spacePath[spacePath.length - 2]);
|
||||
}
|
||||
|
||||
function DrawerHeader({ activeTab }) {
|
||||
return (
|
||||
<Header>
|
||||
<TitleWrapper>
|
||||
<Text variant="s1">{(activeTab === 'home' ? 'Home' : 'Direct messages')}</Text>
|
||||
<Text variant="s1">{spaceName || tabName}</Text>
|
||||
</TitleWrapper>
|
||||
{(activeTab === 'dm')
|
||||
? <IconButton onClick={() => openInviteUser()} tooltip="Start DM" src={PlusIC} size="normal" />
|
||||
: (
|
||||
{ spaceName && <IconButton onClick={handleBackClick} tooltip="Back" src={ChevronLeftIC} size="normal" /> }
|
||||
{ selectedTab === 'dm' && <IconButton onClick={() => openInviteUser()} tooltip="Start DM" src={PlusIC} size="normal" /> }
|
||||
{ selectSpace !== 'dm' && !spaceName && (
|
||||
<>
|
||||
<ContextMenu
|
||||
content={(hideMenu) => (
|
||||
<>
|
||||
|
|
@ -43,13 +62,19 @@ function DrawerHeader({ activeTab }) {
|
|||
)}
|
||||
render={(toggleMenu) => (<IconButton onClick={toggleMenu} tooltip="Add room" src={PlusIC} size="normal" />)}
|
||||
/>
|
||||
)}
|
||||
</>
|
||||
)}
|
||||
{/* <IconButton onClick={() => ''} tooltip="Menu" src={VerticalMenuIC} size="normal" /> */}
|
||||
</Header>
|
||||
);
|
||||
}
|
||||
|
||||
DrawerHeader.defaultProps = {
|
||||
spaceId: null,
|
||||
};
|
||||
DrawerHeader.propTypes = {
|
||||
activeTab: PropTypes.string.isRequired,
|
||||
selectedTab: PropTypes.string.isRequired,
|
||||
spaceId: PropTypes.string,
|
||||
};
|
||||
|
||||
export default DrawerHeader;
|
||||
|
|
|
|||
|
|
@ -1,9 +1,10 @@
|
|||
import React, { useState, useEffect } from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
|
||||
import initMatrix from '../../../client/initMatrix';
|
||||
import cons from '../../../client/state/cons';
|
||||
import navigation from '../../../client/state/navigation';
|
||||
import { selectRoom } from '../../../client/action/navigation';
|
||||
import { selectSpace, selectRoom } from '../../../client/action/navigation';
|
||||
import Postie from '../../../util/Postie';
|
||||
|
||||
import Text from '../../atoms/text/Text';
|
||||
|
|
@ -12,20 +13,32 @@ import Selector from './Selector';
|
|||
import { AtoZ } from './common';
|
||||
|
||||
const drawerPostie = new Postie();
|
||||
function Home() {
|
||||
const { roomList } = initMatrix;
|
||||
const spaceIds = [...roomList.spaces].sort(AtoZ);
|
||||
const roomIds = [...roomList.rooms].sort(AtoZ);
|
||||
|
||||
function Home({ spaceId }) {
|
||||
const [, forceUpdate] = useState({});
|
||||
const { roomList } = initMatrix;
|
||||
let spaceIds = [];
|
||||
let roomIds = [];
|
||||
let directIds = [];
|
||||
|
||||
function selectorChanged(activeRoomID, prevActiveRoomId) {
|
||||
const spaceChildIds = roomList.getSpaceChildren(spaceId);
|
||||
if (spaceChildIds) {
|
||||
spaceIds = spaceChildIds.filter((roomId) => roomList.spaces.has(roomId)).sort(AtoZ);
|
||||
roomIds = spaceChildIds.filter((roomId) => roomList.rooms.has(roomId)).sort(AtoZ);
|
||||
directIds = spaceChildIds.filter((roomId) => roomList.directs.has(roomId)).sort(AtoZ);
|
||||
} else {
|
||||
spaceIds = [...roomList.spaces]
|
||||
.filter((roomId) => !roomList.roomIdToParents.has(roomId)).sort(AtoZ);
|
||||
roomIds = [...roomList.rooms]
|
||||
.filter((roomId) => !roomList.roomIdToParents.has(roomId)).sort(AtoZ);
|
||||
}
|
||||
|
||||
function selectorChanged(selectedRoomId, prevSelectedRoomId) {
|
||||
if (!drawerPostie.hasTopic('selector-change')) return;
|
||||
const addresses = [];
|
||||
if (drawerPostie.hasSubscriber('selector-change', activeRoomID)) addresses.push(activeRoomID);
|
||||
if (drawerPostie.hasSubscriber('selector-change', prevActiveRoomId)) addresses.push(prevActiveRoomId);
|
||||
if (drawerPostie.hasSubscriber('selector-change', selectedRoomId)) addresses.push(selectedRoomId);
|
||||
if (drawerPostie.hasSubscriber('selector-change', prevSelectedRoomId)) addresses.push(prevSelectedRoomId);
|
||||
if (addresses.length === 0) return;
|
||||
drawerPostie.post('selector-change', addresses, activeRoomID);
|
||||
drawerPostie.post('selector-change', addresses, selectedRoomId);
|
||||
}
|
||||
function unreadChanged(roomId) {
|
||||
if (!drawerPostie.hasTopic('unread-change')) return;
|
||||
|
|
@ -36,9 +49,9 @@ function Home() {
|
|||
function roomListUpdated() {
|
||||
const { spaces, rooms, directs } = initMatrix.roomList;
|
||||
if (!(
|
||||
spaces.has(navigation.getActiveRoomId())
|
||||
|| rooms.has(navigation.getActiveRoomId())
|
||||
|| directs.has(navigation.getActiveRoomId()))
|
||||
spaces.has(navigation.selectedRoomId)
|
||||
|| rooms.has(navigation.selectedRoomId)
|
||||
|| directs.has(navigation.selectedRoomId))
|
||||
) {
|
||||
selectRoom(null);
|
||||
}
|
||||
|
|
@ -67,6 +80,7 @@ function Home() {
|
|||
roomId={id}
|
||||
isDM={false}
|
||||
drawerPostie={drawerPostie}
|
||||
onClick={() => selectSpace(id)}
|
||||
/>
|
||||
))}
|
||||
|
||||
|
|
@ -77,10 +91,27 @@ function Home() {
|
|||
roomId={id}
|
||||
isDM={false}
|
||||
drawerPostie={drawerPostie}
|
||||
onClick={() => selectRoom(id)}
|
||||
/>
|
||||
)) }
|
||||
|
||||
{ directIds.length !== 0 && <Text className="cat-header" variant="b3">People</Text> }
|
||||
{ directIds.map((id) => (
|
||||
<Selector
|
||||
key={id}
|
||||
roomId={id}
|
||||
drawerPostie={drawerPostie}
|
||||
onClick={() => selectRoom(id)}
|
||||
/>
|
||||
))}
|
||||
</>
|
||||
);
|
||||
}
|
||||
Home.defaultProps = {
|
||||
spaceId: null,
|
||||
};
|
||||
Home.propTypes = {
|
||||
spaceId: PropTypes.string,
|
||||
};
|
||||
|
||||
export default Home;
|
||||
|
|
|
|||
|
|
@ -4,7 +4,6 @@ import PropTypes from 'prop-types';
|
|||
|
||||
import initMatrix from '../../../client/initMatrix';
|
||||
import { doesRoomHaveUnread } from '../../../util/matrixUtil';
|
||||
import { selectRoom } from '../../../client/action/navigation';
|
||||
import navigation from '../../../client/state/navigation';
|
||||
|
||||
import RoomSelector from '../../molecules/room-selector/RoomSelector';
|
||||
|
|
@ -14,16 +13,18 @@ import HashLockIC from '../../../../public/res/ic/outlined/hash-lock.svg';
|
|||
import SpaceIC from '../../../../public/res/ic/outlined/space.svg';
|
||||
import SpaceLockIC from '../../../../public/res/ic/outlined/space-lock.svg';
|
||||
|
||||
function Selector({ roomId, isDM, drawerPostie }) {
|
||||
function Selector({
|
||||
roomId, isDM, drawerPostie, onClick,
|
||||
}) {
|
||||
const mx = initMatrix.matrixClient;
|
||||
const room = mx.getRoom(roomId);
|
||||
const imageSrc = room.getAvatarFallbackMember()?.getAvatarUrl(mx.baseUrl, 24, 24, 'crop') || null;
|
||||
|
||||
const [isSelected, setIsSelected] = useState(navigation.getActiveRoomId() === roomId);
|
||||
const [isSelected, setIsSelected] = useState(navigation.selectedRoomId === roomId);
|
||||
const [, forceUpdate] = useState({});
|
||||
|
||||
function selectorChanged(activeRoomId) {
|
||||
setIsSelected(activeRoomId === roomId);
|
||||
function selectorChanged(selectedRoomId) {
|
||||
setIsSelected(selectedRoomId === roomId);
|
||||
}
|
||||
function changeNotificationBadge() {
|
||||
forceUpdate({});
|
||||
|
|
@ -58,7 +59,7 @@ function Selector({ roomId, isDM, drawerPostie }) {
|
|||
isUnread={doesRoomHaveUnread(room)}
|
||||
notificationCount={room.getUnreadNotificationCount('total') || 0}
|
||||
isAlert={room.getUnreadNotificationCount('highlight') !== 0}
|
||||
onClick={() => selectRoom(roomId)}
|
||||
onClick={onClick}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
|
@ -71,6 +72,7 @@ Selector.propTypes = {
|
|||
roomId: PropTypes.string.isRequired,
|
||||
isDM: PropTypes.bool,
|
||||
drawerPostie: PropTypes.shape({}).isRequired,
|
||||
onClick: PropTypes.func.isRequired,
|
||||
};
|
||||
|
||||
export default Selector;
|
||||
|
|
|
|||
|
|
@ -60,10 +60,10 @@ function SideBar() {
|
|||
+ initMatrix.roomList.inviteDirects.size;
|
||||
|
||||
const [totalInvites, updateTotalInvites] = useState(totalInviteCount());
|
||||
const [activeTab, setActiveTab] = useState('home');
|
||||
const [selectedTab, setSelectedTab] = useState('home');
|
||||
|
||||
function onTabChanged(tabId) {
|
||||
setActiveTab(tabId);
|
||||
setSelectedTab(tabId);
|
||||
}
|
||||
function onInviteListChange() {
|
||||
updateTotalInvites(totalInviteCount());
|
||||
|
|
@ -91,8 +91,8 @@ function SideBar() {
|
|||
<ScrollView invisible>
|
||||
<div className="scrollable-content">
|
||||
<div className="featured-container">
|
||||
<SidebarAvatar active={activeTab === 'home'} onClick={() => changeTab('home')} tooltip="Home" iconSrc={HomeIC} />
|
||||
<SidebarAvatar active={activeTab === 'dm'} onClick={() => changeTab('dm')} tooltip="People" iconSrc={UserIC} />
|
||||
<SidebarAvatar active={selectedTab === 'home'} onClick={() => changeTab('home')} tooltip="Home" iconSrc={HomeIC} />
|
||||
<SidebarAvatar active={selectedTab === 'dm'} onClick={() => changeTab('dm')} tooltip="People" iconSrc={UserIC} />
|
||||
<SidebarAvatar onClick={() => openPublicRooms()} tooltip="Public rooms" iconSrc={HashSearchIC} />
|
||||
</div>
|
||||
<div className="sidebar-divider" />
|
||||
|
|
|
|||
|
|
@ -39,11 +39,10 @@
|
|||
height: 8px;
|
||||
|
||||
background: transparent;
|
||||
// background-image: linear-gradient(to top, var(--bg-surface-low), transparent);
|
||||
// It produce bug in safari
|
||||
// To fix it, we have to set the color as a fully transparent version of that exact color. like:
|
||||
// background-image: linear-gradient(to top, rgb(255, 255, 255), rgba(255, 255, 255, 0));
|
||||
// TODO: fix this bug while implementing spaces
|
||||
background-image: linear-gradient(
|
||||
to top,
|
||||
var(--bg-surface-low),
|
||||
var(--bg-surface-low-transparent));
|
||||
position: sticky;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ import Spinner from '../../atoms/spinner/Spinner';
|
|||
|
||||
import CinnySvg from '../../../../public/res/svg/cinny.svg';
|
||||
|
||||
// This regex validates historical usernames, which don't satisy today's username requirements.
|
||||
// This regex validates historical usernames, which don't satisfy today's username requirements.
|
||||
// See https://matrix.org/docs/spec/appendices#id13 for more info.
|
||||
const LOCALPART_LOGIN_REGEX = /.*/;
|
||||
const LOCALPART_SIGNUP_REGEX = /^[a-z0-9_\-.=/]+$/;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue