diff --git a/src/components/article.tsx b/src/components/article.tsx index 69ec69a..e779fc2 100644 --- a/src/components/article.tsx +++ b/src/components/article.tsx @@ -12,7 +12,11 @@ import { Icon, Link, } from "@fluentui/react" -import { RSSSource, SourceOpenTarget, SourceTextDirection } from "../scripts/models/source" +import { + RSSSource, + SourceOpenTarget, + SourceTextDirection, +} from "../scripts/models/source" import { shareSubmenu } from "./context-menu" import { platformCtrl, decodeFetchResponse } from "../scripts/utils" @@ -95,8 +99,8 @@ class Article extends React.Component { text: font === "" ? intl.get("default") : font, canCheck: true, checked: this.state.fontFamily === font, - onClick: () => this.setFont(font) - })) + onClick: () => this.setFont(font), + })), }) updateTextDirection = (direction: SourceTextDirection) => { @@ -111,7 +115,8 @@ class Article extends React.Component { iconProps: { iconName: "Forward" }, canCheck: true, checked: this.props.source.textDir === SourceTextDirection.LTR, - onClick: () => this.updateTextDirection(SourceTextDirection.LTR), + onClick: () => + this.updateTextDirection(SourceTextDirection.LTR), }, { key: "RTL", @@ -119,17 +124,20 @@ class Article extends React.Component { iconProps: { iconName: "Back" }, canCheck: true, checked: this.props.source.textDir === SourceTextDirection.RTL, - onClick: () => this.updateTextDirection(SourceTextDirection.RTL), + onClick: () => + this.updateTextDirection(SourceTextDirection.RTL), }, { key: "Vertical", text: intl.get("article.Vertical"), iconProps: { iconName: "Down" }, canCheck: true, - checked: this.props.source.textDir === SourceTextDirection.Vertical, - onClick: () => this.updateTextDirection(SourceTextDirection.Vertical), + checked: + this.props.source.textDir === SourceTextDirection.Vertical, + onClick: () => + this.updateTextDirection(SourceTextDirection.Vertical), }, - ] + ], }) moreMenuProps = (): IContextualMenuProps => ({ @@ -354,13 +362,9 @@ class Article extends React.Component { ) ) - return `article/article.html?a=${a}&h=${h}&f=${ - encodeURIComponent(this.state.fontFamily) - }&s=${ - this.state.fontSize - }&d=${ - this.props.source.textDir - }&u=${ + return `article/article.html?a=${a}&h=${h}&f=${encodeURIComponent( + this.state.fontFamily + )}&s=${this.state.fontSize}&d=${this.props.source.textDir}&u=${ this.props.item.link }&m=${this.state.loadFull ? 1 : 0}` } diff --git a/src/components/settings/app.tsx b/src/components/settings/app.tsx index 4279698..a5c6f68 100644 --- a/src/components/settings/app.tsx +++ b/src/components/settings/app.tsx @@ -20,7 +20,6 @@ import { DefaultButton, ChoiceGroup, IChoiceGroupOption, - loadTheme, Dropdown, IDropdownOption, PrimaryButton, diff --git a/src/containers/article-container.tsx b/src/containers/article-container.tsx index c09d7df..0a7ae8b 100644 --- a/src/containers/article-container.tsx +++ b/src/containers/article-container.tsx @@ -17,7 +17,11 @@ import { closeContextMenu, openImageMenu, } from "../scripts/models/app" -import { RSSSource, SourceTextDirection, updateSource } from "../scripts/models/source" +import { + RSSSource, + SourceTextDirection, + updateSource, +} from "../scripts/models/source" type ArticleContainerProps = { itemId: number diff --git a/src/index.tsx b/src/index.tsx index cce7bfb..cb98426 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -27,7 +27,7 @@ window.utils.addMainContextListener((pos, text) => { }) window.fontList = [""] -window.utils.initFontList().then((fonts) => { +window.utils.initFontList().then(fonts => { window.fontList.push(...fonts) }) diff --git a/src/main/utils.ts b/src/main/utils.ts index bd50ece..bcd1715 100644 --- a/src/main/utils.ts +++ b/src/main/utils.ts @@ -1,16 +1,9 @@ -import { - ipcMain, - shell, - dialog, - app, - session, - clipboard, -} from "electron" +import { ipcMain, shell, dialog, app, session, clipboard } from "electron" import { WindowManager } from "./window" import fs = require("fs") import { ImageCallbackTypes, TouchBarTexts } from "../schema-types" import { initMainTouchBar } from "./touchbar" -import fontList = require('font-list') +import fontList = require("font-list") export function setUtilsListeners(manager: WindowManager) { async function openExternal(url: string, background = false) { @@ -28,9 +21,12 @@ export function setUtilsListeners(manager: WindowManager) { } app.on("web-contents-created", (_, contents) => { - contents.setWindowOpenHandler((details) => { + contents.setWindowOpenHandler(details => { if (contents.getType() === "webview") - openExternal(details.url, details.disposition === "background-tab") + openExternal( + details.url, + details.disposition === "background-tab" + ) return { action: manager.hasWindow() ? "deny" : "allow", } diff --git a/src/scripts/i18n/README.md b/src/scripts/i18n/README.md index 97813ad..5cf0889 100644 --- a/src/scripts/i18n/README.md +++ b/src/scripts/i18n/README.md @@ -18,5 +18,6 @@ Currently, Fluent Reader supports the following languages. | nl | Nederlands | [@Vistaus](https://github.com/Vistaus) | | it | Italiano | [@andrewasd](https://github.com/andrewasd) | | pt-BR | Português do Brasil | [@fabianski7](https://github.com/fabianski7) | +| ko | 한글 | [@1drive](https://github.com/1drive) | Refer to the repo of [react-intl-universal](https://github.com/alibaba/react-intl-universal) to get started on internationalization. diff --git a/src/scripts/models/source.ts b/src/scripts/models/source.ts index 583cf7a..66ed585 100644 --- a/src/scripts/models/source.ts +++ b/src/scripts/models/source.ts @@ -491,7 +491,7 @@ export function sourceReducer( } case MARK_ALL_READ: { let nextState = { ...state } - action.sids.forEach((sid) => { + action.sids.forEach(sid => { nextState[sid] = { ...state[sid], unreadCount: action.time ? state[sid].unreadCount : 0, diff --git a/webpack.config.js b/webpack.config.js index 5492a13..0b995a3 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -24,7 +24,7 @@ module.exports = [ filename: "electron.js", }, node: { - __dirname: false + __dirname: false, }, plugins: [new HardSourceWebpackPlugin()], },