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

[UI/Refactor] Admin Settings #249

Merged
merged 6 commits into from
Jun 29, 2024
Merged

Conversation

mdsaban
Copy link
Contributor

@mdsaban mdsaban commented Jun 22, 2024

  • Refactor Admin page code (Extracts component)
  • Improves UI for admin settings page (Attached web and mobile screenshot)

Desktop

image

Mobile

image

Copy link
Collaborator

@MohamedBassem MohamedBassem left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the refactor! I added a couple of minor comments.

@@ -1,266 +1,11 @@
"use client";
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This can be a server component now and replace useSession with getServerAuthSession

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is throwing error, as we are using useClientConfig in serverStats component, which can not be used if the parent is not client side.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you can access it by importing it directly from shared/config.ts

apps/web/app/dashboard/admin/page.tsx Outdated Show resolved Hide resolved
apps/web/components/dashboard/admin/ServerStats.tsx Outdated Show resolved Hide resolved
@mdsaban mdsaban requested a review from MohamedBassem June 25, 2024 04:13
const latestRelease = useLatestRelease();

let newRelease;
if (latestRelease && currentRelease != latestRelease) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

potentially an issue for you to fix: #201
if the latest docker container is used, the UI still shows that there is a newer version available.

@MohamedBassem MohamedBassem merged commit e107f8b into hoarder-app:main Jun 29, 2024
3 checks passed
@mdsaban mdsaban deleted the admin-ui branch July 2, 2024 03:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants