From 26002f4b673ef934ee2b1d57f1bf610a1be92cdb Mon Sep 17 00:00:00 2001 From: Baptiste Lemoine Date: Mon, 23 Dec 2019 11:44:49 +0100 Subject: [PATCH] :zap: airmail style for notifications about direct messages --- app/javascript/mastodon/components/status.js | 16 ++++---- .../components/conversation.js | 19 ++++----- .../ui/components/messaging/messaging.js | 4 +- app/javascript/styles/bliss/forms.scss | 31 ++++++++------ app/javascript/styles/bliss/messaging.scss | 41 +++++++++++++++++++ app/views/settings/profiles/show.html.haml | 2 +- 6 files changed, 79 insertions(+), 34 deletions(-) diff --git a/app/javascript/mastodon/components/status.js b/app/javascript/mastodon/components/status.js index ba5df0e9e..2817aee8d 100644 --- a/app/javascript/mastodon/components/status.js +++ b/app/javascript/mastodon/components/status.js @@ -607,15 +607,15 @@ class Status extends ImmutablePureComponent { /> )} -
+ {/*
*/} - {status.get('in_reply_to_account_id') === status.getIn(['account', 'id']) && -

oui je cause tout seul, c'est un thread

- } - {this.props.threadsCompile && -

les threads sont en mode compilés

- } -
+ {/* {status.get('in_reply_to_account_id') === status.getIn(['account', 'id']) &&*/} + {/*

oui je cause tout seul, c'est un thread

*/} + {/* }*/} + {/* {this.props.threadsCompile &&*/} + {/*

les threads sont en mode compilés

*/} + {/* }*/} + {/*
*/} ( - ).reduce((prev, cur) => [prev, ', ', cur]); + )).reduce((prev, cur) => [prev, ', ', cur]); const handlers = { reply : this.handleReply, @@ -221,23 +221,22 @@ class Conversation extends ImmutablePureComponent { )}
- -
+
diff --git a/app/javascript/mastodon/features/ui/components/messaging/messaging.js b/app/javascript/mastodon/features/ui/components/messaging/messaging.js index 4e1bdea68..8a004dbce 100644 --- a/app/javascript/mastodon/features/ui/components/messaging/messaging.js +++ b/app/javascript/mastodon/features/ui/components/messaging/messaging.js @@ -1,6 +1,5 @@ import React from 'react'; import ContactsList from './contacts-list'; -import Conversation from './conversations'; export default class Messaging extends React.PureComponent { @@ -48,13 +47,12 @@ export default class Messaging extends React.PureComponent { // } render() { - // const contactlist = null; return (
messagerie todo - + {/**/}
); } diff --git a/app/javascript/styles/bliss/forms.scss b/app/javascript/styles/bliss/forms.scss index 4b32b4058..2ed668dcb 100644 --- a/app/javascript/styles/bliss/forms.scss +++ b/app/javascript/styles/bliss/forms.scss @@ -1,35 +1,41 @@ $no-columns-breakpoint: 600px; -table{ - thead{ +table { + thead { - th{ + th { font-weight: 800; background: $ui-highlight-color; } } - td, th{ - padding: 1rem; - } - a{ + + td, th { + padding: 1rem; + } + + a { @extend .text-btn } } -.table-responsive{ + +.table-responsive { width: 100%; } -.table-striped{ + +.table-striped { margin: 1rem 0; - tr{ + tr { - &:odd{ + &:odd { background: $ui-base-lighter-color; } } } -.group-form{ + +.group-form { } + code { font-family: $font-monospace, monospace; font-weight: 400; @@ -114,6 +120,7 @@ code { position: absolute; margin: 0 4px; margin-top: -2px; + background: $ui-highlight-color; } } } diff --git a/app/javascript/styles/bliss/messaging.scss b/app/javascript/styles/bliss/messaging.scss index bd7cc53ef..e565ce21c 100644 --- a/app/javascript/styles/bliss/messaging.scss +++ b/app/javascript/styles/bliss/messaging.scss @@ -8,6 +8,18 @@ $messagingBoxHeight: 20em; bottom: 0; } +.airmail-border { + border: 0.25em solid transparent; + border-image: 4 repeating-linear-gradient(-45deg, red 0, red 1em, white 0, white 2em, + #58a 0, #58a 3em, white 0, white 4em); + +} + +.status-direct, +.item-list .conversation { + @extend .airmail-border; +} + .messaging-box { @extend .fixed-box; @@ -20,6 +32,35 @@ $messagingBoxHeight: 20em; } } +.conversation { + &.focusable { + &:hover { + background: mix($ui-base-color, $ui-secondary-color); + } + + } + + .conversation_reply { + display: inline-block; + padding: 1em; + width: 15em; + + &:hover { + color: $ui-highlight-color; + } + } + + .status__action-bar-dropdown { + display: inline-block; + padding: 1em; + width: 10em; + + &:hover { + color: $ui-highlight-color; + } + } +} + .conversations_list { right: 1em; position: absolute; diff --git a/app/views/settings/profiles/show.html.haml b/app/views/settings/profiles/show.html.haml index 6929f54f3..c669d91ba 100644 --- a/app/views/settings/profiles/show.html.haml +++ b/app/views/settings/profiles/show.html.haml @@ -21,7 +21,7 @@ %hr.spacer/ .fields-group - = f.input :locked, as: :boolean, wrapper: :with_label, hint: t('simple_form.hints.defaults.locked') + = f.input :locked, as: :boolean, wrapper: :with_label, hint: t('simple_form.hints.defaults.locked'), recommended: true .fields-group = f.input :bot, as: :boolean, wrapper: :with_label, hint: t('simple_form.hints.defaults.bot')