Skip to content

Commit

Permalink
a
Browse files Browse the repository at this point in the history
  • Loading branch information
mattsrobot committed Dec 16, 2023
1 parent 9d578d0 commit 2e85fc2
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 11 deletions.
11 changes: 11 additions & 0 deletions app/components/community-channel.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,17 @@ import { useState } from "react";

import './styles.community-channel.css';

export function CommunityChannelSkeleton() {
return (
<section className='wk-community-main'>
<div className='wk-channel-main'>
<section className='wk-channel-header' onContextMenu={(e) => { e.preventDefault() }} />
<section className='wk-channel-feed' onContextMenu={(e) => { e.preventDefault() }} />
</div>
<section className='wk-channel-users' onContextMenu={(e) => { e.preventDefault() }} />
</section>);
}

export default function CommunityChannel(props) {
const { channel, community, channelHandle } = props;

Expand Down
22 changes: 11 additions & 11 deletions app/components/community-menu.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ function TopChannels(props) {
{!!channels && channels.map((channel) => {
const ur = channel.unread_count > 0;
const navLink = <Box pl="3" pr="3">
<NavLink aria-label={channel.name} draggable="false" preventScrollReset to={`/c/${community.handle}/${channel.handle}`} data-accent-color="gray" className={`wk-nav-link-channel wk-fullwidth wk-gear-toggle-parent ${wkGhostButton}`}>
<NavLink prefetch='intent' aria-label={channel.name} draggable="false" preventScrollReset to={`/c/${community.handle}/${channel.handle}`} data-accent-color="gray" className={`wk-nav-link-channel wk-fullwidth wk-gear-toggle-parent ${wkGhostButton}`}>
{ur && <span className='wk-nav-link-unread' />}
<span style={{ color: ur ? "var(--color-text-on-light)" : "unset" }}>{channel.name}</span>
<div style={{ flexGrow: 1 }} />
Expand Down Expand Up @@ -299,7 +299,7 @@ function ChannelGroup(props) {
const ur = channel.unread_count > 0;
return <ContextMenu.Root key={`ccmu-${channel.id}`}>
<ContextMenu.Trigger>
<NavLink aria-label={channel.name} draggable="false" preventScrollReset={true} to={`/c/${community.handle}/${channel.handle}`} data-accent-color="gray" className={`wk-nav-link-channel wk-fullwidth wk-gear-toggle-parent ${wkGhostButton}`}>
<NavLink prefetch='intent' aria-label={channel.name} draggable="false" preventScrollReset={true} to={`/c/${community.handle}/${channel.handle}`} data-accent-color="gray" className={`wk-nav-link-channel wk-fullwidth wk-gear-toggle-parent ${wkGhostButton}`}>
{ur && <span className='wk-nav-link-unread' />}
<span draggable="false" style={{ color: ur ? "var(--color-text-on-light)" : "unset" }}>{channel.name}</span>
<div draggable="false" style={{ flexGrow: 1 }} />
Expand Down Expand Up @@ -428,7 +428,7 @@ function ChannelsList(props) {
{canInvite && <ContextMenu.Item color='green' onSelect={toggleInviteOpen}>Invite people</ContextMenu.Item>}
{manageChannels || canInvite && <ContextMenu.Separator />}
{manageCommunity ?
<Link to={`/s/${community.handle}/settings/overview`} className='rt-reset' aria-label="Community settings">
<Link prefetch='intent' to={`/s/${community.handle}/settings/overview`} className='rt-reset' aria-label="Community settings">
<ContextMenu.Item color='blue'>Community settings</ContextMenu.Item>
</Link> :
!!me ?
Expand All @@ -441,7 +441,7 @@ function ChannelsList(props) {
<Popover.Content>
<Flex direction="column" gap="3">
{manageCommunity && <Box>
<Link to={`/s/${community.handle}/settings/overview`} aria-label="Community settings" className='rt-reset rt-BaseButton rt-Button rt-r-size-1 rt-variant-solid'>
<Link prefetch='intent' to={`/s/${community.handle}/settings/overview`} aria-label="Community settings" className='rt-reset rt-BaseButton rt-Button rt-r-size-1 rt-variant-solid'>
Community settings
</Link>
</Box>}
Expand Down Expand Up @@ -505,15 +505,15 @@ function ChannelsList(props) {
<ContextMenu.Item onSelect={toggleCreateGroupOpen}>Create group</ContextMenu.Item>
</>}
{canInvite && <ContextMenu.Item onSelect={toggleInviteOpen} color='green'>Invite people</ContextMenu.Item>}
{manageCommunity && <Link to={`/s/${community.handle}/settings/overview`} className='rt-reset' aria-label="Community settings">
{manageCommunity && <Link prefetch='intent' to={`/s/${community.handle}/settings/overview`} className='rt-reset' aria-label="Community settings">
<ContextMenu.Item color='blue'>Community settings</ContextMenu.Item>
</Link>}
</> :
<>
<Link to='/signup' aria-label="Signup to Wikid" className='rt-reset'>
<Link prefetch='intent' to='/signup' aria-label="Signup to Wikid" className='rt-reset'>
<ContextMenu.Item>Signup to Wikid</ContextMenu.Item>
</Link>
<Link to='/login' aria-label="Login to Wikid" className='rt-reset'>
<Link prefetch='intent' to='/login' aria-label="Login to Wikid" className='rt-reset'>
<ContextMenu.Item>Login</ContextMenu.Item>
</Link>
</>}
Expand All @@ -522,10 +522,10 @@ function ChannelsList(props) {
<div className='wk-user-connection'>
{!me ?
<Flex direction="column" p="3" m="0" gap="2">
<Link to='/signup' aria-label="Signup to Wikid" className='rt-reset rt-BaseButton rt-Button rt-variant-ghost rt-r-size-2'>
<Link prefetch='intent' to='/signup' aria-label="Signup to Wikid" className='rt-reset rt-BaseButton rt-Button rt-variant-ghost rt-r-size-2'>
<Text size="2">Signup to Wikid</Text>
</Link>
<Link to='/login' aria-label="Login" className='rt-reset rt-BaseButton rt-Button rt-variant-ghost rt-r-size-2'>
<Link prefetch='intent' to='/login' aria-label="Login" className='rt-reset rt-BaseButton rt-Button rt-variant-ghost rt-r-size-2'>
<Text size="2">Login</Text>
</Link>
</Flex> :
Expand Down Expand Up @@ -564,8 +564,8 @@ function ChannelsList(props) {
</TextField.Root>
<Box grow="1">
<Flex gap="3" mt="3" justify="between">
<Link aria-label="User preferences" to="/u/settings" className='rt-reset rt-BaseButton rt-Button rt-r-size-1 rt-variant-solid'>User preferences</Link>
<Link aria-label="Logout" to="/logout" className='rt-reset rt-BaseButton rt-Button rt-r-size-1 rt-variant-soft' data-accent-color="red">Logout</Link>
<Link prefetch='intent' aria-label="User preferences" to="/u/settings" className='rt-reset rt-BaseButton rt-Button rt-r-size-1 rt-variant-solid'>User preferences</Link>
<Link prefetch='intent' aria-label="Logout" to="/logout" className='rt-reset rt-BaseButton rt-Button rt-r-size-1 rt-variant-soft' data-accent-color="red">Logout</Link>
</Flex>
</Box>
</Flex>
Expand Down

0 comments on commit 2e85fc2

Please sign in to comment.