import export buttons added. see #65

This commit is contained in:
mic 2024-07-14 19:04:18 +02:00
parent 6e6d4abe60
commit d3e6a7d65e
3 changed files with 32 additions and 0 deletions

View file

@ -169,4 +169,10 @@ table .sort.desc {
#txtIdNew, .id_output{
text-transform: lowercase;
}
#import_export{
position: absolute;
right:10px;
top:10px;
}

View file

@ -11,6 +11,10 @@
<p>__MSG_customPrompts_managePrompts_info_default__
<br><a href="https://micz.it/thunderbird-addon-thunderai/custom-prompts/">__MSG_customPrompts_managePrompts_help__</a></p>
</div>
<div id="import_export">
<button id="btnExportAll">__MSG_customPrompts_ExportAll__</button><br>
<button id="btnImport">__MSG_customPrompts_Import__</button>
</div>
<div id="command_palette">
<button id="btnSaveAll" disabled>__MSG_customPrompts_btnSaveAll__</button>
<span id="msgDisplay"></span>

View file

@ -367,6 +367,28 @@ document.addEventListener('DOMContentLoaded', async () => {
});
});
//Import Export
const btnExportAll = document.getElementById('btnExportAll');
btnExportAll.addEventListener('click', (e) => {
e.preventDefault();
exportPrompts();
});
function exportPrompts() {
alert("test export all");
}
const btnImport = document.getElementById('btnImport');
btnImport.addEventListener('click', (e) => {
e.preventDefault();
importPrompts();
});
function importPrompts() {
alert("test import");
}
}, { once: true });