2020-12-09 19:03:29 +05:30
|
|
|
<template>
|
2021-06-29 01:15:03 +05:30
|
|
|
<div
|
|
|
|
class="uk-container uk-container-expand uk-height-viewport"
|
|
|
|
:style="[{ background: backgroundColor, colour: foregroundColor }]"
|
|
|
|
:class="{ 'uk-light': darkMode }"
|
|
|
|
>
|
2021-04-01 03:39:39 +05:30
|
|
|
<Navigation />
|
2021-07-07 19:48:09 +05:30
|
|
|
<router-view v-slot="{ Component }">
|
|
|
|
<keep-alive :max="5">
|
|
|
|
<component :key="$route.fullPath" :is="Component" />
|
|
|
|
</keep-alive>
|
|
|
|
</router-view>
|
2021-03-29 12:08:29 +05:30
|
|
|
|
|
|
|
<div style="text-align: center">
|
2021-05-10 23:44:28 +05:30
|
|
|
<a aria-label="GitHub" href="https://github.com/TeamPiped/Piped">
|
2021-04-07 17:15:40 +05:30
|
|
|
<font-awesome-icon :icon="['fab', 'github']"></font-awesome-icon>
|
2021-03-29 12:08:29 +05:30
|
|
|
</a>
|
|
|
|
|
2021-07-18 23:06:59 +05:30
|
|
|
<a href="https://github.com/TeamPiped/Piped#donations">
|
2021-04-07 17:15:40 +05:30
|
|
|
<font-awesome-icon :icon="['fab', 'bitcoin']"></font-awesome-icon>
|
2021-09-05 18:38:26 +05:30
|
|
|
{{ $t("actions.donations") }}
|
2021-03-29 12:08:29 +05:30
|
|
|
</a>
|
|
|
|
</div>
|
2020-12-09 19:03:29 +05:30
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
2021-04-01 03:39:39 +05:30
|
|
|
import Navigation from "@/components/Navigation";
|
2020-12-09 19:03:29 +05:30
|
|
|
export default {
|
2021-04-01 03:39:39 +05:30
|
|
|
components: {
|
2021-05-10 23:44:28 +05:30
|
|
|
Navigation,
|
|
|
|
},
|
2021-07-19 01:50:35 +05:30
|
|
|
mounted() {
|
|
|
|
if (window.location.pathname === "/" || window.location.pathname.length == 0)
|
|
|
|
switch (this.getPreferenceString("homepage", "trending")) {
|
|
|
|
case "trending":
|
|
|
|
break;
|
|
|
|
case "feed":
|
|
|
|
this.$router.push("/feed");
|
|
|
|
return;
|
|
|
|
default:
|
|
|
|
break;
|
|
|
|
}
|
2021-08-22 15:57:09 +05:30
|
|
|
|
|
|
|
if (this.getPreferenceBoolean("watchHistory", false))
|
|
|
|
if ("indexedDB" in window) {
|
|
|
|
const request = indexedDB.open("piped-db", 1);
|
|
|
|
request.onupgradeneeded = function() {
|
|
|
|
const db = request.result;
|
|
|
|
console.log("Upgrading object store.");
|
|
|
|
if (!db.objectStoreNames.contains("watch_history")) {
|
|
|
|
const store = db.createObjectStore("watch_history", { keyPath: "videoId" });
|
|
|
|
store.createIndex("video_id_idx", "videoId", { unique: true });
|
|
|
|
store.createIndex("id_idx", "id", { unique: true, autoIncrement: true });
|
|
|
|
}
|
|
|
|
};
|
|
|
|
request.onsuccess = e => {
|
|
|
|
window.db = e.target.result;
|
|
|
|
};
|
|
|
|
} else console.log("This browser doesn't support IndexedDB");
|
2021-08-25 22:00:21 +05:30
|
|
|
|
|
|
|
const App = this;
|
|
|
|
|
|
|
|
(async function() {
|
|
|
|
const locale = App.getPreferenceString("hl", "en");
|
|
|
|
if (window.i18n.global.locale.value !== locale) {
|
|
|
|
if (!window.i18n.global.availableLocales.includes(locale)) {
|
|
|
|
const messages = await import("@/locales/" + locale + ".json").then(module => module.default);
|
|
|
|
window.i18n.global.setLocaleMessage(locale, messages);
|
|
|
|
}
|
|
|
|
window.i18n.global.locale.value = locale;
|
|
|
|
}
|
|
|
|
})();
|
2021-07-19 01:50:35 +05:30
|
|
|
},
|
2020-12-09 19:03:29 +05:30
|
|
|
};
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<style>
|
2021-06-28 21:53:24 +05:30
|
|
|
h1,
|
|
|
|
p,
|
|
|
|
a,
|
|
|
|
b {
|
|
|
|
unicode-bidi: plaintext;
|
|
|
|
text-align: start;
|
|
|
|
}
|
|
|
|
|
2020-12-09 19:03:29 +05:30
|
|
|
::-webkit-scrollbar {
|
|
|
|
background-color: #15191a;
|
|
|
|
color: #c5bcae;
|
|
|
|
}
|
|
|
|
|
|
|
|
::-webkit-scrollbar-thumb {
|
|
|
|
background-color: #4b4f52;
|
|
|
|
}
|
|
|
|
|
|
|
|
::-webkit-scrollbar-thumb:hover {
|
|
|
|
background-color: #5b6469;
|
|
|
|
}
|
|
|
|
|
|
|
|
::-webkit-scrollbar-thumb:active {
|
|
|
|
background-color: #485053;
|
|
|
|
}
|
|
|
|
|
|
|
|
::-webkit-scrollbar-corner {
|
|
|
|
background-color: #0b0e0f;
|
|
|
|
}
|
|
|
|
|
2021-02-24 15:05:41 +05:30
|
|
|
* {
|
|
|
|
scrollbar-color: #15191a #444a4e;
|
|
|
|
}
|
|
|
|
</style>
|