mirror of
https://github.com/Foundry376/Mailspring.git
synced 2024-11-14 13:44:41 +08:00
599d8f834f
Summary: This diff moves the preferences interface to a sheet in the main window, with the following benefits: - We can put any sort of React control in it (no ReactRemote) - It's not strange for the interface to scroll - Since it can scroll, it's safe to auto-generate preferences for plugins based on their package config schema. The general tab is now mostly based on the config schema, with the exception of the "Workspace" and "Layout" bits. The other tabs are still manual, and should be polished more. Test Plan: No new tests Reviewers: evan Reviewed By: evan Differential Revision: https://phab.nylas.com/D2278
43 lines
1.2 KiB
CoffeeScript
43 lines
1.2 KiB
CoffeeScript
React = require 'react'
|
|
_ = require 'underscore'
|
|
{RetinaImg, Flexbox} = require 'nylas-component-kit'
|
|
{AccountStore} = require 'nylas-exports'
|
|
|
|
ConfigSchemaItem = require './config-schema-item'
|
|
WorkspaceSection = require './workspace-section'
|
|
|
|
class PreferencesGeneral extends React.Component
|
|
@displayName: 'PreferencesGeneral'
|
|
|
|
render: =>
|
|
<div className="container" style={maxWidth:600}>
|
|
|
|
<WorkspaceSection config={@props.config} configSchema={@props.configSchema} />
|
|
|
|
<ConfigSchemaItem
|
|
configSchema={@props.configSchema.properties.notifications}
|
|
keyName="Notifications"
|
|
keyPath="core.notifications"
|
|
config={@props.config} />
|
|
|
|
<ConfigSchemaItem
|
|
configSchema={@props.configSchema.properties.reading}
|
|
keyName="Reading"
|
|
keyPath="core.reading"
|
|
config={@props.config} />
|
|
|
|
<ConfigSchemaItem
|
|
configSchema={@props.configSchema.properties.sending}
|
|
keyName="Sending"
|
|
keyPath="core.sending"
|
|
config={@props.config} />
|
|
|
|
<ConfigSchemaItem
|
|
configSchema={@props.configSchema.properties.attachments}
|
|
keyName="Attachments"
|
|
keyPath="core.attachments"
|
|
config={@props.config} />
|
|
|
|
</div>
|
|
|
|
module.exports = PreferencesGeneral
|