summaryrefslogtreecommitdiff
path: root/src/RouterParamMixin.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/RouterParamMixin.js')
-rw-r--r--src/RouterParamMixin.js30
1 files changed, 30 insertions, 0 deletions
diff --git a/src/RouterParamMixin.js b/src/RouterParamMixin.js
index 073da35..0c5dbc3 100644
--- a/src/RouterParamMixin.js
+++ b/src/RouterParamMixin.js
@@ -20,5 +20,35 @@ export default {
this.$router.push({ query });
},
},
+ filterRarity: {
+ get: function() {
+ return this.$route.query.rarity || '';
+ },
+ set: function(value) {
+ this.$ga.event('Rarity', 'update', value);
+ const query = Object.assign({}, this.$route.query, { rarity: value });
+ this.$router.push({ query });
+ },
+ },
+ filterName: {
+ get: function() {
+ return this.$route.query.search || '';
+ },
+ set: function(value) {
+ this.$ga.event('Search', 'update', value);
+ const query = Object.assign({}, this.$route.query, { search: value });
+ this.$router.push({ query });
+ },
+ },
+ filterLowPickrate: {
+ get: function() {
+ return this.$route.query.lowPickrate == true;
+ },
+ set: function(value) {
+ this.$ga.event('LowPickrate', 'update', value);
+ const query = Object.assign({}, this.$route.query, { lowPickrate: value });
+ this.$router.push({ query });
+ },
+ },
},
};