mirror of
https://github.com/TeamPiped/Piped.git
synced 2024-08-14 23:57:27 +00:00
merge master
This commit is contained in:
commit
7994e358fb
37 changed files with 925 additions and 434 deletions
12
src/App.vue
12
src/App.vue
|
@ -131,11 +131,13 @@ export default {
|
|||
const defaultLang = await App.defaultLangage;
|
||||
const locale = App.getPreferenceString("hl", defaultLang);
|
||||
if (locale !== App.TimeAgoConfig.locale) {
|
||||
const localeTime = await import(`../node_modules/javascript-time-ago/locale/${locale}.json`).then(
|
||||
module => module.default,
|
||||
);
|
||||
App.TimeAgo.addLocale(localeTime);
|
||||
App.TimeAgoConfig.locale = locale;
|
||||
const localeTime = await import(`../node_modules/javascript-time-ago/locale/${locale}.json`)
|
||||
.catch(() => null)
|
||||
.then(module => module?.default);
|
||||
if (localeTime) {
|
||||
App.TimeAgo.addLocale(localeTime);
|
||||
App.TimeAgoConfig.locale = locale;
|
||||
}
|
||||
}
|
||||
if (window.i18n.global.locale.value !== locale) {
|
||||
if (!window.i18n.global.availableLocales.includes(locale)) {
|
||||
|
|
34
src/components/ChannelItem.vue
Normal file
34
src/components/ChannelItem.vue
Normal file
|
@ -0,0 +1,34 @@
|
|||
<template>
|
||||
<div>
|
||||
<router-link :to="props.item.url">
|
||||
<div class="relative">
|
||||
<img class="w-full" :src="props.item.thumbnail" loading="lazy" />
|
||||
</div>
|
||||
<p>
|
||||
<span v-text="props.item.name" />
|
||||
<font-awesome-icon class="ml-1.5" v-if="props.item.verified" icon="check" />
|
||||
</p>
|
||||
</router-link>
|
||||
<p v-if="props.item.description" v-text="props.item.description" />
|
||||
<router-link v-if="props.item.uploaderUrl" class="link" :to="props.item.uploaderUrl">
|
||||
<p>
|
||||
<span v-text="props.item.uploader" />
|
||||
<font-awesome-icon class="ml-1.5" v-if="props.item.uploaderVerified" icon="check" />
|
||||
</p>
|
||||
</router-link>
|
||||
|
||||
<a v-if="props.item.uploaderName" class="link" v-text="props.item.uploaderName" />
|
||||
<template v-if="props.item.videos >= 0">
|
||||
<br v-if="props.item.uploaderName" />
|
||||
<strong v-text="`${props.item.videos} ${$t('video.videos')}`" />
|
||||
</template>
|
||||
|
||||
<br />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
const props = defineProps({
|
||||
item: Object,
|
||||
});
|
||||
</script>
|
|
@ -35,13 +35,25 @@
|
|||
<font-awesome-icon icon="rss" />
|
||||
</a>
|
||||
|
||||
<div class="flex mt-4 mb-2">
|
||||
<button
|
||||
v-for="(tab, index) in tabs"
|
||||
:key="tab.name"
|
||||
class="btn mr-2"
|
||||
@click="loadTab(index)"
|
||||
:class="{ active: selectedTab == index }"
|
||||
>
|
||||
<span v-text="tab.translatedName"></span>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<hr />
|
||||
|
||||
<div class="video-grid">
|
||||
<VideoItem
|
||||
v-for="video in channel.relatedStreams"
|
||||
:key="video.url"
|
||||
:video="video"
|
||||
<ContentItem
|
||||
v-for="item in contentItems"
|
||||
:key="item.url"
|
||||
:item="item"
|
||||
height="94"
|
||||
width="168"
|
||||
hide-channel
|
||||
|
@ -52,17 +64,20 @@
|
|||
|
||||
<script>
|
||||
import ErrorHandler from "./ErrorHandler.vue";
|
||||
import VideoItem from "./VideoItem.vue";
|
||||
import ContentItem from "./ContentItem.vue";
|
||||
|
||||
export default {
|
||||
components: {
|
||||
ErrorHandler,
|
||||
VideoItem,
|
||||
ContentItem,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
channel: null,
|
||||
subscribed: false,
|
||||
tabs: [],
|
||||
selectedTab: 0,
|
||||
contentItems: [],
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
|
@ -111,25 +126,58 @@ export default {
|
|||
.then(() => {
|
||||
if (!this.channel.error) {
|
||||
document.title = this.channel.name + " - Piped";
|
||||
this.contentItems = this.channel.relatedStreams;
|
||||
this.fetchSubscribedStatus();
|
||||
this.updateWatched(this.channel.relatedStreams);
|
||||
this.tabs.push({
|
||||
translatedName: this.$t("video.videos"),
|
||||
});
|
||||
for (let i = 0; i < this.channel.tabs.length; i++) {
|
||||
let tab = this.channel.tabs[i];
|
||||
tab.translatedName = this.getTranslatedTabName(tab.name);
|
||||
this.tabs.push(tab);
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
handleScroll() {
|
||||
if (this.loading || !this.channel || !this.channel.nextpage) return;
|
||||
if (
|
||||
this.loading ||
|
||||
!this.channel ||
|
||||
!this.channel.nextpage ||
|
||||
(this.selectedTab != 0 && !this.tabs[this.selectedTab].tabNextPage)
|
||||
)
|
||||
return;
|
||||
if (window.innerHeight + window.scrollY >= document.body.offsetHeight - window.innerHeight) {
|
||||
this.loading = true;
|
||||
this.fetchJson(this.apiUrl() + "/nextpage/channel/" + this.channel.id, {
|
||||
nextpage: this.channel.nextpage,
|
||||
}).then(json => {
|
||||
this.channel.nextpage = json.nextpage;
|
||||
this.loading = false;
|
||||
this.updateWatched(json.relatedStreams);
|
||||
json.relatedStreams.map(stream => this.channel.relatedStreams.push(stream));
|
||||
});
|
||||
if (this.selectedTab == 0) {
|
||||
this.fetchChannelNextPage();
|
||||
} else {
|
||||
this.fetchChannelTabNextPage();
|
||||
}
|
||||
}
|
||||
},
|
||||
fetchChannelNextPage() {
|
||||
this.fetchJson(this.apiUrl() + "/nextpage/channel/" + this.channel.id, {
|
||||
nextpage: this.channel.nextpage,
|
||||
}).then(json => {
|
||||
this.channel.nextpage = json.nextpage;
|
||||
this.loading = false;
|
||||
this.updateWatched(json.relatedStreams);
|
||||
json.relatedStreams.map(stream => this.contentItems.push(stream));
|
||||
});
|
||||
},
|
||||
fetchChannelTabNextPage() {
|
||||
this.fetchJson(this.apiUrl() + "/channels/tabs", {
|
||||
data: this.tabs[this.selectedTab].data,
|
||||
nextpage: this.tabs[this.selectedTab].tabNextPage,
|
||||
}).then(json => {
|
||||
this.tabs[this.selectedTab].tabNextPage = json.nextpage;
|
||||
this.loading = false;
|
||||
json.content.map(item => this.contentItems.push(item));
|
||||
this.tabs[this.selectedTab].content = this.contentItems;
|
||||
});
|
||||
},
|
||||
subscribeHandler() {
|
||||
if (this.authenticated) {
|
||||
this.fetchJson(this.authApiUrl() + (this.subscribed ? "/unsubscribe" : "/subscribe"), null, {
|
||||
|
@ -147,6 +195,50 @@ export default {
|
|||
}
|
||||
this.subscribed = !this.subscribed;
|
||||
},
|
||||
getTranslatedTabName(tabName) {
|
||||
let translatedTabName = tabName;
|
||||
switch (tabName) {
|
||||
case "Livestreams":
|
||||
translatedTabName = this.$t("titles.livestreams");
|
||||
break;
|
||||
case "Playlists":
|
||||
translatedTabName = this.$t("titles.playlists");
|
||||
break;
|
||||
case "Channels":
|
||||
translatedTabName = this.$t("titles.channels");
|
||||
break;
|
||||
case "Shorts":
|
||||
translatedTabName = this.$t("video.shorts");
|
||||
break;
|
||||
default:
|
||||
console.error(`Tab name "${tabName}" is not translated yet!`);
|
||||
break;
|
||||
}
|
||||
return translatedTabName;
|
||||
},
|
||||
loadTab(index) {
|
||||
this.selectedTab = index;
|
||||
if (index == 0) {
|
||||
this.contentItems = this.channel.relatedStreams;
|
||||
return;
|
||||
}
|
||||
if (this.tabs[index].content) {
|
||||
this.contentItems = this.tabs[index].content;
|
||||
return;
|
||||
}
|
||||
this.fetchJson(this.apiUrl() + "/channels/tabs", {
|
||||
data: this.tabs[index].data,
|
||||
}).then(tab => {
|
||||
this.contentItems = this.tabs[index].content = tab.content;
|
||||
this.tabs[this.selectedTab].tabNextPage = tab.nextpage;
|
||||
});
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.active {
|
||||
border: 0.1rem outset red;
|
||||
}
|
||||
</style>
|
||||
|
|
|
@ -25,6 +25,11 @@
|
|||
</div>
|
||||
</div>
|
||||
<div class="whitespace-pre-wrap" v-html="urlify(comment.commentText)" />
|
||||
<div class="comment-footer mt-1 flex items-center">
|
||||
<div class="i-fa-solid:thumbs-up" />
|
||||
<span class="ml-1" v-text="numberFormat(comment.likeCount)" />
|
||||
<font-awesome-icon class="ml-1" v-if="comment.hearted" icon="heart" />
|
||||
</div>
|
||||
<template v-if="comment.repliesPage && (!loadingReplies || !showingReplies)">
|
||||
<div @click="loadReplies" class="cursor-pointer">
|
||||
<a v-text="`${$t('actions.reply_count', comment.replyCount)}`" />
|
||||
|
|
35
src/components/ContentItem.vue
Normal file
35
src/components/ContentItem.vue
Normal file
|
@ -0,0 +1,35 @@
|
|||
<template>
|
||||
<component :is="compName" :item="item" />
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { defineAsyncComponent } from "vue";
|
||||
|
||||
const props = defineProps({
|
||||
item: Object,
|
||||
});
|
||||
|
||||
const VideoItem = defineAsyncComponent(() => import("./VideoItem.vue"));
|
||||
const PlaylistItem = defineAsyncComponent(() => import("./PlaylistItem.vue"));
|
||||
const ChannelItem = defineAsyncComponent(() => import("./ChannelItem.vue"));
|
||||
|
||||
var compName;
|
||||
|
||||
switch (props.item?.type) {
|
||||
case "stream":
|
||||
compName = VideoItem;
|
||||
break;
|
||||
case "playlist":
|
||||
compName = PlaylistItem;
|
||||
break;
|
||||
case "channel":
|
||||
compName = ChannelItem;
|
||||
break;
|
||||
default:
|
||||
console.error("Unexpected item type: " + props.item.type);
|
||||
}
|
||||
|
||||
defineExpose({
|
||||
compName,
|
||||
});
|
||||
</script>
|
|
@ -16,7 +16,7 @@
|
|||
<hr />
|
||||
|
||||
<div class="video-grid">
|
||||
<VideoItem :is-feed="true" v-for="video in videos" :key="video.url" :video="video" />
|
||||
<VideoItem :is-feed="true" v-for="video in videos" :key="video.url" :item="video" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
<hr />
|
||||
|
||||
<div class="video-grid">
|
||||
<VideoItem v-for="video in videos" :key="video.url" :video="video" />
|
||||
<VideoItem v-for="video in videos" :key="video.url" :item="video" />
|
||||
</div>
|
||||
|
||||
<br />
|
||||
|
|
34
src/components/PlaylistItem.vue
Normal file
34
src/components/PlaylistItem.vue
Normal file
|
@ -0,0 +1,34 @@
|
|||
<template>
|
||||
<div>
|
||||
<router-link :to="props.item.url">
|
||||
<div class="relative">
|
||||
<img class="w-full" :src="props.item.thumbnail" loading="lazy" />
|
||||
</div>
|
||||
<p>
|
||||
<span v-text="props.item.name" />
|
||||
<font-awesome-icon class="ml-1.5" v-if="props.item.verified" icon="check" />
|
||||
</p>
|
||||
</router-link>
|
||||
<p v-if="props.item.description" v-text="props.item.description" />
|
||||
<router-link v-if="props.item.uploaderUrl" class="link" :to="props.item.uploaderUrl">
|
||||
<p>
|
||||
<span v-text="props.item.uploader" />
|
||||
<font-awesome-icon class="ml-1.5" v-if="props.item.uploaderVerified" icon="check" />
|
||||
</p>
|
||||
</router-link>
|
||||
|
||||
<a v-if="props.item.uploaderName" class="link" v-text="props.item.uploaderName" />
|
||||
<template v-if="props.item.videos >= 0">
|
||||
<br v-if="props.item.uploaderName" />
|
||||
<strong v-text="`${props.item.videos} ${$t('video.videos')}`" />
|
||||
</template>
|
||||
|
||||
<br />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
const props = defineProps({
|
||||
item: Object,
|
||||
});
|
||||
</script>
|
|
@ -32,7 +32,7 @@
|
|||
<VideoItem
|
||||
v-for="(video, index) in playlist.relatedStreams"
|
||||
:key="video.url"
|
||||
:video="video"
|
||||
:item="video"
|
||||
:index="index"
|
||||
:playlist-id="$route.query.list"
|
||||
:admin="admin"
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<VideoItem
|
||||
v-for="(related, index) in playlist.relatedStreams"
|
||||
:key="related.url"
|
||||
:video="related"
|
||||
:item="related"
|
||||
:index="index"
|
||||
:playlist-id="playlistId"
|
||||
height="94"
|
||||
|
|
|
@ -162,11 +162,11 @@
|
|||
@change="onChange($event)"
|
||||
/>
|
||||
</label>
|
||||
<label class="pref" for="chkShowComments">
|
||||
<strong v-t="'actions.show_comments'" />
|
||||
<label class="pref" for="chkHideComments">
|
||||
<strong v-t="'actions.minimize_comments_default'" />
|
||||
<input
|
||||
id="chkShowComments"
|
||||
v-model="showComments"
|
||||
id="chkHideComments"
|
||||
v-model="hideComments"
|
||||
class="checkbox"
|
||||
type="checkbox"
|
||||
@change="onChange($event)"
|
||||
|
@ -416,7 +416,7 @@ export default {
|
|||
countryMap: CountryMap,
|
||||
countrySelected: "US",
|
||||
defaultHomepage: "trending",
|
||||
showComments: true,
|
||||
minimizeComments: false,
|
||||
minimizeDescription: false,
|
||||
minimizeRecommendations: false,
|
||||
watchHistory: false,
|
||||
|
@ -552,7 +552,7 @@ export default {
|
|||
this.bufferingGoal = Math.max(Number(localStorage.getItem("bufferGoal")), 10);
|
||||
this.countrySelected = this.getPreferenceString("region", "US");
|
||||
this.defaultHomepage = this.getPreferenceString("homepage", "trending");
|
||||
this.showComments = this.getPreferenceBoolean("comments", true);
|
||||
this.minimizeComments = this.getPreferenceBoolean("minimizeComments", false);
|
||||
this.minimizeDescription = this.getPreferenceBoolean("minimizeDescription", false);
|
||||
this.minimizeRecommendations = this.getPreferenceBoolean("minimizeRecommendations", false);
|
||||
this.watchHistory = this.getPreferenceBoolean("watchHistory", false);
|
||||
|
@ -611,7 +611,7 @@ export default {
|
|||
localStorage.setItem("bufferGoal", this.bufferingGoal);
|
||||
localStorage.setItem("region", this.countrySelected);
|
||||
localStorage.setItem("homepage", this.defaultHomepage);
|
||||
localStorage.setItem("comments", this.showComments);
|
||||
localStorage.setItem("minimizeComments", this.minimizeComments);
|
||||
localStorage.setItem("minimizeDescription", this.minimizeDescription);
|
||||
localStorage.setItem("minimizeRecommendations", this.minimizeRecommendations);
|
||||
localStorage.setItem("watchHistory", this.watchHistory);
|
||||
|
|
|
@ -20,43 +20,17 @@
|
|||
|
||||
<div v-if="results" class="video-grid">
|
||||
<template v-for="result in results.items" :key="result.url">
|
||||
<VideoItem v-if="shouldUseVideoItem(result)" :video="result" height="94" width="168" />
|
||||
<div v-if="!shouldUseVideoItem(result)">
|
||||
<router-link :to="result.url">
|
||||
<div class="relative">
|
||||
<img class="w-full" :src="result.thumbnail" loading="lazy" />
|
||||
</div>
|
||||
<p>
|
||||
<span v-text="result.name" />
|
||||
<font-awesome-icon class="ml-1.5" v-if="result.verified" icon="check" />
|
||||
</p>
|
||||
</router-link>
|
||||
<p v-if="result.description" v-text="result.description" />
|
||||
<router-link v-if="result.uploaderUrl" class="link" :to="result.uploaderUrl">
|
||||
<p>
|
||||
<span v-text="result.uploader" />
|
||||
<font-awesome-icon class="ml-1.5" v-if="result.uploaderVerified" icon="check" />
|
||||
</p>
|
||||
</router-link>
|
||||
|
||||
<a v-if="result.uploaderName" class="link" v-text="result.uploaderName" />
|
||||
<template v-if="result.videos >= 0">
|
||||
<br v-if="result.uploaderName" />
|
||||
<strong v-text="`${result.videos} ${$t('video.videos')}`" />
|
||||
</template>
|
||||
|
||||
<br />
|
||||
</div>
|
||||
<ContentItem :item="result" height="94" width="168" />
|
||||
</template>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import VideoItem from "./VideoItem.vue";
|
||||
import ContentItem from "./ContentItem.vue";
|
||||
|
||||
export default {
|
||||
components: {
|
||||
VideoItem,
|
||||
ContentItem,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
|
@ -124,9 +98,6 @@ export default {
|
|||
});
|
||||
}
|
||||
},
|
||||
shouldUseVideoItem(item) {
|
||||
return item.title;
|
||||
},
|
||||
handleRedirect() {
|
||||
const query = this.$route.query.search_query;
|
||||
const url =
|
||||
|
|
|
@ -3,11 +3,11 @@
|
|||
<h2 v-t="'actions.share'" />
|
||||
<div class="flex justify-between mt-4">
|
||||
<label v-t="'actions.with_timecode'" for="withTimeCode" />
|
||||
<input id="withTimeCode" type="checkbox" v-model="withTimeCode" />
|
||||
<input id="withTimeCode" type="checkbox" v-model="withTimeCode" @change="onChange" />
|
||||
</div>
|
||||
<div class="flex justify-between mt-2">
|
||||
<label v-t="'actions.piped_link'" />
|
||||
<input type="checkbox" v-model="pipedLink" />
|
||||
<input type="checkbox" v-model="pipedLink" @change="onChange" />
|
||||
</div>
|
||||
<div class="flex justify-between mt-2">
|
||||
<label v-t="'actions.time_code'" />
|
||||
|
@ -47,6 +47,8 @@ export default {
|
|||
},
|
||||
mounted() {
|
||||
this.timeStamp = parseInt(this.currentTime);
|
||||
this.withTimeCode = this.getPreferenceBoolean("shareWithTimeCode", true);
|
||||
this.pipedLink = this.getPreferenceBoolean("shareAsPipedLink", true);
|
||||
},
|
||||
methods: {
|
||||
followLink() {
|
||||
|
@ -63,6 +65,10 @@ export default {
|
|||
alert(this.$t("info.cannot_copy"));
|
||||
}
|
||||
},
|
||||
onChange() {
|
||||
this.setPreference("shareWithTimeCode", this.withTimeCode);
|
||||
this.setPreference("shareAsPipedLink", this.pipedLink);
|
||||
},
|
||||
},
|
||||
computed: {
|
||||
generatedLink() {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<template>
|
||||
<div class="video-grid">
|
||||
<VideoItem v-for="video in videos" :key="video.url" :video="video" height="118" width="210" />
|
||||
<VideoItem v-for="video in videos" :key="video.url" :item="video" height="118" width="210" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
:to="{
|
||||
path: '/watch',
|
||||
query: {
|
||||
v: video.url.substr(-11),
|
||||
v: item.url.substr(-11),
|
||||
...(playlistId && { list: playlistId }),
|
||||
...(index >= 0 && { index: index + 1 }),
|
||||
},
|
||||
|
@ -12,36 +12,36 @@
|
|||
>
|
||||
<img
|
||||
class="w-full"
|
||||
:src="video.thumbnail"
|
||||
:alt="video.title"
|
||||
:class="{ 'shorts-img': short }"
|
||||
:src="item.thumbnail"
|
||||
:alt="item.title"
|
||||
:class="{ 'shorts-img': item.isShort }"
|
||||
loading="lazy"
|
||||
/>
|
||||
<div class="relative text-sm">
|
||||
<span
|
||||
class="thumbnail-overlay thumbnail-right"
|
||||
v-if="video.duration > 0"
|
||||
v-text="timeFormat(video.duration)"
|
||||
v-if="item.duration > 0"
|
||||
v-text="timeFormat(item.duration)"
|
||||
/>
|
||||
<!-- shorts thumbnail -->
|
||||
<span class="thumbnail-overlay thumbnail-left" v-if="short" v-t="'video.shorts'" />
|
||||
<span class="thumbnail-overlay thumbnail-left" v-if="item.isShort" v-t="'video.shorts'" />
|
||||
<span
|
||||
class="thumbnail-overlay thumbnail-right"
|
||||
v-else-if="video.duration >= 60"
|
||||
v-text="timeFormat(video.duration)"
|
||||
v-else-if="item.duration >= 0"
|
||||
v-text="timeFormat(item.duration)"
|
||||
/>
|
||||
<i18n-t v-else keypath="video.live" class="thumbnail-overlay thumbnail-right live-badge" tag="div">
|
||||
<font-awesome-icon :icon="['fas', 'broadcast-tower']" />
|
||||
</i18n-t>
|
||||
<span v-if="video.watched" class="thumbnail-overlay thumbnail-left" v-t="'video.watched'" />
|
||||
<span v-if="item.watched" class="thumbnail-overlay bottom-5px left-5px" v-t="'video.watched'" />
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<p
|
||||
style="display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical"
|
||||
class="my-2 overflow-hidden flex link"
|
||||
:title="video.title"
|
||||
v-text="video.title"
|
||||
:title="item.title"
|
||||
v-text="item.title"
|
||||
/>
|
||||
</div>
|
||||
</router-link>
|
||||
|
@ -51,14 +51,14 @@
|
|||
:to="{
|
||||
path: '/watch',
|
||||
query: {
|
||||
v: video.url.substr(-11),
|
||||
v: item.url.substr(-11),
|
||||
...(playlistId && { list: playlistId }),
|
||||
...(index >= 0 && { index: index + 1 }),
|
||||
listen: '1',
|
||||
},
|
||||
}"
|
||||
:aria-label="'Listen to ' + video.title"
|
||||
:title="'Listen to ' + video.title"
|
||||
:aria-label="'Listen to ' + item.title"
|
||||
:title="'Listen to ' + item.title"
|
||||
>
|
||||
<font-awesome-icon icon="headphones" />
|
||||
</router-link>
|
||||
|
@ -69,20 +69,20 @@
|
|||
v-if="admin"
|
||||
:title="$t('actions.remove_from_playlist')"
|
||||
ref="removeButton"
|
||||
@click="removeVideo(video.url.substr(-11))"
|
||||
@click="removeVideo(item.url.substr(-11))"
|
||||
>
|
||||
<font-awesome-icon icon="circle-minus" />
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<div class="flex">
|
||||
<router-link :to="video.uploaderUrl">
|
||||
<router-link :to="item.uploaderUrl">
|
||||
<img
|
||||
v-if="video.uploaderAvatar"
|
||||
:src="video.uploaderAvatar"
|
||||
v-if="item.uploaderAvatar"
|
||||
:src="item.uploaderAvatar"
|
||||
loading="lazy"
|
||||
:alt="video.uploaderName"
|
||||
class="mr-0.5 mt-0.5 w-32px h-32px"
|
||||
:alt="item.uploaderName"
|
||||
class="rounded-full mr-0.5 mt-0.5 w-32px h-32px"
|
||||
width="68"
|
||||
height="68"
|
||||
/>
|
||||
|
@ -90,22 +90,22 @@
|
|||
|
||||
<div class="w-[calc(100%-32px-1rem)]">
|
||||
<router-link
|
||||
v-if="video.uploaderUrl && video.uploaderName && !hideChannel"
|
||||
v-if="item.uploaderUrl && item.uploaderName && !hideChannel"
|
||||
class="link-secondary overflow-hidden block"
|
||||
:to="video.uploaderUrl"
|
||||
:title="video.uploaderName"
|
||||
:to="item.uploaderUrl"
|
||||
:title="item.uploaderName"
|
||||
>
|
||||
<span v-text="video.uploaderName" />
|
||||
<font-awesome-icon class="ml-1.5" v-if="video.uploaderVerified" icon="check" />
|
||||
<span v-text="item.uploaderName" />
|
||||
<font-awesome-icon class="ml-1.5" v-if="item.uploaderVerified" icon="check" />
|
||||
</router-link>
|
||||
|
||||
<strong v-if="video.views >= 0 || video.uploadedDate" class="text-sm">
|
||||
<span v-if="video.views >= 0">
|
||||
<strong v-if="item.views >= 0 || item.uploadedDate" class="text-sm">
|
||||
<span v-if="item.views >= 0">
|
||||
<font-awesome-icon icon="eye" />
|
||||
<span class="pl-0.5" v-text="`${numberFormat(video.views)} •`" />
|
||||
<span class="pl-0.5" v-text="`${numberFormat(item.views)} •`" />
|
||||
</span>
|
||||
<span v-if="video.uploaded > 0" class="pl-0.5" v-text="timeAgo(video.uploaded)" />
|
||||
<span v-else-if="video.uploadedDate" class="pl-0.5" v-text="video.uploadedDate" />
|
||||
<span v-if="item.uploaded > 0" class="pl-0.5" v-text="timeAgo(item.uploaded)" />
|
||||
<span v-else-if="item.uploadedDate" class="pl-0.5" v-text="item.uploadedDate" />
|
||||
</strong>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -127,7 +127,7 @@ import PlaylistAddModal from "./PlaylistAddModal.vue";
|
|||
|
||||
export default {
|
||||
props: {
|
||||
video: {
|
||||
item: {
|
||||
type: Object,
|
||||
default: () => {
|
||||
return {};
|
||||
|
@ -177,7 +177,7 @@ export default {
|
|||
if (!this.isFeed || !this.getPreferenceBoolean("hideWatched", false)) return;
|
||||
|
||||
const objectStore = window.db.transaction("watch_history", "readonly").objectStore("watch_history");
|
||||
const request = objectStore.get(this.video.url.substr(-11));
|
||||
const request = objectStore.get(this.item.url.substr(-11));
|
||||
request.onsuccess = event => {
|
||||
const video = event.target.result;
|
||||
if (video && (video.currentTime ?? 0) > video.duration * 0.9) {
|
||||
|
@ -187,11 +187,6 @@ export default {
|
|||
};
|
||||
},
|
||||
},
|
||||
computed: {
|
||||
short() {
|
||||
return this.video.duration > 0 && this.video.duration <= 61;
|
||||
},
|
||||
},
|
||||
components: { PlaylistAddModal },
|
||||
};
|
||||
</script>
|
||||
|
|
|
@ -47,11 +47,11 @@
|
|||
<!-- Likes/dilikes -->
|
||||
<div class="pp-likes flex children:mr-2">
|
||||
<template v-if="video.likes >= 0">
|
||||
<div class="flex">
|
||||
<div class="flex items-center">
|
||||
<div class="i-fa-solid:thumbs-up" />
|
||||
<strong class="ml-1" v-text="addCommas(video.likes)" />
|
||||
</div>
|
||||
<div class="flex">
|
||||
<div class="flex items-center">
|
||||
<div class="i-fa-solid:thumbs-down" />
|
||||
<strong class="ml-1" v-text="video.dislikes >= 0 ? addCommas(video.dislikes) : '?'" />
|
||||
</div>
|
||||
|
@ -154,16 +154,22 @@
|
|||
</div>
|
||||
|
||||
<div class="grid pp-rec-vids">
|
||||
<div v-if="!commentsEnabled" class="">
|
||||
<div class="xl:col-span-4 sm:col-span-3">
|
||||
<p class="text-center mt-8" v-t="'comment.user_disabled'"></p>
|
||||
<button
|
||||
class="btn mb-2"
|
||||
@click="toggleComments"
|
||||
v-t="`actions.${showComments ? 'minimize_comments' : 'show_comments'}`"
|
||||
/>
|
||||
</div>
|
||||
<div v-else-if="!comments" class="">
|
||||
<div v-if="!showComments" class="w-full"></div>
|
||||
<div v-if="!comments" class="">
|
||||
<p class="text-center mt-8" v-t="'comment.loading'"></p>
|
||||
</div>
|
||||
<div v-else-if="comments.disabled" class="">
|
||||
<p class="text-center mt-8" v-t="'comment.disabled'"></p>
|
||||
</div>
|
||||
<div v-else ref="comments" class="">
|
||||
<div v-else ref="comments" v-show="showComments" class="">
|
||||
<CommentItem
|
||||
v-for="comment in comments.comments"
|
||||
:key="comment.commentId"
|
||||
|
@ -180,11 +186,12 @@
|
|||
:playlist="playlist"
|
||||
:selected-index="index"
|
||||
/>
|
||||
<hr v-show="showRecs" />
|
||||
<div v-show="showRecs" class="pp-show-recs">
|
||||
<VideoItem
|
||||
<ContentItem
|
||||
v-for="related in video.relatedStreams"
|
||||
:key="related.url"
|
||||
:video="related"
|
||||
:item="related"
|
||||
height="94"
|
||||
width="168"
|
||||
/>
|
||||
|
@ -196,7 +203,7 @@
|
|||
|
||||
<script>
|
||||
import VideoPlayer from "./VideoPlayer.vue";
|
||||
import VideoItem from "./VideoItem.vue";
|
||||
import ContentItem from "./ContentItem.vue";
|
||||
import ErrorHandler from "./ErrorHandler.vue";
|
||||
import CommentItem from "./CommentItem.vue";
|
||||
import ChaptersBar from "./ChaptersBar.vue";
|
||||
|
@ -208,7 +215,7 @@ export default {
|
|||
name: "App",
|
||||
components: {
|
||||
VideoPlayer,
|
||||
VideoItem,
|
||||
ContentItem,
|
||||
ErrorHandler,
|
||||
CommentItem,
|
||||
ChaptersBar,
|
||||
|
@ -228,6 +235,7 @@ export default {
|
|||
sponsors: null,
|
||||
selectedAutoLoop: false,
|
||||
selectedAutoPlay: null,
|
||||
showComments: true,
|
||||
showDesc: true,
|
||||
showRecs: true,
|
||||
showChapters: true,
|
||||
|
@ -262,9 +270,6 @@ export default {
|
|||
year: "numeric",
|
||||
});
|
||||
},
|
||||
commentsEnabled() {
|
||||
return this.getPreferenceBoolean("comments", true);
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
// check screen size
|
||||
|
@ -312,7 +317,7 @@ export default {
|
|||
this.index = Number(this.$route.query.index);
|
||||
this.getPlaylistData();
|
||||
this.getSponsors();
|
||||
if (!this.isEmbed && this.commentsEnabled) this.getComments();
|
||||
if (!this.isEmbed && this.showComments) this.getComments();
|
||||
window.addEventListener("resize", () => {
|
||||
this.smallView = this.smallViewQuery.matches;
|
||||
});
|
||||
|
@ -320,6 +325,7 @@ export default {
|
|||
activated() {
|
||||
this.active = true;
|
||||
this.selectedAutoPlay = this.getPreferenceBoolean("autoplay", false);
|
||||
this.showComments = !this.getPreferenceBoolean("minimizeComments", false);
|
||||
this.showDesc = !this.getPreferenceBoolean("minimizeDescription", false);
|
||||
this.showRecs = !this.getPreferenceBoolean("minimizeRecommendations", false);
|
||||
if (this.video.duration) {
|
||||
|
@ -350,6 +356,12 @@ export default {
|
|||
'"]',
|
||||
});
|
||||
},
|
||||
toggleComments() {
|
||||
this.showComments = !this.showComments;
|
||||
if (this.showComments && this.comments === null) {
|
||||
this.fetchComments();
|
||||
}
|
||||
},
|
||||
fetchComments() {
|
||||
return this.fetchJson(this.apiUrl() + "/comments/" + this.getVideoId());
|
||||
},
|
||||
|
@ -462,7 +474,7 @@ export default {
|
|||
},
|
||||
handleScroll() {
|
||||
if (this.loading || !this.comments || !this.comments.nextpage) return;
|
||||
if (window.innerHeight + window.scrollY >= this.$refs.comments.offsetHeight - window.innerHeight) {
|
||||
if (window.innerHeight + window.scrollY >= this.$refs.comments?.offsetHeight - window.innerHeight) {
|
||||
this.loading = true;
|
||||
this.fetchJson(this.apiUrl() + "/nextpage/comments/" + this.getVideoId(), {
|
||||
nextpage: this.comments.nextpage,
|
||||
|
|
|
@ -111,7 +111,10 @@
|
|||
"status_page": "الحالة",
|
||||
"source_code": "شفرة المصدر",
|
||||
"instance_donations": "تبرعات المثيل",
|
||||
"hide_watched": "إخفاء مقاطع الفيديو التي تمت مشاهدتها من الخلاصة"
|
||||
"hide_watched": "إخفاء مقاطع الفيديو التي تمت مشاهدتها من الخلاصة",
|
||||
"reply_count": "{count} الردود",
|
||||
"minimize_comments_default": "تصغير التعليقات بشكل افتراضي",
|
||||
"minimize_comments": "تصغير التعليقات"
|
||||
},
|
||||
"video": {
|
||||
"sponsor_segments": "المقاطع الإعلانية",
|
||||
|
|
|
@ -111,7 +111,10 @@
|
|||
"follow_link": "Linki izləyin",
|
||||
"piped_link": "Piped linki",
|
||||
"copy_link": "Linki kopyalayın",
|
||||
"back_to_home": "Evə qayıt"
|
||||
"back_to_home": "Evə qayıt",
|
||||
"reply_count": "{count} cavab",
|
||||
"minimize_comments_default": "Şərhləri standart olaraq kiçilt",
|
||||
"minimize_comments": "Şərhləri Kiçilt"
|
||||
},
|
||||
"comment": {
|
||||
"pinned_by": "Tərəfindən Sabitləndi {author}",
|
||||
|
|
|
@ -108,7 +108,10 @@
|
|||
"source_code": "Zdrojový kód",
|
||||
"instance_donations": "Dary na instanci",
|
||||
"documentation": "Dokumentace",
|
||||
"status_page": "Stav"
|
||||
"status_page": "Stav",
|
||||
"reply_count": "{count} odpovědí",
|
||||
"minimize_comments_default": "Ve výchozím nastavení skrýt komentáře",
|
||||
"minimize_comments": "Skrýt komentáře"
|
||||
},
|
||||
"player": {
|
||||
"watch_on": "Sledovat na {0}"
|
||||
|
|
|
@ -10,7 +10,9 @@
|
|||
"playlists": "Playlists",
|
||||
"account": "Account",
|
||||
"instance": "Instance",
|
||||
"player": "Player"
|
||||
"player": "Player",
|
||||
"livestreams": "Livestreams",
|
||||
"channels": "Channels"
|
||||
},
|
||||
"player": {
|
||||
"watch_on": "Watch on {0}"
|
||||
|
@ -47,7 +49,7 @@
|
|||
"buffering_goal": "Buffering Goal (in seconds)",
|
||||
"country_selection": "Country Selection",
|
||||
"default_homepage": "Default Homepage",
|
||||
"show_comments": "Show Comments",
|
||||
"minimize_comments_default": "Minimize Comments by default",
|
||||
"minimize_description_default": "Minimize Description by default",
|
||||
"store_watch_history": "Store Watch History",
|
||||
"language_selection": "Language Selection",
|
||||
|
@ -62,6 +64,8 @@
|
|||
"loop_this_video": "Loop this Video",
|
||||
"auto_play_next_video": "Auto Play next Video",
|
||||
"donations": "Development donations",
|
||||
"minimize_comments": "Minimize Comments",
|
||||
"show_comments": "Show Comments",
|
||||
"minimize_description": "Minimize Description",
|
||||
"show_description": "Description",
|
||||
"minimize_recommendations": "Minimize Recommendations",
|
||||
|
|
|
@ -6,14 +6,18 @@
|
|||
"feed": "Fluo",
|
||||
"preferences": "Agordoj",
|
||||
"history": "Historio",
|
||||
"subscriptions": "Abonoj"
|
||||
"subscriptions": "Abonoj",
|
||||
"playlists": "Ludlistoj",
|
||||
"account": "Konto",
|
||||
"player": "Ludilo",
|
||||
"instance": "Nodo"
|
||||
},
|
||||
"player": {
|
||||
"watch_on": "Vidi en {0}"
|
||||
},
|
||||
"actions": {
|
||||
"subscribe": "Aboni",
|
||||
"unsubscribe": "Malaboni",
|
||||
"subscribe": "Aboni - {count}",
|
||||
"unsubscribe": "Malaboni - {count}",
|
||||
"view_subscriptions": "Vidi Abonojn",
|
||||
"sort_by": "Ordigi laŭ:",
|
||||
"most_recent": "Plej Freŝaj",
|
||||
|
@ -26,7 +30,7 @@
|
|||
"skip_sponsors": "Preterlasi Sponsorojn",
|
||||
"skip_intro": "Preterpasi Interakton/Komencan Animacion",
|
||||
"skip_outro": "Preterpasi Finkartojn/Atribuojn",
|
||||
"skip_preview": "Preterpasi Antaŭvidon/",
|
||||
"skip_preview": "Preterpasi Antaŭvidon/Resumon",
|
||||
"theme": "Etoso",
|
||||
"dark": "Malhela",
|
||||
"light": "Hela",
|
||||
|
@ -36,14 +40,129 @@
|
|||
"country_selection": "Landa Elekto",
|
||||
"default_homepage": "Defaŭlta Ĉefpaĝo",
|
||||
"show_comments": "Montri Komentojn",
|
||||
"language_selection": "Lingvo Elekto",
|
||||
"donations": "Donacoj",
|
||||
"show_more": "Montri pli",
|
||||
"language_selection": "Lingva Elekto",
|
||||
"donations": "Donacoj por programado",
|
||||
"show_more": "Montri Pli",
|
||||
"yes": "Jes",
|
||||
"no": "Ne",
|
||||
"show_chapters": "Sekcioj"
|
||||
"show_chapters": "Sekcioj",
|
||||
"filter": "Filtri",
|
||||
"search": "Serĉi",
|
||||
"hide_replies": "Kaŝi Respondojn",
|
||||
"add_to_playlist": "Aldoni al ludlisto",
|
||||
"delete_playlist": "Forigi Ludliston",
|
||||
"rename_playlist": "Renomi ludliston",
|
||||
"download_as_txt": "Elŝuti kiel .txt",
|
||||
"piped_link": "Piped-ligilo",
|
||||
"copy_link": "Kopii ligilon",
|
||||
"source_code": "Fontkodo",
|
||||
"select_playlist": "Elektu Ludliston",
|
||||
"documentation": "Dokumentaro",
|
||||
"clone_playlist": "Kloni Ludliston",
|
||||
"clone_playlist_success": "Sukcese klonita!",
|
||||
"delete_playlist_video_confirm": "Ĉu forigi videon el ludlisto?",
|
||||
"remove_from_playlist": "Forigi el ludlisto",
|
||||
"create_playlist": "Krei Ludliston",
|
||||
"delete_account": "Forigi Konton",
|
||||
"new_playlist_name": "Nomo de nova ludlisto",
|
||||
"reply_count": "{count} respondoj",
|
||||
"load_more_replies": "Ŝargi pli da Respondoj",
|
||||
"share": "Konigi",
|
||||
"minimize_description": "Plejetigi Priskribon",
|
||||
"with_timecode": "Konigi kun tempkodo",
|
||||
"instance_donations": "Donacoj por instanco",
|
||||
"confirm_reset_preferences": "Ĉu vi certe volas restarigi viajn agordojn?",
|
||||
"export_to_json": "Elporti JSON-n",
|
||||
"loop_this_video": "Ripetadi ĉi tiun Videon",
|
||||
"enable_lbry_proxy": "Ebligi Prokurilon por LBRY",
|
||||
"import_from_json": "Importi el JSON/CSV",
|
||||
"show_description": "Montri Priskribon",
|
||||
"instances_list": "Listo de Nodoj",
|
||||
"auto_play_next_video": "Aŭtomate Ludi sekvan Videon",
|
||||
"show_recommendations": "Montri Rekomendojn",
|
||||
"reset_preferences": "Restarigi agordojn",
|
||||
"instance_selection": "Noda Elekto",
|
||||
"view_ssl_score": "Vidu SSL-Poentaron",
|
||||
"backup_preferences": "Savkopii agordojn",
|
||||
"disable_lbry": "Malebligi LBRY-n por Elsendfluo",
|
||||
"delete_playlist_confirm": "Ĉu forigi ĉi tiun ludliston?",
|
||||
"store_search_history": "Konservi Ŝerĉhistorion",
|
||||
"hide_watched": "Kaŝi viditajn videojn en la fluo",
|
||||
"minimize_recommendations": "Plejetigi Rekomendojn",
|
||||
"instance_auth_selection": "Elekto de Aŭtentokontrola Nodo",
|
||||
"restore_preferences": "Restarigi agordojn",
|
||||
"status_page": "Stato",
|
||||
"please_select_playlist": "Bonvolu elekti ludliston",
|
||||
"different_auth_instance": "Uzi alian nodon por aŭtentokontrolo",
|
||||
"back_to_home": "Ree hejmen",
|
||||
"time_code": "Tempkodo (en sekundoj)",
|
||||
"skip_non_music": "Preterpasi Muzikon: Nemuzika Sekcio",
|
||||
"buffering_goal": "Bufra Celo (en sekundoj)",
|
||||
"follow_link": "Sekvi ligilon",
|
||||
"skip_self_promo": "Preterpasi Nepagitan/Memreklamon",
|
||||
"enabled_codecs": "Kodekoj Ebligitaj (Pluraj)",
|
||||
"auto": "Aŭtomate",
|
||||
"show_markers": "Montri Markojn en Ludilo",
|
||||
"loading": "Ŝarĝante...",
|
||||
"clear_history": "Forigi la Historion",
|
||||
"skip_filler_tangent": "Preterpasi Plenigajn Scenojn",
|
||||
"skip_highlight": "Preterpasi Rimarkindan Momenton",
|
||||
"invalidate_session": "Elsaluti ĉiujn aparatojn",
|
||||
"skip_interaction": "Preterpasi Interagan Memorigon (Aboni)",
|
||||
"store_watch_history": "Konservi Vidhistorion",
|
||||
"logout": "Elsaluti el ĉi tiu aparato",
|
||||
"minimize_description_default": "Defaŭlte Plejetigi Priskribon",
|
||||
"minimize_recommendations_default": "Defaŭlte Plejetigi Rekomendojn",
|
||||
"minimize_comments_default": "Defaŭlte Plejetigi Komentojn",
|
||||
"minimize_comments": "Plejetigi Komentojn"
|
||||
},
|
||||
"video": {
|
||||
"chapters": "Sekcioj"
|
||||
"chapters": "Sekcioj",
|
||||
"videos": "Videoj",
|
||||
"live": "{0} Realtempe",
|
||||
"views": "{views} spektoj",
|
||||
"sponsor_segments": "Sponsoraj Segmentoj",
|
||||
"watched": "Viditaj",
|
||||
"ratings_disabled": "Taksadoj Malebligitaj",
|
||||
"shorts": "Mallongaj"
|
||||
},
|
||||
"search": {
|
||||
"music_albums": "YT Music: Albumoj",
|
||||
"music_playlists": "YT Music: Ludlistoj",
|
||||
"videos": "YouTube: Videoj",
|
||||
"playlists": "YouTube: Ludlistoj",
|
||||
"channels": "YouTube: Kanaloj",
|
||||
"music_videos": "YT Music: Videoj",
|
||||
"music_songs": "YT Music: Muzikaĵoj",
|
||||
"all": "YouTube: Ĉio",
|
||||
"did_you_mean": "Ĉu vi volis diri «{0}»?"
|
||||
},
|
||||
"info": {
|
||||
"copied": "Kopiita!",
|
||||
"cannot_copy": "Ne povas kopii!",
|
||||
"preferences_note": "Noto: la agordoj estas konservitaj en la loka memoro de via retumilo. Forigi la datumojn de via retumilo restarigos ilin.",
|
||||
"page_not_found": "Paĝo ne trovita"
|
||||
},
|
||||
"login": {
|
||||
"username": "Uzantnomo",
|
||||
"password": "Pasvorto"
|
||||
},
|
||||
"preferences": {
|
||||
"version": "Versio",
|
||||
"instance_name": "Noda Nomo",
|
||||
"registered_users": "Registritaj Uzantoj",
|
||||
"ssl_score": "SSL-Poentaro",
|
||||
"up_to_date": "Ĉu ĝisdata?",
|
||||
"has_cdn": "Ĉu ĝi havas CDN-n?",
|
||||
"instance_locations": "Nodaj Lokoj"
|
||||
},
|
||||
"comment": {
|
||||
"disabled": "Komentoj estas malebligitaj de la alŝutinto.",
|
||||
"user_disabled": "Komentoj estas malebligitaj en la agordoj.",
|
||||
"pinned_by": "Fiksita de {author}",
|
||||
"loading": "Ŝarĝante komentojn..."
|
||||
},
|
||||
"subscriptions": {
|
||||
"subscribed_channels_count": "Abonita al: {0}"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -111,7 +111,7 @@
|
|||
"time_code": "Código de tiempo (en segundos)",
|
||||
"reset_preferences": "Restablecer preferencias",
|
||||
"confirm_reset_preferences": "¿Estás seguro de que quieres restablecer tus preferencias?",
|
||||
"backup_preferences": "Preferencias de copia de seguridad",
|
||||
"backup_preferences": "Copia de seguridad de preferencias",
|
||||
"restore_preferences": "Restablecer las preferencias",
|
||||
"back_to_home": "Volver a la página de inicio",
|
||||
"show_chapters": "Capítulos",
|
||||
|
@ -120,7 +120,10 @@
|
|||
"documentation": "Documentación",
|
||||
"instance_donations": "Donaciones para instancia",
|
||||
"status_page": "Estado",
|
||||
"hide_watched": "Ocultar los vídeos vistos en el feed"
|
||||
"hide_watched": "Ocultar los vídeos vistos en el feed",
|
||||
"reply_count": "{count} respuestas",
|
||||
"minimize_comments_default": "Minimizar comentarios por defecto",
|
||||
"minimize_comments": "Minimizar comentarios"
|
||||
},
|
||||
"titles": {
|
||||
"feed": "Fuente web",
|
||||
|
|
|
@ -108,7 +108,10 @@
|
|||
"status_page": "État",
|
||||
"source_code": "Code source",
|
||||
"instance_donations": "Dons d'instance",
|
||||
"hide_watched": "Masquer les vidéos regardées dans le flux"
|
||||
"hide_watched": "Masquer les vidéos regardées dans le flux",
|
||||
"reply_count": "{count} réponses",
|
||||
"minimize_comments_default": "Minimiser les commentaires par défaut",
|
||||
"minimize_comments": "Minimiser les commentaires"
|
||||
},
|
||||
"player": {
|
||||
"watch_on": "Regarder sur {0}"
|
||||
|
|
|
@ -111,7 +111,10 @@
|
|||
"status_page": "מצב",
|
||||
"source_code": "קוד מקור",
|
||||
"hide_watched": "הסתרת הסרטונים שנצפו בערוץ העדכונים",
|
||||
"instance_donations": "תרומות להפעלה"
|
||||
"instance_donations": "תרומות להפעלה",
|
||||
"reply_count": "{count} תגובות",
|
||||
"minimize_comments_default": "צמצום הערות כברירת מחדל",
|
||||
"minimize_comments": "צמצום הערות"
|
||||
},
|
||||
"comment": {
|
||||
"pinned_by": "ננעץ על ידי {author}",
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
"show_description": "Prikaži opis",
|
||||
"minimize_recommendations": "Sakrij preporuke",
|
||||
"show_recommendations": "Prikaži preporuke",
|
||||
"donations": "Donacije",
|
||||
"donations": "Donacije za razvoj",
|
||||
"auto_play_next_video": "Automatski reproduciraj idući video",
|
||||
"loop_this_video": "Ponavljaj ovaj video",
|
||||
"import_from_json": "Uvezi iz JSON/CSV formata",
|
||||
|
@ -114,7 +114,14 @@
|
|||
"rename_playlist": "Preimenuj popis snimaka",
|
||||
"new_playlist_name": "Ime novog popisa snimaka",
|
||||
"share": "Dijeli",
|
||||
"show_chapters": "Poglavlja"
|
||||
"show_chapters": "Poglavlja",
|
||||
"documentation": "Dokumentacija",
|
||||
"source_code": "Izvorni kod",
|
||||
"instance_donations": "Donacije instace",
|
||||
"store_search_history": "Spremi povijest pretrage",
|
||||
"hide_watched": "Sakrij gledana videa u novostima",
|
||||
"status_page": "Stanje",
|
||||
"reply_count": "{count} odgovora"
|
||||
},
|
||||
"player": {
|
||||
"watch_on": "Gledaj na {0}"
|
||||
|
|
|
@ -111,7 +111,10 @@
|
|||
"instance_donations": "Donasi instansi",
|
||||
"hide_watched": "Sembunyikan video yang telah ditonton di umpan",
|
||||
"status_page": "Status",
|
||||
"source_code": "Kode sumber"
|
||||
"source_code": "Kode sumber",
|
||||
"reply_count": "{count} balasan",
|
||||
"minimize_comments_default": "Kecilkan Komentar secara bawaan",
|
||||
"minimize_comments": "Kecilkan Komentar"
|
||||
},
|
||||
"comment": {
|
||||
"pinned_by": "Dipasangi pin oleh {author}",
|
||||
|
|
|
@ -8,13 +8,15 @@
|
|||
"trending": "Vinsælt",
|
||||
"feed": "Straumur",
|
||||
"playlists": "Spilunarlistar",
|
||||
"player": "Spilari"
|
||||
"player": "Spilari",
|
||||
"account": "Reikningur",
|
||||
"instance": "Tilvik"
|
||||
},
|
||||
"actions": {
|
||||
"sort_by": "Raða eftir:",
|
||||
"back": "Til Baka",
|
||||
"dark": "Dimmt",
|
||||
"light": "Ljóst",
|
||||
"dark": "Dökk",
|
||||
"light": "Ljós",
|
||||
"theme": "Þema",
|
||||
"enable_sponsorblock": "Virkja Sponsorblock",
|
||||
"subscribe": "Gerast Áskrifandi - {count}",
|
||||
|
@ -46,14 +48,14 @@
|
|||
"language_selection": "Tungumálaval",
|
||||
"minimize_description_default": "Lágmarka Lýsingu Sjálfgefið",
|
||||
"instances_list": "Tilvikalisti",
|
||||
"donations": "Framlög",
|
||||
"donations": "Framlög til þróunar",
|
||||
"minimize_description": "Minnka Lýsingu",
|
||||
"show_description": "Sýna Lýsingu",
|
||||
"minimize_recommendations": "Minnka Tillögur",
|
||||
"show_recommendations": "Sýna Tillögur",
|
||||
"disable_lbry": "Óvirkja LBRY Fyrir Straumspilun",
|
||||
"enable_lbry_proxy": "Virkja Staðgengilsþjón fyrir LBRY",
|
||||
"view_ssl_score": "Skoðaðu SSL Einkunn",
|
||||
"view_ssl_score": "Skoða SSL einkunn",
|
||||
"enabled_codecs": "Virkjir Afkóðarar (Marghæft)",
|
||||
"instance_selection": "Tilviksval",
|
||||
"import_from_json": "Flytja inn frá JSON/CSV",
|
||||
|
@ -67,13 +69,63 @@
|
|||
"default_quality": "Sjálfgefin Gæði",
|
||||
"buffering_goal": "Biðminnismarkmið (í sekúndum)",
|
||||
"export_to_json": "Flytja út í JSON",
|
||||
"skip_highlight": "Sleppa Hápunkti"
|
||||
"skip_highlight": "Sleppa Hápunkti",
|
||||
"create_playlist": "Skapa spilunarlista",
|
||||
"delete_playlist": "Eyða spilunarlista",
|
||||
"time_code": "Tímakóði (sekúndur)",
|
||||
"restore_preferences": "Flytja inn stillingar",
|
||||
"download_as_txt": "Sækja textaskrá",
|
||||
"different_auth_instance": "Nota annað tilvik til auðkenningar",
|
||||
"instance_auth_selection": "Val tilvika fyrir auðkenningu",
|
||||
"add_to_playlist": "Bæta við á spilunarlista",
|
||||
"reset_preferences": "Endurstilla stillingar",
|
||||
"remove_from_playlist": "Fjarlægja af spilunarlista",
|
||||
"select_playlist": "Velja spilunarlista",
|
||||
"invalidate_session": "Útskrá öll tæki",
|
||||
"backup_preferences": "Flytja út stillingar",
|
||||
"documentation": "Hjálparskjöl",
|
||||
"skip_filler_tangent": "Sleppa því óviðkomandi",
|
||||
"show_markers": "Sýna merki á spilara",
|
||||
"delete_account": "Eyða reikningi",
|
||||
"follow_link": "Fylgja hlekki",
|
||||
"copy_link": "Afrita hlekk",
|
||||
"instance_donations": "Framlög til netþjóns",
|
||||
"status_page": "Staða",
|
||||
"source_code": "Frumkóði",
|
||||
"rename_playlist": "Endurnefna spilunarlista",
|
||||
"new_playlist_name": "Nýtt heiti spilunarlista",
|
||||
"share": "Deila",
|
||||
"with_timecode": "Deilа með tímakóða",
|
||||
"piped_link": "Hlekkur Piped",
|
||||
"please_select_playlist": "Vinsamlegast veldu spilunarlista",
|
||||
"clone_playlist": "Afrita spilunarlista",
|
||||
"clone_playlist_success": "Tókst að afrita spilunarlista!",
|
||||
"confirm_reset_preferences": "Ertu viss um að þú viljir endurstilla stillingarnar?",
|
||||
"back_to_home": "Aftur heim",
|
||||
"delete_playlist_video_confirm": "Fjarlægja myndband af spilunarlista?",
|
||||
"logout": "Útskrá þetta tæki",
|
||||
"delete_playlist_confirm": "Eyða þessum spilunarlista?",
|
||||
"minimize_recommendations_default": "Lágmarka ráðleggingar sjálfkrafa",
|
||||
"store_search_history": "Geyma leitarferil",
|
||||
"hide_watched": "Fela myndbönd sem þú hefur horft á",
|
||||
"show_chapters": "Kaflar",
|
||||
"reply_count": "{count} svör",
|
||||
"minimize_comments_default": "Fela ummæli sjálfgefið",
|
||||
"minimize_comments": "Fela ummæli"
|
||||
},
|
||||
"player": {
|
||||
"watch_on": "Horfa á {0}"
|
||||
},
|
||||
"search": {
|
||||
"did_you_mean": "Áttirðu við: {0}?"
|
||||
"did_you_mean": "Áttirðu við: {0}?",
|
||||
"music_songs": "YT Tónlist: Lög",
|
||||
"playlists": "YouTube: Spilunarlistar",
|
||||
"music_videos": "YT Tónlist: Myndbönd",
|
||||
"music_albums": "YT Tónlist: Plötur",
|
||||
"music_playlists": "YT Tónlist: Lagalistar",
|
||||
"all": "YouTube: Allt",
|
||||
"videos": "YouTube: Myndbönd",
|
||||
"channels": "YouTube: Rásir"
|
||||
},
|
||||
"video": {
|
||||
"ratings_disabled": "Einkunnir Óvirkar",
|
||||
|
@ -82,19 +134,35 @@
|
|||
"watched": "Áhorft",
|
||||
"sponsor_segments": "Styrkjarahlutar",
|
||||
"chapters": "Kaflar",
|
||||
"live": "{0} Í beinni"
|
||||
"live": "{0} Í beinni",
|
||||
"shorts": "Stutt"
|
||||
},
|
||||
"comment": {
|
||||
"pinned_by": "Fest af {author}"
|
||||
"pinned_by": "Fest af {author}",
|
||||
"disabled": "Höfundur lokaði fyrir ummælum.",
|
||||
"user_disabled": "Slökkt er á ummælum í stillingunum.",
|
||||
"loading": "Hleður ummæli…"
|
||||
},
|
||||
"preferences": {
|
||||
"instance_name": "Tilviksheiti",
|
||||
"instance_locations": "Tilviksstaðsetning",
|
||||
"has_cdn": "Hefur Efnisflutningarnet (CDN)?",
|
||||
"ssl_score": "SSL Einkunn"
|
||||
"has_cdn": "Hefur efnisflutningarnet (CDN)?",
|
||||
"ssl_score": "SSL einkunn",
|
||||
"version": "Útgáfa",
|
||||
"registered_users": "Skráðir notendur",
|
||||
"up_to_date": "Nýjasta útgáfa?"
|
||||
},
|
||||
"login": {
|
||||
"password": "Aðgangsorð",
|
||||
"username": "Notandanafn"
|
||||
},
|
||||
"info": {
|
||||
"page_not_found": "Síða fannst ekki",
|
||||
"cannot_copy": "Get ekki afritað!",
|
||||
"preferences_note": "Athugaðu: stillingar eru geymdar í staðbundinni geymslu vafrans þíns. Ef vafragögnum þínum eru eytt verða þau endurstillt.",
|
||||
"copied": "Afritað!"
|
||||
},
|
||||
"subscriptions": {
|
||||
"subscribed_channels_count": "Áskrifandi hjá: {0}"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -93,7 +93,8 @@
|
|||
"store_search_history": "Memorizza la cronologia delle ricerche",
|
||||
"status_page": "Stato",
|
||||
"documentation": "Documentazione",
|
||||
"source_code": "Codice sorgente"
|
||||
"source_code": "Codice sorgente",
|
||||
"reply_count": "{count} risposte"
|
||||
},
|
||||
"player": {
|
||||
"watch_on": "Guarda su {0}"
|
||||
|
|
|
@ -38,7 +38,7 @@
|
|||
"disable_lbry": "Išjungti LBRY srautiniam siuntimui",
|
||||
"instance_selection": "Perdavimo šaltinio pasirinkimas",
|
||||
"auto_play_next_video": "Automatiškai paleisti sekantį vaizdo įrašą",
|
||||
"donations": "Parama",
|
||||
"donations": "Parama plėtrai",
|
||||
"loop_this_video": "Sukti ratu šį vaizdo įrašą",
|
||||
"show_description": "Rodyti aprašymą",
|
||||
"minimize_description": "Suskleisti aprašymą",
|
||||
|
@ -70,7 +70,35 @@
|
|||
"download_as_txt": "Atsisiųsti kaip .txt",
|
||||
"delete_account": "Ištrinti paskyrą",
|
||||
"logout": "Atsijungti šiame įrenginyje",
|
||||
"remove_from_playlist": "Pašalinti iš grojaraščio"
|
||||
"remove_from_playlist": "Pašalinti iš grojaraščio",
|
||||
"confirm_reset_preferences": "Ar tikrai norite iš naujo nustatyti nuostatas?",
|
||||
"reset_preferences": "Iš naujo nustatyti nuostatas",
|
||||
"backup_preferences": "Atsarginės kopijos nuostatos",
|
||||
"source_code": "Pirminis kodas",
|
||||
"documentation": "Dokumentacija",
|
||||
"with_timecode": "Dalintis su laiko kodu",
|
||||
"reply_count": "{count} atsakymų",
|
||||
"show_chapters": "Skyriai",
|
||||
"piped_link": "Piped nuoroda",
|
||||
"rename_playlist": "Pervardyti grojaraštį",
|
||||
"follow_link": "Sekti nuorodą",
|
||||
"store_search_history": "Išsaugoti paieškos istoriją",
|
||||
"hide_watched": "Slėpti žiūrėtus vaizdo įrašus sklaidos kanale",
|
||||
"restore_preferences": "Atkurti nuostatas",
|
||||
"status_page": "Būsena",
|
||||
"copy_link": "Kopijuoti nuorodą",
|
||||
"share": "Dalintis",
|
||||
"new_playlist_name": "Naujas grojaraščio pavadinimas",
|
||||
"minimize_recommendations_default": "Sumažinti rekomendacijas automatiškai",
|
||||
"instance_donations": "Perdavimo šaltinio parama",
|
||||
"instance_auth_selection": "Autentifikavimo perdavimo šaltinio pasirinkimas",
|
||||
"skip_filler_tangent": "Praleisti užpildymo dalį",
|
||||
"different_auth_instance": "Autentiškumo nustatymui naudoti kitą perdavimo šaltinį",
|
||||
"back_to_home": "Grįžti į pagrindinį",
|
||||
"skip_highlight": "Praleisti išskirtų dalių pakartojimus",
|
||||
"time_code": "Laiko kodas (sekundėmis)",
|
||||
"minimize_comments_default": "Suskleisti komentarus automatiškai",
|
||||
"minimize_comments": "Suskleisti komentarus"
|
||||
},
|
||||
"player": {
|
||||
"watch_on": "Žiūrėti per {0}"
|
||||
|
@ -85,29 +113,56 @@
|
|||
"subscriptions": "Prenumeratos",
|
||||
"playlists": "Grojaraščiai",
|
||||
"account": "Paskyra",
|
||||
"player": "Grotuvas"
|
||||
"player": "Grotuvas",
|
||||
"instance": "Perdavimo šaltinis"
|
||||
},
|
||||
"preferences": {
|
||||
"instance_locations": "Perdavimo šaltinio vietovė",
|
||||
"instance_name": "Perdavimo šaltinio pavadinimas",
|
||||
"ssl_score": "SSL balas",
|
||||
"has_cdn": "Turi CDN?"
|
||||
"has_cdn": "Turi CDN?",
|
||||
"version": "Versija",
|
||||
"registered_users": "Registruoti naudotojai",
|
||||
"up_to_date": "Atnaujinta?"
|
||||
},
|
||||
"comment": {
|
||||
"pinned_by": "Prisegė {author}"
|
||||
"pinned_by": "Prisegė {author}",
|
||||
"loading": "Įkeliami komentarai...",
|
||||
"disabled": "Komentarai yra išjungti įkėlėjo.",
|
||||
"user_disabled": "Komentarai yra išjungti nustatymuose."
|
||||
},
|
||||
"video": {
|
||||
"views": "{views} peržiūros",
|
||||
"videos": "Vaizdo įrašai",
|
||||
"sponsor_segments": "Rėmėjų segmentai",
|
||||
"watched": "Žiūrėta",
|
||||
"ratings_disabled": "Įvertinimai išjungti"
|
||||
"ratings_disabled": "Įvertinimai išjungti",
|
||||
"chapters": "Skyriai",
|
||||
"live": "{0} tiesiogiai",
|
||||
"shorts": "Trumpi filmukai"
|
||||
},
|
||||
"login": {
|
||||
"password": "Slaptažodis",
|
||||
"username": "Vartotojo vardas"
|
||||
},
|
||||
"search": {
|
||||
"did_you_mean": "Ar turėjote omenyje: {0}?"
|
||||
"did_you_mean": "Ar turėjote omenyje: {0}?",
|
||||
"playlists": "YouTube: grojaraščiai",
|
||||
"music_playlists": "YT Music: grojaraščiai",
|
||||
"all": "YouTube: visi",
|
||||
"channels": "YouTube: kanalai",
|
||||
"videos": "YouTube: vaizdo įrašai",
|
||||
"music_videos": "YT Music: vaizdo įrašai",
|
||||
"music_songs": "YT Music: dainos",
|
||||
"music_albums": "YT Music: albumai"
|
||||
},
|
||||
"info": {
|
||||
"copied": "Nukopijuota!",
|
||||
"cannot_copy": "Negalima kopijuoti!",
|
||||
"page_not_found": "Puslapis nerastas",
|
||||
"preferences_note": "Pastaba: nuostatos išsaugomos vietinėje naršyklės atmintyje. Ištrynus naršyklės duomenis, jie bus nustatyti iš naujo."
|
||||
},
|
||||
"subscriptions": {
|
||||
"subscribed_channels_count": "Prenumeruojama: {0}"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -38,7 +38,7 @@
|
|||
"yes": "Sim",
|
||||
"show_more": "Mostrar mais",
|
||||
"export_to_json": "Exportar para JSON",
|
||||
"donations": "Doações",
|
||||
"donations": "Doações de desenvolvimento",
|
||||
"minimize_recommendations": "Recolher recomendações",
|
||||
"loading": "Carregando...",
|
||||
"hide_replies": "Esconder respostas",
|
||||
|
@ -48,8 +48,8 @@
|
|||
"delete_playlist": "Excluir Playlist",
|
||||
"select_playlist": "Selecionar uma Playlist",
|
||||
"add_to_playlist": "Adicionar à playlist",
|
||||
"delete_playlist_confirm": "Tem certeza que deseja excluir esta playlist?",
|
||||
"delete_playlist_video_confirm": "Tem certeza que gostaria de remover este vídeo desta playlist?",
|
||||
"delete_playlist_confirm": "Excluir esta playlist?",
|
||||
"delete_playlist_video_confirm": "Remover vídeo da playlist?",
|
||||
"please_select_playlist": "Por favor, selecione uma playlist",
|
||||
"remove_from_playlist": "Remover da playlist",
|
||||
"view_ssl_score": "Ver Pontuação SSL",
|
||||
|
@ -66,7 +66,39 @@
|
|||
"auto_play_next_video": "Autoreproduzir vídeo seguinte",
|
||||
"filter": "Filtro",
|
||||
"store_watch_history": "Salvar Histórico de Exibição",
|
||||
"show_recommendations": "Mostrar recomendações"
|
||||
"show_recommendations": "Mostrar recomendações",
|
||||
"minimize_comments_default": "Minimizar Comentários por padrão",
|
||||
"minimize_comments": "Minimizar Comentários",
|
||||
"different_auth_instance": "Use uma instância diferente para autenticação",
|
||||
"delete_account": "Deletar Conta",
|
||||
"invalidate_session": "Sair de todos os dispositivos",
|
||||
"clone_playlist": "Clonar Playlist",
|
||||
"backup_preferences": "Fazer backup das preferências",
|
||||
"logout": "Sair deste dispositivo",
|
||||
"copy_link": "Copiar link",
|
||||
"store_search_history": "Armazenar Histórico de Pesquisa",
|
||||
"hide_watched": "Ocultar vídeos assistidos no feed",
|
||||
"status_page": "Estado",
|
||||
"source_code": "Código fonte",
|
||||
"instance_donations": "Doações de instâncias",
|
||||
"instance_auth_selection": "Seleção de iIstância de Autenticação",
|
||||
"clone_playlist_success": "Clonada com sucesso!",
|
||||
"download_as_txt": "Baixar como .txt",
|
||||
"restore_preferences": "Restaurar preferências",
|
||||
"back_to_home": "Voltar ao início",
|
||||
"share": "Compartilhar",
|
||||
"rename_playlist": "Renomear playlist",
|
||||
"new_playlist_name": "Novo nome da playlist",
|
||||
"with_timecode": "Compartilhar com código de tempo",
|
||||
"piped_link": "Link do Piped",
|
||||
"follow_link": "Siguir link",
|
||||
"time_code": "Código de tempo (em segundos)",
|
||||
"show_chapters": "Capítulos",
|
||||
"confirm_reset_preferences": "Tem certeza de que deseja redefinir suas preferências?",
|
||||
"reset_preferences": "Redefinir preferências",
|
||||
"documentation": "Documentação",
|
||||
"reply_count": "{count} respostas",
|
||||
"minimize_recommendations_default": "Minimizar Recomendações por padrão"
|
||||
},
|
||||
"titles": {
|
||||
"history": "Histórico",
|
||||
|
@ -76,13 +108,19 @@
|
|||
"login": "Entrar",
|
||||
"playlists": "Playlists",
|
||||
"feed": "Feed",
|
||||
"subscriptions": "Inscrições"
|
||||
"subscriptions": "Inscrições",
|
||||
"instance": "Instância",
|
||||
"player": "Player",
|
||||
"account": "Conta"
|
||||
},
|
||||
"player": {
|
||||
"watch_on": "Assistir no"
|
||||
},
|
||||
"comment": {
|
||||
"pinned_by": "Fixado por {author}"
|
||||
"pinned_by": "Fixado por {author}",
|
||||
"user_disabled": "Os comentários estão desativados nas configurações.",
|
||||
"disabled": "Os comentários são desativados pelo remetente.",
|
||||
"loading": "Carregando comentários..."
|
||||
},
|
||||
"preferences": {
|
||||
"registered_users": "Usuários cadastrados",
|
||||
|
@ -104,7 +142,8 @@
|
|||
"live": "{0} Ao vivo",
|
||||
"watched": "Assistido",
|
||||
"ratings_disabled": "Avaliações desabilitadas",
|
||||
"sponsor_segments": "Segmentos de patrocinadores"
|
||||
"sponsor_segments": "Segmentos de patrocinadores",
|
||||
"shorts": "Shorts"
|
||||
},
|
||||
"search": {
|
||||
"did_you_mean": "Você quis dizer: {0}?",
|
||||
|
@ -116,5 +155,14 @@
|
|||
"music_albums": "YT Music: Álbuns",
|
||||
"music_playlists": "YT Music: Playlists",
|
||||
"all": "YouTube: Tudo"
|
||||
},
|
||||
"info": {
|
||||
"copied": "Copiado!",
|
||||
"cannot_copy": "Não foi possível copiar!",
|
||||
"preferences_note": "Nota: as preferências são salvas no armazenamento local do seu navegador. A exclusão dos dados do seu navegador irá redefini-los.",
|
||||
"page_not_found": "página não encontrada"
|
||||
},
|
||||
"subscriptions": {
|
||||
"subscribed_channels_count": "Inscrito em: {0}"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -111,7 +111,10 @@
|
|||
"status_page": "Статус",
|
||||
"source_code": "Исходный код",
|
||||
"documentation": "Пожертвования сервера",
|
||||
"instance_donations": "Пожертвования сервера"
|
||||
"instance_donations": "Пожертвования сервера",
|
||||
"reply_count": "{count} ответов",
|
||||
"minimize_comments_default": "Сворачивать комментарии по умолчанию",
|
||||
"minimize_comments": "Свернуть комментарии"
|
||||
},
|
||||
"comment": {
|
||||
"pinned_by": "Прикреплено пользователем {author}",
|
||||
|
|
|
@ -105,7 +105,10 @@
|
|||
"follow_link": "Прати везу",
|
||||
"copy_link": "Копирај везу",
|
||||
"time_code": "Временски код (у секундама)",
|
||||
"new_playlist_name": "Ново име плејлисте"
|
||||
"new_playlist_name": "Ново име плејлисте",
|
||||
"minimize_comments_default": "Подразумевано умањи коментаре",
|
||||
"minimize_comments": "Умањи коментаре",
|
||||
"reply_count": "{count} одговора"
|
||||
},
|
||||
"preferences": {
|
||||
"instance_locations": "Локација инстанце",
|
||||
|
|
|
@ -95,7 +95,10 @@
|
|||
"source_code": "Kaynak kodu",
|
||||
"documentation": "Belgelendirme",
|
||||
"instance_donations": "Örnek bağışları",
|
||||
"status_page": "Durum"
|
||||
"status_page": "Durum",
|
||||
"reply_count": "{count} yanıt",
|
||||
"minimize_comments": "Yorumları Küçült",
|
||||
"minimize_comments_default": "Yorumları Öntanımlı Olarak Küçült"
|
||||
},
|
||||
"player": {
|
||||
"watch_on": "{0} üzerinde izle"
|
||||
|
|
|
@ -95,7 +95,10 @@
|
|||
"status_page": "状态",
|
||||
"source_code": "源代码",
|
||||
"instance_donations": "实例捐赠",
|
||||
"documentation": "文档"
|
||||
"documentation": "文档",
|
||||
"reply_count": "{count} 条回复",
|
||||
"minimize_comments": "最小化评论",
|
||||
"minimize_comments_default": "默认最小化评论"
|
||||
},
|
||||
"video": {
|
||||
"sponsor_segments": "赞助商部分",
|
||||
|
|
16
src/main.js
16
src/main.js
|
@ -94,20 +94,8 @@ const mixin = {
|
|||
return str;
|
||||
},
|
||||
numberFormat(num) {
|
||||
const digits = 2;
|
||||
const si = [
|
||||
{ value: 1, symbol: "" },
|
||||
{ value: 1e3, symbol: "k" },
|
||||
{ value: 1e6, symbol: "M" },
|
||||
{ value: 1e9, symbol: "B" },
|
||||
];
|
||||
const rx = /\.0+$|(\.[0-9]*[1-9])0+$/;
|
||||
for (var i = si.length - 1; i > 0; i--) {
|
||||
if (num >= si[i].value) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
return (num / si[i].value).toFixed(digits).replace(rx, "$1") + si[i].symbol;
|
||||
const formatter = Intl.NumberFormat(undefined, { notation: "compact" });
|
||||
return formatter.format(num);
|
||||
},
|
||||
addCommas(num) {
|
||||
num = parseInt(num);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue