Skip to content

Commit

Permalink
Fix notifications & themes
Browse files Browse the repository at this point in the history
  • Loading branch information
amanharwara committed Apr 7, 2020
1 parent 9055b37 commit 5987204
Show file tree
Hide file tree
Showing 6 changed files with 2,052 additions and 1,398 deletions.
9 changes: 8 additions & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,14 @@ function getDarkTheme(createThemesList) {
}
})
.then(css => {
createThemesList(css.replace(/\/\*(.*\n)+\n@.*\{/gim, ''))
css = `
.app {
width: 100% !important;
border-radius: 0 !important;
border: 0 !important;
}
` + css;
createThemesList(css.replace(/\@.*\{/gim, ''))
})
.catch(e => {
dialog.showErrorBox('Error: Base Dark Theme Not Loaded (No Internet Connection)', e);
Expand Down
2 changes: 1 addition & 1 deletion src/windows/customTheme/customTheme.js
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ document.querySelector('#customizeraddbutton').addEventListener('click', () => {
let name = document.querySelector('#customizer-theme-name').value || 'New Theme';

// Generate new custom theme css
let css = generateCustomCSS(baseTheme.replace(/\/\*(.*\n)+\n@.*\{/gim, '').replace("#2f343d", 'var(--darken)').replace("#383d46", 'var(--darken)'), mainBG, secBG, terBG, mainText, secText, accentColor, shadowColor, emojiOpacity);
let css = generateCustomCSS(baseTheme.replace(/\@.*\{/gim, '').replace("#2f343d", 'var(--darken)').replace("#383d46", 'var(--darken)'), mainBG, secBG, terBG, mainText, secText, accentColor, shadowColor, emojiOpacity);

// Get themes list as array
let themesList = Array.from(themes.get('themes'));
Expand Down
6 changes: 3 additions & 3 deletions src/windows/main/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ document.querySelector('#add-tab-button').addEventListener('click', e => {
* Run code after DOM has loaded
*/
document.addEventListener('DOMContentLoaded', e => {
setTabBarVisibility(settings.get('settings').find(s=>s.id==='tabBar').value);
setTabBarVisibility(settings.get('settings').find(s => s.id === 'tabBar').value);
});

/**
Expand Down Expand Up @@ -549,11 +549,11 @@ function getActiveTab() {
}
}

ipcRenderer.on('switch-to-add', e=>{
ipcRenderer.on('switch-to-add', e => {
tabs.toggle('#addtab');
});

ipcRenderer.on('set-tabbar', (e,t)=>{
ipcRenderer.on('set-tabbar', (e, t) => {
setTabBarVisibility(t);
});

Expand Down
Loading

0 comments on commit 5987204

Please sign in to comment.