Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions config.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ module.exports = {
geoTiffResolution: 128,
redirectLegacyUrls: false,
itemsPerPage: 12,
maxItemsPerPage: 1000,
defaultThumbnailSize: null,
maxPreviewsOnMap: 50,
crossOriginMedia: null,
Expand Down
6 changes: 6 additions & 0 deletions config.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,12 @@
],
"minimum": 1
},
"maxItemsPerPage": {
"type": [
"integer"
],
"minimum": 1
},
"defaultThumbnailSize": {
"type": [
"array",
Expand Down
5 changes: 5 additions & 0 deletions docs/options.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ The following ways to set config options are possible:
- [displayGeoTiffByDefault](#displaygeotiffbydefault)
- [redirectLegacyUrls](#redirectlegacyurls)
- [itemsPerPage](#itemsperpage)
- [maxItemsPerPage](#maxitemsperpage)
- [maxPreviewsOnMap](#maxpreviewsonmap)
- [cardViewMode](#cardviewmode)
- [cardViewSort](#cardviewsort)
Expand Down Expand Up @@ -237,6 +238,10 @@ If you are updating from on old version of STAC Browser, you can set this option

The number of items requested and shown per page by default. Only applies to APIs that support the `limit` query parameter.

## maxItemsPerPage

The maximum number of items to request through the `limit` query parameter (`1000` by default).

## maxPreviewsOnMap

The maximum number of previews (thumbnails or overviews) of items that will be shown on the map when on Catalog or Collection pages.
Expand Down
6 changes: 4 additions & 2 deletions src/components/SearchFilter.vue
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,6 @@ export default {
data() {
return Object.assign({
results: null,
maxItems: 10000,
loaded: false,
queryables: null,
hasAllCollections: false,
Expand All @@ -215,7 +214,7 @@ export default {
}, getDefaults());
},
computed: {
...mapState(['itemsPerPage', 'uiLanguage']),
...mapState(['itemsPerPage', 'maxItemsPerPage', 'uiLanguage']),
...mapGetters(['canSearchCollections', 'supportsConformance']),
collectionSelectOptions() {
let taggable = !this.hasAllCollections;
Expand Down Expand Up @@ -281,6 +280,9 @@ export default {
const collator = new Intl.Collator(this.uiLanguage);
return this.queryables.slice(0).sort((a, b) => collator.compare(a.title, b.title));
},
maxItems() {
return this.maxItemsPerPage || 1000;
},
datetime: {
get() {
return Array.isArray(this.query.datetime) ? this.query.datetime.map(d => Utils.dateFromUTC(d)) : null;
Expand Down