Browse Source

put project buttons in dropdown-menu

Martin Kunz 10 months ago
parent
commit
ce4acffd46
2 changed files with 13 additions and 4 deletions
  1. 11 4
      src/components/TheModels.vue
  2. 2 0
      src/main.ts

+ 11 - 4
src/components/TheModels.vue

@@ -108,10 +108,17 @@ async function  loadZip(file: File){
       <div class="card-body" v-if="store.addressSpace">
         <div class="d-flex justify-content-between align-items-center mb-3">
           <h5 class="card-title d-inline">Models</h5>
-          <div class="btn-group">
-            <button class="btn btn-light" @click="serverConfigOpen = true">Settings</button>
-            <button class="btn btn-light" @click.prevent="exportProject()">Export</button>
-            <button class="btn btn-light" @click="newProjectOpen = true">New</button>
+          <div class="dropdown">
+            <button class="btn btn-secondary dropdown-toggle"
+                    type="button"
+                    data-bs-toggle="dropdown"
+                    aria-expanded="false">Project
+            </button>
+            <ul class="dropdown-menu">
+              <li><a class="dropdown-item" href="#" @click="serverConfigOpen = true">Edit Settings</a></li>
+              <li><a class="dropdown-item" href="#" @click.prevent="exportProject()">Export Project</a></li>
+              <li><a class="dropdown-item" href="#" @click="newProjectOpen = true">New Project</a></li>
+            </ul>
           </div>
         </div>
         <p class="card-text">

+ 2 - 0
src/main.ts

@@ -5,6 +5,8 @@ import App from './App.vue'
 import { createPinia } from 'pinia'
 import { install as VueMonacoEditorPlugin } from '@guolao/vue-monaco-editor'
 import 'bootstrap/dist/css/bootstrap.min.css'
+import 'bootstrap/dist/js/bootstrap'
+
 
 const app = createApp(App)
 const pinia = createPinia()