From fe6cb080450bd0bc285921f89ff81929b2be3a3a Mon Sep 17 00:00:00 2001 From: heapwolf Date: Sun, 24 Mar 2024 20:04:08 +0100 Subject: [PATCH] fix header buttons --- src/css/tonic-overrides.css | 1 - src/index.js | 18 +++++++++++++----- 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/src/css/tonic-overrides.css b/src/css/tonic-overrides.css index 6e2bb22..e7842f2 100644 --- a/src/css/tonic-overrides.css +++ b/src/css/tonic-overrides.css @@ -77,7 +77,6 @@ tonic-accordion-section .tonic--accordion-header button .tonic--label { tonic-accordion-section .tonic--accordion-header button[aria-expanded="true"] .tonic--label { text-decoration: underline; text-underline-offset: 2px; - color: var(--tonic-accent); } tonic-accordion-section .tonic--accordion-header button { diff --git a/src/index.js b/src/index.js index 2fe96e4..d5a98e4 100644 --- a/src/index.js +++ b/src/index.js @@ -425,6 +425,10 @@ class AppView extends Tonic { this.activatePreviewWindows() } + async addSharedProject () { + const coDialogSubscribe = document.querySelector('dialog-subscribe') + if (coDialogSubscribe) coDialogSubscribe.show() + } async createProject () { const dest = path.join(path.DATA, 'projects', 'new-project') @@ -597,8 +601,7 @@ class AppView extends Tonic { } case 'Add Shared Project': { - const coDialogSubscribe = document.querySelector('dialog-subscribe') - if (coDialogSubscribe) coDialogSubscribe.show() + this.addSharedProject() break } @@ -675,7 +678,12 @@ class AppView extends Tonic { this.exportProject() } - if (event === 'publish') { + if (event === 'create-new-project') { + this.createProject() + } + + if (event === 'add-shared-project') { + this.addSharedProject() } } @@ -697,9 +705,9 @@ class AppView extends Tonic {
- + - +