forked from MapComplete/MapComplete
Merge master
This commit is contained in:
commit
8d08ebf416
34 changed files with 6821 additions and 262 deletions
|
|
@ -177,7 +177,7 @@ export default class FeatureReviews {
|
|||
}>,
|
||||
testmode?: Store<boolean>,
|
||||
loadingAllowed?: UIEventSource<boolean | null>,
|
||||
reportError?: (msg: string, extra: string) => Promise<void>
|
||||
reportError?: (msg: string, extra: string) => Promise<void>
|
||||
) {
|
||||
this.loadingAllowed = loadingAllowed
|
||||
this._reportError = reportError
|
||||
|
|
@ -294,7 +294,7 @@ export default class FeatureReviews {
|
|||
tagsSource: UIEventSource<Record<string, string>>,
|
||||
mangroveIdentity: MangroveIdentity,
|
||||
options: { nameKey: string; fallbackName: string },
|
||||
state?: SpecialVisualizationState,
|
||||
state?: SpecialVisualizationState
|
||||
): FeatureReviews {
|
||||
const key =
|
||||
feature.properties.id +
|
||||
|
|
@ -362,10 +362,13 @@ export default class FeatureReviews {
|
|||
const jwt = await MangroveReviews.signReview(keypair, r)
|
||||
const kid = await MangroveReviews.publicToPem(keypair.publicKey)
|
||||
if (!this._testmode.data) {
|
||||
try{
|
||||
try {
|
||||
await MangroveReviews.submitReview(jwt)
|
||||
}catch (e) {
|
||||
await this._reportError(e, "Could not save a review. The text is:"+review.rating+", "+review.opinion)
|
||||
} catch (e) {
|
||||
await this._reportError(
|
||||
e,
|
||||
"Could not save a review. The text is:" + review.rating + ", " + review.opinion
|
||||
)
|
||||
throw e
|
||||
}
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -14,5 +14,7 @@
|
|||
</script>
|
||||
|
||||
{#if src?.length > 0}
|
||||
{@html marked.parse(src)}
|
||||
<div class="in-markdown">
|
||||
{@html marked.parse(src)}
|
||||
</div>
|
||||
{/if}
|
||||
|
|
|
|||
|
|
@ -6,6 +6,8 @@
|
|||
import Tr from "../Base/Tr.svelte"
|
||||
import { ariaLabel } from "../../Utils/ariaLabel"
|
||||
import ThemeViewState from "../../Models/ThemeViewState"
|
||||
import Markdown from "../Base/Markdown.svelte"
|
||||
import AccordionSingle from "../Flowbite/AccordionSingle.svelte"
|
||||
|
||||
export let state: ThemeViewState = undefined
|
||||
export let review: Review & {
|
||||
|
|
@ -43,6 +45,7 @@
|
|||
<h3>{sub}</h3>
|
||||
</button>
|
||||
{/if}
|
||||
|
||||
<div class="flex w-full items-center justify-between">
|
||||
<div
|
||||
tabindex="0"
|
||||
|
|
@ -50,7 +53,7 @@
|
|||
n: "" + Math.round(review.rating / 10) / 2,
|
||||
})}
|
||||
>
|
||||
<StarsBar readonly={true} score={review.rating} />
|
||||
<StarsBar starSize="w-4 h-4 md:w-6 md:h-6" readonly={true} score={review.rating} />
|
||||
</div>
|
||||
<div class="flex flex-wrap space-x-2">
|
||||
<a
|
||||
|
|
@ -66,22 +69,23 @@
|
|||
</span>
|
||||
{/if}
|
||||
</a>
|
||||
<span class="subtle">
|
||||
{date}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
{#if review.opinion}
|
||||
<div class="link-no-underline">
|
||||
<a
|
||||
class="subtle"
|
||||
target="_blank"
|
||||
rel="noopener nofollow"
|
||||
href={`https://mangrove.reviews/list?signature=${encodeURIComponent(review.signature)}`}
|
||||
>
|
||||
{review.opinion}
|
||||
{date}
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{#if review.opinion}
|
||||
<div class="disable-links">
|
||||
<Markdown src= {review.opinion}/>
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
{#if review.metadata.is_affiliated}
|
||||
<Tr t={Translations.t.reviews.affiliated_reviewer_warning} />
|
||||
{/if}
|
||||
|
|
|
|||
|
|
@ -213,6 +213,9 @@
|
|||
owner: uid,
|
||||
},
|
||||
}
|
||||
if(mode === undefined || id === undefined){
|
||||
return
|
||||
}
|
||||
const statePromise: Promise<EditJsonState<any>> =
|
||||
mode === "layer" ? editLayer(event) : editTheme(event)
|
||||
const state = await statePromise
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"contributors": [
|
||||
{
|
||||
"commits": 10023,
|
||||
"commits": 10029,
|
||||
"contributor": "Pieter Vander Vennet"
|
||||
},
|
||||
{
|
||||
|
|
|
|||
|
|
@ -11413,22 +11413,18 @@
|
|||
"if": "value=toilet_at_amenity",
|
||||
"then": "toilet_at_amenity - A layer showing (public) toilets located at different places."
|
||||
},
|
||||
{
|
||||
"if": "value=campsite",
|
||||
"then": "campsite - Campsites"
|
||||
},
|
||||
{
|
||||
"if": "value=toilet_at_amenity_lib",
|
||||
"then": "toilet_at_amenity_lib - Special layer which makes it easy to add, as a group, information about toilets to any POI"
|
||||
},
|
||||
{
|
||||
"if": "value=tourism_accomodation",
|
||||
"then": "tourism_accomodation - Various types of lodging facilities"
|
||||
},
|
||||
{
|
||||
"if": "value=cafe_pub",
|
||||
"then": "cafe_pub - A layer showing cafés and pubs where one can gather around a drink. The layer asks for some relevant questions"
|
||||
},
|
||||
{
|
||||
"if": "value=campsite",
|
||||
"then": "campsite - Campsites"
|
||||
},
|
||||
{
|
||||
"if": "value=doctors",
|
||||
"then": "doctors - This layer shows doctor offices"
|
||||
|
|
@ -11449,6 +11445,10 @@
|
|||
"if": "value=shops",
|
||||
"then": "shops - A shop"
|
||||
},
|
||||
{
|
||||
"if": "value=tourism_accomodation",
|
||||
"then": "tourism_accomodation - Various types of lodging facilities"
|
||||
},
|
||||
{
|
||||
"if": "value=bike_shop",
|
||||
"then": "bike_shop - A shop specifically selling bicycles or related items"
|
||||
|
|
|
|||
|
|
@ -1292,22 +1292,18 @@
|
|||
"if": "value=toilet_at_amenity",
|
||||
"then": "<b>toilet_at_amenity</b> (builtin) - A layer showing (public) toilets located at different places."
|
||||
},
|
||||
{
|
||||
"if": "value=campsite",
|
||||
"then": "<b>campsite</b> (builtin) - Campsites"
|
||||
},
|
||||
{
|
||||
"if": "value=toilet_at_amenity_lib",
|
||||
"then": "<b>toilet_at_amenity_lib</b> (builtin) - Special layer which makes it easy to add, as a group, information about toilets to any POI"
|
||||
},
|
||||
{
|
||||
"if": "value=tourism_accomodation",
|
||||
"then": "<b>tourism_accomodation</b> (builtin) - Various types of lodging facilities"
|
||||
},
|
||||
{
|
||||
"if": "value=cafe_pub",
|
||||
"then": "<b>cafe_pub</b> (builtin) - A layer showing cafés and pubs where one can gather around a drink. The layer asks for some relevant questions"
|
||||
},
|
||||
{
|
||||
"if": "value=campsite",
|
||||
"then": "<b>campsite</b> (builtin) - Campsites"
|
||||
},
|
||||
{
|
||||
"if": "value=doctors",
|
||||
"then": "<b>doctors</b> (builtin) - This layer shows doctor offices"
|
||||
|
|
@ -1328,6 +1324,10 @@
|
|||
"if": "value=shops",
|
||||
"then": "<b>shops</b> (builtin) - A shop"
|
||||
},
|
||||
{
|
||||
"if": "value=tourism_accomodation",
|
||||
"then": "<b>tourism_accomodation</b> (builtin) - Various types of lodging facilities"
|
||||
},
|
||||
{
|
||||
"if": "value=bike_shop",
|
||||
"then": "<b>bike_shop</b> (builtin) - A shop specifically selling bicycles or related items"
|
||||
|
|
@ -14081,22 +14081,18 @@
|
|||
"if": "value=toilet_at_amenity",
|
||||
"then": "toilet_at_amenity - A layer showing (public) toilets located at different places."
|
||||
},
|
||||
{
|
||||
"if": "value=campsite",
|
||||
"then": "campsite - Campsites"
|
||||
},
|
||||
{
|
||||
"if": "value=toilet_at_amenity_lib",
|
||||
"then": "toilet_at_amenity_lib - Special layer which makes it easy to add, as a group, information about toilets to any POI"
|
||||
},
|
||||
{
|
||||
"if": "value=tourism_accomodation",
|
||||
"then": "tourism_accomodation - Various types of lodging facilities"
|
||||
},
|
||||
{
|
||||
"if": "value=cafe_pub",
|
||||
"then": "cafe_pub - A layer showing cafés and pubs where one can gather around a drink. The layer asks for some relevant questions"
|
||||
},
|
||||
{
|
||||
"if": "value=campsite",
|
||||
"then": "campsite - Campsites"
|
||||
},
|
||||
{
|
||||
"if": "value=doctors",
|
||||
"then": "doctors - This layer shows doctor offices"
|
||||
|
|
@ -14117,6 +14113,10 @@
|
|||
"if": "value=shops",
|
||||
"then": "shops - A shop"
|
||||
},
|
||||
{
|
||||
"if": "value=tourism_accomodation",
|
||||
"then": "tourism_accomodation - Various types of lodging facilities"
|
||||
},
|
||||
{
|
||||
"if": "value=bike_shop",
|
||||
"then": "bike_shop - A shop specifically selling bicycles or related items"
|
||||
|
|
@ -35906,22 +35906,18 @@
|
|||
"if": "value=toilet_at_amenity",
|
||||
"then": "toilet_at_amenity - A layer showing (public) toilets located at different places."
|
||||
},
|
||||
{
|
||||
"if": "value=campsite",
|
||||
"then": "campsite - Campsites"
|
||||
},
|
||||
{
|
||||
"if": "value=toilet_at_amenity_lib",
|
||||
"then": "toilet_at_amenity_lib - Special layer which makes it easy to add, as a group, information about toilets to any POI"
|
||||
},
|
||||
{
|
||||
"if": "value=tourism_accomodation",
|
||||
"then": "tourism_accomodation - Various types of lodging facilities"
|
||||
},
|
||||
{
|
||||
"if": "value=cafe_pub",
|
||||
"then": "cafe_pub - A layer showing cafés and pubs where one can gather around a drink. The layer asks for some relevant questions"
|
||||
},
|
||||
{
|
||||
"if": "value=campsite",
|
||||
"then": "campsite - Campsites"
|
||||
},
|
||||
{
|
||||
"if": "value=doctors",
|
||||
"then": "doctors - This layer shows doctor offices"
|
||||
|
|
@ -35942,6 +35938,10 @@
|
|||
"if": "value=shops",
|
||||
"then": "shops - A shop"
|
||||
},
|
||||
{
|
||||
"if": "value=tourism_accomodation",
|
||||
"then": "tourism_accomodation - Various types of lodging facilities"
|
||||
},
|
||||
{
|
||||
"if": "value=bike_shop",
|
||||
"then": "bike_shop - A shop specifically selling bicycles or related items"
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@
|
|||
"contributor": "mcliquid"
|
||||
},
|
||||
{
|
||||
"commits": 98,
|
||||
"commits": 99,
|
||||
"contributor": "mike140"
|
||||
},
|
||||
{
|
||||
|
|
@ -69,7 +69,7 @@
|
|||
"contributor": "Iago"
|
||||
},
|
||||
{
|
||||
"commits": 31,
|
||||
"commits": 32,
|
||||
"contributor": "Lukáš Jelínek"
|
||||
},
|
||||
{
|
||||
|
|
@ -240,6 +240,10 @@
|
|||
"commits": 8,
|
||||
"contributor": "Vinicius"
|
||||
},
|
||||
{
|
||||
"commits": 7,
|
||||
"contributor": "ERyPTION"
|
||||
},
|
||||
{
|
||||
"commits": 7,
|
||||
"contributor": "Franco"
|
||||
|
|
@ -376,10 +380,6 @@
|
|||
"commits": 4,
|
||||
"contributor": "Jan Zabel"
|
||||
},
|
||||
{
|
||||
"commits": 3,
|
||||
"contributor": "ERyPTION"
|
||||
},
|
||||
{
|
||||
"commits": 3,
|
||||
"contributor": "ceirios"
|
||||
|
|
@ -608,6 +608,10 @@
|
|||
"commits": 2,
|
||||
"contributor": "Leo Alcaraz"
|
||||
},
|
||||
{
|
||||
"commits": 1,
|
||||
"contributor": "oxisol"
|
||||
},
|
||||
{
|
||||
"commits": 1,
|
||||
"contributor": "POG"
|
||||
|
|
|
|||
|
|
@ -617,6 +617,11 @@ svg.apply-fill path {
|
|||
height: calc(2.5rem - 1px);
|
||||
}
|
||||
|
||||
.in-markdown p, .in-markdown ol, .in-markdown ul {
|
||||
padding-top: 0.5rem;
|
||||
padding-bottom: 0.5rem;
|
||||
}
|
||||
|
||||
@media (min-width: 640px) {
|
||||
.compass_arrow {
|
||||
width: calc(2.75rem - 1px);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue