Skip to content

Commit 272c336

Browse files
authored
Merge branch 'main' into update/polar-core-documentation_plugin.fields
2 parents c59f501 + 4a5733f commit 272c336

File tree

5 files changed

+26
-6
lines changed

5 files changed

+26
-6
lines changed

packages/plugins/Attributions/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
## unpublished
44

5+
- Feature: Add new option `'footer'` to configuration parameter `renderType` that changes the attributions to be displayed as a small version of the information box that is always visible.
56
- Refactor: Replace redundant props with computed properties.
67

78
## 1.2.1

packages/plugins/Attributions/src/components/AttributionContent.vue

Lines changed: 22 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,14 @@
11
<template>
22
<v-scroll-x-reverse-transition>
3-
<v-card dense filled :width="width" :color="color" :max-width="maxWidth">
4-
<v-card-title>
3+
<v-card
4+
:class="renderType === 'footer' ? 'polar-plugin-attributions-footer' : ''"
5+
dense
6+
filled
7+
:width="width"
8+
:color="color"
9+
:max-width="maxWidth"
10+
>
11+
<v-card-title v-if="renderType !== 'footer'">
512
{{ $t('common:plugins.attributions.title') }}
613
</v-card-title>
714
<!-- NOTE: The usage of v-html is considered unsafe as it
@@ -48,7 +55,9 @@ export default Vue.extend({
4855
return this.renderType === 'independent'
4956
},
5057
color() {
51-
return this.renderIndependently ? '#ffffffdd' : ''
58+
return this.renderType === 'independent' || this.renderType === 'footer'
59+
? '#ffffffdd'
60+
: ''
5261
},
5362
maxWidth() {
5463
return this.renderIndependently
@@ -76,4 +85,13 @@ export default Vue.extend({
7685
})
7786
</script>
7887

79-
<style scoped lang="scss"></style>
88+
<style scoped lang="scss">
89+
.polar-plugin-attributions-footer {
90+
margin: 4px;
91+
}
92+
.polar-plugin-attributions-footer .v-card__text {
93+
font-size: 0.8rem;
94+
padding: 2px;
95+
line-height: 1.1;
96+
}
97+
</style>

packages/plugins/Attributions/src/types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ export interface AttributionsGetters extends AttributionsState {
1818
listenToChanges: string[]
1919
mapInfo: string[]
2020
initiallyOpen: boolean
21-
renderType: 'independent' | 'iconMenu'
21+
renderType: 'independent' | 'iconMenu' | 'footer'
2222
staticAttributions: string[]
2323
windowWidth: number
2424
}

packages/types/custom/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
- Feature: Add `afterResultComponent` to `AddressSearchConfiguration` for custom search result suffixes.
66
- Feature: Add `mapHasDimensions` to `CoreState` and `CoreGetters`.
77
- Feature: Add new getter `deviceIsHorizontal` to `CoreGetters`.
8+
- Feature: Add `footer` to `RenderType` as an option to display attributions in a footer.
89
- Fix: Add `string` as option for `SearchType` since arbitrary strings can be registered.
910
- Fix: Remove unused parameters `proxyUrl` and `loadingStrategy` from `LayerConfigurationOptions`.
1011
- Fix: Properly document optional parameters of interfaces `AddressSearchConfiguration`, `FeatureList`, `FilterConfigurationTime`, `FilterConfigurationTimeOption`, `GeoLocationConfiguration`, `LayerConfigurationOptionLayers` and `PinsConfiguration`

packages/types/custom/core.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ export interface PluginOptions {
3232
layoutTag?: string // TODO: Might it be useful to move declaration of NineLayoutTag here?
3333
}
3434

35-
export type RenderType = 'iconMenu' | 'independent'
35+
export type RenderType = 'iconMenu' | 'independent' | 'footer'
3636

3737
/** Possible search methods by type */
3838
export type SearchType = 'bkg' | 'gazetteer' | 'wfs' | 'mpapi' | string

0 commit comments

Comments
 (0)