Skip to content

Commit

Permalink
add version badge
Browse files Browse the repository at this point in the history
  • Loading branch information
potts99 committed Dec 6, 2023
1 parent ada40cf commit 8a7d593
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 5 deletions.
1 change: 1 addition & 0 deletions apps/api/src/controllers/auth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -434,6 +434,7 @@ export function authRoutes(fastify: FastifyInstance) {
ticket_comments: user!.notify_ticket_comments,
ticket_assigned: user!.notify_ticket_assigned,
sso_status: config!.sso_active,
version: config!.client_version,
notifcations,
};

Expand Down
18 changes: 13 additions & 5 deletions apps/client/layouts/newLayout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -471,6 +471,7 @@ export default function NewLayout({ children }: any) {
alt="Buy Me a Coffee at ko-fi.com"
/>
</a> */}

{user.isAdmin && (
<Link
href="/admin"
Expand Down Expand Up @@ -518,7 +519,14 @@ export default function NewLayout({ children }: any) {
aria-hidden="true"
/>

<div className="flex flex-1 gap-x-4 self-stretch lg:gap-x-6 pb-2">
<div className="flex flex-1 gap-x-4 self-stretch lg:gap-x-6 items-center">
<div className="flex w-full justify-start items-center">
<Link className="" href="">
<span className="inline-flex items-center rounded-md bg-green-500/10 px-2 py-1 text-xs font-medium text-green-400 ring-1 ring-inset ring-green-500/20">
Version {user.version}
</span>
</Link>
</div>
{/* <div
className="relative mt-2 hidden sm:flex items-center w-full min-w-[320px] max-w-[360px] hover:cursor-pointer"
onClick={() => {
Expand All @@ -544,7 +552,7 @@ export default function NewLayout({ children }: any) {
</div> */}
<div className="flex w-full justify-end items-center gap-x-2 lg:gap-x-2">
<Popover className="relative">
<Popover.Button className="relative mt-2.5 rounded-full p-1 text-gray-400 hover:text-gray-500 focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:ring-offset-2">
<Popover.Button className="relative rounded-full p-1 text-gray-400 hover:text-gray-500 focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:ring-offset-2">
<BellAlertIcon
className="h-6 w-6 text-white"
aria-hidden="true"
Expand Down Expand Up @@ -627,10 +635,10 @@ export default function NewLayout({ children }: any) {
</Popover>
{/* Profile dropdown */}
<Menu as="div" className="relative">
<Menu.Button className="mt-2 z-50 flex items-center p-1.5">
<Menu.Button className="z-50 mb-0.5 flex items-center p-1.5">
<span className="sr-only">Open user menu</span>
<span className="inline-flex h-8 w-8 items-center justify-center rounded-full bg-gray-500">
<span className="text-sm mt-0.5 font-medium leading-none text-white uppercase">
<span className="inline-flex h-6 w-6 items-center justify-center rounded-full bg-gray-500">
<span className="text-xs mt-0.5 font-medium leading-none text-white uppercase">
{user.name[0]}
</span>
</span>
Expand Down

0 comments on commit 8a7d593

Please sign in to comment.