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

Adjust logo names #26

Merged
merged 1 commit into from
Oct 30, 2024
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
8 changes: 4 additions & 4 deletions src/config-schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export const configSchema = {
logo: {
src: {
_type: Type.String,
_default: "${openmrsSpaBase}/home/patient-queues",
_default: "/openmrs/spa/logo.svg",
_description:
"A path or URL to an image. If null, will use the OpenMRS SVG sprite.",
_validators: [validators.isUrl],
Expand All @@ -50,7 +50,7 @@ export const configSchema = {
_description: "Alt text, shown on hover",
},
},
loginBackgroundImage: {
loginBackground: {
src: {
_type: Type.String,
_default: "/openmrs/spa/background.png",
Expand All @@ -64,10 +64,10 @@ export const configSchema = {
_description: "Alt text, shown on hover",
},
},
loginLogoImage: {
loginBanner: {
src: {
_type: Type.String,
_default: "/openmrs/spa/logo.svg",
_default: "/openmrs/spa/banner.png",
_description:
"A path or URL to an image. If null, will use the OpenMRS SVG sprite.",
_validators: [validators.isUrl],
Expand Down
6 changes: 3 additions & 3 deletions src/login/background.wrapper.component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ import { useConfig } from "@openmrs/esm-framework";
const BackgroundWrapper = ({ children }) => {
const config = useConfig();

return config?.loginBackgroundImage ? (
return config?.loginBackground ? (
<>
<img
src={config?.loginBackgroundImage?.src}
alt={config?.loginBackgroundImage?.alt || "Background Image"}
src={config?.loginBackground?.src}
alt={config?.loginBackground?.alt || "Background Image"}
className={styles.backgroundImage}
/>
<div className={styles.backgroundContainer}>
Expand Down
8 changes: 4 additions & 4 deletions src/login/logo.component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ import React from "react";
import { useConfig } from "@openmrs/esm-framework";

const Logo = (props) => {
const { loginLogoImage } = useConfig();
return loginLogoImage.src ? (
const { loginBanner } = useConfig();
return loginBanner.src ? (
<img
{...props}
src={loginLogoImage.src}
alt={loginLogoImage.alt}
src={loginBanner.src}
alt={loginBanner.alt}
title="UgandaEMR+ logo"
/>
) : (
Expand Down
Loading