Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

User dashboard design: 272 #54

Merged
merged 7 commits into from
Jul 31, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 4 additions & 7 deletions src/app/FooterSidebar.astro
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,12 @@ import CopyrightNotice from '../components/CopyrightNotice.astro';
<ul class="flex flex-wrap items-center mb-6 space-y-1 md:mb-0">
<li>
<a
href="#"
class="mr-4 text-sm font-normal text-gray-500 hover:underline md:mr-6 dark:text-gray-400"
>Terms and conditions</a
>
</li>
<li>
<a
href="#"
class="mr-4 text-sm font-normal text-gray-500 hover:underline md:mr-6 dark:text-gray-400"
>Privacy Policy</a
>
Expand All @@ -29,7 +27,6 @@ import CopyrightNotice from '../components/CopyrightNotice.astro';
</li>
<li>
<a
href="#"
class="mr-4 text-sm font-normal text-gray-500 hover:underline md:mr-6 dark:text-gray-400"
>Cookie Policy</a
>
Expand All @@ -43,7 +40,7 @@ import CopyrightNotice from '../components/CopyrightNotice.astro';
</li>
</ul>
<div class="flex space-x-6 sm:justify-center">
<a
<!-- <a
href="#"
class="text-gray-500 hover:text-gray-900 dark:text-gray-400 dark:hover:text-white"
>
Expand All @@ -58,7 +55,7 @@ import CopyrightNotice from '../components/CopyrightNotice.astro';
d="M22 12c0-5.523-4.477-10-10-10S2 6.477 2 12c0 4.991 3.657 9.128 8.438 9.878v-6.987h-2.54V12h2.54V9.797c0-2.506 1.492-3.89 3.777-3.89 1.094 0 2.238.195 2.238.195v2.46h-1.26c-1.243 0-1.63.771-1.63 1.562V12h2.773l-.443 2.89h-2.33v6.988C18.343 21.128 22 16.991 22 12z"
clip-rule="evenodd"></path>
</svg>
</a>
</a> -->
<a
href="#"
class="text-gray-500 hover:text-gray-900 dark:text-gray-400 dark:hover:text-white"
Expand Down Expand Up @@ -106,7 +103,7 @@ import CopyrightNotice from '../components/CopyrightNotice.astro';
clip-rule="evenodd"></path>
</svg>
</a>
<a
<!-- <a
href="#"
class="text-gray-500 hover:text-gray-900 dark:text-gray-400 dark:hover:text-white"
>
Expand All @@ -121,7 +118,7 @@ import CopyrightNotice from '../components/CopyrightNotice.astro';
d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10c5.51 0 10-4.48 10-10S17.51 2 12 2zm6.605 4.61a8.502 8.502 0 011.93 5.314c-.281-.054-3.101-.629-5.943-.271-.065-.141-.12-.293-.184-.445a25.416 25.416 0 00-.564-1.236c3.145-1.28 4.577-3.124 4.761-3.362zM12 3.475c2.17 0 4.154.813 5.662 2.148-.152.216-1.443 1.941-4.48 3.08-1.399-2.57-2.95-4.675-3.189-5A8.687 8.687 0 0112 3.475zm-3.633.803a53.896 53.896 0 013.167 4.935c-3.992 1.063-7.517 1.04-7.896 1.04a8.581 8.581 0 014.729-5.975zM3.453 12.01v-.26c.37.01 4.512.065 8.775-1.215.25.477.477.965.694 1.453-.109.033-.228.065-.336.098-4.404 1.42-6.747 5.303-6.942 5.629a8.522 8.522 0 01-2.19-5.705zM12 20.547a8.482 8.482 0 01-5.239-1.8c.152-.315 1.888-3.656 6.703-5.337.022-.01.033-.01.054-.022a35.318 35.318 0 011.823 6.475 8.4 8.4 0 01-3.341.684zm4.761-1.465c-.086-.52-.542-3.015-1.659-6.084 2.679-.423 5.022.271 5.314.369a8.468 8.468 0 01-3.655 5.715z"
clip-rule="evenodd"></path>
</svg>
</a>
</a> -->
</div>
</footer>

