mirror of
https://github.com/TeamPiped/Piped.git
synced 2025-08-09 20:24:09 +00:00
alt properties and fix linting
This commit is contained in:
@@ -1,12 +1,12 @@
|
||||
<template
|
||||
><nav
|
||||
<template>
|
||||
<nav
|
||||
class="uk-navbar-container uk-container-expand uk-position-relative uk-light"
|
||||
style="background: #0b0e0f"
|
||||
uk-navbar
|
||||
>
|
||||
<div class="uk-navbar-left">
|
||||
<router-link class="uk-navbar-item uk-logo uk-text-bold" to="/"
|
||||
><img src="/img/icons/logo.svg" height="32" width="32" />iped</router-link
|
||||
><img alt="logo" src="/img/icons/logo.svg" height="32" width="32" />iped</router-link
|
||||
>
|
||||
</div>
|
||||
<div class="uk-navbar-center uk-flex uk-visible@m">
|
||||
@@ -58,12 +58,12 @@ import SearchSuggestions from "@/components/SearchSuggestions";
|
||||
|
||||
export default {
|
||||
components: {
|
||||
SearchSuggestions
|
||||
SearchSuggestions,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
searchText: "",
|
||||
suggestionsVisible: false
|
||||
suggestionsVisible: false,
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
@@ -71,7 +71,7 @@ export default {
|
||||
if (e.key === "Enter") {
|
||||
this.$router.push({
|
||||
name: "SearchResults",
|
||||
query: { search_query: this.searchText }
|
||||
query: { search_query: this.searchText },
|
||||
});
|
||||
return;
|
||||
} else if (e.key === "ArrowUp" || e.key === "ArrowDown") {
|
||||
@@ -87,8 +87,8 @@ export default {
|
||||
},
|
||||
onSearchTextChange(searchText) {
|
||||
this.searchText = searchText;
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
|
@@ -20,12 +20,12 @@ import Constants from "@/Constants.js";
|
||||
|
||||
export default {
|
||||
props: {
|
||||
searchText: String
|
||||
searchText: String,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
selected: 0,
|
||||
searchSuggestions: []
|
||||
searchSuggestions: [],
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
@@ -50,7 +50,7 @@ export default {
|
||||
},
|
||||
async refreshSuggestions() {
|
||||
this.searchSuggestions = await this.fetchJson(
|
||||
Constants.BASE_URL + "/suggestions?query=" + encodeURI(this.searchText)
|
||||
Constants.BASE_URL + "/suggestions?query=" + encodeURI(this.searchText),
|
||||
);
|
||||
this.searchSuggestions.unshift(this.searchText);
|
||||
this.setSelected(0);
|
||||
@@ -64,14 +64,14 @@ export default {
|
||||
this.setSelected(i);
|
||||
this.$router.push({
|
||||
name: "SearchResults",
|
||||
query: { search_query: this.searchSuggestions[i] }
|
||||
query: { search_query: this.searchSuggestions[i] },
|
||||
});
|
||||
},
|
||||
setSelected(val) {
|
||||
this.selected = val;
|
||||
this.$emit("searchchange", this.searchSuggestions[this.selected]);
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
|
@@ -12,7 +12,14 @@
|
||||
>
|
||||
<div class="uk-text-secondary" style="background: #0b0e0f">
|
||||
<router-link class="uk-text-emphasis" v-bind:to="video.url || '/'">
|
||||
<img height="118" width="210" style="width: 100%" v-bind:src="video.thumbnail" loading="lazy" />
|
||||
<img
|
||||
height="118"
|
||||
width="210"
|
||||
style="width: 100%"
|
||||
v-bind:src="video.thumbnail"
|
||||
alt="thumbnail"
|
||||
loading="lazy"
|
||||
/>
|
||||
<p>{{ video.title }}</p>
|
||||
</router-link>
|
||||
<router-link class="uk-link-muted" v-bind:to="video.uploaderUrl || '/'">
|
||||
|
Reference in New Issue
Block a user