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);
|
setGitCheckInProgress(true);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
if (IS_DEV && simulateToolsMissingRef.current) {
|
if (DEV_UI_ENABLED && simulateToolsMissingRef.current) {
|
||||||
const simulated = {
|
const simulated = {
|
||||||
git: { ok: false, command: "git", error: "simulated_missing" },
|
git: { ok: false, command: "git", error: "simulated_missing" },
|
||||||
lfs: { ok: false, command: "git lfs", error: "simulated_missing" },
|
lfs: { ok: false, command: "git lfs", error: "simulated_missing" },
|
||||||
|
|
@ -303,7 +303,7 @@ const App = () => {
|
||||||
|
|
||||||
if (serverRecoveryActive) {
|
if (serverRecoveryActive) {
|
||||||
setServerRecoveryActive(false);
|
setServerRecoveryActive(false);
|
||||||
if (IS_DEV) {
|
if (DEV_UI_ENABLED) {
|
||||||
setDevProceedReady(true);
|
setDevProceedReady(true);
|
||||||
} else {
|
} else {
|
||||||
scheduleScreenTransition("login");
|
scheduleScreenTransition("login");
|
||||||
|
|
@ -315,7 +315,7 @@ const App = () => {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (IS_DEV) {
|
if (DEV_UI_ENABLED) {
|
||||||
setDevProceedReady(true);
|
setDevProceedReady(true);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
@ -870,7 +870,9 @@ const App = () => {
|
||||||
className="ghost"
|
className="ghost"
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
setSkipToolsCheck(true);
|
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>
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
{IS_DEV &&
|
{DEV_UI_ENABLED &&
|
||||||
serverHealthy &&
|
serverHealthy &&
|
||||||
(skipToolsCheck ||
|
(skipToolsCheck ||
|
||||||
Boolean(gitCheckResult?.git.ok && gitCheckResult?.lfs.ok)) && (
|
Boolean(gitCheckResult?.git.ok && gitCheckResult?.lfs.ok)) && (
|
||||||
|
|
@ -894,7 +896,7 @@ const App = () => {
|
||||||
다음으로 이동
|
다음으로 이동
|
||||||
</button>
|
</button>
|
||||||
)}
|
)}
|
||||||
{IS_DEV && (
|
{DEV_UI_ENABLED && (
|
||||||
<button
|
<button
|
||||||
type="button"
|
type="button"
|
||||||
className="ghost"
|
className="ghost"
|
||||||
|
|
@ -950,22 +952,6 @@ const App = () => {
|
||||||
>
|
>
|
||||||
비밀번호 변경
|
비밀번호 변경
|
||||||
</button>
|
</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>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
)}
|
)}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue