Refactor development mode checks to use DEV_UI_ENABLED constant. Updated conditional logic throughout the App component to improve clarity and maintainability. Removed deprecated demo session button to streamline the UI.
This commit is contained in:
parent
9f7244185d
commit
03a3f85974
|
|
@ -113,7 +113,7 @@ const App = () => {
|
|||
setGitCheckInProgress(true);
|
||||
|
||||
try {
|
||||
if (IS_DEV && simulateToolsMissingRef.current) {
|
||||
if (DEV_UI_ENABLED && simulateToolsMissingRef.current) {
|
||||
const simulated = {
|
||||
git: { ok: false, command: "git", error: "simulated_missing" },
|
||||
lfs: { ok: false, command: "git lfs", error: "simulated_missing" },
|
||||
|
|
@ -303,7 +303,7 @@ const App = () => {
|
|||
|
||||
if (serverRecoveryActive) {
|
||||
setServerRecoveryActive(false);
|
||||
if (IS_DEV) {
|
||||
if (DEV_UI_ENABLED) {
|
||||
setDevProceedReady(true);
|
||||
} else {
|
||||
scheduleScreenTransition("login");
|
||||
|
|
@ -315,7 +315,7 @@ const App = () => {
|
|||
return;
|
||||
}
|
||||
|
||||
if (IS_DEV) {
|
||||
if (DEV_UI_ENABLED) {
|
||||
setDevProceedReady(true);
|
||||
return;
|
||||
}
|
||||
|
|
@ -870,7 +870,9 @@ const App = () => {
|
|||
className="ghost"
|
||||
onClick={() => {
|
||||
setSkipToolsCheck(true);
|
||||
scheduleScreenTransition(IS_DEV ? "login" : hasSession ? "main" : "login");
|
||||
scheduleScreenTransition(
|
||||
DEV_UI_ENABLED ? "login" : hasSession ? "main" : "login"
|
||||
);
|
||||
}}
|
||||
>
|
||||
나중에 진행
|
||||
|
|
@ -878,7 +880,7 @@ const App = () => {
|
|||
</div>
|
||||
</div>
|
||||
)}
|
||||
{IS_DEV &&
|
||||
{DEV_UI_ENABLED &&
|
||||
serverHealthy &&
|
||||
(skipToolsCheck ||
|
||||
Boolean(gitCheckResult?.git.ok && gitCheckResult?.lfs.ok)) && (
|
||||
|
|
@ -894,7 +896,7 @@ const App = () => {
|
|||
다음으로 이동
|
||||
</button>
|
||||
)}
|
||||
{IS_DEV && (
|
||||
{DEV_UI_ENABLED && (
|
||||
<button
|
||||
type="button"
|
||||
className="ghost"
|
||||
|
|
@ -950,22 +952,6 @@ const App = () => {
|
|||
>
|
||||
비밀번호 변경
|
||||
</button>
|
||||
<button
|
||||
type="button"
|
||||
className="ghost"
|
||||
onClick={() => {
|
||||
const fallbackId = loginId.trim() || "demo";
|
||||
setProfile({
|
||||
username: fallbackId,
|
||||
nickname: "Demo",
|
||||
level: 1
|
||||
});
|
||||
setHasSession(true);
|
||||
setScreen("main");
|
||||
}}
|
||||
>
|
||||
유효 세션 가정(데모)
|
||||
</button>
|
||||
</div>
|
||||
</section>
|
||||
)}
|
||||
|
|
|
|||
Loading…
Reference in New Issue