-
Notifications
You must be signed in to change notification settings - Fork 49
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/enable edit menu server web #3387
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -3,6 +3,7 @@ import { config } from '../../../configs/config'; | |||||||||||||||||||||||||||||||||||||||
import { useTranslation } from 'react-i18next'; | ||||||||||||||||||||||||||||||||||||||||
import LanguageSelector from '../../components/LanguageSelector'; | ||||||||||||||||||||||||||||||||||||||||
import { useEffect, useState } from 'react'; | ||||||||||||||||||||||||||||||||||||||||
import { ThemeToggler } from '../../components/Toggler'; | ||||||||||||||||||||||||||||||||||||||||
type props = { | ||||||||||||||||||||||||||||||||||||||||
nextAction: () => void; | ||||||||||||||||||||||||||||||||||||||||
}; | ||||||||||||||||||||||||||||||||||||||||
|
@@ -25,8 +26,17 @@ const Landing = (props: props) => { | |||||||||||||||||||||||||||||||||||||||
}, []); | ||||||||||||||||||||||||||||||||||||||||
return ( | ||||||||||||||||||||||||||||||||||||||||
<div className="w-full"> | ||||||||||||||||||||||||||||||||||||||||
<div className="mb-6 ml-10"> | ||||||||||||||||||||||||||||||||||||||||
<LanguageSelector lang={defaultLang} /> | ||||||||||||||||||||||||||||||||||||||||
<div className="flex w-full mb-6 ml-10"> | ||||||||||||||||||||||||||||||||||||||||
<div className="flex flex-col w-6/12"> | ||||||||||||||||||||||||||||||||||||||||
<div> | ||||||||||||||||||||||||||||||||||||||||
<LanguageSelector lang={defaultLang} /> | ||||||||||||||||||||||||||||||||||||||||
</div> | ||||||||||||||||||||||||||||||||||||||||
</div> | ||||||||||||||||||||||||||||||||||||||||
<div className="flex w-6/12 flex-row-reverse mr-10"> | ||||||||||||||||||||||||||||||||||||||||
<div className="flex flex-col w-2/8"> | ||||||||||||||||||||||||||||||||||||||||
<ThemeToggler /> | ||||||||||||||||||||||||||||||||||||||||
</div> | ||||||||||||||||||||||||||||||||||||||||
</div> | ||||||||||||||||||||||||||||||||||||||||
Comment on lines
+29
to
+39
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🛠️ Refactor suggestion Improve layout structure and accessibility The current implementation has several issues that should be addressed:
Consider applying these improvements: - <div className="flex w-full mb-6 ml-10">
- <div className="flex flex-col w-6/12">
- <div>
- <LanguageSelector lang={defaultLang} />
- </div>
- </div>
- <div className="flex w-6/12 flex-row-reverse mr-10">
- <div className="flex flex-col w-2/8">
- <ThemeToggler />
- </div>
- </div>
+ <nav className="flex justify-between items-center w-full px-10 mb-6" aria-label="Site settings">
+ <div className="flex-shrink-0" role="region" aria-label="Language selection">
+ <LanguageSelector lang={defaultLang} />
+ </div>
+ <div className="flex-shrink-0" role="region" aria-label="Theme selection">
+ <ThemeToggler />
+ </div>
+ </nav> Changes made:
📝 Committable suggestion
Suggested change
|
||||||||||||||||||||||||||||||||||||||||
</div> | ||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||
<div className="mb-8 w-full text-center"> | ||||||||||||||||||||||||||||||||||||||||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
import getConfig from 'next/config'; | ||
import { ServerRuntimeConfig } from '@app/interfaces/IRuntimeServerConfig'; | ||
import { IServerRuntimeConfig } from '@app/interfaces/IRuntimeServerConfig'; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 💡 Codebase verification Interface renaming needs to be completed across the codebase The verification reveals inconsistent interface naming:
Locations needing updates:
🔗 Analysis chainVerify consistent interface renaming across the codebase The interface renaming from Let me analyze the results further by checking the implementation details of these files. 🏁 Scripts executedThe following scripts were executed for the analysis: Script: #!/bin/bash
# Description: Check for any remaining occurrences of the old interface name
# and verify the new interface is used consistently
# Search for any remaining instances of the old interface name
echo "Checking for remaining instances of ServerRuntimeConfig..."
rg "ServerRuntimeConfig" --type ts
# Verify the new interface usage
echo "Verifying IServerRuntimeConfig usage..."
rg "IServerRuntimeConfig" --type ts
Length of output: 1213 Script: #!/bin/bash
# Check the implementation of getServerRuntimeConfig and its usage
echo "Checking env.ts implementation..."
cat apps/web/app/env.ts
echo -e "\nChecking constants.ts implementation..."
cat apps/web/app/constants.ts
echo -e "\nChecking IRuntimeServerConfig interface..."
cat apps/web/app/interfaces/IRuntimeServerConfig.ts
Length of output: 12996 |
||
import { GAUZY_API_SERVER_URL, GAUZY_API_BASE_SERVER_URL } from '@app/constants'; | ||
|
||
export function getDesktopConfig(): Partial<ServerRuntimeConfig> { | ||
export function getDesktopConfig(): Partial<IServerRuntimeConfig> { | ||
try { | ||
const { serverRuntimeConfig } = getConfig(); | ||
return serverRuntimeConfig; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🛠️ Refactor suggestion
Remove duplicate method implementation
buildInitialTemplate
appears to be identical tobuildDefaultTemplate
. Consider removing this duplication and reusingbuildDefaultTemplate
instead.