Skip to content

Commit

Permalink
revert font change, work on inbox page, bug fixes, v0.0.60
Browse files Browse the repository at this point in the history
  • Loading branch information
yayvery committed May 12, 2021
1 parent 37e6dc8 commit 861a617
Show file tree
Hide file tree
Showing 88 changed files with 586 additions and 291 deletions.
2 changes: 1 addition & 1 deletion electron/electron/loading/loading.html
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
align-items: center;
justify-items: center;
box-sizing: border-box;
background-color: #333338;
background-color: #31343C;
border-radius: 1rem;
box-shadow: rgba(0, 0, 0, 0) 0px 0px 0px 0px, rgba(0, 0, 0, 0) 0px 0px 0px 0px, rgba(0, 0, 0, 0.1) 0px 10px 15px -3px, rgba(0, 0, 0, 0.05) 0px 4px 6px -2px;
}
Expand Down
6 changes: 3 additions & 3 deletions electron/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "electron",
"description": "All-in-one chat and forums for communities.",
"version": "0.0.59",
"version": "0.0.60",
"private": true,
"repository": "github:joincomet/comet",
"homepage": "https://joincomet.app",
Expand All @@ -27,12 +27,12 @@
"electron-is-dev": "^2.0.0",
"electron-log": "^4.3.5",
"electron-store": "^8.0.0",
"electron-updater": "^4.3.8",
"electron-updater": "^4.3.9",
"typescript": "^4.2.4"
},
"devDependencies": {
"electron": "12.0.7",
"electron-builder": "^22.11.2"
"electron-builder": "^22.11.3"
},
"build": {
"productName": "Comet",
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "comet",
"version": "0.0.59",
"version": "0.0.60",
"private": true,
"license": "MPL-2.0",
"author": {
Expand Down
6 changes: 3 additions & 3 deletions server/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "server",
"version": "0.0.59",
"version": "0.0.60",
"private": true,
"engines": {
"node": "15.x.x"
Expand All @@ -20,7 +20,7 @@
"@n1ru4l/in-memory-live-query-store": "^0.6.4",
"apollo-server-express": "^2.24.0",
"argon2": "^0.27.2",
"aws-sdk": "^2.904.0",
"aws-sdk": "^2.905.0",
"class-validator": "^0.13.1",
"cors": "^2.8.5",
"cross-env": "^7.0.3",
Expand Down Expand Up @@ -59,7 +59,7 @@
"sharp": "^0.28.2",
"type-graphql": "^1.1.1",
"typescript": "^4.2.4",
"user-agents": "^1.0.648",
"user-agents": "^1.0.649",
"validator": "^13.6.0",
"ws": "^7.4.5",
"xss": "^1.0.9"
Expand Down
2 changes: 1 addition & 1 deletion server/src/resolver/reply/queries/replies.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export async function replies({ em, userId }: Context): Promise<Reply[]> {
'user',
'comment.author.user',
'comment.author.roles',
'comment.post',
'comment.post.server',
'comment.parentComment.author.user',
'comment.parentComment.author.roles'
],
Expand Down
2 changes: 1 addition & 1 deletion web/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<link rel="icon" type="image/svg+xml" href="/logos/logo_icon.svg"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<title>Comet – All-in-one chat and forums for communities.</title>

<link rel="stylesheet" href="https://rsms.me/inter/inter.css">
<!-- Start Single Page Apps for GitHub Pages -->
<script type="text/javascript">
// Single Page Apps for GitHub Pages
Expand Down
10 changes: 5 additions & 5 deletions web/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "web",
"description": "All-in-one chat and forums for communities.",
"version": "0.0.59",
"version": "0.0.60",
"private": true,
"repository": "github:joincomet/comet",
"homepage": "https://joincomet.app",
Expand All @@ -19,7 +19,7 @@
"preview": "vite preview --port 3000"
},
"dependencies": {
"@apollo/client": "^3.3.16",
"@apollo/client": "^3.3.17",
"@electron/remote": "^1.1.0",
"@headlessui/react": "^1.2.0",
"@n1ru4l/graphql-live-query": "^0.7.1",
Expand All @@ -34,13 +34,13 @@
"@tiptap/extension-placeholder": "^2.0.0-beta.15",
"@tiptap/extension-underline": "^2.0.0-beta.12",
"@tiptap/react": "^2.0.0-beta.33",
"@tiptap/starter-kit": "^2.0.0-beta.51",
"@tiptap/starter-kit": "^2.0.0-beta.52",
"cross-env": "^7.0.3",
"date-fns": "^2.21.3",
"dayjs": "^1.10.4",
"dayjs-twitter": "^0.4.0",
"extract-files": "^10.0.0",
"framer-motion": "^4.1.13",
"framer-motion": "^4.1.15",
"fuse.js": "^6.4.6",
"graphql": "^15.4.0-experimental-stream-defer.1",
"graphql-ws": "^4.5.0",
Expand Down Expand Up @@ -96,7 +96,7 @@
"string-hash": "^1.1.3",
"tailwind-scrollbar": "^1.3.0",
"tailwindcss": "^2.1.2",
"vite": "^2.2.4"
"vite": "^2.3.0"
},
"resolutions": {
"prosemirror-model": "1.14.1"
Expand Down
19 changes: 16 additions & 3 deletions web/src/components/BottomBar.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ import { version } from '../../package.json'
import { useStore } from '@/hooks/useStore'
import { useChangeOnlineStatusMutation } from '@/graphql/hooks'
import { Link } from 'react-router-dom'
import { useCopyToClipboard } from 'react-use'
import toast from 'react-hot-toast'

export default function BottomBar() {
const [currentUser] = useCurrentUser()
Expand Down Expand Up @@ -42,14 +44,25 @@ export default function BottomBar() {
}, 15000)
return () => clearInterval(id)
})
const copyToClipboard = useCopyToClipboard()[1]

return (
<>
<UserSettingsDialog open={open} setOpen={setOpen} />

<div className="flex items-center shadow-md px-5 bottom-0 h-5.5 bg-gray-700 z-50">
<UserAvatar size={4.5} className="mr-2" user={currentUser} />
<div className="dark:text-white text-sm">{currentUser.name}</div>
<Tippy content={currentUser.username}>
<div
className="dark:text-white text-sm cursor-pointer"
onClick={() => {
copyToClipboard(currentUser.username)
toast.success('Copied username!')
}}
>
{currentUser.name}
</div>
</Tippy>
<div className="w-2 h-2 rounded-full bg-green-500 ml-2" />
<div className="ml-auto flex items-center space-x-4 text-primary">
<Tippy
Expand Down Expand Up @@ -83,7 +96,7 @@ export default function BottomBar() {
</div>
</Tippy>

<Tippy content="Search" offset={offset}>
{/*<Tippy content="Search" offset={offset}>
<div>
<IconSearch className="w-4.5 h-4.5 cursor-pointer" />
</div>
Expand All @@ -93,7 +106,7 @@ export default function BottomBar() {
<div>
<IconFolder className="w-4.5 h-4.5 cursor-pointer" />
</div>
</Tippy>
</Tippy>*/}

<Tippy content="Notifications" offset={offset}>
<Link to="/me/inbox">
Expand Down
2 changes: 1 addition & 1 deletion web/src/components/channel/ChannelContextMenu.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export default function ChannelContextMenu({ channel, ContextMenuItem }) {
<>
<ContextMenuSection>
<ContextMenuItem label={t('channel.context.markRead')} />
<ContextMenuItem label={t('channel.context.mute')} />
{/*<ContextMenuItem label={t('channel.context.mute')} />*/}
<ContextMenuItem label={t('channel.context.edit')} />
{canManageChannels && (
<ContextMenuItem
Expand Down
6 changes: 2 additions & 4 deletions web/src/components/folder/FolderContextMenu.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { useTranslation } from 'react-i18next'
import ContextMenuSection from '@/components/ui/context/ContextMenuSection'
import { useState } from 'react'
import { matchPath, useHistory, useLocation } from 'react-router-dom'
import { useCurrentUser } from '@/hooks/graphql/useCurrentUser'
import {
Expand All @@ -17,11 +16,10 @@ export default function FolderContextMenu({ folder, ContextMenuItem }) {
const [currentUser] = useCurrentUser()
const userFolders = useUserFolders()
const isFollowing = userFolders
.filter(f => f.owner.id !== currentUser.id)
.filter(f => f.owner?.id !== currentUser.id)
.map(f => f.id)
.includes(folder.id)
const editable = folder.name !== 'Read Later' && folder.name !== 'Favorites'
const [c, setC] = useState(false)
const [updateFolder] = useUpdateFolderMutation()
const [followFolder] = useFollowFolderMutation()
const [unfollowFolder] = useUnfollowFolderMutation()
Expand All @@ -36,7 +34,7 @@ export default function FolderContextMenu({ folder, ContextMenuItem }) {
<ContextMenuSection>
<ContextMenuItem label={t('folder.context.copyLink')} />

{folder.owner.id !== currentUser.id && (
{folder.owner?.id !== currentUser.id && (
<>
{isFollowing ? (
<ContextMenuItem
Expand Down
6 changes: 5 additions & 1 deletion web/src/components/folder/FolderInfoCard.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,11 @@ export default function FolderInfoCard({ folder }) {
) : (
<div className="flex items-center">
<ServerPopup server={folder.server}>
<ServerAvatar size={5} server={folder.server} />
<ServerAvatar
className="rounded-full"
size={5}
server={folder.server}
/>
</ServerPopup>
<ServerPopup server={folder.server}>
<span className="ml-1.5 text-primary cursor-pointer hover:underline font-medium">
Expand Down
8 changes: 4 additions & 4 deletions web/src/components/message/MessageContextMenu.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ export default function MessageContextMenu({ message, ContextMenuItem }) {
<>
<ContextMenuSection>
{isAuthor && <ContextMenuItem label={t('message.context.edit')} />}
{canPin && (
{/*{canPin && (
<ContextMenuItem
label={
message.isPinned
Expand All @@ -57,13 +57,13 @@ export default function MessageContextMenu({ message, ContextMenuItem }) {
}
onClick={() => togglePin()}
/>
)}
<ContextMenuItem
)}*/}
{/*<ContextMenuItem
onClick={() => {
copyToClipboard(`${message.relativeUrl}`)
}}
label={t('message.context.copyLink')}
/>
/>*/}
{canDelete && (
<ContextMenuItem
label={t('message.context.delete')}
Expand Down
24 changes: 16 additions & 8 deletions web/src/components/post/Post.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { DragItemTypes } from '@/types/DragItemTypes'
import UserAvatar from '@/components/user/UserAvatar'
import ServerAvatar from '@/components/server/ServerAvatar'
import UserPopup from '@/components/user/UserPopup'
import { shortDate } from '@/utils/timeUtils'
import { calendarDate, shortDate } from '@/utils/timeUtils'
import {
IconChat,
IconChevrownLeft,
Expand All @@ -20,6 +20,7 @@ import { useTogglePostVote } from '@/components/post/useTogglePostVote'
import ContextMenuTrigger from '@/components/ui/context/ContextMenuTrigger'
import { ContextMenuType } from '@/types/ContextMenuType'
import PostEmbed from '@/components/post/PostEmbed'
import Tippy from '@tippyjs/react'

export default memo(function Post({
post,
Expand All @@ -44,7 +45,6 @@ export default memo(function Post({
const dragging = dragDropManager.getMonitor().isDragging()
const [isDragging, setIsDragging] = useState(false)
useEffect(() => {
console.log({ dragging, isDragging })
if (dragging) {
setIsDragging(true)
} else {
Expand Down Expand Up @@ -113,9 +113,14 @@ export default memo(function Post({
: {}
}
>
{!!post.text && <IconText className="w-8 h-8 text-tertiary" />}
{!post.thumbnailUrl && !post.text && (
<IconLinkWeb className="w-8 h-8 text-tertiary" />
{!post.thumbnailUrl && (
<>
{post.linkUrl ? (
<IconLinkWeb className="w-8 h-8 text-tertiary" />
) : (
<IconText className="w-8 h-8 text-tertiary" />
)}
</>
)}
</div>
)}
Expand Down Expand Up @@ -267,11 +272,14 @@ export default memo(function Post({
{post.server.name}
</span>
</Link>
<div className="text-xs text-mid font-medium">
&nbsp;&nbsp;&middot;&nbsp;&nbsp;{shortDate(post.createdAt)}
</div>
</div>
)}
<div className="text-xs text-mid font-medium">
&nbsp;&nbsp;&middot;&nbsp;&nbsp;
<Tippy content={calendarDate(post.createdAt)}>
<span>{shortDate(post.createdAt)}</span>
</Tippy>
</div>
</div>

<div className="flex items-center ml-auto" onClick={onClick}>
Expand Down
Loading

0 comments on commit 861a617

Please sign in to comment.