alpha release build 0.2.0
This commit is contained in:
parent
06a08e3f52
commit
f017bced35
10
package.json
10
package.json
|
@ -1,13 +1,13 @@
|
|||
{
|
||||
"name": "fluent-reader",
|
||||
"version": "0.1.0",
|
||||
"version": "0.2.0",
|
||||
"description": "A simplistic, modern desktop RSS reader",
|
||||
"main": "./dist/electron.js",
|
||||
"scripts": {
|
||||
"build": "webpack --config ./webpack.config.js",
|
||||
"electron": "electron ./dist/electron.js",
|
||||
"start": "npm run build && npm run electron",
|
||||
"package-win": "electron-builder -w --x64 && electron-builder -w --ia32 && electron-builder -w --arm64",
|
||||
"package-win": "electron-builder -w --x64 && electron-builder -w --ia32 && electron-builder -w appx:arm64",
|
||||
"package-mac": "sudo electron-builder --mac"
|
||||
},
|
||||
"keywords": [],
|
||||
|
@ -36,6 +36,12 @@
|
|||
"showNameOnTiles": true,
|
||||
"setBuildNumber": true
|
||||
},
|
||||
"nsis": {
|
||||
"oneClick": false,
|
||||
"perMachine": true,
|
||||
"allowToChangeInstallationDirectory": true,
|
||||
"deleteAppDataOnUninstall": true
|
||||
},
|
||||
"mac": {
|
||||
"target": [ "dmg" ]
|
||||
}
|
||||
|
|
|
@ -2,6 +2,7 @@ import * as React from "react"
|
|||
import intl = require("react-intl-universal")
|
||||
import { Stack, Link } from "@fluentui/react"
|
||||
import { openExternal } from "../../scripts/utils"
|
||||
import { remote } from "electron"
|
||||
|
||||
class AboutTab extends React.Component {
|
||||
render = () => (
|
||||
|
@ -9,7 +10,7 @@ class AboutTab extends React.Component {
|
|||
<Stack className="settings-about" horizontalAlign="center">
|
||||
<img src="logo.svg" style={{width: 120, height: 120}} />
|
||||
<h3>Fluent Reader</h3>
|
||||
<small>{intl.get("settings.version")} 0.1.0</small>
|
||||
<small>{intl.get("settings.version")} {remote.app.getVersion()}</small>
|
||||
<p className="settings-hint">Copyright © 2020 Haoyuan Liu. All rights reserved.</p>
|
||||
<Stack horizontal horizontalAlign="center" tokens={{childrenGap: 12}}>
|
||||
<small><Link onClick={() => openExternal("https://github.com/yang991178/fluent-reader")}>{intl.get("settings.openSource")}</Link></small>
|
||||
|
|
|
@ -1,10 +1,12 @@
|
|||
import { app, ipcMain, BrowserWindow, Menu, nativeTheme } from "electron"
|
||||
import windowStateKeeper = require("electron-window-state")
|
||||
import Store = require("electron-store")
|
||||
import performUpdate from "./scripts/update-scripts"
|
||||
|
||||
let mainWindow: BrowserWindow
|
||||
let store = new Store()
|
||||
let restarting = false
|
||||
performUpdate(store)
|
||||
nativeTheme.themeSource = store.get("theme", "system")
|
||||
|
||||
function createWindow() {
|
||||
|
@ -35,7 +37,7 @@ function createWindow() {
|
|||
mainWindow.on("ready-to-show", () => {
|
||||
mainWindow.show()
|
||||
mainWindow.focus()
|
||||
mainWindow.webContents.openDevTools()
|
||||
if (!app.isPackaged) mainWindow.webContents.openDevTools()
|
||||
});
|
||||
// and load the index.html of the app.
|
||||
mainWindow.loadFile((app.isPackaged ? "dist/" : "") + "index.html")
|
||||
|
|
|
@ -20,4 +20,5 @@ export type schemaTypes = {
|
|||
locale: string
|
||||
sourceGroups: SourceGroup[]
|
||||
fontSize: number
|
||||
menuOn: boolean
|
||||
}
|
||||
|
|
|
@ -5,7 +5,7 @@ import { ActionStatus, AppThunk, getWindowBreakpoint } from "../utils"
|
|||
import { INIT_FEEDS, FeedActionTypes, ALL, initFeeds } from "./feed"
|
||||
import { SourceGroupActionTypes, UPDATE_SOURCE_GROUP, ADD_SOURCE_TO_GROUP, DELETE_SOURCE_GROUP, REMOVE_SOURCE_FROM_GROUP, REORDER_SOURCE_GROUPS } from "./group"
|
||||
import { PageActionTypes, SELECT_PAGE, PageType, selectAllArticles } from "./page"
|
||||
import { getCurrentLocale } from "../settings"
|
||||
import { getCurrentLocale, setDefaultMenu, getDefaultMenu } from "../settings"
|
||||
import locales from "../i18n/_locales"
|
||||
import * as db from "../db"
|
||||
|
||||
|
@ -38,7 +38,7 @@ export class AppState {
|
|||
fetchingItems = false
|
||||
fetchingProgress = 0
|
||||
fetchingTotal = 0
|
||||
menu = getWindowBreakpoint()
|
||||
menu = getWindowBreakpoint() && getDefaultMenu()
|
||||
menuKey = ALL
|
||||
title = ""
|
||||
settings = {
|
||||
|
@ -149,7 +149,13 @@ export function openGroupMenu(sids: number[], event: React.MouseEvent): ContextM
|
|||
}
|
||||
}
|
||||
|
||||
export const toggleMenu = () => ({ type: TOGGLE_MENU })
|
||||
export function toggleMenu(): AppThunk {
|
||||
return (dispatch, getState) => {
|
||||
dispatch({ type: TOGGLE_MENU })
|
||||
setDefaultMenu(getState().app.menu)
|
||||
}
|
||||
}
|
||||
|
||||
export const toggleLogMenu = () => ({ type: TOGGLE_LOGS })
|
||||
export const toggleSettings = () => ({ type: TOGGLE_SETTINGS })
|
||||
export const saveSettings = () => ({ type: SAVE_SETTINGS })
|
||||
|
|
|
@ -9,6 +9,14 @@ import intl = require("react-intl-universal")
|
|||
|
||||
export const store = new Store<schemaTypes>()
|
||||
|
||||
const MENU_STORE_KEY = "menuOn"
|
||||
export function getDefaultMenu() {
|
||||
return store.get(MENU_STORE_KEY, false)
|
||||
}
|
||||
export function setDefaultMenu(state: boolean) {
|
||||
store.set(MENU_STORE_KEY, state)
|
||||
}
|
||||
|
||||
const PAC_STORE_KEY = "pac"
|
||||
const PAC_STATUS_KEY = "pacOn"
|
||||
export function getProxyStatus() {
|
||||
|
|
|
@ -9,6 +9,9 @@ module.exports = [
|
|||
rules: [{
|
||||
test: /\.ts$/,
|
||||
include: /src/,
|
||||
resolve: {
|
||||
extensions: ['.ts', '.js']
|
||||
},
|
||||
use: [{ loader: 'ts-loader' }]
|
||||
}]
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue