Skip to content

Commit

Permalink
Early Augst Update (#1060)
Browse files Browse the repository at this point in the history
* chore(deps): bump @babel/traverse from 7.22.15 to 7.23.2 (#912)

Bumps [@babel/traverse](https://github.com/babel/babel/tree/HEAD/packages/babel-traverse) from 7.22.15 to 7.23.2.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.23.2/packages/babel-traverse)

---
updated-dependencies:
- dependency-name: "@babel/traverse"
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore: cleanup calendar pup-up (#913)

* chore: cleanup calendar pup-up

* chore: update conditions

* fix: formatting

* chore: added emoji ➡️

* chore: remove emoji 😥

* chore: fix pre-commit file permissions

* chore(deps-dev): bump postcss from 8.4.29 to 8.4.31 (#904)

Bumps [postcss](https://github.com/postcss/postcss) from 8.4.29 to 8.4.31.
- [Release notes](https://github.com/postcss/postcss/releases)
- [Changelog](https://github.com/postcss/postcss/blob/main/CHANGELOG.md)
- [Commits](postcss/postcss@8.4.29...8.4.31)

---
updated-dependencies:
- dependency-name: postcss
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Feat(event)/waitlist (#911)

* Feat/event add users maunually (#917)

* Added api endpoints locally and hooks

* Added component and ui part

* Small fix, only allow one person to be added

* Updated Changelog

* Update CHANGELOG.md

* Trigger build

* made page for creating and deleting QR codes (#907)

* made page for creating and deleting QR codes

* added error for invalid url, and download option

* commit

* fixed the error with deleting qr code

* Update CHANGELOG.md

* added error for invalid url

* changed to qr generations at frontend

* format

* refactored to use QR code generator at frontend, and styled the component

* fixes

* format

* Activity (#922)

* first version

* changed layout for activities on landing page

* changed limit for activities on landing page

* Update CHANGELOG.md

* vite 5.0.0 update (#928)

chore: vite 5.0.0 update

* added buttuns for filtering (#924)

* added buttuns for filtering

* added filter for expired events

* fix

* fixed filtering of events and activities (#939)

* Reaksjoner (#900)

* moved share button below news post instead of above

* moved share button below news post instead of above

* startet adding checkbox for emojis

* started adding emojis

* fixed bug with newseditor

* saving progress

* added test mui components for displaying emojis

* Your commit message

* fikset logikken for emojies

* added emoji picker for react

* added emoji picker for react

* started adding mutation

* fixed fetching and started on designing

* redesigned

* started om emojis for event

* added emojies for events

* fixed design for mobile

* redesigned to displaying users

* format

* removed yarn file

* added ContentType type

---------

Co-authored-by: 1Cezzo <emiljohnzen@gmail.com>
Co-authored-by: Jonatan <jonatanv@stud.ntnu.no>
Co-authored-by: Jarand Romestrand <jarandjr@stud.ntnu.no>

* moved checkbox for emojies outside paid event collapse

* added id for each user in copy of participants of an event (#940)

* disabled switch to change from free to paid event if an event has reg… (#910)

* disabled switch to change from free to paid event if an event has registrations

* first version finished

* Update CHANGELOG.md

* format

* fixed wrong disable logic for switching off paid event

* Update CHANGELOG.md

* fixed countdowntimer bug, so if the time is out and there is an error in the backend, the timer will disapear

* fixed countdowntimer bug

* added message for when time is out, explaining why the user is not kicked out before extra payment time is out

* changed message for signing off event

* format

* changed text (#944)

* changed email for strike message (#945)

* added package for allowing iframe (#949)

* reduced number of showcase to two for mobile fit (#950)

* Update CHANGELOG.md (#951)

* added helpertext (#957)

* removed timepicker. Paytime is set to constant 2 hours (#958)

* Update CHANGELOG.md (#959)

* Clickable user component in reactions list (#961)

* changed cheatsheet button (#962)

* Feat/paragraph description (#963)

* Added description to fine

* Updated changelog

* Fixed rendering error when no laws

* Fix(waiting list)/fix waiting list order (#965)

* will now sort and render the waiting list participants according to their respective waiting list number

* added waiting list number field to participant info

* added tailwindcss and shadcn (#964)

* added tailwindcss and shadcn

* added clsx package for utils.ts

* changed to outlined on contained buttons to fix css bug

* added old bg colors to tailwindcss config

* redesigned reaction handler

* removed full import from React in button.tsx

* removed full import from react in card.tsx

* added old primary colors to index.css

* changed icon for showing all reacitons

* Update CHANGELOG.md (#966)

* waiting-list will now only be sorted if there is a priority pool (#968)

* waiting list info will now only be rendered if not null (#969)

* Shadcn button refdesign (#970)

* changed button for add fine

* changed button for adding prioritygroups

* changed button for image upload

* Shadcn redesign footer (#971)

* fixed long text on image upload and removed hover on small devices

* refactord footer to shadcn

* fixed pnpm-lock

* Refactor(shadcn)/markdown (#974)

* fixed markdown bugs

* format

* fixed link for event calender (#976)

* redesigned to shadcn avatars (#977)

* changed themesettings component to shadcn (#978)

* fixed seperator for markdown (#981)

* fixed seperator for markdown (#982)

* Refactor event renderer (#983)

* init

* refactored event renderer

* added change to changelog

* started on redesign of profile page (#980)

* started on redesign of profile page

* redesinged event subscription collapse

* redesigned admin cards

* refactored badge listing

* refactored membershippage

* started on strike listing

* refactored strike listing

* finished

* added change to changelog

* chore(deps): bump eslint from 8.48.0 to 8.56.0 (#941)

Bumps [eslint](https://github.com/eslint/eslint) from 8.48.0 to 8.56.0.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
- [Commits](eslint/eslint@v8.48.0...v8.56.0)

---
updated-dependencies:
- dependency-name: eslint
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Mads Nylund <73914541+MadsNyl@users.noreply.github.com>

* docs(changelog): iterate changelog version (#919)

Co-authored-by: MadsNyl <MadsNyl@users.noreply.github.com>
Co-authored-by: Mads Nylund <73914541+MadsNyl@users.noreply.github.com>

* refactored news renderer (#989)

* chore(deps): bump @emotion/react from 11.9.0 to 11.11.4 (#988)

Bumps [@emotion/react](https://github.com/emotion-js/emotion) from 11.9.0 to 11.11.4.
- [Release notes](https://github.com/emotion-js/emotion/releases)
- [Changelog](https://github.com/emotion-js/emotion/blob/main/CHANGELOG.md)
- [Commits](https://github.com/emotion-js/emotion/compare/@emotion/react@11.9.0...@emotion/react@11.11.4)

---
updated-dependencies:
- dependency-name: "@emotion/react"
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps): bump @vercel/analytics from 1.0.2 to 1.1.4 (#984)

Bumps [@vercel/analytics](https://github.com/vercel/analytics/tree/HEAD/packages/web) from 1.0.2 to 1.1.4.
- [Release notes](https://github.com/vercel/analytics/releases)
- [Commits](https://github.com/vercel/analytics/commits/1.1.4/packages/web)

---
updated-dependencies:
- dependency-name: "@vercel/analytics"
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps): bump react-router-dom from 6.15.0 to 6.22.3 (#985)

* chore(deps): bump react-router-dom from 6.15.0 to 6.22.3

Bumps [react-router-dom](https://github.com/remix-run/react-router/tree/HEAD/packages/react-router-dom) from 6.15.0 to 6.22.3.
- [Release notes](https://github.com/remix-run/react-router/releases)
- [Changelog](https://github.com/remix-run/react-router/blob/main/packages/react-router-dom/CHANGELOG.md)
- [Commits](https://github.com/remix-run/react-router/commits/react-router-dom@6.22.3/packages/react-router-dom)

---
updated-dependencies:
- dependency-name: react-router-dom
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* fixed pnpm-lock

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Mads Nylund <73914541+MadsNyl@users.noreply.github.com>
Co-authored-by: Mads Nylund <madsnyl@gmail.com>

* chore(deps-dev): bump vite from 5.0.0 to 5.0.12 (#956)

* chore(deps-dev): bump vite from 5.0.0 to 5.0.12

Bumps [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) from 5.0.0 to 5.0.12.
- [Release notes](https://github.com/vitejs/vite/releases)
- [Changelog](https://github.com/vitejs/vite/blob/v5.0.12/packages/vite/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite/commits/v5.0.12/packages/vite)

---
updated-dependencies:
- dependency-name: vite
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>

* fixed pnpm-lock

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Mads Nylund <73914541+MadsNyl@users.noreply.github.com>
Co-authored-by: Mads Nylund <madsnyl@gmail.com>

* Update CHANGELOG.md (#990)

* fixed ts error

* added description of how to use spaces (#992)

* changed position of share and edit button for event (#993)

changed position of share and edit button

* diasbled theme selector (#998)

* NITO logo footer (#1002)

added nito logo and made news title bigger on mobile

* added version name to changelog

* trigger build

* Menu for shortcuts (#1006)

* init

* added shortcut navigations for external sites

* Changed icon and added logout button

* changed info for contact for strikes (#1007)

changed info for contact

* changed changelog

* User bio (#1010)

* Created initial profileBio

* Started on bio editor

* made the frame for bio editor

* Create user_bio type and add api calls for user bio

* Create user_bio type and added it to user type. Added api calls for user bio. Created hooks.

* Refactor: Changed the gui in edit bio

* Refactor: Fixed User bio editor

* format

* Enable partial updates

* format

* finished

---------

Co-authored-by: Ester2109 <126612066+Ester2109@users.noreply.github.com>
Co-authored-by: Harry Linrui XU <xulr0820@hotmail.com>

* Update CHANGELOG.md

* PNG image bg fix (#1013)

removed white bg

* removed unregister button if registration is paid (#1015)

* removed unregister button if registration is paid

* update changelog

* sort after category (#1018)

* sort after category

* fixed event cateogry type

* fixed eventlist type

* made sepearte eventlist type

* fixed type error

* fixed category for event view (#1020)

* Remove MUI from Navigation (#1028)

* converted navigation to not use mui, and went away from navigation hook

* removed unused props from TihldeLogo component

* Remove MUI from signin pages (#1030)

removed mui from signin, signup and forgot password

* Remove Page component (#1031)

removed Page component

* Replace MUI with ShadCN (#1038)

* upgraded to react 18 types

* removed mui from most of the pages

* refactored gallery page

* refactored index changelog page

* wikitree update

* wikietree update

* done with wiki

* removed unused files

* finished with pages

* removed all mui imports

* removed mui and other unsued dependencies

* changelog

* fixed small design bugs  and added scrollToTop component (#1040)

* fixed small design bugs  and added scrollToTop component

* trigger build

* removed scrolltotop

* changed scrolltotop component

* changed version of pnpm/action-setup to fix known bug

* feat(changelog)/changelog site for logged in users (#1045)

* Added navbar destination for changelog

* Export changelog URLs to use in changelog page

* Add classname prop to used components

Makes it easier to customize styling via tailwind

* Created page and added routing destination

* Updated CHANGELOG.md

* Fix navbar columns for md and lg breakpoints

* Undid changelog formatting

* Fix bugs (#1044)

Co-authored-by: Anton Tveito <anton_tveito@Antons-MacBook-Air.local>

* Fix accordion stutter (#1043)

Pass p-4 to children in Expandable to fix opening/closing stutter

* updated changelog.md

* Redesing of Ny student page (#1050)

* added 'pnpm dev'

* finished first draft of the new new student page

* added light mode

* added mobile layout

---------

Co-authored-by: Embret Olav Rasmussen Roås <embret.roas@outlook.com>

* added new button for wiki page redirect

* fixed small writing error

* created option for registration with FEIDE

* changelog update

* added paginate button for event participants

* changed main sponsor logo (#1055)

* Update CHANGELOG.md

* Added info box about how to create a feide user (#1057)

added info box about how to create a feide user

* Redesign of notifications (#1059)

redesigned notifications bar

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Martin Clementz <martcl@stud.ntnu.no>
Co-authored-by: martcl <martincclementz@gmail.com>
Co-authored-by: Anders <69890033+lille-morille@users.noreply.github.com>
Co-authored-by: Ester2109 <126612066+Ester2109@users.noreply.github.com>
Co-authored-by: 1Cezzo <emiljohnzen@gmail.com>
Co-authored-by: Jonatan <jonatanv@stud.ntnu.no>
Co-authored-by: Jarand Romestrand <jarandjr@stud.ntnu.no>
Co-authored-by: Emil Johnsen <111747340+1Cezzo@users.noreply.github.com>
Co-authored-by: Frikk Balder <33499052+MindChirp@users.noreply.github.com>
Co-authored-by: Erik Skjellevik <98759397+eriskjel@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: MadsNyl <MadsNyl@users.noreply.github.com>
Co-authored-by: LeMiTam <145369879+LeMiTam@users.noreply.github.com>
Co-authored-by: Harry Linrui XU <xulr0820@hotmail.com>
Co-authored-by: antontveito <64641278+antontveito@users.noreply.github.com>
Co-authored-by: Anton Tveito <anton_tveito@Antons-MacBook-Air.local>
Co-authored-by: Markus <113692526+MarkussMadsbakken@users.noreply.github.com>
Co-authored-by: Embret Olav Rasmussen Roås <embret.roas@outlook.com>
  • Loading branch information
20 people committed Aug 8, 2024
1 parent b2f97fc commit 8a55cbd
Show file tree
Hide file tree
Showing 3 changed files with 56 additions and 44 deletions.
6 changes: 2 additions & 4 deletions src/components/miscellaneous/ThemeSettings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,14 @@ const ThemeSettings = () => {

return (
<Button
className='dark:text-white'
className='text-black dark:text-white w-auto h-auto p-0 bg-inherit hover:bg-inherit'
onClick={() => {
if (theme === 'dark') {
setTheme('light');
} else {
setTheme('dark');
}
}}
size='icon'
variant='ghost'>
}}>
<Sun className='h-[1.2rem] w-[1.2rem] rotate-0 scale-100 transition-all dark:-rotate-90 dark:scale-0' />
<Moon className='absolute h-[1.2rem] w-[1.2rem] rotate-90 scale-0 transition-all dark:rotate-0 dark:scale-100' />
<span className='sr-only'>Toggle theme</span>
Expand Down
2 changes: 1 addition & 1 deletion src/components/navigation/ProfileTopbarButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const ProfileTopbarButton = () => {
const analytics = (page: string) => event(`go-to-${page}`, 'topbar-profile-button', `Go to ${page}`);

return (
<div className='flex items-center space-x-1'>
<div className='flex items-center space-x-4'>
{Boolean(user) && <TopbarNotifications />}
<ThemeSettings />
{user ? (
Expand Down
92 changes: 53 additions & 39 deletions src/components/navigation/TopbarNotifications.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import parseISO from 'date-fns/parseISO';
import { Bell, BellRing, ChevronDown, ChevronUp, SquareArrowOutUpRight, X } from 'lucide-react';
import { Bell, BellRing, SquareArrowOutUpRight, X } from 'lucide-react';
import { useMemo, useState } from 'react';
import { Link } from 'react-router-dom';
import { getTimeSince } from 'utils';
Expand All @@ -12,10 +12,10 @@ import { useUser } from 'hooks/User';

import NotFoundIndicator from 'components/miscellaneous/NotFoundIndicator';
import { Button, PaginateButton } from 'components/ui/button';
import { Collapsible, CollapsibleContent, CollapsibleTrigger } from 'components/ui/collapsible';
import { Drawer, DrawerContent, DrawerTrigger } from 'components/ui/drawer';
import { Popover, PopoverContent, PopoverTrigger } from 'components/ui/popover';
import { ScrollArea } from 'components/ui/scroll-area';
import { Separator } from 'components/ui/separator';
import { Skeleton } from 'components/ui/skeleton';

type NotificationItemProps = {
Expand All @@ -30,39 +30,43 @@ export type NotificationsTopbarProps = {
const NotificationItem = ({ notification, setShowNotifications }: NotificationItemProps) => {
const [showDescription, setShowDescription] = useState(false);

const Icon = notification.read ? Bell : BellRing;
const ExpandIcon = showDescription ? ChevronUp : ChevronDown;

const linkOnClick = () => {
setShowNotifications(false);
};

return (
<Collapsible className='rounded-md border bg-inherit' onOpenChange={setShowDescription} open={showDescription}>
<div className='w-full'>
<CollapsibleTrigger className='flex items-center justify-between w-full hover:bg-border py-2 px-4 rounded-tl-sm cursor-pointer'>
<div className='flex items-center space-x-6'>
<Icon className='h-[1.2rem] w-[1.2rem] stroke-[1.5px]' />
<div className='text-start'>
<h1 className='text-sm'>{notification.title}</h1>
<p className='text-xs text-muted-foreground'>{getTimeSince(parseISO(notification.created_at))}</p>
</div>
<div className='w-full flex justify-between px-4 py-4 border-b'>
<div className='w-5/6 space-y-2'>
<div>
<h1 className='text-sm truncate'>{notification.title}</h1>
<p className='text-xs text-muted-foreground'>{getTimeSince(parseISO(notification.created_at))}</p>
</div>
<div>
<div className='text-sm text-muted-foreground'>
{notification.description.length < 100 ? (
notification.description
) : (
<p>
{showDescription ? notification.description : `${notification.description.slice(0, 100)}...`}
<span className='text-primary hover:underline cursor-pointer ml-1 text-xs' onClick={() => setShowDescription((prev) => !prev)}>
{showDescription ? 'Skjul' : 'Vis mer'}
</span>
</p>
)}
</div>
<ExpandIcon className='w-5 h-5 stroke-[1.5px]' />
</CollapsibleTrigger>
</div>
<CollapsibleContent>
<p className='text-sm border-t p-2'>{notification.description}</p>
</div>
{notification.link && (
<Button asChild className='w-full rounded-t-none' variant='secondary'>
<Link onClick={linkOnClick} to={notification.link}>
<SquareArrowOutUpRight className='h-[1.2rem] w-[1.2rem] stroke-[1.5px] mr-2' />
<Button asChild className='w-auto h-auto px-4 py-2' variant='secondary'>
<Link className='text-xs' onClick={linkOnClick} to={notification.link}>
<SquareArrowOutUpRight className='h-[1rem] w-[1rem] stroke-[1.5px] mr-2' />
Les mer
</Link>
</Button>
)}
</CollapsibleContent>
</Collapsible>
</div>

{!notification.read && <div className='rounded-full w-2 h-2 bg-sky-300 animate-pulse' />}
</div>
);
};

Expand All @@ -86,28 +90,31 @@ const NotificationsTopbar = () => {
return (
<Drawer onOpenChange={setShowNotifications} open={showNotifications}>
<DrawerTrigger asChild>
<Button className='dark:text-white' size='icon' variant='ghost'>
<button className='dark:text-white'>
{!showNotifications ? (
user && user.unread_notifications > 0 ? (
<BellRing className='animate-pulse w-[1.2rem] h-[1.2rem] stroke-[1.5px]' />
<div className='relative'>
<BellRing className='h-[1.2rem] w-[1.2rem]' />
<div className='absolute bottom-0 -right-0.5 bg-red-400 rounded-full h-2 w-2 animate-pulse' />
</div>
) : (
<Bell className='w-[1.2rem] h-[1.2rem] stroke-[1.5px]' />
<Bell className='h-[1.2rem] w-[1.2rem]' />
)
) : (
<X />
<X className='h-[1.2rem] w-[1.2rem]' />
)}
</Button>
</button>
</DrawerTrigger>

<DrawerContent className='px-2'>
<h1 className='text-xl font-bold text-center'>Varslinger</h1>
<h1 className='text-xl font-bold text-center pt-4 pb-2'>Varslinger</h1>

<ScrollArea className='h-[60vh]'>
<ScrollArea className='h-[60vh] pb-4 pr-0'>
{isLoading && <NotificationItemLoading />}
{isEmpty && <NotFoundIndicator header='Fant ingen varsler' />}
{error && <h1 className='text-center mt-8'>{error.detail}</h1>}
{data !== undefined && (
<div className='space-y-2'>
<div>
{notifications.map((notification, index) => (
<NotificationItem key={index} notification={notification} setShowNotifications={setShowNotifications} />
))}
Expand All @@ -123,27 +130,34 @@ const NotificationsTopbar = () => {
return (
<Popover onOpenChange={setShowNotifications} open={showNotifications}>
<PopoverTrigger asChild>
<Button className='dark:text-white' size='icon' variant='ghost'>
<button className='dark:text-white'>
{!showNotifications ? (
user && user.unread_notifications > 0 ? (
<BellRing className='animate-pulse h-[1.2rem] w-[1.2rem]' />
<div className='relative'>
<BellRing className='h-[1.2rem] w-[1.2rem]' />
<div className='absolute bottom-0 -right-0.5 bg-red-400 rounded-full h-2 w-2 animate-pulse' />
</div>
) : (
<Bell className='h-[1.2rem] w-[1.2rem]' />
)
) : (
<X className='h-[1.2rem] w-[1.2rem]' />
)}
</Button>
</button>
</PopoverTrigger>
<PopoverContent className='w-[600px]'>
<h1 className='text-xl font-bold text-center'>Varslinger</h1>
<PopoverContent className='w-[400px] rounded-xl mr-8 mt-2 p-0 dark:bg-background'>
<div className='p-4'>
<h1 className='text-lg font-bold'>Varslinger</h1>
</div>

<Separator />

<ScrollArea className='h-[60vh]'>
<ScrollArea className='h-[60vh] pb-4 pr-0'>
{isLoading && <NotificationItemLoading />}
{isEmpty && <NotFoundIndicator header='Fant ingen varsler' />}
{error && <h1 className='text-center mt-8'>{error.detail}</h1>}
{data !== undefined && (
<div className='space-y-2'>
<div>
{notifications.map((notification, index) => (
<NotificationItem key={index} notification={notification} setShowNotifications={setShowNotifications} />
))}
Expand Down

0 comments on commit 8a55cbd

Please sign in to comment.