Fix timeago import and warning.

This commit is contained in:
FireMasterK 2022-01-12 05:39:36 +00:00
parent 983fdac95d
commit 9b1f7086f4
No known key found for this signature in database
GPG Key ID: 49451E4482CC5BCD
2 changed files with 4 additions and 4 deletions

View File

@ -59,9 +59,9 @@ export default {
(async function () { (async function () {
const locale = App.getPreferenceString("hl", App.defaultLangage); const locale = App.getPreferenceString("hl", App.defaultLangage);
if (locale !== App.TimeAgoConfig.locale) { if (locale !== App.TimeAgoConfig.locale) {
const localeTime = await import("javascript-time-ago/locale/" + locale + ".json").then( const localeTime = await import(
module => module.default, "./../node_modules/javascript-time-ago/locale/" + locale + ".json"
); ).then(module => module.default);
App.TimeAgo.addLocale(localeTime); App.TimeAgo.addLocale(localeTime);
App.TimeAgoConfig.locale = locale; App.TimeAgoConfig.locale = locale;
} }

View File

@ -1,5 +1,5 @@
<template> <template>
<h1 v-t="$t('titles.trending')" class="font-bold text-center" /> <h1 v-t="'titles.trending'" class="font-bold text-center" />
<hr /> <hr />