init fix for last review

This commit is contained in:
btzr-io 2017-08-19 13:04:45 -06:00
parent 3f3372c96a
commit 58496c1d3c
10 changed files with 13 additions and 45 deletions

View file

@ -8,11 +8,10 @@ Web UI version numbers should always match the corresponding version of LBRY App
## [Unreleased]
### Added
* Added a new component, `FormFieldPrice` which is now used in Publish and Settings
* Added a theme system to select different themes in Settings.
* Added a new component, `FormFieldPrice` which is now used in Publish and Settings.
* Added a new theme system to select different themes in Settings.
* Added a new dark theme.
* Added a forward button and improved history behavior. Back/forward disable when unusable.
* Added a new component, `FormFieldPrice` which is now used in Publish and Settings.
* Added wallet backup guide reference.
### Changed

View file

@ -46,6 +46,7 @@ export function doSetClientSetting(key, value) {
}
export function getThemes() {
/*
// Themes path
const themesPath = `${remote.app.getAppPath()}/dist/themes`;
@ -63,4 +64,5 @@ export function getThemes() {
type: types.GET_THEMES,
data: { themes },
};
*/
}

View file

@ -85,9 +85,6 @@ export const SEARCH_CANCELLED = "SEARCH_CANCELLED";
export const DAEMON_SETTINGS_RECEIVED = "DAEMON_SETTINGS_RECEIVED";
export const CLIENT_SETTING_CHANGED = "CLIENT_SETTING_CHANGED";
// Themes
export const GET_THEMES = "GET_THEMES";
// User
export const AUTHENTICATION_STARTED = "AUTHENTICATION_STARTED";
export const AUTHENTICATION_SUCCESS = "AUTHENTICATION_SUCCESS";

View file

@ -3,3 +3,4 @@ export const FIRST_RUN_ACKNOWLEDGED = "welcome_acknowledged";
export const LANGUAGE = "language";
export const SHOW_NSFW = "showNsfw";
export const SHOW_UNAVAILABLE = "showUnavailable";
export const GET_THEMES = "theme";

View file

@ -8,7 +8,6 @@ import store from "store.js";
import SplashScreen from "component/splash";
import { doChangePath, doNavigate, doDaemonReady } from "actions/app";
import { toQueryString } from "util/query_params";
import setTheme from "util/setTheme";
import * as types from "constants/action_types";
const env = ENV;
@ -72,9 +71,6 @@ document.addEventListener("click", event => {
}
});
// Load initial theme
setTheme(lbry.getClientSetting("theme"));
const application = remote.app;
const dock = application.dock;
const win = remote.getCurrentWindow();

View file

@ -1,11 +1,7 @@
import React from "react";
import { connect } from "react-redux";
import { doClearCache } from "actions/app";
import {
doSetDaemonSetting,
doSetClientSetting,
getThemes,
} from "actions/settings";
import { doSetDaemonSetting, doSetClientSetting } from "actions/settings";
import { selectDaemonSettings, selectShowNsfw } from "selectors/settings";
import SettingsPage from "./view";
@ -17,7 +13,6 @@ const select = state => ({
const perform = dispatch => ({
setDaemonSetting: (key, value) => dispatch(doSetDaemonSetting(key, value)),
clearCache: () => dispatch(doClearCache()),
getThemes: () => dispatch(getThemes()),
setClientSetting: (key, value) => dispatch(doSetClientSetting(key, value)),
});

View file

@ -7,7 +7,6 @@ import lbry from "lbry.js";
import Link from "component/link";
import FormFieldPrice from "component/formFieldPrice";
import { remote } from "electron";
import setTheme from "util/setTheme";
class SettingsPage extends React.PureComponent {
constructor(props) {
@ -21,7 +20,7 @@ class SettingsPage extends React.PureComponent {
showUnavailable: lbry.getClientSetting(settings.SHOW_UNAVAILABLE),
language: lbry.getClientSetting(settings.LANGUAGE),
clearingCache: false,
theme: lbry.getClientSetting("theme"),
theme: lbry.getClientSetting(settings.THEME),
themes: [],
};
}
@ -40,8 +39,8 @@ class SettingsPage extends React.PureComponent {
}
getThemes() {
const { themes } = this.props.getThemes().data;
this.setState({ themes });
//const { themes } = this.props.getThemes().data;
//this.setState({ themes });
}
setDaemonSetting(name, value) {
@ -54,8 +53,8 @@ class SettingsPage extends React.PureComponent {
}
setTheme(value) {
setTheme(value);
this.props.setClientSetting("theme", value);
//setTheme(value);
//this.props.setClientSetting("theme", value);
}
onRunOnStartChange(event) {

View file

@ -1,21 +0,0 @@
import lbry from "lbry";
import { existsSync } from "fs";
import { remote } from "electron";
function setTheme(name) {
/*
const link = document.getElementById("theme");
const file = `${name}.css`;
const path = `${remote.app.getAppPath()}/dist/themes/${file}`;
if (existsSync(path)) {
link.href = `./themes/${file}`;
lbry.setClientSetting("theme", name);
} else {
link.href = `./themes/light.css`;
lbry.setClientSetting("theme", "light");
}
*/
}
export default setTheme;

View file

@ -106,7 +106,7 @@
--menu-item-hover-bg: var(--color-bg-alt);
/* Tooltip */
--tooltip-body-width: 300px;
--tooltip-width: 300px;
--tooltip-bg: var(--color-bg);
--tooltip-color: var(--text-color);
--tooltip-border: 1px solid #aaa;

View file

@ -38,7 +38,7 @@ table.table-standard {
background-color: var(--table-item-odd);
}
&:nth-child(odd):not(.even) {
background-color: var(--table-item-ever);
background-color: var(--table-item-even);
}
&.thead {
background: none;