Frontend: Change sort order defaults
See https://twitter.com/browseyourlife/status/1213498860133343234 Signed-off-by: Michael Mayer <michael@liquidbytes.net>
This commit is contained in:
parent
1f37de7d6a
commit
fb82749447
5 changed files with 8 additions and 27 deletions
|
@ -57,7 +57,7 @@
|
|||
:items="countryOptions">
|
||||
</v-select>
|
||||
</v-flex>
|
||||
<v-flex xs12 sm6 md3 pa-2 class="p-camera-select">
|
||||
<v-flex xs12 sm6 md3 pa-2 class="p-year-select">
|
||||
<v-select @change="dropdownChange"
|
||||
:label="labels.year"
|
||||
flat solo hide-details
|
||||
|
@ -98,7 +98,7 @@
|
|||
:items="cameraOptions">
|
||||
</v-select>
|
||||
</v-flex>
|
||||
<v-flex xs12 sm6 md3 pa-2 class="p-camera-select">
|
||||
<v-flex xs12 sm6 md3 pa-2 class="p-lens-select">
|
||||
<v-select @change="dropdownChange"
|
||||
:label="labels.lens"
|
||||
flat solo hide-details
|
||||
|
@ -109,7 +109,7 @@
|
|||
:items="lensOptions">
|
||||
</v-select>
|
||||
</v-flex>
|
||||
<v-flex xs12 sm6 md3 pa-2 class="p-camera-select">
|
||||
<v-flex xs12 sm6 md3 pa-2 class="p-color-select">
|
||||
<v-select @change="dropdownChange"
|
||||
:label="labels.color"
|
||||
flat solo hide-details
|
||||
|
@ -120,7 +120,7 @@
|
|||
:items="colorOptions">
|
||||
</v-select>
|
||||
</v-flex>
|
||||
<v-flex xs12 sm6 md3 pa-2 class="p-camera-select">
|
||||
<v-flex xs12 sm6 md3 pa-2 class="p-category-select">
|
||||
<v-select @change="dropdownChange"
|
||||
:label="labels.category"
|
||||
flat solo hide-details
|
||||
|
|
|
@ -68,7 +68,7 @@
|
|||
const uuid = this.$route.params.uuid;
|
||||
const query = this.$route.query;
|
||||
const routeName = this.$route.name;
|
||||
const order = query['order'] ? query['order'] : 'imported';
|
||||
const order = query['order'] ? query['order'] : 'oldest';
|
||||
const camera = query['camera'] ? parseInt(query['camera']) : 0;
|
||||
const q = query['q'] ? query['q'] : '';
|
||||
const country = query['country'] ? query['country'] : '';
|
||||
|
|
|
@ -27,10 +27,6 @@
|
|||
:selection="selection"
|
||||
:open-photo="openPhoto"
|
||||
:open-location="openLocation"></p-photo-details>
|
||||
<!-- p-photo-tiles v-else
|
||||
:photos="results"
|
||||
:selection="selection"
|
||||
:open-photo="openPhoto"></p-photo-tiles -->
|
||||
</v-container>
|
||||
</div>
|
||||
</template>
|
||||
|
@ -54,10 +50,6 @@
|
|||
this.filter.year = query['year'] ? parseInt(query['year']) : 0;
|
||||
this.filter.color = query['color'] ? query['color'] : '';
|
||||
this.filter.label = query['label'] ? query['label'] : '';
|
||||
|
||||
// this.filter.before = query['before'] ? query['before'] : '';
|
||||
// this.filter.after = query['after'] ? query['after'] : '';
|
||||
|
||||
this.settings.view = this.viewType();
|
||||
this.lastFilter = {};
|
||||
this.routeName = this.$route.name;
|
||||
|
@ -67,13 +59,9 @@
|
|||
data() {
|
||||
const query = this.$route.query;
|
||||
const routeName = this.$route.name;
|
||||
const order = query['order'] ? query['order'] : 'imported';
|
||||
const order = query['order'] ? query['order'] : 'newest';
|
||||
const camera = query['camera'] ? parseInt(query['camera']) : 0;
|
||||
const q = query['q'] ? query['q'] : '';
|
||||
|
||||
// const before = query['before'] ? query['before'] : '';
|
||||
// const after = query['after'] ? query['after'] : '';
|
||||
|
||||
const country = query['country'] ? query['country'] : '';
|
||||
const lens = query['lens'] ? parseInt(query['lens']) : 0;
|
||||
const year = query['year'] ? parseInt(query['year']) : 0;
|
||||
|
@ -237,18 +225,11 @@
|
|||
}
|
||||
}).catch(() => this.loading = false);
|
||||
},
|
||||
onKeypress(event) {
|
||||
/* if (event.key === "Escape") {
|
||||
this.$clipboard.clear();
|
||||
} */
|
||||
},
|
||||
},
|
||||
created() {
|
||||
this.search();
|
||||
// window.addEventListener('keydown', this.onKeypress);
|
||||
},
|
||||
destroyed() {
|
||||
// window.removeEventListener('keydown', this.onKeypress);
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
|
|
@ -18,7 +18,7 @@ test('Test camera filter', async t => {
|
|||
await t
|
||||
.click('button.p-expand-search');
|
||||
logger.clear();
|
||||
await page.setFilter('camera', 'iPhone 6');
|
||||
await page.setFilter('camera', 'iPhone SE');
|
||||
const request = await logger.requests[0].responseBody;
|
||||
await t
|
||||
.expect(logger.requests[0].response.statusCode).eql(200)
|
||||
|
|
|
@ -22,7 +22,7 @@ test('Test search object', async t => {
|
|||
.expect(Selector('div.v-image__image').visible).ok();
|
||||
}),
|
||||
test('Test search color', async t => {
|
||||
await page.search('color:pink');
|
||||
await page.search('color:red');
|
||||
const request2 = await logger.requests[1].responseBody;
|
||||
await t
|
||||
.expect(logger.requests[1].response.statusCode).eql(200)
|
||||
|
|
Loading…
Reference in a new issue