Localize fonts

Signed-off-by: Ajay Bura <ajbura@gmail.com>
This commit is contained in:
Ajay Bura 2021-12-16 17:55:16 +05:30
parent ed27e6b8e4
commit 3d7e509f9a
43 changed files with 378 additions and 77 deletions

View file

@ -61,7 +61,7 @@ function EmojiGroup({ name, groupEmojis }) {
return (
<div className="emoji-group">
<Text className="emoji-group__header" variant="b2">{name}</Text>
<Text className="emoji-group__header" variant="b2" weight="bold">{name}</Text>
{groupEmojis.length !== 0 && <div className="emoji-set">{getEmojiBoard()}</div>}
</div>
);

View file

@ -101,7 +101,6 @@
margin-left: var(--sp-extra-tight);
padding: var(--sp-extra-tight) var(--sp-ultra-tight);
text-transform: uppercase;
font-weight: 600;
box-shadow: 0 -4px 0 0 var(--bg-surface);
border-bottom: 1px solid var(--bg-surface-border);
[dir=rtl] & {

View file

@ -89,7 +89,7 @@ function InviteList({ isOpen, onRequestClose }) {
<div className="invites-content">
{ initMatrix.roomList.inviteDirects.size !== 0 && (
<div className="invites-content__subheading">
<Text variant="b3">Direct Messages</Text>
<Text variant="b3" weight="bold">Direct Messages</Text>
</div>
)}
{
@ -117,14 +117,14 @@ function InviteList({ isOpen, onRequestClose }) {
}
{ initMatrix.roomList.inviteSpaces.size !== 0 && (
<div className="invites-content__subheading">
<Text variant="b3">Spaces</Text>
<Text variant="b3" weight="bold">Spaces</Text>
</div>
)}
{ Array.from(initMatrix.roomList.inviteSpaces).map(renderRoomTile) }
{ initMatrix.roomList.inviteRooms.size !== 0 && (
<div className="invites-content__subheading">
<Text variant="b3">Rooms</Text>
<Text variant="b3" weight="bold">Rooms</Text>
</div>
)}
{ Array.from(initMatrix.roomList.inviteRooms).map(renderRoomTile) }

View file

@ -7,7 +7,6 @@
& .text {
text-transform: uppercase;
font-weight: 600;
}
&:first-child {
margin-top: var(--sp-tight);

View file

@ -18,10 +18,6 @@
border-left: 1px solid var(--bg-surface-border);
}
& .header__title-wrapper .text {
font-weight: 500;
}
&__content-wrapper {
@extend .drawer-flexItem;
@extend .drawer-flexBox;
@ -79,6 +75,5 @@
margin: var(--sp-normal);
margin-bottom: var(--sp-extra-tight);
text-transform: uppercase;
font-weight: 600;
}
}

View file

@ -32,7 +32,7 @@ function DrawerHeader({ selectedTab, spaceId }) {
return (
<Header>
<TitleWrapper>
<Text variant="s1">{twemojify(spaceName) || tabName}</Text>
<Text variant="s1" weight="medium" primary>{twemojify(spaceName) || tabName}</Text>
</TitleWrapper>
{spaceName && (
<IconButton

View file

@ -72,7 +72,7 @@ function Home({ spaceId }) {
return (
<>
{ spaceIds.length !== 0 && <Text className="cat-header" variant="b3">Spaces</Text> }
{ spaceIds.length !== 0 && <Text className="cat-header" variant="b3" weight="bold">Spaces</Text> }
{ spaceIds.map((id) => (
<Selector
key={id}
@ -83,7 +83,7 @@ function Home({ spaceId }) {
/>
))}
{ roomIds.length !== 0 && <Text className="cat-header" variant="b3">Rooms</Text> }
{ roomIds.length !== 0 && <Text className="cat-header" variant="b3" weight="bold">Rooms</Text> }
{ roomIds.map((id) => (
<Selector
key={id}
@ -94,7 +94,7 @@ function Home({ spaceId }) {
/>
)) }
{ directIds.length !== 0 && <Text className="cat-header" variant="b3">People</Text> }
{ directIds.length !== 0 && <Text className="cat-header" variant="b3" weight="bold">People</Text> }
{ directIds.map((id) => (
<Selector
key={id}

View file

@ -272,7 +272,7 @@ function ProfileViewer() {
size="large"
/>
<div className="profile-viewer__user__info">
<Text variant="s1">{twemojify(username)}</Text>
<Text variant="s1" weight="medium">{twemojify(username)}</Text>
<Text variant="b2">{twemojify(userId)}</Text>
</div>
<div className="profile-viewer__user__role">

View file

@ -26,9 +26,6 @@
margin: 0 var(--sp-normal);
& .text-s1 {
font-weight: 500;
}
& .text {
white-space: pre-wrap;
word-break: break-word;

View file

@ -143,7 +143,7 @@ function PeopleDrawer({ roomId }) {
<div className="people-drawer">
<Header>
<TitleWrapper>
<Text variant="s1">
<Text variant="s1" primary>
People
<Text className="people-drawer__member-count" variant="b3">{`${room.getJoinedMemberCount()} members`}</Text>
</Text>

View file

@ -29,7 +29,7 @@ function RoomViewHeader({ roomId }) {
<Header>
<Avatar imageSrc={avatarSrc} text={roomName} bgColor={colorMXID(roomId)} size="small" />
<TitleWrapper>
<Text variant="h2">{twemojify(roomName)}</Text>
<Text variant="h2" weight="medium" primary>{twemojify(roomName)}</Text>
{ typeof roomTopic !== 'undefined' && <p title={roomTopic} className="text text-b3">{twemojify(roomTopic)}</p>}
</TitleWrapper>
<IconButton onClick={togglePeopleDrawer} tooltip="People" src={UserIC} />

View file

@ -10,7 +10,7 @@ function Welcome() {
<div className="app-welcome flex--center">
<div className="flex-v--center">
<img className="app-welcome__logo noselect" src={CinnySvg} alt="Cinny logo" />
<Text className="app-welcome__heading" variant="h1">Welcome to Cinny</Text>
<Text className="app-welcome__heading" variant="h1" weight="medium">Welcome to Cinny</Text>
<Text className="app-welcome__subheading" variant="s1">Yet another matrix client</Text>
</div>
</div>