diff --git a/locales/en.json b/locales/en.json index b19089e..8b2574a 100644 --- a/locales/en.json +++ b/locales/en.json @@ -107,5 +107,8 @@ "Night Theme": "Night Theme", "Follow us on %s and %s.": "Follow us on %s, and %s.", "Privacy": "Privacy", - "Terms of Use": "Terms of Use" -} \ No newline at end of file + "Terms of Use": "Terms of Use", + "Do you really want to delete your user account?": "Do you really want to delete your user account?", + "This will delete your account, all notes that are owned by you and remove all references to your account from other notes.": "This will delete your account, all notes that are owned by you and remove all references to your account from other notes.", + "Delete user": "Delete user" +} diff --git a/public/js/cover.js b/public/js/cover.js index c9c2b6c..2a09b4c 100644 --- a/public/js/cover.js +++ b/public/js/cover.js @@ -39,7 +39,7 @@ const options = { '' + '
' + '
' + - '
' + + '
' + '
' + '

' + '

' + @@ -208,8 +208,8 @@ function historyCloseClick (e) { e.preventDefault() const id = $(this).closest('a').siblings('span').html() const value = historyList.get('id', id)[0]._values - $('.ui-delete-modal-msg').text('Do you really want to delete below history?') - $('.ui-delete-modal-item').html(` ${value.text}
${value.time}`) + $('.ui-delete-history-modal-msg').text('Do you really want to delete below history?') + $('.ui-delete-history-modal-item').html(` ${value.text}
${value.time}`) clearHistory = false deleteId = id } @@ -277,7 +277,7 @@ function deleteHistory () { checkHistoryList() } } - $('.delete-modal').modal('hide') + $('.delete-history-modal').modal('hide') deleteId = null clearHistory = false }) @@ -297,12 +297,12 @@ function deleteHistory () { deleteId = null }) } - $('.delete-modal').modal('hide') + $('.delete-history-modal').modal('hide') clearHistory = false }) } -$('.ui-delete-modal-confirm').click(() => { +$('.ui-delete-history-modal-confirm').click(() => { deleteHistory() }) @@ -342,8 +342,8 @@ $('.ui-open-history').bind('change', e => { }) $('.ui-clear-history').click(() => { - $('.ui-delete-modal-msg').text('Do you really want to clear all history?') - $('.ui-delete-modal-item').html('There is no turning back.') + $('.ui-delete-history-modal-msg').text('Do you really want to clear all history?') + $('.ui-delete-history-modal-item').html('There is no turning back.') clearHistory = true deleteId = null }) @@ -371,6 +371,10 @@ $('.ui-refresh-history').click(() => { }) }) +$('.ui-delete-user-modal-cancel').click(() => { + $('.ui-delete-user').parent().removeClass('active') +}) + $('.ui-logout').click(() => { clearLoginState() location.href = `${serverurl}/logout` diff --git a/public/views/index/body.ejs b/public/views/index/body.ejs index e3a3a85..d435054 100644 --- a/public/views/index/body.ejs +++ b/public/views/index/body.ejs @@ -27,6 +27,7 @@

@@ -108,7 +109,7 @@ - + @@ -157,8 +158,8 @@
- -