Skip to content

Commit

Permalink
import export buttons added. see #65
Browse files Browse the repository at this point in the history
  • Loading branch information
micz committed Jul 14, 2024
1 parent 6e6d4ab commit d3e6a7d
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 0 deletions.
6 changes: 6 additions & 0 deletions customprompts/mzta-custom-prompts.css
Original file line number Diff line number Diff line change
Expand Up @@ -169,4 +169,10 @@ table .sort.desc {

#txtIdNew, .id_output{
text-transform: lowercase;
}

#import_export{
position: absolute;
right:10px;
top:10px;
}
4 changes: 4 additions & 0 deletions customprompts/mzta-custom-prompts.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ <h1>__MSG_customPrompts_managePrompts__</h1>
<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>
Expand Down
22 changes: 22 additions & 0 deletions customprompts/mzta-custom-prompts.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 });


Expand Down

0 comments on commit d3e6a7d

Please sign in to comment.