Skip to content

Commit

Permalink
Fullscreen for batch job and other panels #340
Browse files Browse the repository at this point in the history
  • Loading branch information
m-mohr committed Jan 15, 2025
1 parent 88f87c9 commit fa88c3e
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 4 deletions.
3 changes: 3 additions & 0 deletions src/components/CustomProcessPanel.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
<template slot="toolbar">
<AsyncButton title="Store the process in the process editor on the server" :fn="addProcessFromScript" v-show="supportsCreate" :disabled="!this.hasProcess" fa confirm icon="fas fa-plus">Add</AsyncButton>
<SyncButton v-if="supportsList" :name="plualizedName" :sync="reloadData" />
<FullscreenButton :element="() => this.$el" />
</template>
<template #actions="p">
<AsyncButton title="Show details about this process" :fn="() => processInfo(p.row)" v-show="supportsRead" fa icon="fas fa-info"></AsyncButton>
Expand All @@ -15,6 +16,7 @@
<script>
import EventBusMixin from './EventBusMixin';
import WorkPanelMixin from './WorkPanelMixin';
import FullscreenButton from './FullscreenButton.vue';
import SyncButton from './SyncButton.vue';
import AsyncButton from '@openeo/vue-components/components/internal/AsyncButton.vue';
import Utils from '../utils.js';
Expand All @@ -25,6 +27,7 @@ export default {
mixins: [WorkPanelMixin('userProcesses', 'custom process', 'custom processes', false), EventBusMixin],
components: {
AsyncButton,
FullscreenButton,
SyncButton
},
data() {
Expand Down
3 changes: 3 additions & 0 deletions src/components/FilePanel.vue
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
</div>
</div>
<SyncButton v-if="supportsList" :name="plualizedName" :sync="reloadData" />
<FullscreenButton :element="() => this.$el" />
</template>
<template #actions="p">
<AsyncButton title="Download this file to your computer" :fn="() => downloadFile(p.row)" v-show="supportsRead" fa icon="fas fa-download"></AsyncButton>
Expand All @@ -22,6 +23,7 @@
<script>
import WorkPanelMixin from './WorkPanelMixin';
import AsyncButton from '@openeo/vue-components/components/internal/AsyncButton.vue';
import FullscreenButton from './FullscreenButton.vue';
import SyncButton from './SyncButton.vue';
import Utils from '../utils.js';
Expand All @@ -30,6 +32,7 @@ export default {
mixins: [WorkPanelMixin('files', 'file', 'files')],
components: {
AsyncButton,
FullscreenButton,
SyncButton
},
data() {
Expand Down
8 changes: 4 additions & 4 deletions src/components/FullscreenButton.vue
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,13 @@ export default {
el.addEventListener('keydown', this.keyDownFn);
}
},
beforeDestroy() {
beforeDestroy() {
let el = this.getElement();
if (el) {
el.removeEventListener('keydown', this.keyDownFn);
}
},
computed: {
},
computed: {
...Utils.mapState('editor', ['hightestModalZIndex'])
},
methods: {
Expand All @@ -52,7 +52,7 @@ export default {
this.toggleFullscreen();
e.preventDefault();
e.stopPropagation();
}
}
},
getElement() {
if (typeof this.element === 'string') {
Expand Down
3 changes: 3 additions & 0 deletions src/components/JobPanel.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
<AsyncButton title="Create a new job from the process in the process editor for batch processing" :fn="createJobFromScript" v-show="supportsCreate" :disabled="!this.hasProcess" fa confirm icon="fas fa-plus">Create Batch Job</AsyncButton>
<AsyncButton title="Run the process in the process editor directly and view the results without storing them permanently" :fn="executeProcess" v-show="supports('computeResult')" :disabled="!this.hasProcess" fa confirm icon="fas fa-play">Run now</AsyncButton>
<SyncButton v-if="supportsList" :name="plualizedName" :sync="reloadData" />
<FullscreenButton :element="() => this.$el" />
</template>
<template #actions="p">
<AsyncButton title="Show details about this job" :fn="() => showJobInfo(p.row)" v-show="supportsRead" fa icon="fas fa-info"></AsyncButton>
Expand All @@ -25,6 +26,7 @@
import EventBusMixin from './EventBusMixin';
import WorkPanelMixin from './WorkPanelMixin';
import SyncButton from './SyncButton.vue';
import FullscreenButton from './FullscreenButton.vue';
import AsyncButton from '@openeo/vue-components/components/internal/AsyncButton.vue';
import Utils from '../utils.js';
import { Job } from '@openeo/js-client';
Expand All @@ -43,6 +45,7 @@ export default {
],
components: {
AsyncButton,
FullscreenButton,
SyncButton
},
data() {
Expand Down
3 changes: 3 additions & 0 deletions src/components/ServicePanel.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
<AsyncButton title="Create a new permanent service from the process in the process editor" :fn="createServiceFromScript" v-show="supportsCreate" :disabled="!this.hasProcess" fa confirm icon="fas fa-plus">Create</AsyncButton>
<AsyncButton title="Quickly show the process on map without storing it permanently" :fn="quickViewServiceFromScript" v-show="supportsQuickView" :disabled="!this.hasProcess" fa confirm icon="fas fa-map">Show on Map</AsyncButton>
<SyncButton v-if="supportsList" :name="plualizedName" :sync="reloadData" />
<FullscreenButton :element="() => this.$el" />
</template>
<template #actions="p">
<AsyncButton title="Show details about this service" :fn="() => serviceInfo(p.row)" v-show="supportsRead" fa icon="fas fa-info"></AsyncButton>
Expand All @@ -22,6 +23,7 @@ import EventBusMixin from './EventBusMixin';
import WorkPanelMixin from './WorkPanelMixin';
import FieldMixin from './FieldMixin';
import AsyncButton from '@openeo/vue-components/components/internal/AsyncButton.vue';
import FullscreenButton from './FullscreenButton.vue';
import SyncButton from './SyncButton.vue';
import Utils from '../utils';
import { Service } from '@openeo/js-client';
Expand All @@ -36,6 +38,7 @@ export default {
],
components: {
AsyncButton,
FullscreenButton,
SyncButton
},
data() {
Expand Down

0 comments on commit fa88c3e

Please sign in to comment.