correct pagination color, home button resets search

This commit is contained in:
Rigel Kent 2020-09-11 15:50:34 +02:00
parent 679dd77b71
commit dc8bbc8b3d
No known key found for this signature in database
GPG Key ID: 5E53E96A494E452F
4 changed files with 16 additions and 5 deletions

View File

@ -41,7 +41,7 @@
} }
a { a {
color: #4285f5; color: $orange;
text-decoration: none; text-decoration: none;
&:hover { &:hover {

View File

@ -1,7 +1,7 @@
<template> <template>
<div class="block" v-bind:class="{ highlight: highlight }" v-translate="{ indexName: indexName }"> <div class="block" v-bind:class="{ highlight: highlight }" v-translate="{ indexName: indexName }">
<strong>%{indexName}</strong> displays videos and channels that match your search but is not the publisher, nor the owner. <strong>%{indexName}</strong> displays videos and channels that match your search but is not the publisher, nor the owner.
If you notice any problems with a video, report it to the corresponding administrator on the PeerTube website. If you notice any problems with a video, report it to the administrators on the PeerTube website where the video is published.
</div> </div>
</template> </template>

View File

@ -77,7 +77,8 @@ p.catch(err => {
routes = routes.concat([ routes = routes.concat([
{ {
path: base + locale, path: base + locale,
component: Search component: Search,
name: 'home'
}, },
{ {
path: base + 'search', path: base + 'search',

View File

@ -1,9 +1,9 @@
<template> <template>
<div> <div>
<my-header v-if="!searchDone" v-bind:indexName="indexName"></my-header> <my-header v-if="!searchDone" v-bind:indexName="indexName"></my-header>
<div v-else class="header-left-logo"> <router-link v-else class="header-left-logo" :to="{ name: 'home' }" @click.native="simpleFormReset(false)" :title="homeTitleMessage">
<img src="/img/peertube-logo.svg" alt=""> <img src="/img/peertube-logo.svg" alt="">
</div> </router-link>
<main> <main>
<h3 v-if="!searchDone" v-bind:class="{ 'none-opacity': !instancesCount }" v-translate="{ instancesCount: instancesCount, indexedInstancesUrl: indexedInstancesUrl }"> <h3 v-if="!searchDone" v-bind:class="{ 'none-opacity': !instancesCount }" v-translate="{ instancesCount: instancesCount, indexedInstancesUrl: indexedInstancesUrl }">
@ -269,6 +269,7 @@
.header-left-logo { .header-left-logo {
position: relative; position: relative;
display: block;
height: 0; height: 0;
img { img {
@ -608,6 +609,10 @@
{ id: 'fi', label: this.$gettext('suomi') }, { id: 'fi', label: this.$gettext('suomi') },
{ id: 'ru', label: this.$gettext('русский') } { id: 'ru', label: this.$gettext('русский') }
] ]
},
homeTitleMessage () {
return this.$gettextInterpolate(this.$gettext('Display the video index homepage'))
} }
}, },
@ -838,6 +843,11 @@
else if (field === 'tagsOneOf') this.formTagsOneOf = [] else if (field === 'tagsOneOf') this.formTagsOneOf = []
}, },
simpleFormReset (searchDone = true) {
this.formSearch = ''
this.searchDone = searchDone
},
countActiveFilters () { countActiveFilters () {
let count = 0 let count = 0