Skip to content

Commit

Permalink
Fix Build
Browse files Browse the repository at this point in the history
  • Loading branch information
ingalls committed Sep 21, 2024
1 parent 3a8733c commit 1dc7480
Show file tree
Hide file tree
Showing 6 changed files with 40 additions and 28 deletions.
15 changes: 9 additions & 6 deletions api/web/src/components/Admin/AdminOverlaysEdit.vue
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,10 @@
class='px-2'
>
<TablerLoading v-if='loading' />
<div v-else class='row'>
<div
v-else
class='row'
>
<div class='col-12'>
<TablerInput
v-model='overlay.name'
Expand Down Expand Up @@ -43,11 +46,11 @@
/>
</div>
<div class='col-12 col-md-6'>
<TablerEnum
v-model='overlay.format'
label='Overlay Format'
:options='["png", "jpeg", "mvt"]'
/>
<TablerEnum
v-model='overlay.format'
label='Overlay Format'
:options='["png", "jpeg", "mvt"]'
/>
</div>
<div class='col-12'>
<TablerInput
Expand Down
2 changes: 1 addition & 1 deletion api/web/src/components/CloudTAK/CoTView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -286,8 +286,8 @@
<CoTVideo
v-if='viewer'
class='my-2 mx-2'
@close='viewer = false'
:video='feat.properties.video.url'
@close='viewer = false'
/>

<div class='table-responsive rounded mx-2 py-2 px-2'>
Expand Down
24 changes: 12 additions & 12 deletions api/web/src/components/CloudTAK/Menu/OverlayExplorer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@
<div
v-for='ov in list.items'
:key='ov.id'
@click='createOverlay(ov)'
class='cursor-pointer col-12 py-2 px-3 hover-dark'
@click='createOverlay(ov)'
>
<div class='col-12 py-2 px-2 d-flex align-items-center'>
<span
Expand Down Expand Up @@ -62,17 +62,6 @@ export default {
TablerLoading,
MenuTemplate
},
mounted: async function() {
await this.fetchList();
},
watch: {
paging: {
deep: true,
handler: async function() {
await this.fetchList();
},
}
},
data: function() {
return {
loading: false,
Expand All @@ -87,6 +76,17 @@ export default {
}
}
},
watch: {
paging: {
deep: true,
handler: async function() {
await this.fetchList();
},
}
},
mounted: async function() {
await this.fetchList();
},
methods: {
createOverlay: async function(overlay) {
this.loading = true;
Expand Down
2 changes: 1 addition & 1 deletion api/web/src/components/CloudTAK/Menu/Overlays.vue
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@
<TablerDelete
v-if='
opened.includes(overlay.id)
&& ["mission", "data", "profile", "overlay"].includes(overlay.mode)
&& ["mission", "data", "profile", "overlay"].includes(overlay.mode)
'
:key='overlay.id'
v-tooltip='"Delete Overlay"'
Expand Down
18 changes: 13 additions & 5 deletions api/web/src/components/CloudTAK/util/Video.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,18 @@
<div>
<TablerLoading v-if='loading' />
<template v-else-if='err'>
<TablerAlert title='Video Error' :err='err'/>
<TablerAlert
title='Video Error'
:err='err'
/>

<div class='d-flex justify-content-center'>
<button @click='$emit("close")' class='btn'>Close Player</button>
<button
class='btn'
@click='$emit("close")'
>
Close Player
</button>
</div>
</template>
<template v-else-if='!protocols || !protocols.hls'>
Expand Down Expand Up @@ -47,9 +55,6 @@ import {
export default defineComponent({
name: 'CoTVideo',
emits: [
'close'
],
components: {
TablerNone,
TablerAlert,
Expand All @@ -61,6 +66,9 @@ export default defineComponent({
required: true
}
},
emits: [
'close'
],
data: function(): {
loading: boolean,
err?: Error,
Expand Down
7 changes: 4 additions & 3 deletions api/web/src/stores/overlays/base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export default class Overlay {
mode: string;
mode_id: string | null;
url?: string;
styles: Array<any>;
styles: Array<LayerSpecification>;
token: string | null;

static async create(
Expand All @@ -53,8 +53,9 @@ export default class Overlay {

if (ov.styles && ov.styles.length) {
for (const layer of ov.styles) {
const l = layer as any;
const l = layer as LayerSpecification;
l.id = `${ov.id}-${l.id}`;
// @ts-expect-error Special case Background Layer type
l.source = String(ov.id);
}
}
Expand Down Expand Up @@ -127,7 +128,7 @@ export default class Overlay {
this.mode = overlay.mode;
this.mode_id = overlay.mode_id;
this.url = overlay.url;
this.styles = overlay.styles;
this.styles = overlay.styles as Array<LayerSpecification>;
this.token = overlay.token;

this.init(opts);
Expand Down

0 comments on commit 1dc7480

Please sign in to comment.