Skip to content

Commit

Permalink
Fixed to Env Editor
Browse files Browse the repository at this point in the history
  • Loading branch information
ingalls committed Dec 9, 2024
1 parent ea0ec3b commit ec569ad
Show file tree
Hide file tree
Showing 7 changed files with 56 additions and 62 deletions.
20 changes: 10 additions & 10 deletions api/web/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions api/web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"@sinclair/typebox": "^0.34.0",
"@tabler/core": "^1.0.0-beta16",
"@tabler/icons-vue": "^3.0.0",
"@tak-ps/vue-tabler": "^3.60.2",
"@tak-ps/vue-tabler": "^3.61.1",
"@turf/bbox": "^7.1.0",
"@turf/boolean-point-in-polygon": "^7.1.0",
"@turf/boolean-touches": "^7.1.0",
Expand All @@ -29,7 +29,7 @@
"dropzone": "^6.0.0-beta.2",
"floating-vue": "^2.0.0-beta.17",
"jsonata": "^2.0.4",
"maplibre-gl": "^5.0.0-pre.8",
"maplibre-gl": "^5.0.0-pre.9",
"moment": "^2.29.3",
"p12-pem": "^1.0.5",
"phone": "^3.1.42",
Expand Down
5 changes: 4 additions & 1 deletion api/web/src/components/Connection.vue
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,10 @@
<div class='row row-deck row-cards'>
<div class='col-lg-12'>
<div class='card'>
<TablerLoading v-if='loading.connection' />
<TablerLoading
v-if='loading.connection'
class='text-white'
/>
<template v-else>
<div class='card-header'>
<ConnectionStatus :connection='connection' />
Expand Down
1 change: 1 addition & 0 deletions api/web/src/components/Data.vue
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@

<TablerLoading
v-if='loading.data'
class='text-white'
desc='Loading Data'
/>
<div
Expand Down
1 change: 1 addition & 0 deletions api/web/src/components/Layer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@

<TablerLoading
v-if='loading.layer'
class='text-white'
desc='Loading Layer'
/>
<div
Expand Down
6 changes: 3 additions & 3 deletions api/web/src/components/Layer/LayerEnvironment.vue
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
class='cursor-pointer'
@click='raw = true'
/>
<IconSettings
<IconPencil
:size='32'
:stroke='1'
class='cursor-pointer'
Expand Down Expand Up @@ -130,7 +130,7 @@ import Schema from './utils/Schema.vue';
import {
IconX,
IconCode,
IconSettings,
IconPencil,
} from '@tabler/icons-vue'
export default {
Expand All @@ -139,7 +139,7 @@ export default {
Schema,
IconCode,
IconX,
IconSettings,
IconPencil,
TablerTimeZone,
TablerAlert,
TablerLoading,
Expand Down
81 changes: 35 additions & 46 deletions api/web/src/components/Layer/utils/SchemaModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,20 @@
type='button'
class='btn-close'
aria-label='Close'
@click='$emit("close")'
@click='emit("close")'
/>
<div class='modal-status bg-yellow' />
<div class='modal-header'>
<span class='modal-title'>Row Editor</span>
<TablerDelete
v-if='!disabled'
displaytype='icon'
@delete='$emit("remove")'
/>
<div class='ms-auto'>
<TablerDelete
v-if='!disabled'
displaytype='icon'
@delete='emit("remove")'
/>
</div>
</div>
<div
v-if='!loading'
class='modal-body py-4'
>
<div class='modal-body py-4' >
<TablerSchema
v-model='row'
:schema='schema'
Expand All @@ -28,56 +27,46 @@
<button
v-if='!disabled'
class='btn btn-primary w-100 mt-4'
@click='$emit("done", row)'
@click='emit("done", row)'
>
Done
</button>
</div>
</TablerModal>
</template>

<script>
<script setup>
import { ref, onMounted } from 'vue';
import {
TablerModal,
TablerSchema,
TablerDelete
} from '@tak-ps/vue-tabler';
export default {
name: 'LayerEnvironmentModal',
components: {
TablerModal,
TablerDelete,
TablerSchema
const props = defineProps({
edit: {
type: Object,
required: true
},
props: {
edit: {
type: Object,
required: true
},
disabled: {
type: Boolean,
default: true
},
schema: {
type: Object,
required: true
},
disabled: {
type: Boolean,
default: true
},
emits: [
'close',
'remove',
'done'
],
data: function() {
return {
loading: true,
row: {}
}
schema: {
type: Object,
required: true
},
mounted: function() {
this.row = Object.assign(this.row, JSON.parse(JSON.stringify(this.edit)));
this.loading = false;
}
}
});
const emit = defineEmits([
'close',
'remove',
'done'
]);
const row = ref({});
onMounted(() => {
row.value = Object.assign(row.value, JSON.parse(JSON.stringify(props.edit)));
})
</script>

0 comments on commit ec569ad

Please sign in to comment.