웹 로그아웃 버튼을 위쪽 메뉴와 내 정보 창으로 옮김
로그아웃 버튼이 화면 맨 아래 작은 글씨로만 있어 찾기 어려웠다. 로그인한 화면의 위쪽 메뉴에서 내 정보 옆에 두고 내 정보 창에도 같은 버튼을 넣었다. 두 버튼은 같은 절차를 쓰며 전송 대기 중인 변경이 있으면 기존처럼 로그아웃을 멈춘다. 업데이트 안내 검사가 예전 웹 버전을 고정값으로 쓰고 있어 버전을 올린 뒤부터 실패하던 것을 현재 소스의 웹 버전을 읽도록 고쳤다. 웹 2026-11-24.1로 반영한다. 서버 코드와 회원 DB 및 앱 APK는 변경하지 않았다. 별도 시험 서버에서 PC 폭과 390px 휴대폰 폭으로 가입·내 정보 창 로그아웃·재로그인·위쪽 메뉴 로그아웃을 확인했고 로그아웃 뒤 회원 조회가 401로 막히는 것을 확인했다. 운영 화면에서 버튼 위치와 오류 없음도 확인했다.
This commit is contained in:
1 parent
68f9818e4e
commit
b4be27b72d
7 files changed
+24
-11
No files matched your search
+3
-1
@@ -147,7 +147,9 @@ function openPassword(){$('password-form').reset();$('password-error').textConte
|
||||
$('password-open').onclick=()=>{$('account-dialog').close();openPassword();};
|
||||
$('password-dialog').addEventListener('close',()=>$('password-form').reset());
|
||||
$('password-form').onsubmit=async event=>{event.preventDefault();if($('password-new').value!==$('password-repeat').value){$('password-error').textContent='새 비밀번호 확인이 일치하지 않습니다.';return;}const button=event.submitter;button.disabled=true;try{await api('password',{currentPassword:$('password-current').value,password:$('password-new').value});$('password-dialog').close();watchGeneration++;await enter();notify('비밀번호를 변경했습니다. 다른 기기는 다시 로그인하세요.');}catch(error){$('password-error').textContent=error.message;}finally{button.disabled=false;}};
|
||||
$('logout').onclick=async()=>{if(pending.length){notify('전송 대기 중인 내용이 있습니다. 동기화를 마친 뒤 로그아웃해 주세요.');return;}if(!await confirmAction('이 브라우저에서 로그아웃할까요? 다시 로그인하면 저장한 일정을 볼 수 있습니다.','로그아웃'))return;try{await api('logout',{});connected=false;watchGeneration++;localStorage.removeItem(cacheKey());localStorage.removeItem(stateCacheKey());location.reload();}catch(error){notify(error.message);}};
|
||||
// 위쪽 메뉴와 내 정보 창의 로그아웃이 같은 절차를 쓴다. 전송 대기 내용이 있으면 잃지 않도록 먼저 멈춘다.
|
||||
async function logoutNow(){if($('account-dialog').open)$('account-dialog').close();if(pending.length){notify('전송 대기 중인 내용이 있습니다. 동기화를 마친 뒤 로그아웃해 주세요.');return;}if(!await confirmAction('이 브라우저에서 로그아웃할까요? 다시 로그인하면 저장한 일정을 볼 수 있습니다.','로그아웃'))return;try{await api('logout',{});connected=false;watchGeneration++;localStorage.removeItem(cacheKey());localStorage.removeItem(stateCacheKey());location.reload();}catch(error){notify(error.message);}}
|
||||
$('logout').onclick=logoutNow;$('account-logout').onclick=logoutNow;
|
||||
|
||||
function drawPerson(pattern){$('person-count').value=pattern.length;$('person-days').replaceChildren();pattern.forEach((shift,index)=>{const label=text('label',(index+1)+'일째'),select=document.createElement('select');for(const [value,name] of Object.entries(labels)){const option=text('option',name);option.value=value;select.append(option);}select.value=shift;label.append(select);$('person-days').append(label);});}
|
||||
function openPerson(item){if(!item&&personalPeople().length>=20){notify('함께 볼 사람은 20명까지 등록할 수 있습니다.');return;}personId=item?.id??null;const d=item?.data??{name:'',color:'BLUE',anchor:selected,pattern:['DUTY','OFF','REGULAR']};$('person-heading').textContent=item?'함께 보는 근무표 수정':'함께 볼 사람 추가';$('person-name').value=d.name;$('person-color').value=d.color;$('person-anchor').value=d.anchor;$('person-work-week').value=String(d.workWeek||6);$('person-duty-weekday').checked=d.dutyAsWeekday===true;resetPatternMode('person');drawPerson(d.pattern);$('person-delete').hidden=!item;$('person-error').textContent='';$('person-dialog').showModal();}
|
||||
|
||||
Reference in new issue
Block a user