diff --git a/solara/lib/core/dashboard/brand/BrandView.js b/solara/lib/core/dashboard/brand/BrandView.js
index 2ea4eef..cdd261b 100644
--- a/solara/lib/core/dashboard/brand/BrandView.js
+++ b/solara/lib/core/dashboard/brand/BrandView.js
@@ -1,4 +1,5 @@
import {DataSource} from './BrandModel.js';
+import '../component/onboard_bottom_sheet/OnboardBottomSheet.js';
class BrandView {
constructor(model) {
@@ -15,6 +16,8 @@ class BrandView {
this.uploadBrandBtn = document.getElementById('uploadBrandBtn');
this.addNewBrandBtn = document.getElementById('newBrandBtn');
+ this.onboardSheet = document.getElementById('onboardBottomSheet');
+
this.initializeApp();
}
@@ -33,7 +36,9 @@ class BrandView {
this.toggleAddBrandContainer(true);
this.addNewBrandBtn.addEventListener('click', async () => {
- await this.addNewBrand('TODO', 'TODO');
+ this.showOnboardBrandForm((key, name) => {
+ this.addNewBrand(key, name)
+ })
});
this.uploadBrandBtn.addEventListener('click', async () => {
@@ -41,7 +46,9 @@ class BrandView {
const dirHandle = await window.showDirectoryPicker();
const sections = await this.createBrandSectionsFromFolder(dirHandle);
- await this.addBrand(dirHandle.name, "TODO", sections)
+ this.showOnboardBrandForm((key, name) => {
+ this.addBrand(key, name, sections)
+ })
} catch (error) {
console.error('Error:', error);
}
@@ -54,7 +61,6 @@ class BrandView {
await this.addBrand(key, name, sections)
}
-
async addBrand(key, name, sections) {
// TODO: remove later
const json = JSON.stringify(sections, null, 2);
@@ -417,6 +423,15 @@ class BrandView {
setOnDeleteFieldHandler(handler) {
this.onDeleteField = handler;
}
+
+ showOnboardBrandForm(onSubmit) {
+ this.onboardSheet.show(onSubmit);
+ }
+
+ async hideOnboardBrandForm() {
+ this.onboardSheet.hide();
+ }
+
}
export default BrandView;
\ No newline at end of file
diff --git a/solara/lib/core/dashboard/brand/brand.html b/solara/lib/core/dashboard/brand/brand.html
index 0f02227..e8d9805 100644
--- a/solara/lib/core/dashboard/brand/brand.html
+++ b/solara/lib/core/dashboard/brand/brand.html
@@ -541,7 +541,7 @@
padding: 40px;
border-radius: 20px;
box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
- z-index: 1001;
+ z-index: 1000;
animation: fadeIn 0.5s ease-out;
display: none;
}
@@ -605,6 +605,8 @@
+
+