From ad9d20a2d23ec7ead187288b0df22711635e3943 Mon Sep 17 00:00:00 2001 From: mashirozx Date: Sun, 1 Aug 2021 10:06:35 +0800 Subject: [PATCH] Excute eslint --- src/@types/declarations.d.ts | 4 +- src/admin/Core.vue | 2 +- src/admin/options.ts | 3 +- src/hooks/state.ts | 2 +- src/locales/default.json | 112 +++++++++----- src/locales/defaultMessages.json | 256 ++++++++++++++++++++++--------- src/store/messages.ts | 2 +- src/utils/getScrollBarWidth.ts | 4 +- src/utils/timeFormater.ts | 2 +- src/views/Single.vue | 2 - 10 files changed, 266 insertions(+), 123 deletions(-) diff --git a/src/@types/declarations.d.ts b/src/@types/declarations.d.ts index 8bdbb63..5c254c7 100644 --- a/src/@types/declarations.d.ts +++ b/src/@types/declarations.d.ts @@ -5,12 +5,12 @@ /** * Sakura initState */ -declare var InitState: any +declare let InitState: any /** * reCaptcha */ -declare var grecaptcha: any +declare let grecaptcha: any interface Pagination { page: number diff --git a/src/admin/Core.vue b/src/admin/Core.vue index fb51546..4437ffb 100644 --- a/src/admin/Core.vue +++ b/src/admin/Core.vue @@ -68,7 +68,7 @@ export default defineComponent({ return { context: options[key].title, icon: options[key].icon, key } }) - let defaultCurrentTabIndex: number = 0 + let defaultCurrentTabIndex = 0 if (window.location.hash) { const locationHashMatch = window.location.hash.match(/^#(.*)/) if (locationHashMatch && locationHashMatch[1] && tabKeys.indexOf(locationHashMatch[1]) > -1) { diff --git a/src/admin/options.ts b/src/admin/options.ts index 85a4112..1b83fa5 100644 --- a/src/admin/options.ts +++ b/src/admin/options.ts @@ -389,7 +389,8 @@ const options: Options = { title: 'Long string', desc: 'Textarea for long string input.', type: 'longString', - default: `"It is the unknown we fear when we look upon death and darkness, nothing more."\n-- Albus Dumbledore`, + default: + '"It is the unknown we fear when we look upon death and darkness, nothing more."\n-- Albus Dumbledore', }, { namespace: 'demo.switcher', diff --git a/src/hooks/state.ts b/src/hooks/state.ts index 6ee952d..309f99a 100644 --- a/src/hooks/state.ts +++ b/src/hooks/state.ts @@ -21,7 +21,7 @@ export const usePersistedState = ( cachePeriod?: number ): [Ref>, (arg: T) => void] => { cachePeriod = cachePeriod ?? 24 * 60 * 60 - let state = ref(defaultValue) + const state = ref(defaultValue) const s = new storage() let fetchingStorage = true diff --git a/src/locales/default.json b/src/locales/default.json index 2499711..88281a6 100644 --- a/src/locales/default.json +++ b/src/locales/default.json @@ -1,39 +1,75 @@ { - "messages.admin.invalidUrl": "Invalid URL", - "messages.admin.uplicateUrls": "Duplicate URLs", - "messages.popup.close": "Close", - "messages.popup.dismiss": "Dismiss", - "messages.popup.showDetails": "Show details", - "messages.wordpress.applicationPasswordsEndpointNotAvailable": "ApplicationPasswords is not avaliabe in your WordPress installation, please upgrade WordPress to v5.6.0 above, or enable the ApplicationPasswords feature in v5.6.0 above installation.", - "messages.wordpress.permalink.shouldIncludeFieldsInPost": "WordPress pages should use %slug% as the permalink.", - "messages.wordpress.permalink.shouldIncludeFieldsInSingle": "WordPress permalink should include at least one of %post_id%, %postname%. You may set them here: {baseUrl}/wp-admin/options-permalink.php", - "options.basic.site.logo.binds.button": "Use this image", - "options.basic.site.logo.binds.title": "Select image for site logo.", - "options.basic.site.logo.desc": "The site's Logo image, will display on navigation bar.", - "options.basic.site.logo.title": "Site logo", - "options.basic.site.title.desc": "The site title", - "options.basic.site.title.title": "Site title", - "options.thirdParty.reCaptcha.enable.desc": "Use reCAPTCHA for anti-spam check.", - "options.thirdParty.reCaptcha.enable.negativeLabel": "Disabled", - "options.thirdParty.reCaptcha.enable.positiveLabel": "Enabled", - "options.thirdParty.reCaptcha.enable.title": "Enable reCAPTCHA", - "options.thirdParty.reCaptcha.secretKey.title": "reCAPTCHA secret key", - "options.thirdParty.reCaptcha.siteKey.title": "reCAPTCHA site key", - "options.thirdParty.reCaptcha.version.desc": "Register your reCAPTCHA app 'here', and choose a version.", - "options.thirdParty.reCaptcha.version.label.v2": "reCAPTCHA version 2", - "options.thirdParty.reCaptcha.version.label.v3": "reCAPTCHA version 3", - "options.thirdParty.reCaptcha.version.title": "reCAPTCHA version", - "posts.comment.composer.authorEmail.label": "Email *", - "posts.comment.composer.authorName.label": "Nickname *", - "posts.comment.composer.authorUrl.label": "Link", - "posts.comment.composer.captcha.toggleButton": "Captcha", - "posts.comment.composer.content.label": "You are a surprise that I will only meet once in my life", - "posts.comment.composer.submit.button": "Submit", - "posts.comment.composer.tips.markdownSupported": "Markdown Supported", - "posts.commentCount": "{commentCount, plural, =0 {No comment} =1 {One comment} other {{commentCount, number, ::compact-short} Comments}}", - "posts.postTimeOn": "Post on {publistTimeDate, date, long}", - "posts.postTimeSince": "Post {duration} ago", - "posts.readCount": "{readCount, plural, =0 {No one ever read} =1 {One read} other {{readCount, number, ::compact-short} Reads}}", - "posts.readMore": "Read More", - "posts.wordCount": "{wordCount, plural, =0 {No content} =1 {One word} other {{wordCount, number, ::compact-short} Words}}" -} \ No newline at end of file + 'admin.restore.title': 'Restore this option to default.', + 'app.common.units.year': '{num, plural, =0 {just now} =1 {1 second} other {{num, number, ::compact-short} seconds}}', + 'messages.admin.invalidUrl': 'Invalid URL', + 'messages.admin.uplicateUrls': 'Duplicate URLs', + 'messages.comment.submit.error': 'Comment post failure.', + 'messages.comment.submit.success': 'Comment post successfully.', + 'messages.commonMessages.javascriptErrorTitle': 'Opps, something when wrong!', + 'messages.popup.close': 'Close', + 'messages.popup.dismiss': 'Dismiss', + 'messages.popup.showDetails': 'Show details', + 'messages.postContent.cache.found': 'Fetching the latest post content...', + 'messages.postList.cache.found': 'Fetching the latest post list...', + 'messages.postList.reachLastPage': 'No more...', + 'messages.posts.fetchPageError': 'Failed to fetch page content.', + 'messages.posts.fetchPostError': 'Failed to fetch post content.', + 'messages.wordpress.applicationPasswordsEndpointNotAvailable': 'ApplicationPasswords is not avaliabe in your WordPress installation, please upgrade WordPress to v5.6.0 above, or enable the ApplicationPasswords feature in v5.6.0 above installation.', + 'messages.wordpress.permalink.shouldIncludeFieldsInPost': 'WordPress pages should use %slug% as the permalink.', + 'messages.wordpress.permalink.shouldIncludeFieldsInSingle': 'WordPress permalink should include at least one of %post_id%, %postname%. You may set them here: {baseUrl}/wp-admin/options-permalink.php', + 'options.basic.site.logo.binds.button': 'Use this image', + 'options.basic.site.logo.binds.title': 'Select image for site logo.', + 'options.basic.site.logo.desc': 'The site\'s Logo image, will display on navigation bar.', + 'options.basic.site.logo.title': 'Site logo', + 'options.basic.site.title.desc': 'The site title', + 'options.basic.site.title.title': 'Site title', + 'options.basicDesc': 'The basic options', + 'options.basicTitle': 'Basic', + 'options.homepage.cover.image.binds.button': 'Use this image', + 'options.homepage.cover.image.binds.title': 'Select image for homepage cover.', + 'options.homepage.cover.image.desc': 'Homepage cover images. Will enable slide show with multiple selections.', + 'options.homepage.cover.image.title': 'Cover images', + 'options.homepage.quote.title': 'Quote', + 'options.homepage.signature.desc': 'The signature text (follows the quote).', + 'options.homepage.signature.title': 'Signature', + 'options.homepage.slogan.desc': 'The slogan text (with typewriter effect), recommend 10-20 characters.', + 'options.homepage.slogan.title': 'Slogan', + 'options.homepageDesc': 'Homepage options', + 'options.homepageTitle': 'Homepage', + 'options.social.facebook.desc': 'Your \'Facebook\' username', + 'options.social.facebook.title': 'Facebook username', + 'options.social.github.desc': 'Your \'Github\' username', + 'options.social.github.title': 'Github username', + 'options.social.gitlab.desc': 'Your \'Gitlab\' username', + 'options.social.gitlab.title': 'Gitlab username', + 'options.social.stackoverflow.desc': 'Your \'Stackoverflow\' username', + 'options.social.stackoverflow.title': 'Stackoverflow username', + 'options.social.twitter.desc': 'Your \'Twitter\' username', + 'options.social.twitter.title': 'Twitter username', + 'options.social.weibo.desc': 'Your \'Weibo\' username', + 'options.social.weibo.title': 'Weibo username', + 'options.thirdParty.reCaptcha.enable.desc': 'Use reCAPTCHA for anti-spam check.', + 'options.thirdParty.reCaptcha.enable.negativeLabel': 'Disabled', + 'options.thirdParty.reCaptcha.enable.positiveLabel': 'Enabled', + 'options.thirdParty.reCaptcha.enable.title': 'Enable reCAPTCHA', + 'options.thirdParty.reCaptcha.secretKey.title': 'reCAPTCHA secret key', + 'options.thirdParty.reCaptcha.siteKey.title': 'reCAPTCHA site key', + 'options.thirdParty.reCaptcha.version.desc': 'Register your reCAPTCHA app \'here\', and choose a version.', + 'options.thirdParty.reCaptcha.version.label.v2': 'reCAPTCHA version 2', + 'options.thirdParty.reCaptcha.version.label.v3': 'reCAPTCHA version 3', + 'options.thirdParty.reCaptcha.version.title': 'reCAPTCHA version', + 'posts.comment.composer.authorEmail.label': 'Email *', + 'posts.comment.composer.authorName.label': 'Nickname *', + 'posts.comment.composer.authorUrl.label': 'Link', + 'posts.comment.composer.captcha.toggleButton': 'Captcha', + 'posts.comment.composer.content.label': 'You are a surprise that I will only meet once in my life', + 'posts.comment.composer.submit.button': 'Submit', + 'posts.comment.composer.tips.markdownSupported': 'Markdown Supported', + 'posts.commentCount': '{commentCount, plural, =0 {No comment} =1 {One comment} other {{commentCount, number, ::compact-short} Comments}}', + 'posts.postTimeOn.brief': '{publistTimeDate, date, long}', + 'posts.postTimeOn.full': 'Post on {publistTimeDate, date, long}', + 'posts.postTimeSince': 'Post {duration} ago', + 'posts.readCount': '{readCount, plural, =0 {No one ever read} =1 {One read} other {{readCount, number, ::compact-short} Reads}}', + 'posts.readMore': 'Read More', + 'posts.wordCount': '{wordCount, plural, =0 {No content} =1 {One word} other {{wordCount, number, ::compact-short} Words}}' +} diff --git a/src/locales/defaultMessages.json b/src/locales/defaultMessages.json index 95f4b8e..a41ce7a 100644 --- a/src/locales/defaultMessages.json +++ b/src/locales/defaultMessages.json @@ -1,113 +1,221 @@ { - "messages.admin.invalidUrl": { - "defaultMessage": "Invalid URL" + 'admin.restore.title': { + 'defaultMessage': 'Restore this option to default.' }, - "messages.admin.uplicateUrls": { - "defaultMessage": "Duplicate URLs" + 'app.common.units.year': { + 'defaultMessage': '{num, plural, =0 {just now} =1 {1 second} other {{num, number, ::compact-short} seconds}}' }, - "messages.popup.close": { - "defaultMessage": "Close" + 'messages.admin.invalidUrl': { + 'defaultMessage': 'Invalid URL' }, - "messages.popup.dismiss": { - "defaultMessage": "Dismiss" + 'messages.admin.uplicateUrls': { + 'defaultMessage': 'Duplicate URLs' }, - "messages.popup.showDetails": { - "defaultMessage": "Show details" + 'messages.comment.submit.error': { + 'defaultMessage': 'Comment post failure.' }, - "messages.wordpress.applicationPasswordsEndpointNotAvailable": { - "defaultMessage": "ApplicationPasswords is not avaliabe in your WordPress installation, please upgrade WordPress to v5.6.0 above, or enable the ApplicationPasswords feature in v5.6.0 above installation." + 'messages.comment.submit.success': { + 'defaultMessage': 'Comment post successfully.' }, - "messages.wordpress.permalink.shouldIncludeFieldsInPost": { - "defaultMessage": "WordPress pages should use %slug% as the permalink." + 'messages.commonMessages.javascriptErrorTitle': { + 'defaultMessage': 'Opps, something when wrong!' }, - "messages.wordpress.permalink.shouldIncludeFieldsInSingle": { - "defaultMessage": "WordPress permalink should include at least one of %post_id%, %postname%. You may set them here: {baseUrl}/wp-admin/options-permalink.php" + 'messages.popup.close': { + 'defaultMessage': 'Close' }, - "options.basic.site.logo.binds.button": { - "defaultMessage": "Use this image" + 'messages.popup.dismiss': { + 'defaultMessage': 'Dismiss' }, - "options.basic.site.logo.binds.title": { - "defaultMessage": "Select image for site logo." + 'messages.popup.showDetails': { + 'defaultMessage': 'Show details' }, - "options.basic.site.logo.desc": { - "defaultMessage": "The site's Logo image, will display on navigation bar." + 'messages.postContent.cache.found': { + 'defaultMessage': 'Fetching the latest post content...' }, - "options.basic.site.logo.title": { - "defaultMessage": "Site logo" + 'messages.postList.cache.found': { + 'defaultMessage': 'Fetching the latest post list...' }, - "options.basic.site.title.desc": { - "defaultMessage": "The site title" + 'messages.postList.reachLastPage': { + 'defaultMessage': 'No more...' }, - "options.basic.site.title.title": { - "defaultMessage": "Site title" + 'messages.posts.fetchPageError': { + 'defaultMessage': 'Failed to fetch page content.' }, - "options.thirdParty.reCaptcha.enable.desc": { - "defaultMessage": "Use reCAPTCHA for anti-spam check." + 'messages.posts.fetchPostError': { + 'defaultMessage': 'Failed to fetch post content.' }, - "options.thirdParty.reCaptcha.enable.negativeLabel": { - "defaultMessage": "Disabled" + 'messages.wordpress.applicationPasswordsEndpointNotAvailable': { + 'defaultMessage': 'ApplicationPasswords is not avaliabe in your WordPress installation, please upgrade WordPress to v5.6.0 above, or enable the ApplicationPasswords feature in v5.6.0 above installation.' }, - "options.thirdParty.reCaptcha.enable.positiveLabel": { - "defaultMessage": "Enabled" + 'messages.wordpress.permalink.shouldIncludeFieldsInPost': { + 'defaultMessage': 'WordPress pages should use %slug% as the permalink.' }, - "options.thirdParty.reCaptcha.enable.title": { - "defaultMessage": "Enable reCAPTCHA" + 'messages.wordpress.permalink.shouldIncludeFieldsInSingle': { + 'defaultMessage': 'WordPress permalink should include at least one of %post_id%, %postname%. You may set them here: {baseUrl}/wp-admin/options-permalink.php' }, - "options.thirdParty.reCaptcha.secretKey.title": { - "defaultMessage": "reCAPTCHA secret key" + 'options.basic.site.logo.binds.button': { + 'defaultMessage': 'Use this image' }, - "options.thirdParty.reCaptcha.siteKey.title": { - "defaultMessage": "reCAPTCHA site key" + 'options.basic.site.logo.binds.title': { + 'defaultMessage': 'Select image for site logo.' }, - "options.thirdParty.reCaptcha.version.desc": { - "defaultMessage": "Register your reCAPTCHA app 'here', and choose a version." + 'options.basic.site.logo.desc': { + 'defaultMessage': 'The site\'s Logo image, will display on navigation bar.' }, - "options.thirdParty.reCaptcha.version.label.v2": { - "defaultMessage": "reCAPTCHA version 2" + 'options.basic.site.logo.title': { + 'defaultMessage': 'Site logo' }, - "options.thirdParty.reCaptcha.version.label.v3": { - "defaultMessage": "reCAPTCHA version 3" + 'options.basic.site.title.desc': { + 'defaultMessage': 'The site title' }, - "options.thirdParty.reCaptcha.version.title": { - "defaultMessage": "reCAPTCHA version" + 'options.basic.site.title.title': { + 'defaultMessage': 'Site title' }, - "posts.comment.composer.authorEmail.label": { - "defaultMessage": "Email *" + 'options.basicDesc': { + 'defaultMessage': 'The basic options' }, - "posts.comment.composer.authorName.label": { - "defaultMessage": "Nickname *" + 'options.basicTitle': { + 'defaultMessage': 'Basic' }, - "posts.comment.composer.authorUrl.label": { - "defaultMessage": "Link" + 'options.homepage.cover.image.binds.button': { + 'defaultMessage': 'Use this image' }, - "posts.comment.composer.captcha.toggleButton": { - "defaultMessage": "Captcha" + 'options.homepage.cover.image.binds.title': { + 'defaultMessage': 'Select image for homepage cover.' }, - "posts.comment.composer.content.label": { - "defaultMessage": "You are a surprise that I will only meet once in my life" + 'options.homepage.cover.image.desc': { + 'defaultMessage': 'Homepage cover images. Will enable slide show with multiple selections.' }, - "posts.comment.composer.submit.button": { - "defaultMessage": "Submit" + 'options.homepage.cover.image.title': { + 'defaultMessage': 'Cover images' }, - "posts.comment.composer.tips.markdownSupported": { - "defaultMessage": "Markdown Supported" + 'options.homepage.quote.title': { + 'defaultMessage': 'Quote' }, - "posts.commentCount": { - "defaultMessage": "{commentCount, plural, =0 {No comment} =1 {One comment} other {{commentCount, number, ::compact-short} Comments}}" + 'options.homepage.signature.desc': { + 'defaultMessage': 'The signature text (follows the quote).' }, - "posts.postTimeOn": { - "defaultMessage": "Post on {publistTimeDate, date, long}" + 'options.homepage.signature.title': { + 'defaultMessage': 'Signature' }, - "posts.postTimeSince": { - "defaultMessage": "Post {duration} ago" + 'options.homepage.slogan.desc': { + 'defaultMessage': 'The slogan text (with typewriter effect), recommend 10-20 characters.' }, - "posts.readCount": { - "defaultMessage": "{readCount, plural, =0 {No one ever read} =1 {One read} other {{readCount, number, ::compact-short} Reads}}" + 'options.homepage.slogan.title': { + 'defaultMessage': 'Slogan' }, - "posts.readMore": { - "defaultMessage": "Read More" + 'options.homepageDesc': { + 'defaultMessage': 'Homepage options' }, - "posts.wordCount": { - "defaultMessage": "{wordCount, plural, =0 {No content} =1 {One word} other {{wordCount, number, ::compact-short} Words}}" + 'options.homepageTitle': { + 'defaultMessage': 'Homepage' + }, + 'options.social.facebook.desc': { + 'defaultMessage': 'Your \'Facebook\' username' + }, + 'options.social.facebook.title': { + 'defaultMessage': 'Facebook username' + }, + 'options.social.github.desc': { + 'defaultMessage': 'Your \'Github\' username' + }, + 'options.social.github.title': { + 'defaultMessage': 'Github username' + }, + 'options.social.gitlab.desc': { + 'defaultMessage': 'Your \'Gitlab\' username' + }, + 'options.social.gitlab.title': { + 'defaultMessage': 'Gitlab username' + }, + 'options.social.stackoverflow.desc': { + 'defaultMessage': 'Your \'Stackoverflow\' username' + }, + 'options.social.stackoverflow.title': { + 'defaultMessage': 'Stackoverflow username' + }, + 'options.social.twitter.desc': { + 'defaultMessage': 'Your \'Twitter\' username' + }, + 'options.social.twitter.title': { + 'defaultMessage': 'Twitter username' + }, + 'options.social.weibo.desc': { + 'defaultMessage': 'Your \'Weibo\' username' + }, + 'options.social.weibo.title': { + 'defaultMessage': 'Weibo username' + }, + 'options.thirdParty.reCaptcha.enable.desc': { + 'defaultMessage': 'Use reCAPTCHA for anti-spam check.' + }, + 'options.thirdParty.reCaptcha.enable.negativeLabel': { + 'defaultMessage': 'Disabled' + }, + 'options.thirdParty.reCaptcha.enable.positiveLabel': { + 'defaultMessage': 'Enabled' + }, + 'options.thirdParty.reCaptcha.enable.title': { + 'defaultMessage': 'Enable reCAPTCHA' + }, + 'options.thirdParty.reCaptcha.secretKey.title': { + 'defaultMessage': 'reCAPTCHA secret key' + }, + 'options.thirdParty.reCaptcha.siteKey.title': { + 'defaultMessage': 'reCAPTCHA site key' + }, + 'options.thirdParty.reCaptcha.version.desc': { + 'defaultMessage': 'Register your reCAPTCHA app \'here\', and choose a version.' + }, + 'options.thirdParty.reCaptcha.version.label.v2': { + 'defaultMessage': 'reCAPTCHA version 2' + }, + 'options.thirdParty.reCaptcha.version.label.v3': { + 'defaultMessage': 'reCAPTCHA version 3' + }, + 'options.thirdParty.reCaptcha.version.title': { + 'defaultMessage': 'reCAPTCHA version' + }, + 'posts.comment.composer.authorEmail.label': { + 'defaultMessage': 'Email *' + }, + 'posts.comment.composer.authorName.label': { + 'defaultMessage': 'Nickname *' + }, + 'posts.comment.composer.authorUrl.label': { + 'defaultMessage': 'Link' + }, + 'posts.comment.composer.captcha.toggleButton': { + 'defaultMessage': 'Captcha' + }, + 'posts.comment.composer.content.label': { + 'defaultMessage': 'You are a surprise that I will only meet once in my life' + }, + 'posts.comment.composer.submit.button': { + 'defaultMessage': 'Submit' + }, + 'posts.comment.composer.tips.markdownSupported': { + 'defaultMessage': 'Markdown Supported' + }, + 'posts.commentCount': { + 'defaultMessage': '{commentCount, plural, =0 {No comment} =1 {One comment} other {{commentCount, number, ::compact-short} Comments}}' + }, + 'posts.postTimeOn.brief': { + 'defaultMessage': '{publistTimeDate, date, long}' + }, + 'posts.postTimeOn.full': { + 'defaultMessage': 'Post on {publistTimeDate, date, long}' + }, + 'posts.postTimeSince': { + 'defaultMessage': 'Post {duration} ago' + }, + 'posts.readCount': { + 'defaultMessage': '{readCount, plural, =0 {No one ever read} =1 {One read} other {{readCount, number, ::compact-short} Reads}}' + }, + 'posts.readMore': { + 'defaultMessage': 'Read More' + }, + 'posts.wordCount': { + 'defaultMessage': '{wordCount, plural, =0 {No content} =1 {One word} other {{wordCount, number, ::compact-short} Words}}' } } diff --git a/src/store/messages.ts b/src/store/messages.ts index 6f0ee83..b89b99e 100644 --- a/src/store/messages.ts +++ b/src/store/messages.ts @@ -12,7 +12,7 @@ export interface Message { closeTimeout?: number } -export interface MessageOptions extends Omit {} +export type MessageOptions = Omit export default function msg(): object { const [messageList, setMessageList] = useState([] as Message[]) diff --git a/src/utils/getScrollBarWidth.ts b/src/utils/getScrollBarWidth.ts index 687cc22..159a14a 100644 --- a/src/utils/getScrollBarWidth.ts +++ b/src/utils/getScrollBarWidth.ts @@ -1,6 +1,6 @@ const getScrollbarWidth = () => { - let div1 = document.createElement('div') - let div2 = document.createElement('div') + const div1 = document.createElement('div') + const div2 = document.createElement('div') div1.style.width = div2.style.width = div1.style.height = div2.style.height = '100px' div1.style.overflow = 'scroll' div2.style.overflow = 'hidden' diff --git a/src/utils/timeFormater.ts b/src/utils/timeFormater.ts index 0f8948f..778114e 100644 --- a/src/utils/timeFormater.ts +++ b/src/utils/timeFormater.ts @@ -17,7 +17,7 @@ export default class timeFormater { public getTimeFromNow() { const gap = this.timestampFromNow - let num: number = 0 + let num = 0 let unit: Unit = 'second' if (gap < 60 * 1000) { num = gap / 1000 diff --git a/src/views/Single.vue b/src/views/Single.vue index bcc953f..873bd3e 100644 --- a/src/views/Single.vue +++ b/src/views/Single.vue @@ -12,13 +12,11 @@