-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1008 from geoadmin/bug-PB--631-cors-kml-icons
- Loading branch information
Showing
15 changed files
with
259 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
# required in order to access the translation spreadsheet (while running `npm run update:translations`) | ||
GOOGLE_API_KEY: !var infra-gopass-bgdi/web-mapviewer/GOOGLE_API_KEY | ||
CYPRESS_RECORD_KEY: !var infra-gopass-bgdi/web-mapviewer/cypress-key key | ||
GOOGLE_API_KEY: !var /google.com/web-mapviewer/api-key --profile swisstopo-bgdi-builder | ||
CYPRESS_RECORD_KEY: !var /cypress.io/ppbgdi/web-mapviewer/record-key --profile swisstopo-bgdi-builder |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
/** Warning message to display to the user */ | ||
export default class WarningMessage { | ||
/** | ||
* @param {string} msg Translation key message | ||
* @param {any} params Translation params to pass to i18n (used for message formatting) | ||
*/ | ||
constructor(msg, params = null) { | ||
this.msg = msg | ||
this.params = params | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,103 @@ | ||
<script setup> | ||
import { computed, ref, toRefs } from 'vue' | ||
import { useI18n } from 'vue-i18n' | ||
import { useStore } from 'vuex' | ||
const props = defineProps({ | ||
title: { | ||
type: String, | ||
default: '', | ||
}, | ||
/** | ||
* Hide the modal with backdrop, can be used to temporarily hide the modal without loosing its | ||
* content | ||
*/ | ||
hide: { | ||
type: Boolean, | ||
default: false, | ||
}, | ||
}) | ||
const { title, hide } = toRefs(props) | ||
const store = useStore() | ||
const showBody = ref(true) | ||
const hasDevSiteWarning = computed(() => store.getters.hasDevSiteWarning) | ||
const i18n = useI18n() | ||
const emit = defineEmits(['close']) | ||
</script> | ||
|
||
<template> | ||
<div | ||
v-show="!hide" | ||
class="simple-window card bg-warning fw-bold" | ||
:class="{ 'dev-disclaimer-present': hasDevSiteWarning }" | ||
data-cy="warning-window" | ||
> | ||
<div | ||
class="card-header d-flex align-items-center justify-content-sm-end" | ||
data-cy="window-header" | ||
> | ||
<span v-if="title" class="me-auto text-truncate">{{ i18n.t(title) }}</span> | ||
<span v-else class="me-auto" /> | ||
<button class="btn btn-sm btn-light me-2" @click.stop="showBody = !showBody"> | ||
<FontAwesomeIcon :icon="`caret-${showBody ? 'down' : 'right'}`" /> | ||
</button> | ||
<button | ||
class="btn btn-light btn-sm" | ||
data-cy="warning-window-close" | ||
@click.stop="emit('close')" | ||
> | ||
<FontAwesomeIcon icon="times" /> | ||
</button> | ||
</div> | ||
<div class="card-body" :class="{ hide: !showBody }" data-cy="warning-window-body"> | ||
<slot /> | ||
</div> | ||
</div> | ||
</template> | ||
|
||
<style lang="scss" scoped> | ||
@import '@/scss/variables.module'; | ||
@import '@/scss/media-query.mixin'; | ||
@import '@/scss/webmapviewer-bootstrap-theme'; | ||
.simple-window { | ||
$top-margin: calc(2 * $header-height + 2rem); | ||
z-index: calc($zindex-menu - 1); | ||
position: fixed; | ||
top: $top-margin; | ||
right: 4rem; | ||
width: max-content; | ||
max-width: 400px; | ||
max-height: calc(100vh - $top-margin); | ||
@include respond-below(phone) { | ||
$top-margin: $header-height; | ||
&.dev-disclaimer-present { | ||
$top-margin: calc($header-height + $dev-disclaimer-height); | ||
} | ||
top: $top-margin; | ||
left: 50%; | ||
right: unset; | ||
transform: translate(-50%, 0%); | ||
max-height: calc(100vh - $top-margin); | ||
max-width: 100vw; | ||
} | ||
.card-body { | ||
// Allow text selection | ||
@extend .clear-no-ios-long-press; | ||
overflow-y: auto; | ||
&.hide { | ||
visibility: hidden; | ||
height: 0px; | ||
padding: 0px; | ||
} | ||
} | ||
} | ||
</style> |
Oops, something went wrong.