|
|
|
@ -303,14 +303,18 @@ class Websites extends LitElement {
|
|
|
|
|
async searchResult() { |
|
|
|
|
let searchName = this.shadowRoot.getElementById('searchName').value |
|
|
|
|
if (searchName.length === 0) { |
|
|
|
|
parentEpml.request('showSnackBar', 'Name cannot be empty!') |
|
|
|
|
parentEpml.request('showSnackBar', 'Name Can Not Be Empty!') |
|
|
|
|
} else { |
|
|
|
|
let searchResources = await parentEpml.request('apiCall', { |
|
|
|
|
url: `/arbitrary/resources/search?service=${this.service}&query=${searchName}&default=true&limit=5&reverse=false&includestatus=true` |
|
|
|
|
}) |
|
|
|
|
if (this.isEmptyArray(searchResources)) { |
|
|
|
|
parentEpml.request('showSnackBar', 'Name Not Found!') |
|
|
|
|
} else { |
|
|
|
|
this.searchResources = searchResources |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
renderSearchAvatar(searchObj) { |
|
|
|
|
let name = searchObj.name |
|
|
|
|