Skip to content

Commit

Permalink
minor (#140): added export file button to dropwdown menu
Browse files Browse the repository at this point in the history
  • Loading branch information
LisaPich committed Jun 6, 2024
1 parent 7c56472 commit 3e7f8a5
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,12 @@ async function handleSaveButtonClick() {
}
}
async function handleExportButtonClick() {
overlayStateStore.setExportView(true)
closeDropdown()
}
async function handleNewFileButtonClick() {
closeDropdown()
showDummyLoading()
Expand All @@ -80,6 +86,7 @@ async function handleNewFileButtonClick() {
</template>
<div id="dropdown-elements">
<div class="dropdown-element" @click="handleNewFileButtonClick()">New File</div>
<div class="dropdown-element" @click="handleExportButtonClick()">Export File</div>
<div class="dropdown-element" @click="handleSaveButtonClick()">Save in profile</div>
<div class="dropdown-element" @click="handleJoinChannel()">Channels</div>
<div class="dropdown-element">Settings (In work...)</div>
Expand Down
6 changes: 6 additions & 0 deletions solardoc/frontend/src/stores/overlay-state.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ export const useOverlayStateStore = defineStore('fullScreenPreview', {
fullScreenPreview: false,
channelView: false,
createShareUrl: false,
exportView: false,
}
},
actions: {
Expand All @@ -21,10 +22,15 @@ export const useOverlayStateStore = defineStore('fullScreenPreview', {
this.resetAll()
this.createShareUrl = createShareUrl
},
setExportView(exportView: boolean) {
this.resetAll()
this.exportView = exportView
},
resetAll() {
this.channelView = false
this.createShareUrl = false
this.fullScreenPreview = false
this.exportView = false
},
},
})
2 changes: 2 additions & 0 deletions solardoc/frontend/src/views/EditorView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import LoadAnywayButton from '@/components/LoadAnywayButton.vue'
import EditorSandwichDropdown from '@/components/editor/dropdown/EditorSandwichDropdown.vue'
import ChannelView from '@/components/editor/channel-view/ChannelView.vue'
import ShareUrlCreate from '@/components/editor/share-url/ShareUrlCreate.vue'
import Export from "@/components/editor/export/Export.vue";
import * as backendAPI from '@/services/render/api-service'
import * as phoenixBackend from '@/services/phoenix/api-service'
import { SDSCLIENT_URL } from '@/services/phoenix/config'
Expand Down Expand Up @@ -130,6 +131,7 @@ setInterval(updateLastModified, 500)
<ShareUrlCreate />
<ChannelView />
<FullScreenPreview />
<Export />
<div id="editor-page">
<div id="menu">
<div id="menu-left-side">
Expand Down

0 comments on commit 3e7f8a5

Please sign in to comment.