Skip to content
Draft
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
Binary file added public/images/tools/call_dark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/images/tools/call_light.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/images/tools/care_instructions_dark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/images/tools/care_instructions_light.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/images/tools/contacts_dark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/images/tools/contacts_light.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/images/tools/medications_dark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/images/tools/medications_light.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/images/tools/pro_dark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/images/tools/pro_light.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/images/tools/resources_dark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/images/tools/resources_light.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/images/tools/settings_dark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/images/tools/settings_light.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src-tauri/icons/128x128.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src-tauri/icons/128x128@2x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src-tauri/icons/32x32.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src-tauri/icons/64x64.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src-tauri/icons/Square107x107Logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src-tauri/icons/Square142x142Logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src-tauri/icons/Square150x150Logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src-tauri/icons/Square284x284Logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src-tauri/icons/Square30x30Logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src-tauri/icons/Square310x310Logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src-tauri/icons/Square44x44Logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src-tauri/icons/Square71x71Logo.png
Binary file modified src-tauri/icons/Square89x89Logo.png
Binary file modified src-tauri/icons/StoreLogo.png
Binary file modified src-tauri/icons/icon.icns
Binary file not shown.
Binary file modified src-tauri/icons/icon.ico
Binary file not shown.
Binary file modified src-tauri/icons/icon.png
13 changes: 9 additions & 4 deletions src/app/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import { getConfig, setAppearanceConfig } from "@/utils/settings";
import { setupOnboarding } from "@/utils/onboarding";

export default function Hub() {
const [onboardingCompleted, setOnboardingCompleted] = useState(false);
const [config, setConfig] = useState<Config | null>(null);
const [availableTools, setAvailableTools] = useState<HubTool[]>(hubTools);
const router = useRouter();

Expand All @@ -47,7 +47,7 @@ export default function Hub() {
try {
await setupOnboarding();
const c = await getConfig();
setOnboardingCompleted(c.onboarding_completed);
setConfig(c);

if (!c.onboarding_completed) {
router.push("/onboarding");
Expand All @@ -68,7 +68,8 @@ export default function Hub() {
}, []);

return (
onboardingCompleted && (
config &&
config.onboarding_completed && (
<main>
<HubHeader></HubHeader>
<section className={styles.sectionTools}>
Expand All @@ -78,7 +79,11 @@ export default function Hub() {
<HubToolButton
key={hubTool.name}
link={hubTool.link}
icon={hubTool.icon}
icon={
config.appearance === "dark"
? hubTool.icon
: hubTool.icon.replace("light", "dark")
}
name={hubTool.name}
/>
))}
Expand Down
14 changes: 7 additions & 7 deletions src/utils/hub.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,37 +10,37 @@ export const hubTools: HubTool[] = [
{
link: "./resources",
name: "Resources",
icon: "/images/tools/resources.png",
icon: "/images/tools/resources_light.png",
},
{
link: "./care-instructions",
name: "Care Instructions",
icon: "/images/tools/care-instructions.png",
icon: "/images/tools/care_instructions_light.png",
},
{
link: "./pro",
name: "Survey",
icon: "/images/tools/pro.png",
icon: "/images/tools/pro_light.png",
},
{
link: "./medications",
name: "Medications",
icon: "/images/tools/medications.png",
icon: "/images/tools/medications_light.png",
},
{
link: "./call",
name: "Video",
icon: "/images/tools/call.png",
icon: "/images/tools/call_light.png",
},
{
link: "./settings/device",
name: "Settings",
icon: "/images/tools/settings.png",
icon: "/images/tools/settings_light.png",
},
{
link: "./contacts",
name: "Contacts",
icon: "/images/tools/contacts.png",
icon: "/images/tools/contacts_light.png",
},
].sort((a, b) => {
// Sorts list by HubTool.name
Expand Down