mirror of
https://github.com/TeamPiped/Piped.git
synced 2024-11-25 06:57:22 +00:00
alt properties and fix linting
This commit is contained in:
parent
48860ec0f8
commit
57a51b0a8b
11
src/App.vue
11
src/App.vue
@ -1,13 +1,10 @@
|
||||
<template>
|
||||
<div
|
||||
class="uk-container uk-container-expand uk-light uk-height-viewport"
|
||||
style="background: #0b0e0f"
|
||||
>
|
||||
<div class="uk-container uk-container-expand uk-light uk-height-viewport" style="background: #0b0e0f">
|
||||
<Navigation />
|
||||
<router-view />
|
||||
|
||||
<div style="text-align: center">
|
||||
<a href="https://github.com/TeamPiped/Piped">
|
||||
<a aria-label="GitHub" href="https://github.com/TeamPiped/Piped">
|
||||
<font-awesome-icon :icon="['fab', 'github']"></font-awesome-icon>
|
||||
</a>
|
||||
|
||||
@ -23,8 +20,8 @@
|
||||
import Navigation from "@/components/Navigation";
|
||||
export default {
|
||||
components: {
|
||||
Navigation
|
||||
}
|
||||
Navigation,
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
|
@ -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 || '/'">
|
||||
|
@ -11,12 +11,12 @@ import("uikit/dist/js/uikit-core.min");
|
||||
import router from "@/router/router";
|
||||
import App from "./App.vue";
|
||||
|
||||
import "./registerServiceWorker";
|
||||
import("./registerServiceWorker");
|
||||
|
||||
const mixin = {
|
||||
methods: {
|
||||
timeFormat: function(duration) {
|
||||
var pad = function(num, size) {
|
||||
timeFormat: function (duration) {
|
||||
var pad = function (num, size) {
|
||||
return ("000" + num).slice(size * -1);
|
||||
};
|
||||
|
||||
@ -33,7 +33,7 @@ const mixin = {
|
||||
|
||||
return str;
|
||||
},
|
||||
fetchJson: function(url, options) {
|
||||
fetchJson: function (url, options) {
|
||||
return fetch(url, options).then(response => {
|
||||
return response.json();
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user