2015-08-15 06:40:11 +08:00
|
|
|
@import "ui-variables";
|
|
|
|
@import "ui-mixins";
|
|
|
|
|
2015-08-15 07:24:53 +08:00
|
|
|
// Preferences Specific
|
|
|
|
|
2015-08-15 06:40:11 +08:00
|
|
|
.preferences-wrap {
|
2015-08-19 02:13:47 +08:00
|
|
|
input[type=checkbox] {margin: 0 7px 0 0; position: relative; top: -1px; }
|
|
|
|
input[type=radio] {margin: 0 7px 0 0; position: relative; top: -1px; }
|
2015-10-22 02:52:04 +08:00
|
|
|
select { margin: 4px 0 0 8px; }
|
2015-08-15 06:40:11 +08:00
|
|
|
|
2015-11-24 04:20:51 +08:00
|
|
|
height: 100%;
|
2015-10-10 07:05:26 +08:00
|
|
|
background-color: @background-primary;
|
|
|
|
color: @text-color;
|
|
|
|
|
2015-11-24 04:20:51 +08:00
|
|
|
section:first-child h2:first-child {
|
|
|
|
margin-top:0;
|
|
|
|
}
|
|
|
|
|
|
|
|
section section h2 {
|
|
|
|
font-size:120%;
|
|
|
|
}
|
|
|
|
|
|
|
|
section {
|
|
|
|
padding-bottom: @padding-base-vertical;
|
|
|
|
.item {
|
|
|
|
padding-top: @padding-small-vertical;
|
|
|
|
padding-bottom: @padding-small-vertical;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
.preferences-sidebar {
|
2016-02-24 07:40:44 +08:00
|
|
|
background-color: @source-list-bg;
|
2015-11-24 04:20:51 +08:00
|
|
|
border-right: 1px solid @border-color-divider;
|
|
|
|
flex: 1;
|
|
|
|
max-width:350px;
|
|
|
|
min-width:200px;
|
|
|
|
height: 100%;
|
|
|
|
|
|
|
|
.item {
|
|
|
|
border-bottom: 1px solid @border-color-divider;
|
|
|
|
cursor: default;
|
2015-12-01 03:43:49 +08:00
|
|
|
|
|
|
|
&.active {
|
|
|
|
background: @background-primary;
|
|
|
|
|
|
|
|
&:not(.has-subitems) {
|
|
|
|
border-right:3px solid @component-active-color;
|
|
|
|
.name {
|
|
|
|
color: @component-active-color;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
.subitem.active {
|
|
|
|
background: @background-primary;
|
|
|
|
border-right:3px solid @component-active-color;
|
|
|
|
color: @component-active-color;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
.disclosure-triangle {
|
|
|
|
float: left;
|
|
|
|
padding-top:16px;
|
|
|
|
}
|
|
|
|
|
|
|
|
.name {
|
|
|
|
padding: @padding-large-vertical @padding-large-horizontal;
|
|
|
|
}
|
|
|
|
|
|
|
|
.subitems {
|
|
|
|
padding-left: 0;
|
|
|
|
box-shadow: inset 0 2px 1px rgba(0, 0, 0, 0.15);
|
|
|
|
background: darken(@background-secondary, 3%);
|
|
|
|
list-style-type: none;
|
|
|
|
font-size: 0.95em;
|
|
|
|
margin: 0;
|
|
|
|
|
|
|
|
.subitem {
|
|
|
|
padding: @padding-large-vertical * 0.8 @padding-large-horizontal + 4;
|
|
|
|
border-top: 1px solid @border-color-divider;
|
|
|
|
border-right:3px solid transparent;
|
2016-01-07 01:51:42 +08:00
|
|
|
text-overflow: ellipsis;
|
|
|
|
overflow: hidden;
|
|
|
|
padding-right: 8px;
|
2015-12-01 03:43:49 +08:00
|
|
|
}
|
|
|
|
}
|
2015-11-24 04:20:51 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
.preferences-content {
|
|
|
|
flex: 4;
|
2015-12-10 04:35:40 +08:00
|
|
|
&>.scroll-region-content {
|
2015-11-24 04:20:51 +08:00
|
|
|
padding: @padding-large-vertical*3 @padding-large-horizontal * 3;
|
|
|
|
}
|
2015-08-15 06:40:11 +08:00
|
|
|
}
|
|
|
|
|
2015-11-24 04:20:51 +08:00
|
|
|
.appearance-mode-switch {
|
|
|
|
max-width:400px;
|
|
|
|
text-align: right;
|
2015-10-22 11:32:33 +08:00
|
|
|
|
2015-08-15 06:40:11 +08:00
|
|
|
.appearance-mode {
|
2015-10-10 07:05:26 +08:00
|
|
|
background-color: @background-off-primary;;
|
2015-08-15 06:40:11 +08:00
|
|
|
border-radius: 10px;
|
2015-10-10 07:05:26 +08:00
|
|
|
border: 1px solid @background-tertiary;
|
2015-08-15 06:40:11 +08:00
|
|
|
text-align: center;
|
|
|
|
flex: 1;
|
|
|
|
padding:25px;
|
|
|
|
padding-bottom:9px;
|
2015-10-22 11:32:33 +08:00
|
|
|
margin-right:10px;
|
2015-11-24 04:20:51 +08:00
|
|
|
margin-bottom:7px;
|
2015-08-15 06:40:11 +08:00
|
|
|
margin-top:0;
|
|
|
|
img {
|
2015-10-10 07:05:26 +08:00
|
|
|
background-color: @background-tertiary;
|
2015-08-15 06:40:11 +08:00
|
|
|
}
|
|
|
|
div {
|
|
|
|
margin-top: 15px;
|
|
|
|
text-transform: capitalize;
|
|
|
|
cursor: default;
|
|
|
|
}
|
2015-11-24 04:20:51 +08:00
|
|
|
&:last-child {
|
|
|
|
margin-right:0;
|
|
|
|
}
|
2015-08-15 06:40:11 +08:00
|
|
|
}
|
|
|
|
.appearance-mode.active {
|
|
|
|
border:1px solid @component-active-color;
|
|
|
|
color: @component-active-color;
|
|
|
|
img { background-color: @component-active-color; }
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
.container-keymaps {
|
2015-11-24 12:34:04 +08:00
|
|
|
max-width: 450px;
|
|
|
|
|
2015-12-02 10:31:12 +08:00
|
|
|
.col-left {
|
|
|
|
text-align: right;
|
|
|
|
flex: 1;
|
|
|
|
margin-right: 20px;
|
|
|
|
}
|
|
|
|
.col-right {
|
|
|
|
text-align: left;
|
|
|
|
flex: 1;
|
|
|
|
select {
|
|
|
|
width: 75%;
|
2015-08-15 06:40:11 +08:00
|
|
|
}
|
2015-12-02 10:31:12 +08:00
|
|
|
}
|
2015-08-15 06:40:11 +08:00
|
|
|
|
2015-12-02 10:31:12 +08:00
|
|
|
.shortcut-presets {
|
|
|
|
padding: 5px 0 20px 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
.shortcut-section-title {
|
|
|
|
border-bottom:1px solid @border-color-divider;
|
|
|
|
margin: @padding-large-vertical * 1.5 0;
|
|
|
|
}
|
2015-08-15 06:40:11 +08:00
|
|
|
|
2015-12-02 10:31:12 +08:00
|
|
|
.shortcut {
|
|
|
|
padding: 3px 0;
|
|
|
|
color: @text-color-very-subtle;
|
2015-11-24 04:20:51 +08:00
|
|
|
.shortcut-value {
|
2015-12-02 10:31:12 +08:00
|
|
|
font-family: monospace;
|
|
|
|
font-weight: 600;
|
|
|
|
color: @text-color;
|
|
|
|
.then {
|
|
|
|
font-family: @font-family-base;
|
|
|
|
color: @text-color-very-subtle;
|
|
|
|
font-weight: 400;
|
|
|
|
font-size: 0.9em;
|
|
|
|
padding-left:3px;
|
|
|
|
padding-right:3px;
|
|
|
|
}
|
|
|
|
&:after {
|
|
|
|
content: ", "
|
|
|
|
}
|
|
|
|
&:last-child:after {
|
|
|
|
content: "";
|
|
|
|
}
|
2015-11-24 04:20:51 +08:00
|
|
|
}
|
|
|
|
}
|
2015-08-15 06:40:11 +08:00
|
|
|
}
|
|
|
|
|
2015-12-04 03:36:54 +08:00
|
|
|
.platform-note {
|
|
|
|
padding: @padding-base-vertical @padding-base-horizontal;
|
2015-12-16 03:56:31 +08:00
|
|
|
background: fade(@black, 4%);
|
2015-12-04 03:36:54 +08:00
|
|
|
border-left:3px solid @info-color;
|
|
|
|
margin:@padding-base-vertical 0;
|
feat(mail-rules): Per-account mail rules filter incoming, existing mail
Summary:
Originally, this was going to be a totally independent package, but
I wasn't able to isolate the functionality and get it tied in to
the delta-stream consumption. Here's how it currently works:
- The preferences package has a new tab which allows you to edit
mail filters. Filters are saved in a new core store, and a new
stock component (ScenarioEditor) renders the editor. The editor
takes a set of templates that define a value space, and outputs
a valid set of values.
- A new MailFilterProcessor takes messages and creates tasks to
apply the actions from the MailFiltersStore.
- The worker-sync package now uses the MailFilterProcessor to
apply filters /before/ it calls didPassivelyReceiveNewModels,
so filtrs are applied before any notifications are created.
- A new task, ReprocessMailFiltersTask allows you to run filters
on all of your existing mail. It leverages the existing TaskQueue
architecture to: a) resume where it left off if you quit midway,
b) be queryable (for status) from all windows and c) cancelable.
The TaskQueue is a bit strange because it runs performLocal and
performRemote very differently, and I had to use `performRemote`.
(todo refactor soon.)
This diff also changes the EditableList a bit to behave like a
controlled component and render focused / unfocused states.
Test Plan: Run tests, only for actual filter processing atm.
Reviewers: juan, evan
Reviewed By: evan
Differential Revision: https://phab.nylas.com/D2379
2015-12-23 15:19:32 +08:00
|
|
|
font-size:0.95em;
|
2015-12-04 03:36:54 +08:00
|
|
|
&:before {
|
|
|
|
color: @info-color;
|
|
|
|
font-weight:600;
|
|
|
|
content: "NOTE: ";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
.platform-linux-only {
|
|
|
|
display: none;
|
|
|
|
}
|
2015-10-22 07:48:57 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
body.platform-win32 {
|
2015-10-22 11:32:33 +08:00
|
|
|
.preferences-wrap {
|
|
|
|
.well {
|
|
|
|
border-radius: 0;
|
|
|
|
}
|
|
|
|
.container-appearance {
|
|
|
|
.appearance-mode {
|
|
|
|
border-radius: 0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2015-08-15 06:40:11 +08:00
|
|
|
}
|
2015-12-04 03:36:54 +08:00
|
|
|
|
|
|
|
body.platform-linux {
|
|
|
|
.preferences-wrap {
|
|
|
|
.platform-linux-only {
|
|
|
|
display: block;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|