Skip to content

Commit

Permalink
Merge pull request #435 from dfpc-coe/ShareSearch
Browse files Browse the repository at this point in the history
Migrate Share to TS
  • Loading branch information
ingalls authored Dec 2, 2024
2 parents 0d2a272 + b5c9385 commit adb694e
Show file tree
Hide file tree
Showing 7 changed files with 148 additions and 143 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/s3.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ jobs:

- name: NPM Build
working-directory: ./api/web/
run: API_URL='${{ secrets[matrix.api_url] }}' npm run build
run: API_URL='${{ secrets[matrix.api_url] }}' npm run builds3

- name: AWS S3 CP
working-directory: ./api/web/
Expand All @@ -75,7 +75,7 @@ jobs:

- name: NPM Build
working-directory: ./api/web/
run: API_URL='${{ secrets[matrix.staging_api_url] }}' npm run build
run: API_URL='${{ secrets[matrix.staging_api_url] }}' npm run builds3

- name: AWS S3 CP
working-directory: ./api/web/
Expand Down
1 change: 1 addition & 0 deletions api/web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"typegen": "openapi-typescript http://localhost:5001/api/swagger --output src/derived-types.d.ts",
"check": "vue-tsc",
"build": "vite build",
"builds3": "VITE_MODE=s3 vite build",
"lint": "eslint ./src/"
},
"dependencies": {
Expand Down
10 changes: 5 additions & 5 deletions api/web/src/components/CloudTAK/Menu/Package.vue
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
v-else-if='error'
:err='error'
/>
<template v-else-if='mode === "share"'>
<template v-else-if='mode === "share" && shareFeat'>
<div class='overflow-auto'>
<Share
:feats='[shareFeat]'
Expand Down Expand Up @@ -99,7 +99,7 @@
<script setup lang='ts'>
import { ref, computed, watch, onMounted } from 'vue';
import { useRouter, useRoute } from 'vue-router';
import type { Server, Package, Import } from '../../../../src/types.ts';
import type { Server, Package, Import, Feature } from '../../../../src/types.ts';
import { std, stdurl } from '../../../../src/std.ts';
import Share from '../util/Share.vue';
import timeDiff from '../../../timediff.ts';
Expand Down Expand Up @@ -132,8 +132,8 @@ watch(route, async () => {
const profile = profileStore.profile;
const shareFeat = computed(() => {
if (!profile || !pkg.value || !server.value) return
const shareFeat = computed<Feature | undefined>(() => {
if (!profile || !pkg.value || !server.value) return;
return {
type: 'Feature',
Expand All @@ -155,7 +155,7 @@ const shareFeat = computed(() => {
type: 'Point',
coordinates: [0, 0, 0]
}
}
} as Feature;
});
Expand Down
14 changes: 6 additions & 8 deletions api/web/src/components/CloudTAK/util/SelectFeats.vue
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
v-for='select in selected.values()'
class='col-12'
>
<Feature
<DisplayFeature
:feature='select'
delete-action='emit'
@delete='selected.delete(select.properties.id)'
Expand Down Expand Up @@ -136,7 +136,8 @@

<script setup lang='ts'>
import { ref } from 'vue';
import Feature from './Feature.vue';
import DisplayFeature from './Feature.vue';
import type { Feature } from '../../../../src/types.ts';
import { useCOTStore } from '../../../../src/stores/cots.ts';
import {
IconPackageExport,
Expand All @@ -158,12 +159,9 @@ import ShareToPackage from './ShareToPackage.vue';
const cotStore = useCOTStore();
const props = defineProps({
selected: {
type: Object,
required: true
}
});
const props = defineProps<{
selected: Map<string, Feature>
}>();
enum ShareType {
NONE = 'none',
Expand Down
Loading

0 comments on commit adb694e

Please sign in to comment.