mirror of
https://github.com/bellingcat/osm-search.git
synced 2026-06-07 19:18:32 +03:00
Minor frontend tweaks (link to wiki)
This commit is contained in:
@@ -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':
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user