Skip to content

Commit

Permalink
Merge pull request #22 from ngageoint/develop
Browse files Browse the repository at this point in the history
1.6.1 cleanup
  • Loading branch information
jclark118 authored Oct 1, 2024
2 parents 7c33056 + 34cb738 commit bd564f1
Show file tree
Hide file tree
Showing 18 changed files with 104 additions and 52 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Software source code previously released under an open source license and then m

#### License

[License](LICENSE.md)
[License](LICENSE)

### Acknowledgements
Earth image
Expand Down
6 changes: 4 additions & 2 deletions src/lib/vue/vuetify/vuetify.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ const light = {
main_active_text: '#326482',
scroll_thumb: '#808285',
scroll_track: '#f5f5f5',
dark_background: '#f5f5f5'
dark_background: '#f5f5f5',
list_offset_background: '#ededed'
}
}

Expand All @@ -51,7 +52,8 @@ const dark = {
main_active_text: '#f5f5f5',
scroll_thumb: '#f5f5f5',
scroll_track: '#414042',
dark_background: '#f5f5f5'
dark_background: '#f5f5f5',
list_offset_background: '#2b2b2b'
}
}

Expand Down
6 changes: 3 additions & 3 deletions src/renderer/src/views/BaseMaps/BaseMaps.vue
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@
@click="(e) => item.zoomTo(e, project.id)"/>
</template>
<div class="ml-4">
<v-list-item-title :title="item.name" :style="{marginBottom: '0px'}" v-text="item.name"></v-list-item-title>
<v-list-item-subtitle v-if="item.type != null" v-text="item.type"></v-list-item-subtitle>
<v-list-item-subtitle v-if="item.subtitle != null" v-text="item.subtitle"></v-list-item-subtitle>
<v-list-item-title :title="item.name" :style="{marginBottom: '0px'}">{{ item.name }}</v-list-item-title>
<v-list-item-subtitle v-if="item.type != null">{{ item.type }}</v-list-item-subtitle>
<v-list-item-subtitle v-if="item.subtitle != null">{{ item.subtitle }}</v-list-item-subtitle>
<v-list-item-subtitle v-if="item.count != null">{{ item.count + ' features' }}</v-list-item-subtitle>
</div>
<template v-slot:append>
Expand Down
2 changes: 1 addition & 1 deletion src/renderer/src/views/Common/FeatureView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@
<div v-if="column.dataType === TEXT">
<div :style="{fontSize: '14px', fontWeight: '500', marginBottom: '0px'}">
<span v-if="featureViewData.feature.properties[column.name] != null && isHtml(featureViewData.feature.properties[column.name])" :class="column.showMore ? 'regular--text allowselect' : 'show-less-text regular--text allowselect'" v-html="$sanitize(featureViewData.feature.properties[column.name], transformHtml)"></span>
<span v-else :class="column.showMore ? 'regular--text allowselect' : 'show-less-text regular--text allowselect'" v-text="featureViewData.feature.properties[column.name]"></span>
<span v-else :class="column.showMore ? 'regular--text allowselect' : 'show-less-text regular--text allowselect'">{{ featureViewData.feature.properties[column.name] }}</span>
</div>
<div v-if="featureViewData.feature.properties[column.name] != null && featureViewData.feature.properties[column.name].length > 100 && column.showMore != null" class="show-more">
<span class="clickable-text" @click="column.showMore = !column.showMore ">{{column.showMore ? 'Show less...' : 'Show more...'}}</span>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,10 +100,8 @@
class="detail-bg sortable-list-item pt-3 pb-3"
@click="tableFields[column].click"
:prepend-icon="tableFields[column].icon">
<v-list-item-title :title="tableFields[column].name"
v-text="tableFields[column].name"></v-list-item-title>
<v-list-item-subtitle :title="tableFields[column].type"
v-text="tableFields[column].type"></v-list-item-subtitle>
<v-list-item-title :title="tableFields[column].name">{{ tableFields[column].name }}</v-list-item-title>
<v-list-item-subtitle :title="tableFields[column].type">{{ tableFields[column].type }}</v-list-item-subtitle>
<template v-slot:append>
<v-icon @click.stop.prevent class="sortHandle" icon="mdi-drag-horizontal-variant"/>
</template>
Expand Down
4 changes: 2 additions & 2 deletions src/renderer/src/views/Common/WMSLayerEditor.vue
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,11 @@
</template>
<div class="mr-4">
<div v-if="item.title">
<div class="list-item-title no-clamp" v-text="item.title"></div>
<div class="list-item-title no-clamp">{{ item.title }}</div>
</div>
<div v-if="item.subtitles && item.subtitles.length > 0">
<div class="list-item-subtitle no-clamp" v-for="(title, i) in item.subtitles"
:key="i + 'service-layer-title'" v-text="title"></div>
:key="i + 'service-layer-title'">{{ item.subtitles[i] }}</div>
</div>
</div>
<template v-slot:append>
Expand Down
4 changes: 2 additions & 2 deletions src/renderer/src/views/Common/WMTSLayerEditor.vue
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,11 @@
</template>
<div>
<div v-if="item.name">
<div class="list-item-title no-clamp" v-text="item.name"></div>
<div class="list-item-title no-clamp">{{ item.name }}</div>
</div>
<div v-if="item.subtitles && item.subtitles.length > 0">
<div class="list-item-subtitle no-clamp" v-for="(title, i) in item.subtitles"
:key="i + 'service-layer-title'" v-text="title"></div>
:key="i + 'service-layer-title'">{{ item.subtitles[i] }}</div>
</div>
</div>
<v-list-item-action>
Expand Down
8 changes: 4 additions & 4 deletions src/renderer/src/views/DataSources/AddDataSourceUrl.vue
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
<v-col>
<v-combobox
v-model="dataSourceUrl"
:search-input.sync="dataSourceUrl"
:search-input="dataSourceUrl"
:menu-props="menuProps"
:rules="dataSourceUrlRules"
clearable
Expand Down Expand Up @@ -189,14 +189,14 @@
:value="item"
@click="() => {item.active = !item.active}"
>
<template v-slot:default="{ active }">
<template v-slot:default>
<v-list-item-title>
<div v-if="item.title" >
<div class="list-item-title" v-text="item.title" :title="item.title"></div>
<div class="list-item-title" :title="item.title">{{ item.title }}</div>
</div>
<div v-if="item.subtitles && item.subtitles.length > 0">
<div class="list-item-subtitle no-clamp" v-for="(title, i) in item.subtitles"
:key="i + 'service-layer-title'" v-text="title" :title="title"></div>
:key="i + 'service-layer-title'" :title="title">{{ item.subtitles[i] }}</div>
</div>
</v-list-item-title>
</template>
Expand Down
6 changes: 3 additions & 3 deletions src/renderer/src/views/DataSources/DataSourceList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@
</v-btn>
</template>
<div class="pl-2">
<v-list-item-title :title="item.name" :style="{marginBottom: '0px', fontWeight: 500}" v-text="item.name"></v-list-item-title>
<v-list-item-subtitle v-if="item.type != null" v-text="item.type"></v-list-item-subtitle>
<v-list-item-subtitle v-if="item.subtitle != null" v-text="item.subtitle"></v-list-item-subtitle>
<v-list-item-title :title="item.name" :style="{marginBottom: '0px', fontWeight: 500}">{{ item.name }}</v-list-item-title>
<v-list-item-subtitle v-if="item.type != null">{{ item.type }}</v-list-item-subtitle>
<v-list-item-subtitle v-if="item.subtitle != null">{{ item.subtitle }}</v-list-item-subtitle>
<v-list-item-subtitle v-if="item.count != null">{{ item.count + ' features' }}</v-list-item-subtitle>
</div>
<template v-slot:append>
Expand Down
31 changes: 26 additions & 5 deletions src/renderer/src/views/FeatureTable/FeatureTable.vue
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
disable-pagination
:server-items-length="table.featureCount"
:loading="loading"
:page.sync="page"
:page="page"
class="elevation-1"
v-on:update:sort-by="handleSortUpdate"
v-on:update:sort-desc="handleDescendingSortUpdate"
Expand Down Expand Up @@ -79,10 +79,13 @@
<div class="ma=0 pa-0" v-if="column.key === 'attachments'">
{{ item.attachments > 0 ? item.attachments : null }}
</div>
<v-checkbox hide-details style="margin-left: -8px;" v-else-if="column.key === 'data-table-select'" @click="(e) => {
toggleSelect(item)
<v-checkbox-btn hide-details style="margin-left: -8px;" v-else-if="column.key === 'data-table-select'" @click="(e) => {
// Manual toggle due to undefined objects getting added
//toggleSelect(item)
this.toggleSelected(item)
e.stopPropagation()
}" :model-value="isSelected(item)"></v-checkbox>
}" :model-value="isSelected">
</v-checkbox-btn>
<div class="ma-0 pa-0 text-truncate" v-else>
{{item[column.key]}}
</div>
Expand Down Expand Up @@ -295,6 +298,21 @@ export default {
}
},
methods: {
toggleSelected(item){
const deproxiedItem = window.deproxy(item)
let found = false
for (let i = this.selected.length - 1; i >= 0; i--){
if(this.selected[i] != undefined){
if(this.selected[i].selectId == deproxiedItem.selectId){
found = true
this.selected.splice(i, 1)
}
}
}
if(!found){
this.selected.push(deproxiedItem)
}
},
clearSelectedItems () {
while (this.selected.length > 0) {
this.selected.pop()
Expand Down Expand Up @@ -398,6 +416,9 @@ export default {
},
async deleteSelected () {
this.loading = true
this.selected = this.selected.filter(function (element) {
return element != null
})
if (!isNil(this.selected) && this.selected.length > 0) {
const ids = this.selected.map(feature => feature.id)
if (this.isGeoPackage) {
Expand All @@ -422,7 +443,7 @@ export default {
},
handleClick (item) {
if (!this.removeDialog) {
this.showFeature(this.id, this.isGeoPackage, this.table.tableName, item.raw.id)
this.showFeature(this.id, this.isGeoPackage, this.table.tableName, item.id)
}
},
zoomTo (item) {
Expand Down
4 changes: 2 additions & 2 deletions src/renderer/src/views/GeoPackage/AddFeatureLayer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -172,8 +172,8 @@
</v-btn>
</template>
<div class="pa-0 ma-0 ml-4">
<v-list-item-title v-text="item.title"></v-list-item-title>
<v-list-item-subtitle v-if="item.subtitle" v-text="item.subtitle"></v-list-item-subtitle>
<v-list-item-title>{{ item.title }}</v-list-item-title>
<v-list-item-subtitle v-if="item.subtitle">{{ item.subtitle }}</v-list-item-subtitle>
</div>
<template v-slot:append class="sortHandle" style="vertical-align: middle !important;">
<v-icon @click.stop.prevent icon="mdi-drag-horizontal-variant"/>
Expand Down
19 changes: 9 additions & 10 deletions src/renderer/src/views/GeoPackage/AddTileLayer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@
</template>
<template v-slot:default="{ active }">
<div>
<v-list-item-title v-text="item.title" class="pl-3"></v-list-item-title>
<v-list-item-title class="pl-3">{{ item.title }}</v-list-item-title>
</div>
<v-list-item-action>
<source-visibility-switch class="pl-4" :model-value="active" :project-id="project.id"
Expand Down Expand Up @@ -148,8 +148,8 @@
</template>
<template v-slot:default="{ active }">
<div>
<v-list-item-title v-text="item.title" class="pl-3"></v-list-item-title>
<v-list-item-subtitle v-text="item.subtitle" class="pl-3"></v-list-item-subtitle>
<v-list-item-title class="pl-3">{{ item.title }}</v-list-item-title>
<v-list-item-subtitle class="pl-3">{{ item.subtitle }}</v-list-item-subtitle>
</div>
<v-list-item-action>
<v-switch
Expand Down Expand Up @@ -203,8 +203,8 @@
</template>
<template v-slot:default="{ active }">
<div>
<v-list-item-title v-text="item.title"></v-list-item-title>
<v-list-item-subtitle v-text="item.subtitle"></v-list-item-subtitle>
<v-list-item-title>{{ item.title }}</v-list-item-title>
<v-list-item-subtitle>{{ item.subtitle }}</v-list-item-subtitle>
</div>
<v-list-item-action>
<v-switch
Expand All @@ -227,7 +227,6 @@
</v-card>
</v-card>
</template>

<template v-slot:item.3 editable :complete="step > 3" color="primary">
Order layers
<small
Expand All @@ -246,7 +245,7 @@
density="compact">
<v-list-item
v-for="item in sortedLayers"
class="sortable-list-item"
class="sortable-list-item px-0"
:key="item.id">
<template v-slot:prepend>
<v-btn icon @click.stop="item.zoomTo">
Expand All @@ -259,9 +258,9 @@
<v-img v-else src="/images/polygon.png" alt="Feature layer" width="20px" height="20px"/>
</v-btn>
</template>
<div class="pa-0 ma-0">
<v-list-item-title v-text="item.title"></v-list-item-title>
<v-list-item-subtitle v-if="item.subtitle" v-text="item.subtitle"></v-list-item-subtitle>
<div class="pl-2 ma-0">
<v-list-item-title>{{ item.title }}</v-list-item-title>
<v-list-item-subtitle v-if="item.subtitle">{{ item.subtitle }}</v-list-item-subtitle>
</div>
<template v-slot:append class="sortHandle" style="vertical-align: middle !important;">
<v-icon @click.sort.prevent icon="mdi-drag-horizontal-variant"/>
Expand Down
2 changes: 1 addition & 1 deletion src/renderer/src/views/GeoPackage/GeoPackageLayerList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
</template>
</v-btn>
</template>
<v-list-item-title class="ml-4" :title="item.name" :style="{marginBottom: '0px'}" v-text="item.name"></v-list-item-title>
<v-list-item-title class="ml-4" :title="item.name" :style="{marginBottom: '0px'}">{{ item.name }}</v-list-item-title>
<template v-slot:append>
<v-switch
color="primary"
Expand Down
6 changes: 3 additions & 3 deletions src/renderer/src/views/GeoPackage/GeoPackageList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@
<template v-for="item in items" :key="item.id + 'list-item'">
<v-list-item @click="() => item.click(item)">
<div>
<v-list-item-title class="text-h6" :style="{marginBottom: '0px'}" v-text="item.name"></v-list-item-title>
<v-list-item-subtitle v-text="item.featureLayersText"></v-list-item-subtitle>
<v-list-item-subtitle v-text="item.tileLayersText"></v-list-item-subtitle>
<v-list-item-title class="text-h6" :style="{marginBottom: '0px'}">{{ item.name }}</v-list-item-title>
<v-list-item-subtitle>{{ item.featureLayersText }}</v-list-item-subtitle>
<v-list-item-subtitle>{{ item.tileLayersText }}</v-list-item-subtitle>
</div>
<template v-slot:append class="mt-auto mb-auto">
<v-btn variant="text" v-if="item.health.missing" color="#d9534f" @click.stop="item.showMissingFileDialog" title="Missing GeoPackage" icon="mdi-alert-circle"/>
Expand Down
2 changes: 1 addition & 1 deletion src/renderer/src/views/LandingPage/Projects.vue
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@
color="primary" class="pt-2 pb-4">
<v-card-text
class="pt-2 text-theme-dark-background">
<p class="text-theme-dark-background" v-text="dialogText"/>
<p class="text-theme-dark-background">{{ dialogText }}</p>
<v-progress-linear
class="mt-2 text-theme-dark-background"
indeterminate>
Expand Down
2 changes: 1 addition & 1 deletion src/renderer/src/views/Overpass/OverpassDataSource.vue
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
auto-select-first
multiple
clearable
:search-input.sync="searchInput"
:search-input="searchInput"
>
<template v-slot:selection="{ item, index }">
<v-chip v-if="index === 0">
Expand Down
38 changes: 35 additions & 3 deletions src/renderer/src/views/Settings/SavedUrls.vue
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@
<v-card-text v-if="!!urls" class="pb-0 pt-0">
<v-card-subtitle v-if="!urls || urls.length === 0">No saved urls.</v-card-subtitle>
<v-list style="max-height: 400px;" v-else>
<v-list-item class="pa-0" density="compact" :key="item" v-for="item in urls">
<v-list-item-title class="ma-0 pa-0 text-wrap" v-text="item"></v-list-item-title>
<v-list-item variant=text class="pa-0" density="compact" :key="item" v-for="item in urls">
<v-list-item-title class="ma-0 pa-0 text-wrap" @click="copyText(item)">{{ item }}</v-list-item-title>
<template v-slot:append>
<v-row no-gutters justify="end">
<v-btn variant="text" icon="mdi-pencil" color="primary" @click.stop.prevent="showEditUrlDialog(item)">
Expand All @@ -70,6 +70,20 @@
</v-btn>
</v-card-actions>
</v-card>
<v-snackbar
v-model="snackbar"
:timeout="timeout"
>
URL copied
<template v-slot:actions>
<v-btn
variant="text"
@click="snackbar = false"
>
Close
</v-btn>
</template>
</v-snackbar>
</template>

<script>
Expand Down Expand Up @@ -112,7 +126,9 @@ export default {
editUrlValue: null,
editUrlInitialValue: null,
editUrlDialog: false,
editUrlValid: false
editUrlValid: false,
snackbar: false,
timeout: 2000
}
},
methods: {
Expand All @@ -121,6 +137,10 @@ export default {
editUrl: 'URLs/editUrl',
removeUrl: 'URLs/removeUrl'
}),
copyText(item) {
this.snackbar = true;
navigator.clipboard.writeText(item);
},
cancelAddNewUrl () {
this.addUrlDialog = false
},
Expand Down Expand Up @@ -176,4 +196,16 @@ export default {
</script>

<style scoped>
.v-list-item:nth-child(even) {
background: rgb(var(--v-theme-list_offset_background));
}
.v-list-item:nth-child(odd) {
background: rgb(var(--v-theme-background));
}
.v-list-item {
margin-top: 8px;
margin-bottom: 8px;
}
</style>
Loading

0 comments on commit bd564f1

Please sign in to comment.