Minor frontend tweaks (link to wiki)

This commit is contained in:
Logan Williams
2023-03-31 11:30:18 +02:00
parent 608e2f10c0
commit ba394b3b07
3 changed files with 22 additions and 10 deletions

View File

@@ -212,7 +212,7 @@ def make_filter_query(filter):
else:
parameter = sql.SQL("CAST({parameter} AS {cast})").format(parameter=parameter, cast=sql.SQL(subfilter['cast']))
if 'value' not in subfilter or subfilter['value'] == '':
if subfilter['comparison'] == 'is null' or subfilter['comparison'] == 'is not null':
filter_query = sql.SQL("{filter_query} ({parameter} {comparison})").format(filter_query=filter_query, parameter=parameter, comparison=sql.SQL(subfilter['comparison']))
else:
if subfilter['comparison'] == 'starts with':

View File

@@ -24,8 +24,21 @@
v-model="f.parameter"
:items="$store.state.osmKeys"
@input="getValues"
></v-combobox
></v-col>
>
<template
v-slot:append
v-if="f.parameter != '' && f.parameter != null"
>
<a
:href="'https://wiki.openstreetmap.org/wiki/Key:' + f.parameter"
target="_blank"
class="super"
>
<v-icon x-small>mdi-open-in-new</v-icon></a
>
</template>
</v-combobox></v-col
>
<v-col>
<!-- Dropdown for type of comparison between parameter and value -->
<v-select
@@ -63,7 +76,12 @@
</v-card-text>
<v-card-actions>
<v-btn color="secondary" text @click="addFilter">Add condition</v-btn>
<v-btn style="margin-left: auto" color="primary" text @click="addCustom"
<v-btn
style="margin-left: auto"
color="primary"
text
@click="addCustom"
:disabled="filters[0].parameter == ''"
>Add custom feature</v-btn
>
</v-card-actions>

View File

@@ -25,18 +25,12 @@
</div>
</v-card-text>
<v-card-actions>
<!-- <a
class="outlink"
target="_blank"
:href="`https://www.google.com/maps/search/?api=1&query=${result.lat},${result.lng}`"
> -->
<v-btn
:href="`https://www.google.com/maps/search/?api=1&query=${result.lat},${result.lng}`"
text
target="_blank"
>({{ result.lat.toFixed(5) }}, {{ result.lng.toFixed(5) }})</v-btn
>
<!-- </a> -->
</v-card-actions>
</v-card>
</v-col>