MarshallOfSound/Google-Play-Music-Desktop-Player-UNOFFICIAL-

View on GitHub
src/renderer/ui/components/settings/tabs/StyleTab.js

Summary

Maintainability
A
0 mins
Test Coverage
import React, { Component } from 'react';

import FileInput from '../FileInput';
import SettingsTabWrapper from './SettingsTabWrapper';
import RaisedButton from 'material-ui/RaisedButton';

function refresh() {
  Emitter.fire('FetchGPMCustomStyles');
  Emitter.fire('FetchYTMCustomStyles');
  Emitter.fire('FetchMainAppCustomStyles');
}

export default class StyleTab extends Component {
  render() {
    return (
      <SettingsTabWrapper>
        <FileInput
          label={TranslationProvider.query('settings-options-style-main-app')}
          settingsKey={'mainAppStyleFile'}
          bonusEvents={['FetchMainAppCustomStyles']}
        />
        <FileInput
          label={TranslationProvider.query('settings-options-style-gpm')}
          settingsKey={'gpmStyleFile'}
          bonusEvents={['FetchGPMCustomStyles']}
        />
        <FileInput
          label={TranslationProvider.query('settings-options-style-ytm')}
          settingsKey={'ytmStyleFile'}
          bonusEvents={['FetchYTMCustomStyles']}
        />
        <RaisedButton
          label={TranslationProvider.query('settings-options-style-refresh')}
          primary
          style={{ marginTop: 18 }}
          onClick={refresh}
        />
      </SettingsTabWrapper>
    );
  }
}