feat: 접경 귀환 기능 추가
This commit is contained in:
@@ -131,6 +131,7 @@ const apiRealPath = {
|
||||
itemType: ItemTypeKey;
|
||||
}>,
|
||||
DieOnPrestart: POST as APICallT<undefined>,
|
||||
InstantRetreat: POST as APICallT<undefined>,
|
||||
BuildNationCandidate: POST as APICallT<undefined>,
|
||||
GetCommandTable: GET as APICallT<undefined, CommandTableResponse>,
|
||||
GetFrontInfo: GET as APICallT<{
|
||||
|
||||
@@ -170,6 +170,26 @@ $(function ($) {
|
||||
location.reload();
|
||||
});
|
||||
|
||||
$('#instantRetreat').on('click', async function (e) {
|
||||
e.preventDefault();
|
||||
|
||||
if(!confirm('아군 접경으로 이동할까요?')){
|
||||
return false;
|
||||
}
|
||||
|
||||
try {
|
||||
await SammoAPI.General.InstantRetreat();
|
||||
}
|
||||
catch (e) {
|
||||
console.log(e);
|
||||
alert(`실패했습니다: ${e}`);
|
||||
location.reload();
|
||||
return;
|
||||
}
|
||||
|
||||
location.reload();
|
||||
});
|
||||
|
||||
$('#vacation').on('click', async function (e) {
|
||||
e.preventDefault();
|
||||
if (!confirm('휴가 기능을 신청할까요?')) {
|
||||
|
||||
Reference in New Issue
Block a user