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

fix: resolve empty state image correctly in profile page #4456

Merged
merged 1 commit into from
Oct 22, 2024

Conversation

jamesgeorge007
Copy link
Member

@jamesgeorge007 jamesgeorge007 commented Oct 18, 2024

Description

This PR aims to fix a broken reference to an image as part of the Personal Access Tokens view empty state on the profile page. Follow up of #4304.

Closes HFE-629.

What's changed

colorMode as consumed from the useColorMode() composable is a reactive object, hence, inferring the current Background selection via the value field.

const exposed: HoppColorMode = reactive({
preference: currentLocalPreference,
// Marking as readonly to not allow writes to this ref
value: selection as Readonly<Ref<Exclude<HoppBgColor, "system">>>,
})
app.provide("colorMode", exposed)

import { inject } from "vue"
import { HoppColorMode } from "~/modules/theming"
export const useColorMode = () => inject("colorMode") as HoppColorMode

Preview

Before

image

After

image

@jamesgeorge007 jamesgeorge007 changed the base branch from patch to next October 22, 2024 16:29
@jamesgeorge007 jamesgeorge007 force-pushed the fix/pat-empty-state-image branch from c4ecfc4 to 0fe2370 Compare October 22, 2024 16:30
@jamesgeorge007 jamesgeorge007 merged commit f10fac9 into next Oct 22, 2024
1 check passed
@jamesgeorge007 jamesgeorge007 deleted the fix/pat-empty-state-image branch October 22, 2024 16:34
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.

2 participants