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: load server name and icon from settings #3908

Merged
merged 1 commit into from
Sep 10, 2024

Conversation

RoccoSmit
Copy link
Contributor

Display the saved server name and icon to unregistered users viewing the explore page as per issue #3904

Testing:

Fresh signup page
sign up

Setting only server name
no icon

Signin page with new server name and default image
signin no icon

Explore page when unregistered without icon set
explore no icon

Setting server icon
settings with icon

Signin page with new server name and icon
login with icon

Explore page when unregistered with icon set
explore with icon

Comment on lines +24 to +27
const workspaceGeneralSetting =
workspaceSettingStore.getWorkspaceSettingByKey(WorkspaceSettingKey.GENERAL).generalSetting || WorkspaceGeneralSetting.fromPartial({});
const title = user ? user.nickname || user.username : workspaceGeneralSetting.customProfile?.title;
const avatarUrl = user ? user.avatarUrl : workspaceGeneralSetting.customProfile?.logoUrl;
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
const workspaceGeneralSetting =
workspaceSettingStore.getWorkspaceSettingByKey(WorkspaceSettingKey.GENERAL).generalSetting || WorkspaceGeneralSetting.fromPartial({});
const title = user ? user.nickname || user.username : workspaceGeneralSetting.customProfile?.title;
const avatarUrl = user ? user.avatarUrl : workspaceGeneralSetting.customProfile?.logoUrl;
const workspaceGeneralSetting =
workspaceSettingStore.getWorkspaceSettingByKey(WorkspaceSettingKey.GENERAL).generalSetting || WorkspaceGeneralSetting.fromPartial({});
const title = user ? user.nickname || user.username : workspaceGeneralSetting.customProfile?.title;
const avatarUrl = user ? user.avatarUrl : (workspaceGeneralSetting.customProfile?.logoUrl || "/full-logo.webp") ;

Copy link
Member

@boojack boojack left a comment

Choose a reason for hiding this comment

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

LGTM

@boojack boojack changed the title Load server name and icon from settings fix: load server name and icon from settings Sep 10, 2024
@boojack boojack merged commit 42bc769 into usememos:main Sep 10, 2024
2 checks passed
@RoccoSmit RoccoSmit deleted the unregistered-explore-server-name branch September 10, 2024 21:05
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