Add montserrat bold, add no videos in feed, add logout logic

This commit is contained in:
Karlis Cudars 2021-10-23 02:34:27 +03:00
parent 00e805f06e
commit 95e533f982
6 changed files with 34 additions and 4 deletions

View file

@ -3,6 +3,16 @@
src: url("/fonts/Montserrat-Regular.ttf"); src: url("/fonts/Montserrat-Regular.ttf");
} }
@font-face {
font-family: MontserratBold;
src: url("/fonts/Montserrat-Bold.ttf");
}
* { * {
font-family: Montserrat; font-family: Montserrat;
} }
h1, h2, h3, h4, h5 {
font-family: MontserratBold;
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 56 KiB

View file

@ -70,6 +70,19 @@
> >
<VideoItem :video="video" /> <VideoItem :video="video" />
</div> </div>
<div
v-if="videos.length == 0 && !loading"
class="uk-text-center"
style="text-align: center; width: 100%; margin-top: 10%;"
>
<img width="210" src="/img/feed-no-video.png" />
<h3 style="font-family: MontserratBold;">No videos in My feed yet</h3>
<p class="uk-text-center" style="line-height: 21px;">
Subscribe to channels to be<br />
the first to see new videos.
</p>
</div>
</div> </div>
</template> </template>
@ -85,6 +98,7 @@ export default {
data() { data() {
return { return {
currentVideoCount: 0, currentVideoCount: 0,
loading: true,
videoStep: 100, videoStep: 100,
videosStore: [], videosStore: [],
videos: [], videos: [],
@ -100,6 +114,7 @@ export default {
}, },
mounted() { mounted() {
this.fetchFeed().then(videos => { this.fetchFeed().then(videos => {
this.loading = false;
this.videosStore = videos; this.videosStore = videos;
this.loadMoreVideos(); this.loadMoreVideos();
this.updateWatched(this.videos); this.updateWatched(this.videos);

View file

@ -60,13 +60,13 @@
<span v-if="!hideText" v-t="'titles.trending'" /> <span v-if="!hideText" v-t="'titles.trending'" />
</router-link> </router-link>
</li> </li>
<li> <li v-if="authenticated">
<router-link to="/feed" class="highlight sidebar-link uk-flex"> <router-link to="/feed" class="highlight sidebar-link uk-flex">
<font-awesome-icon icon="rss" /> <font-awesome-icon icon="rss" />
<span v-if="!hideText" v-t="'titles.feed'" /> <span v-if="!hideText" v-t="'titles.feed'" />
</router-link> </router-link>
</li> </li>
<li> <li v-if="authenticated">
<router-link to="/subscriptions" class="highlight sidebar-link uk-flex"> <router-link to="/subscriptions" class="highlight sidebar-link uk-flex">
<font-awesome-icon icon="heart" /> <font-awesome-icon icon="heart" />
<span v-if="!hideText" v-t="'titles.subscriptions'" /> <span v-if="!hideText" v-t="'titles.subscriptions'" />
@ -132,7 +132,8 @@ export default {
}, },
methods: { methods: {
logout() { logout() {
alert("logging out"); this.removePreference("authToken" + this.hashCode(this.apiUrl()));
window.location = "/"; // done to bypass cache
}, },
}, },
computed: { computed: {

View file

@ -82,7 +82,8 @@ export default {
}, },
methods: { methods: {
logout() { logout() {
alert("logging out"); this.removePreference("authToken" + this.hashCode(this.apiUrl()));
window.location = "/"; // done to bypass cache
}, },
}, },
computed: { computed: {

View file

@ -114,6 +114,9 @@ const mixin = {
setPreference(key, value) { setPreference(key, value) {
if (localStorage) localStorage.setItem(key, value); if (localStorage) localStorage.setItem(key, value);
}, },
removePreference(key) {
if (localStorage) localStorage.removeItem(key);
},
getPreferenceBoolean(key, defaultVal) { getPreferenceBoolean(key, defaultVal) {
var value; var value;
if ( if (