mirror of
https://github.com/mattermost/mattermost.git
synced 2025-02-25 18:55:24 -06:00
MM-54931 - Updating settings modals UI (#24934)
* Updating modals * Updating tests * Updating css * Updating edit button * Updating collapse icon in sidebar
This commit is contained in:
parent
76337aed24
commit
de42776e35
@ -70,8 +70,13 @@ export default class SettingItemMin extends React.PureComponent<Props> {
|
||||
aria-labelledby={this.props.section + 'Title ' + this.props.section + 'Edit'}
|
||||
aria-expanded={false}
|
||||
>
|
||||
<EditIcon/>
|
||||
{this.props.describe}
|
||||
{this.props.describe ? this.props.describe : (
|
||||
<FormattedMessage
|
||||
id='setting_item_min.edit'
|
||||
defaultMessage='Edit'
|
||||
/>
|
||||
)}
|
||||
<i className='icon icon-chevron-down'/>
|
||||
</button>
|
||||
</div>
|
||||
);
|
||||
|
@ -65,7 +65,7 @@ exports[`components/team_settings_modal should match snapshot 1`] = `
|
||||
tabs={
|
||||
Array [
|
||||
Object {
|
||||
"icon": "icon fa fa-cog",
|
||||
"icon": "icon icon-settings-outline",
|
||||
"iconTitle": "Settings Icon",
|
||||
"name": "general",
|
||||
"uiName": "General",
|
||||
|
@ -75,7 +75,7 @@ export default class TeamSettingsModal extends React.PureComponent<Props, State>
|
||||
|
||||
render() {
|
||||
const tabs = [];
|
||||
tabs.push({name: 'general', uiName: Utils.localizeMessage('team_settings_modal.generalTab', 'General'), icon: 'icon fa fa-cog', iconTitle: Utils.localizeMessage('generic_icons.settings', 'Settings Icon')});
|
||||
tabs.push({name: 'general', uiName: Utils.localizeMessage('team_settings_modal.generalTab', 'General'), icon: 'icon icon-settings-outline', iconTitle: Utils.localizeMessage('generic_icons.settings', 'Settings Icon')});
|
||||
|
||||
return (
|
||||
<Modal
|
||||
|
@ -278,13 +278,13 @@ class UserSettingsModal extends React.PureComponent<Props, State> {
|
||||
}
|
||||
const tabs = [];
|
||||
if (this.props.isContentProductSettings) {
|
||||
tabs.push({name: 'notifications', uiName: formatMessage(holders.notifications), icon: 'icon fa fa-exclamation-circle', iconTitle: Utils.localizeMessage('user.settings.notifications.icon', 'Notification Settings Icon')});
|
||||
tabs.push({name: 'display', uiName: formatMessage(holders.display), icon: 'icon fa fa-eye', iconTitle: Utils.localizeMessage('user.settings.display.icon', 'Display Settings Icon')});
|
||||
tabs.push({name: 'sidebar', uiName: formatMessage(holders.sidebar), icon: 'icon fa fa-columns', iconTitle: Utils.localizeMessage('user.settings.sidebar.icon', 'Sidebar Settings Icon')});
|
||||
tabs.push({name: 'advanced', uiName: formatMessage(holders.advanced), icon: 'icon fa fa-list-alt', iconTitle: Utils.localizeMessage('user.settings.advance.icon', 'Advanced Settings Icon')});
|
||||
tabs.push({name: 'notifications', uiName: formatMessage(holders.notifications), icon: 'icon icon-bell-outline', iconTitle: Utils.localizeMessage('user.settings.notifications.icon', 'Notification Settings Icon')});
|
||||
tabs.push({name: 'display', uiName: formatMessage(holders.display), icon: 'icon icon-eye-outline', iconTitle: Utils.localizeMessage('user.settings.display.icon', 'Display Settings Icon')});
|
||||
tabs.push({name: 'sidebar', uiName: formatMessage(holders.sidebar), icon: 'icon icon-dock-left', iconTitle: Utils.localizeMessage('user.settings.sidebar.icon', 'Sidebar Settings Icon')});
|
||||
tabs.push({name: 'advanced', uiName: formatMessage(holders.advanced), icon: 'icon icon-tune', iconTitle: Utils.localizeMessage('user.settings.advance.icon', 'Advanced Settings Icon')});
|
||||
} else {
|
||||
tabs.push({name: 'profile', uiName: formatMessage(holders.profile), icon: 'icon fa fa-gear', iconTitle: Utils.localizeMessage('user.settings.profile.icon', 'Profile Settings Icon')});
|
||||
tabs.push({name: 'security', uiName: formatMessage(holders.security), icon: 'icon fa fa-lock', iconTitle: Utils.localizeMessage('user.settings.security.icon', 'Security Settings Icon')});
|
||||
tabs.push({name: 'profile', uiName: formatMessage(holders.profile), icon: 'icon icon-settings-outline', iconTitle: Utils.localizeMessage('user.settings.profile.icon', 'Profile Settings Icon')});
|
||||
tabs.push({name: 'security', uiName: formatMessage(holders.security), icon: 'icon icon-lock-outline', iconTitle: Utils.localizeMessage('user.settings.security.icon', 'Security Settings Icon')});
|
||||
}
|
||||
|
||||
const title = this.props.isContentProductSettings ? formatMessage({
|
||||
|
@ -48,6 +48,7 @@
|
||||
}
|
||||
|
||||
.modal-header {
|
||||
border-color: rgba(var(--center-channel-color-rgb), 0.16);
|
||||
background: var(--sidebar-header-bg);
|
||||
|
||||
.close {
|
||||
@ -239,7 +240,7 @@
|
||||
display: flex;
|
||||
min-height: 56px;
|
||||
padding: 14px 48px 11px 15px;
|
||||
border: 1px solid $light-gray;
|
||||
border-bottom: 1px solid $light-gray;
|
||||
background: #333;
|
||||
border-radius: 0;
|
||||
border-radius: 3px 3px 0 0;
|
||||
|
@ -17,6 +17,7 @@
|
||||
@import 'links';
|
||||
@import 'mentions';
|
||||
@import 'modal';
|
||||
@import 'settings-modal';
|
||||
@import 'multi-select';
|
||||
@import 'oauth';
|
||||
@import 'popover';
|
||||
|
107
webapp/channels/src/sass/components/_settings-modal.scss
Normal file
107
webapp/channels/src/sass/components/_settings-modal.scss
Normal file
@ -0,0 +1,107 @@
|
||||
@charset "utf-8";
|
||||
|
||||
.app__body {
|
||||
.settings-modal {
|
||||
h3 {
|
||||
font-size: 18px;
|
||||
}
|
||||
|
||||
// Tabs
|
||||
.nav-pills {
|
||||
> li {
|
||||
margin-bottom: 8px;
|
||||
|
||||
button {
|
||||
height: 32px;
|
||||
padding: 0 12px;
|
||||
border-radius: 4px;
|
||||
color: rgba(var(--center-channel-color-rgb), 0.75);
|
||||
font-weight: 600;
|
||||
|
||||
&:hover {
|
||||
background-color: rgba(var(--center-channel-color-rgb), 0.04);
|
||||
border-radius: 4px;
|
||||
color: rgba(var(--center-channel-color-rgb), 0.88);
|
||||
}
|
||||
}
|
||||
|
||||
&.active {
|
||||
button {
|
||||
background: rgba(var(--button-bg-rgb), 0.08);
|
||||
color: v(button-bg);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.modal-content {
|
||||
border: 1px solid rgba(var(--center-channel-color-rgb), 0.16);
|
||||
background: var(--center-channel-bg);
|
||||
border-radius: 12px;
|
||||
}
|
||||
|
||||
.settings-table {
|
||||
.settings-links {
|
||||
width: 232px;
|
||||
padding: 16px;
|
||||
border-right: 1px solid rgba(var(--center-channel-color-rgb), 0.08);
|
||||
background: rgba(var(--center-channel-color-rgb), 0.04);
|
||||
}
|
||||
|
||||
.nav {
|
||||
width: 200px;
|
||||
}
|
||||
|
||||
.settings-content {
|
||||
.divider-dark {
|
||||
border-color: rgba(var(--center-channel-color-rgb), 0.12);
|
||||
}
|
||||
|
||||
.divider-light {
|
||||
border-color: rgba(var(--center-channel-color-rgb), 0.08);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.modal-header {
|
||||
height: 76px;
|
||||
align-items: center;
|
||||
padding: 0 24px;
|
||||
border-color: rgba(var(--center-channel-color-rgb), 0.08);
|
||||
background: transparent;
|
||||
|
||||
.close {
|
||||
top: 18px;
|
||||
right: 18px;
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
border-radius: 4px;
|
||||
color: rgba(var(--center-channel-color-rgb), 0.56);
|
||||
font-size: 30px;
|
||||
font-weight: 400;
|
||||
|
||||
&:hover {
|
||||
background: rgba(var(--center-channel-color-rgb), 0.08);
|
||||
color: rgba(var(--center-channel-color-rgb), 0.72);
|
||||
}
|
||||
|
||||
&:active {
|
||||
background: rgba(var(--button-bg-rgb), 0.08);
|
||||
color: v(button-bg);
|
||||
}
|
||||
|
||||
.modal-title {
|
||||
background: transparent;
|
||||
color: v(center-channel-color);
|
||||
font-size: 22px;
|
||||
}
|
||||
}
|
||||
|
||||
.modal-title {
|
||||
background: transparent;
|
||||
color: v(center-channel-color);
|
||||
font-size: 22px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -160,14 +160,6 @@
|
||||
|
||||
.modal {
|
||||
.settings-modal {
|
||||
&:not(.settings-modal--tabless) {
|
||||
&:not(.display--content) {
|
||||
.modal-content {
|
||||
background: var(--sidebar-bg);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.modal-body {
|
||||
min-height: 100%;
|
||||
}
|
||||
@ -195,11 +187,21 @@
|
||||
padding-right: 15px;
|
||||
}
|
||||
|
||||
.section-min {
|
||||
.d-flex {
|
||||
flex-direction: column;
|
||||
}
|
||||
}
|
||||
|
||||
.section-min__edit {
|
||||
position: relative;
|
||||
top: 0;
|
||||
right: 0;
|
||||
text-align: left;
|
||||
|
||||
button {
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
|
||||
.appearance-section {
|
||||
@ -235,7 +237,7 @@
|
||||
position: absolute;
|
||||
z-index: 5;
|
||||
top: 0;
|
||||
display: block;
|
||||
display: flex;
|
||||
width: 100%;
|
||||
|
||||
.modal-title {
|
||||
@ -247,6 +249,8 @@
|
||||
>span {
|
||||
display: block;
|
||||
overflow: hidden;
|
||||
font-family: Metropolis, sans-serif;
|
||||
font-weight: 600;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
@ -289,13 +293,7 @@
|
||||
}
|
||||
|
||||
> button {
|
||||
color: var(--sidebar-text);
|
||||
}
|
||||
|
||||
&.active {
|
||||
> button {
|
||||
color: var(--sidebar-text);
|
||||
}
|
||||
height: 48px;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -303,9 +301,13 @@
|
||||
.settings-content {
|
||||
.section-min__edit {
|
||||
text-align: left;
|
||||
text-decoration: none;
|
||||
|
||||
button {
|
||||
display: flex;
|
||||
width: 100%;
|
||||
align-items: center;
|
||||
color: rgba(var(--center-channel-color-rgb), 0.75);
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
@ -319,7 +321,7 @@
|
||||
padding: 0;
|
||||
|
||||
.user-settings {
|
||||
padding: 70px 20px 30px;
|
||||
padding: 100px 20px 30px;
|
||||
}
|
||||
}
|
||||
|
||||
@ -348,11 +350,6 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
button {
|
||||
padding: 15px;
|
||||
border-bottom: 1px solid;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -54,22 +54,17 @@
|
||||
|
||||
.modal-back {
|
||||
position: absolute;
|
||||
top: 12px;
|
||||
left: 0;
|
||||
width: 50px;
|
||||
top: 18px;
|
||||
left: 12px;
|
||||
display: flex;
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
cursor: pointer;
|
||||
font-size: 27px;
|
||||
font-weight: normal;
|
||||
line-height: 32px;
|
||||
text-align: center;
|
||||
|
||||
.fa {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
line-height: inherit;
|
||||
}
|
||||
}
|
||||
|
||||
.modal-body {
|
||||
@ -206,6 +201,7 @@
|
||||
.nav {
|
||||
position: fixed;
|
||||
width: 179px;
|
||||
margin: 0;
|
||||
|
||||
&.position--top {
|
||||
top: 57px;
|
||||
@ -234,14 +230,16 @@
|
||||
|
||||
.section-max {
|
||||
@include pie-clearfix;
|
||||
@include alpha-property('background', $black, 0.05);
|
||||
|
||||
padding: 1em 0 1.3em;
|
||||
margin-bottom: 0;
|
||||
background: rgba(var(--center-channel-color-rgb), 0.04);
|
||||
|
||||
.section-title {
|
||||
padding-left: 14px;
|
||||
margin: 0 0 5px;
|
||||
font-size: 14px;
|
||||
font-weight: 600;
|
||||
line-height: 20px;
|
||||
}
|
||||
}
|
||||
@ -513,10 +511,11 @@
|
||||
}
|
||||
|
||||
.icon {
|
||||
top: 2px;
|
||||
width: 14px;
|
||||
margin-right: 10px;
|
||||
font-size: 15px;
|
||||
position: relative;
|
||||
top: 1px;
|
||||
width: 16px;
|
||||
margin-right: 8px;
|
||||
font-size: 18px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
@ -548,8 +547,6 @@
|
||||
button:hover,
|
||||
button:focus {
|
||||
position: relative;
|
||||
border-radius: 0;
|
||||
font-weight: 400;
|
||||
}
|
||||
|
||||
button {
|
||||
@ -640,6 +637,7 @@
|
||||
.section-min {
|
||||
position: relative;
|
||||
padding: 1em;
|
||||
border-radius: 4px;
|
||||
cursor: pointer;
|
||||
|
||||
@include clearfix;
|
||||
@ -652,6 +650,10 @@
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.section-min__edit {
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
&:hover .section-min__edit {
|
||||
text-decoration: underline;
|
||||
}
|
||||
@ -684,7 +686,7 @@
|
||||
.section-min__describe {
|
||||
@include clearfix;
|
||||
|
||||
opacity: 0.7;
|
||||
opacity: 0.75;
|
||||
text-overflow: ellipsis;
|
||||
white-space: pre;
|
||||
}
|
||||
|
@ -350,7 +350,7 @@ export function applyTheme(theme: Theme) {
|
||||
changeCss('.app__body .post-create__container .post-create-body .send-button.disabled i', 'color:' + changeOpacity(theme.centerChannelColor, 0.4));
|
||||
changeCss('.app__body .channel-header .pinned-posts-button svg', 'fill:' + changeOpacity(theme.centerChannelColor, 0.6));
|
||||
changeCss('.app__body .channel-header .channel-header_plugin-dropdown svg', 'fill:' + changeOpacity(theme.centerChannelColor, 0.6));
|
||||
changeCss('.app__body .file-preview, .app__body .post-image__details, .app__body .markdown__table th, .app__body .markdown__table td, .app__body .modal .settings-modal .settings-table .settings-content .divider-light, .app__body .webhooks__container, .app__body .dropdown-menu, .app__body .modal .modal-header', 'border-color:' + changeOpacity(theme.centerChannelColor, 0.2));
|
||||
changeCss('.app__body .file-preview, .app__body .post-image__details, .app__body .markdown__table th, .app__body .markdown__table td, .app__body .webhooks__container, .app__body .dropdown-menu', 'border-color:' + changeOpacity(theme.centerChannelColor, 0.2));
|
||||
changeCss('.emoji-picker .emoji-picker__header', 'border-color:' + changeOpacity(theme.centerChannelColor, 0.2));
|
||||
changeCss('.app__body .popover.bottom>.arrow', 'border-bottom-color:' + changeOpacity(theme.centerChannelColor, 0.25));
|
||||
changeCss('.app__body .btn.btn-transparent', 'color:' + changeOpacity(theme.centerChannelColor, 0.7));
|
||||
@ -371,14 +371,14 @@ export function applyTheme(theme: Theme) {
|
||||
changeCss('.app__body .date-separator .separator__hr, .app__body .modal-footer, .app__body .modal .custom-textarea', 'border-color:' + changeOpacity(theme.centerChannelColor, 0.2));
|
||||
changeCss('.app__body .search-item-container', 'border-color:' + changeOpacity(theme.centerChannelColor, 0.1));
|
||||
changeCss('.app__body .modal .custom-textarea:focus', 'border-color:' + changeOpacity(theme.centerChannelColor, 0.3));
|
||||
changeCss('.app__body .channel-intro, .app__body .modal .settings-modal .settings-table .settings-content .divider-dark, .app__body hr, .app__body .modal .settings-modal .settings-table .settings-links, .app__body .modal .settings-modal .settings-table .settings-content .appearance-section .theme-elements__header, .app__body .user-settings .authorized-app:not(:last-child)', 'border-color:' + changeOpacity(theme.centerChannelColor, 0.2));
|
||||
changeCss('.app__body .channel-intro, .app__body hr, .app__body .modal .settings-modal .settings-table .settings-content .appearance-section .theme-elements__header, .app__body .user-settings .authorized-app:not(:last-child)', 'border-color:' + changeOpacity(theme.centerChannelColor, 0.2));
|
||||
changeCss('.app__body .post.post--comment.other--root.current--user .post-comment, .app__body pre', 'background:' + changeOpacity(theme.centerChannelColor, 0.05));
|
||||
changeCss('.app__body .post.post--comment.other--root.current--user .post-comment, .app__body .more-modal__list .more-modal__row, .app__body .member-div:first-child, .app__body .member-div, .app__body .access-history__table .access__report, .app__body .activity-log__table', 'border-color:' + changeOpacity(theme.centerChannelColor, 0.1));
|
||||
changeCss('@media(max-width: 1800px){.app__body .inner-wrap.move--left .post.post--comment.same--root', 'border-color:' + changeOpacity(theme.centerChannelColor, 0.07));
|
||||
changeCss('.app__body .post.post--hovered', 'background:' + changeOpacity(theme.centerChannelColor, 0.08));
|
||||
changeCss('.app__body .attachment__body__wrap.btn-close', 'background:' + changeOpacity(theme.centerChannelColor, 0.08));
|
||||
changeCss('.app__body .attachment__body__wrap.btn-close', 'border-color:' + changeOpacity(theme.centerChannelColor, 0.2));
|
||||
changeCss('@media(min-width: 768px){.app__body .post.a11y--active, .app__body .modal .settings-modal .settings-table .settings-content .section-min:hover', 'background:' + changeOpacity(theme.centerChannelColor, 0.08));
|
||||
changeCss('@media(min-width: 768px){.app__body .post.a11y--active, .app__body .modal .settings-modal .settings-table .settings-content .section-min:hover', 'background:' + changeOpacity(theme.centerChannelColor, 0.04));
|
||||
changeCss('@media(min-width: 768px){.app__body .post.post--editing', 'background:' + changeOpacity(theme.buttonBg, 0.08));
|
||||
changeCss('@media(min-width: 768px){.app__body .post.current--user:hover .post__body ', 'background: transparent;');
|
||||
changeCss('.app__body .more-modal__row.more-modal__row--selected, .app__body .date-separator.hovered--before:after, .app__body .date-separator.hovered--after:before, .app__body .new-separator.hovered--after:before, .app__body .new-separator.hovered--before:after', 'background:' + changeOpacity(theme.centerChannelColor, 0.07));
|
||||
|
Loading…
Reference in New Issue
Block a user