workflow: reset feature/search-page-improvement branch

This commit is contained in:
Roberto Tonino
2020-11-02 12:25:08 +01:00
parent 66b1ebe244
commit 7f0d621f62
44 changed files with 3265 additions and 1592 deletions

View File

@@ -6,7 +6,10 @@ import { socket } from '@/utils/socket'
const sharedOptions = {
gravity: 'bottom',
position: 'left'
position: 'left',
offset: {
x: '14rem'
}
}
let toastsWithId = {}
@@ -84,9 +87,6 @@ export const toast = function(msg, icon = null, dismiss = true, id = null) {
delete toastsWithId[id]
}
}
},
offset: {
x: 'true' === localStorage.getItem('slimSidebar') ? '3rem': '14rem'
}
}).showToast()
if (id) {

View File

@@ -95,6 +95,28 @@ export function copyToClipboard(text) {
ghostInput.remove()
}
export function getProperty(obj, ...props) {
for (const prop of props) {
// Example: this.is.an.example
let hasDotNotation = /\./.test(prop)
// Searching the properties in the object
let valueToTest = hasDotNotation
? prop.split('.').reduce((o, i) => {
if (o) {
return o[i]
}
}, obj)
: obj[prop]
if (!!valueToTest) {
return valueToTest
}
}
return null
}
export default {
isValidURL,
convertDuration,