mirror of https://github.com/Lissy93/dashy.git
🐛 Fixes clearFilterInput Safari bug (#463) (Sentry: 2911601158)
This commit is contained in:
parent
d07a5f7e6f
commit
ad1fae5b66
|
@ -100,11 +100,13 @@ export default {
|
||||||
this.settingsVisible = this.getSettingsVisibility();
|
this.settingsVisible = this.getSettingsVisibility();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
/* Emit event to begin/ continue searching */
|
||||||
userIsTypingSomething(something) {
|
userIsTypingSomething(something) {
|
||||||
this.$emit('user-is-searchin', something);
|
this.$emit('user-is-searchin', something);
|
||||||
},
|
},
|
||||||
|
/* Call function to clear search field, remove focus and reset results */
|
||||||
clearFilterInput() {
|
clearFilterInput() {
|
||||||
this.$refs.SearchBar.clearFilterInput();
|
if (this.$refs.SearchBar) this.$refs.SearchBar.clearFilterInput();
|
||||||
},
|
},
|
||||||
getInitialTheme() {
|
getInitialTheme() {
|
||||||
return this.appConfig.theme || '';
|
return this.appConfig.theme || '';
|
||||||
|
@ -115,10 +117,12 @@ export default {
|
||||||
if (typeof userThemes === 'string') return [userThemes];
|
if (typeof userThemes === 'string') return [userThemes];
|
||||||
return userThemes;
|
return userThemes;
|
||||||
},
|
},
|
||||||
|
/* Show / hide settings */
|
||||||
toggleSettingsVisibility() {
|
toggleSettingsVisibility() {
|
||||||
this.settingsVisible = !this.settingsVisible;
|
this.settingsVisible = !this.settingsVisible;
|
||||||
localStorage.setItem(localStorageKeys.HIDE_SETTINGS, this.settingsVisible);
|
localStorage.setItem(localStorageKeys.HIDE_SETTINGS, this.settingsVisible);
|
||||||
},
|
},
|
||||||
|
/* Get initial settings visibility, either from appConfig, local storage or browser type */
|
||||||
getSettingsVisibility() {
|
getSettingsVisibility() {
|
||||||
const screenWidth = document.body.clientWidth;
|
const screenWidth = document.body.clientWidth;
|
||||||
if (screenWidth && screenWidth < 600) return false;
|
if (screenWidth && screenWidth < 600) return false;
|
||||||
|
|
Loading…
Reference in New Issue