release build 1.1.0

This commit is contained in:
Bruce Liu 2021-12-16 17:26:30 +08:00
parent 7092a57b2c
commit dea293683a
8 changed files with 35 additions and 31 deletions

View File

@ -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<ArticleProps, ArticleState> {
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<ArticleProps, ArticleState> {
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<ArticleProps, ArticleState> {
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<ArticleProps, ArticleState> {
</>
)
)
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}`
}

View File

@ -20,7 +20,6 @@ import {
DefaultButton,
ChoiceGroup,
IChoiceGroupOption,
loadTheme,
Dropdown,
IDropdownOption,
PrimaryButton,

View File

@ -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

View File

@ -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)
})

View File

@ -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",
}

View File

@ -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.

View File

@ -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,

View File

@ -24,7 +24,7 @@ module.exports = [
filename: "electron.js",
},
node: {
__dirname: false
__dirname: false,
},
plugins: [new HardSourceWebpackPlugin()],
},