Expand Down
49 changes: 30 additions & 19 deletions src/app/NavBarSidebar.astro
Original file line number Diff line number Diff line change
Expand Up @@ -79,16 +79,23 @@ import SignOutButton from '../components/SignOutButton/index'
</div>

<!-- Notifications -->
<button type="button" data-dropdown-toggle="notification-dropdown"
class="p-2 text-gray-500 rounded-lg hover:text-gray-900 hover:bg-gray-100 dark:text-gray-400 dark:hover:text-white dark:hover:bg-gray-700">
<span class="sr-only">View notifications</span>
<!-- <button
type="button"
data-dropdown-toggle="notification-dropdown"
class="p-2 text-gray-500 rounded-lg hover:text-gray-900 hover:bg-gray-100 dark:text-gray-400 dark:hover:text-white dark:hover:bg-gray-700"
>
<span class="sr-only">View notifications</span> -->
<!-- Bell icon -->
<svg class="w-6 h-6" fill="currentColor" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg">
<path
d="M10 2a6 6 0 00-6 6v3.586l-.707.707A1 1 0 004 14h12a1 1 0 00.707-1.707L16 11.586V8a6 6 0 00-6-6zM10 18a3 3 0 01-3-3h6a3 3 0 01-3 3z">
</path>
</svg>
</button>
<!-- <svg
class="w-6 h-6"
fill="currentColor"
viewBox="0 0 20 20"
xmlns="http://www.w3.org/2000/svg"
><path
d="M10 2a6 6 0 00-6 6v3.586l-.707.707A1 1 0 004 14h12a1 1 0 00.707-1.707L16 11.586V8a6 6 0 00-6-6zM10 18a3 3 0 01-3-3h6a3 3 0 01-3 3z"
></path></svg
>
</button> -->
<!-- Dropdown menu -->
<div class="z-20 z-50 hidden max-w-sm my-4 overflow-hidden text-base list-none bg-white divide-y divide-gray-100 rounded shadow-lg dark:divide-gray-600 dark:bg-gray-700"
id="notification-dropdown">
Expand Down Expand Up @@ -282,7 +289,7 @@ import SignOutButton from '../components/SignOutButton/index'
</div>
</a> -->
<a
href="#"
href="./invitations"
class="block p-4 text-center rounded-lg hover:bg-gray-100 dark:hover:bg-gray-600"
>
<svg
Expand All @@ -297,7 +304,7 @@ import SignOutButton from '../components/SignOutButton/index'
</div>
</a>
<a
href="#"
href="./organizations/users"
class="block p-4 text-center rounded-lg hover:bg-gray-100 dark:hover:bg-gray-600"
>
<svg
Expand Down Expand Up @@ -471,21 +478,25 @@ import SignOutButton from '../components/SignOutButton/index'
class="block px-4 py-2 text-sm text-gray-700 hover:bg-gray-100 dark:text-gray-300 dark:hover:bg-gray-600 dark:hover:text-white"
role="menuitem">Dashboard</a>
</li>
<li>
<a href="/settings"
<!-- <li>
<a
href="/settings"
class="block px-4 py-2 text-sm text-gray-700 hover:bg-gray-100 dark:text-gray-300 dark:hover:bg-gray-600 dark:hover:text-white"
role="menuitem">Settings</a>
</li>
role="menuitem">Settings</a
>
</li> -->
<li>
<a href={pathRoutes.users.profile}
class="block px-4 py-2 text-sm text-gray-700 hover:bg-gray-100 dark:text-gray-300 dark:hover:bg-gray-600 dark:hover:text-white"
role="menuitem">Profile</a>
</li>
<li>
<a href="#"
<!-- <li>
<a
href="#"
class="block px-4 py-2 text-sm text-gray-700 hover:bg-gray-100 dark:text-gray-300 dark:hover:bg-gray-600 dark:hover:text-white"
role="menuitem">Earnings</a>
</li>
role="menuitem">Earnings</a
>
</li> -->
<li>
<SignOutButton client:load/>
</li>
Expand Down
27 changes: 10 additions & 17 deletions src/app/SideBar.astro
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ import { pathRoutes } from "../config/pathRoutes";
<span class="ml-3" sidebar-toggle-item>Dashboard</span>
</a>
</li>
<li>
<!-- <li>
<a
href={pathRoutes.users.invitations}
class="flex items-center p-2 text-base text-gray-900 rounded-lg hover:bg-gray-100 group dark:text-gray-200 dark:hover:bg-gray-700"
Expand All @@ -87,7 +87,7 @@ import { pathRoutes } from "../config/pathRoutes";
</svg>
<span class="ml-3" sidebar-toggle-item>Received Invitations</span>
</a>
</li>
</li> -->
<li>
<button
type="button"
Expand Down Expand Up @@ -128,14 +128,7 @@ import { pathRoutes } from "../config/pathRoutes";
class="flex items-center p-2 text-base text-gray-900 transition duration-75 rounded-lg pl-11 group hover:bg-gray-100 dark:text-gray-200 dark:hover:bg-gray-700"
>Organizations</a
>
</li>
<li>
<a
href={pathRoutes.organizations.invitations}
class="flex items-center p-2 text-base text-gray-900 transition duration-75 rounded-lg pl-11 group hover:bg-gray-100 dark:text-gray-200 dark:hover:bg-gray-700"
>Sent Invitations</a
>
</li>
</li>
<li>
<a
href={pathRoutes.organizations.users}
Expand Down Expand Up @@ -220,9 +213,9 @@ import { pathRoutes } from "../config/pathRoutes";
</li>
</ul>
</li>
<!-- <li>
{{ if eq $page_slug "settings" }}
<a
<li>
<!-- {{ if eq $page_slug "settings" }} -->
<!-- <a
href="/settings"
class="flex items-center p-2 text-base text-gray-900 rounded-lg hover:bg-gray-100 group dark:text-gray-200 dark:hover:bg-gray-700"
>
Expand All @@ -240,8 +233,8 @@ import { pathRoutes } from "../config/pathRoutes";
></path>
</svg>
<span class="ml-3" sidebar-toggle-item>Settings</span>
</a>
</li> -->
</a> -->
</li>

