Skip to content

Commit

Permalink
feat: config store and management (#548)
Browse files Browse the repository at this point in the history
* config store and management

* creating root output dir
  • Loading branch information
akosbalasko authored Dec 26, 2023
1 parent 1a3b53e commit 49cd956
Show file tree
Hide file tree
Showing 10 changed files with 142 additions and 68 deletions.
58 changes: 19 additions & 39 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions src/ui/assets/css/demo.css
Original file line number Diff line number Diff line change
Expand Up @@ -253,3 +253,9 @@
.fixed-plugin ul > li:last-child a{
margin-bottom: 15px;
}

.flex-center {
flex-direction: column;
display: flex;
align-items: center;
}
6 changes: 4 additions & 2 deletions src/ui/assets/js/dialog.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ ipcRenderer.on('defaultTemplateLoaded', (event, store) => {
ipcRenderer.on('logSeqModeSelected', (event, config, template) => {

const flatConfig = flatten(JSON.parse(config));
flatConfig.replacementCharacterMap = config.replacementCharacterMap
flatConfig.currentTemplate = template;
updateDomByFlatConfig(flatConfig, true);
document.getElementById('currentTemplate').disabled = false;
Expand All @@ -89,6 +90,8 @@ ipcRenderer.on('logSeqModeSelected', (event, config, template) => {
ipcRenderer.on('logSeqModeDeselected', (event, config, template) => {

const flatConfig = flatten(JSON.parse(config));
flatConfig.replacementCharacterMap = config.replacementCharacterMap

updateDomByFlatConfig(flatConfig, false);
document.getElementById('currentTemplate').value = template;

Expand All @@ -99,7 +102,6 @@ ipcRenderer.on('logSeqModeDeselected', (event, config, template) => {
updateConfigStore('currentTemplate', template);
});


window.dialog = window.dialog || {},
function(n) {

Expand Down Expand Up @@ -141,7 +143,7 @@ function(n) {
$('#selectOutputFolder').click( function () {
ipcRenderer.send('selectOutputFolder');
});

$('#showErrorBox').click( function () {
dialog.handler.showErrorBox();
})
Expand Down
Loading

0 comments on commit 49cd956

Please sign in to comment.