diff --git a/src/component-library/Pages/Layout/AccountDropdown.tsx b/src/component-library/Pages/Layout/AccountDropdown.tsx index 5181f50bc..d56570bab 100644 --- a/src/component-library/Pages/Layout/AccountDropdown.tsx +++ b/src/component-library/Pages/Layout/AccountDropdown.tsx @@ -2,6 +2,7 @@ import {twMerge} from "tailwind-merge" import {ForwardedRef, forwardRef, useState} from "react" import {HiSwitchHorizontal, HiLogout, HiUserAdd} from "react-icons/hi" import Link from "next/link" +import {useRouter} from "next/navigation"; const AccountList = (props: { accountList: string[] }) => { return
@@ -31,26 +32,36 @@ const AccountList = (props: { accountList: string[] }) => { }; const SignOutOfAllButton = () => { - return { + const request = new Request('/api/auth/logout', { + method: 'POST' + }) + //TODO: handle errors + await fetch(request) + router.push('/auth/login') + }; + + return
signOut()} > - Sign out of all accounts + Sign out of all accounts - +
} const SignIntoButton = () => { return ) { + const hasAccountChoice = props.accountsPossible.length !== 1; return (
- {props.accountsPossible.length !== 1 && + {hasAccountChoice && account !== props.accountActive)}/> } + {hasAccountChoice && } ) } diff --git a/src/component-library/outputtailwind.css b/src/component-library/outputtailwind.css index 344f8ec9e..3c1e9e3ca 100644 --- a/src/component-library/outputtailwind.css +++ b/src/component-library/outputtailwind.css @@ -2214,6 +2214,11 @@ html { background-color: rgb(56 189 248 / var(--tw-bg-opacity)); } +.hover\:bg-base-success-200:hover { + --tw-bg-opacity: 1; + background-color: rgb(187 247 208 / var(--tw-bg-opacity)); +} + .hover\:bg-base-success-600:hover { --tw-bg-opacity: 1; background-color: rgb(22 163 74 / var(--tw-bg-opacity)); @@ -2802,6 +2807,11 @@ html { background-color: rgb(30 41 59 / var(--tw-bg-opacity)); } + .dark\:hover\:bg-base-success-600:hover { + --tw-bg-opacity: 1; + background-color: rgb(22 163 74 / var(--tw-bg-opacity)); + } + .dark\:hover\:bg-base-warning-600:hover { --tw-bg-opacity: 1; background-color: rgb(217 119 6 / var(--tw-bg-opacity));