</ul>
<div class="pt-2 space-y-2">
Expand Down Expand Up @@ -358,7 +351,7 @@ import { pathRoutes } from "../config/pathRoutes";
Settings page
<div class="tooltip-arrow" data-popper-arrow></div>
</div>
<button
<!-- <button
type="button"
data-dropdown-toggle="language-dropdown"
class="inline-flex justify-center p-2 text-gray-500 rounded cursor-pointer hover:text-gray-900 hover:bg-gray-100 dark:hover:bg-gray-700 dark:hover:text-white"
Expand Down Expand Up @@ -390,7 +383,7 @@ import { pathRoutes } from "../config/pathRoutes";
></use><use xlink:href="#e" x="2470"></use></g
></svg
>
</button>
</button> -->
<!-- Dropdown -->
<div
class="z-50 hidden my-4 text-base list-none bg-white divide-y divide-gray-100 rounded shadow dark:bg-gray-700"
Expand Down
5 changes: 4 additions & 1 deletion src/components/AlertComponent/index.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
import { Alert, Avatar, Spinner } from 'flowbite-react';

export const AlertComponent = ({ message, type, onAlertClose }: { message: string | null, type: string, onAlertClose: () => void }) => {


return message !== null ? <Alert
color={type === 'success' ? "success" : "failure"}
className='mb-4'
color={type}
onDismiss={() => onAlertClose()}
>
<span>
Expand Down
2 changes: 1 addition & 1 deletion src/components/CopyrightNotice.astro
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<p class="my-10 text-sm text-center text-gray-500">
&copy; 2019 - {new Date().getFullYear()} —
<a href="https://credebl.id/" class="hover:underline" target="_blank"
<a class="hover:underline" target="_blank"
>CREDEBL</a
> | All rights reserved.
</p>
Loading