feat(pad-settings): added possibility to delete pad by the creator

This commit is contained in:
SamTV12345 2024-10-28 21:52:25 +01:00
parent ac4489875f
commit 4939831f0d
10 changed files with 84 additions and 15 deletions

View file

@ -75,11 +75,20 @@ const padeditor = (() => {
padutils.setCheckbox($('#options-rtlcheck'), ('rtl' === html10n.getDirection()));
});
// font family change
$('#viewfontmenu').on('change', () => {
pad.changeViewOption('padFontFamily', $('#viewfontmenu').val());
});
// delete pad
$('#delete-pad').on('click', () => {
if (window.confirm(html10n.get('pad.delete.confirm'))) {
pad.collabClient.sendMessage({type: 'PAD_DELETE', data:{padId: pad.getPadId()}});
}
})
// Language
html10n.bind('localized', () => {
$('#languagemenu').val(html10n.getLanguage());