diff --git a/src/components/AccountNotifications.tsx b/src/components/AccountNotifications.tsx index 348ad95c7..9febd6c6f 100644 --- a/src/components/AccountNotifications.tsx +++ b/src/components/AccountNotifications.tsx @@ -5,8 +5,9 @@ import { } from '@primer/octicons-react'; import { type FC, type MouseEvent, useContext, useState } from 'react'; import { AppContext } from '../context/App'; -import { type Account, Size } from '../types'; +import { type Account, Opacity, Size } from '../types'; import type { Notification } from '../typesGitHub'; +import { cn } from '../utils/cn'; import { openAccountProfile } from '../utils/links'; import { HoverGroup } from './HoverGroup'; import { NotificationRow } from './NotificationRow'; @@ -66,7 +67,11 @@ export const AccountNotifications: FC = ( <> {showAccountHostname && (
diff --git a/src/components/NotificationRow.tsx b/src/components/NotificationRow.tsx index 964adf2dd..4fe7e897b 100644 --- a/src/components/NotificationRow.tsx +++ b/src/components/NotificationRow.tsx @@ -17,7 +17,7 @@ import { useState, } from 'react'; import { AppContext } from '../context/App'; -import { IconColor, Size } from '../types'; +import { IconColor, Opacity, Size } from '../types'; import type { Notification } from '../typesGitHub'; import { cn } from '../utils/cn'; import { @@ -120,7 +120,7 @@ export const NotificationRow: FC = ({ 'group flex border-b border-gray-100 bg-white px-3 py-2 hover:bg-gray-100 dark:border-gray-darker dark:bg-gray-dark dark:text-white dark:hover:bg-gray-darker', animateExit && 'translate-x-full opacity-0 transition duration-[350ms] ease-in-out', - showAsRead && 'opacity-50 dark:opacity-50', + showAsRead && Opacity.READ, )} >
= ({
handleNotification()} > {groupByDate && (
@@ -165,14 +168,19 @@ export const NotificationRow: FC = ({ )}
{notification.subject.title}
-
+
{notification.subject.user ? (
@@ -311,14 +311,14 @@ exports[`components/AccountNotifications.tsx should render itself (github.com wi
Improve the UI
, "container":
@@ -531,14 +531,14 @@ exports[`components/AccountNotifications.tsx should render itself (github.com wi
I am a robot and this is a test!
@@ -728,14 +728,14 @@ exports[`components/AccountNotifications.tsx should render itself (github.com wi
Improve the UI
, "container":
, "container":
, "container":
I am a robot and this is a test!
I am a robot and this is a test!
I am a robot and this is a test!
I am a robot and this is a test!
I am a robot and this is a test!
I am a robot and this is a test!
I am a robot and this is a test!
I am a robot and this is a test!
I am a robot and this is a test!
I am a robot and this is a test!
I am a robot and this is a test!
I am a robot and this is a test!
I am a robot and this is a test!
I am a robot and this is a test!
I am a robot and this is a test!
I am a robot and this is a test!
I am a robot and this is a test!
I am a robot and this is a test!
@@ -4685,14 +4685,14 @@ exports[`components/NotificationRow.tsx should render itself & its children - gr
I am a robot and this is a test!
@@ -4885,14 +4885,14 @@ exports[`components/NotificationRow.tsx should render itself & its children - gr
I am a robot and this is a test!
I am a robot and this is a test!
I am a robot and this is a test!
I am a robot and this is a test!
I am a robot and this is a test!
I am a robot and this is a test!
I am a robot and this is a test!
gitify-app/notifications-test's avatar gitify-app/notifications-test @@ -103,7 +103,7 @@ exports[`components/Repository.tsx should render itself & its children 1`] = ` class="group flex items-center justify-between bg-gray-100 px-3 py-2 dark:bg-gray-darker dark:text-white" >
gitify-app/notifications-test's avatar gitify-app/notifications-test @@ -254,7 +254,7 @@ exports[`components/Repository.tsx should toggle account notifications visibilit class="group flex items-center justify-between bg-gray-100 px-3 py-2 dark:bg-gray-darker dark:text-white" >
gitify-app/notifications-test @@ -350,7 +350,7 @@ exports[`components/Repository.tsx should toggle account notifications visibilit class="group flex items-center justify-between bg-gray-100 px-3 py-2 dark:bg-gray-darker dark:text-white" >
gitify-app/notifications-test @@ -453,7 +453,7 @@ exports[`components/Repository.tsx should toggle account notifications visibilit class="group flex items-center justify-between bg-gray-100 px-3 py-2 dark:bg-gray-darker dark:text-white" >
gitify-app/notifications-test @@ -613,7 +613,7 @@ exports[`components/Repository.tsx should use default repository icon when avata class="group flex items-center justify-between bg-gray-100 px-3 py-2 dark:bg-gray-darker dark:text-white" >
gitify-app/notifications-test @@ -716,7 +716,7 @@ exports[`components/Repository.tsx should use default repository icon when avata class="group flex items-center justify-between bg-gray-100 px-3 py-2 dark:bg-gray-darker dark:text-white" >
gitify-app/notifications-test diff --git a/src/types.ts b/src/types.ts index 1dacf4fee..94aa95b8c 100644 --- a/src/types.ts +++ b/src/types.ts @@ -137,6 +137,13 @@ export enum IconColor { WHITE = 'text-white', } +export enum Opacity { + READ = 'opacity-50', + LOW = 'opacity-70', + MEDIUM = 'opacity-80', + HIGH = 'opacity-90', +} + export type PullRequestApprovalIcon = { type: FC; color: IconColor;