Merge pull request #2476 from matrix-org/travis/modal-tab-settings
Basic structure for tabbed user settings
This commit is contained in:
commit
94b1d739fb
21 changed files with 725 additions and 79 deletions
|
@ -160,7 +160,7 @@ textarea {
|
|||
padding: 0 58px 36px;
|
||||
width: 60%;
|
||||
max-width: 704px;
|
||||
box-shadow: 0 1px 0 0 rgba(0, 0, 0, 0.2);
|
||||
box-shadow: 2px 15px 30px 0 $dialog-shadow-color;
|
||||
max-height: 80%;
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
@ -171,7 +171,7 @@ textarea {
|
|||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background-color: $dialog-background-bg-color;
|
||||
background-color: $dialog-backdrop-color;
|
||||
opacity: 0.8;
|
||||
}
|
||||
|
||||
|
|
|
@ -17,6 +17,7 @@
|
|||
@import "./structures/_RoomSubList.scss";
|
||||
@import "./structures/_RoomView.scss";
|
||||
@import "./structures/_SearchBox.scss";
|
||||
@import "./structures/_TabbedView.scss";
|
||||
@import "./structures/_TagPanel.scss";
|
||||
@import "./structures/_TopLeftMenuButton.scss";
|
||||
@import "./structures/_UploadBar.scss";
|
||||
|
@ -56,6 +57,7 @@
|
|||
@import "./views/dialogs/_SetPasswordDialog.scss";
|
||||
@import "./views/dialogs/_ShareDialog.scss";
|
||||
@import "./views/dialogs/_UnknownDeviceDialog.scss";
|
||||
@import "./views/dialogs/_UserSettingsDialog.scss";
|
||||
@import "./views/dialogs/keybackup/_CreateKeyBackupDialog.scss";
|
||||
@import "./views/dialogs/keybackup/_KeyBackupFailedDialog.scss";
|
||||
@import "./views/dialogs/keybackup/_RestoreKeyBackupDialog.scss";
|
||||
|
@ -128,6 +130,8 @@
|
|||
@import "./views/settings/_IntegrationsManager.scss";
|
||||
@import "./views/settings/_KeyBackupPanel.scss";
|
||||
@import "./views/settings/_Notifications.scss";
|
||||
@import "./views/settings/tabs/_GeneralSettingsTab.scss";
|
||||
@import "./views/settings/tabs/_SettingsTab.scss";
|
||||
@import "./views/voip/_CallView.scss";
|
||||
@import "./views/voip/_IncomingCallbox.scss";
|
||||
@import "./views/voip/_VideoView.scss";
|
||||
|
|
92
res/css/structures/_TabbedView.scss
Normal file
92
res/css/structures/_TabbedView.scss
Normal file
|
@ -0,0 +1,92 @@
|
|||
/*
|
||||
Copyright 2017 Travis Ralston
|
||||
Copyright 2019 New Vector Ltd
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
.mx_TabbedView {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
display: flex;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.mx_TabbedView_tabLabels {
|
||||
width: 136px;
|
||||
height: 100%;
|
||||
color: $tab-label-fg-color;
|
||||
}
|
||||
|
||||
.mx_TabbedView_tabLabel {
|
||||
vertical-align: text-top;
|
||||
cursor: pointer;
|
||||
display: block;
|
||||
border-radius: 3px;
|
||||
font-size: 12px;
|
||||
font-weight: 600;
|
||||
height: 20px;
|
||||
margin-bottom: 6px;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.mx_TabbedView_tabLabel_active {
|
||||
background-color: $tab-label-active-bg-color;
|
||||
color: $tab-label-active-fg-color;
|
||||
}
|
||||
|
||||
// TODO: Remove temporary hack alongside "visit old settings" tab
|
||||
.mx_TabbedView_tabLabel_TEMP_HACK {
|
||||
background-color: orange;
|
||||
}
|
||||
|
||||
.mx_TabbedView_maskedIcon {;
|
||||
margin-left: 6px;
|
||||
margin-right: 9px;
|
||||
width: 14px;
|
||||
height: 14px;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.mx_TabbedView_maskedIcon:before {
|
||||
display: inline-block;
|
||||
background-color: $tab-label-icon-bg-color;
|
||||
mask-repeat: no-repeat;
|
||||
mask-size: 14px;
|
||||
width: 14px;
|
||||
height: 14px;
|
||||
mask-position: center;
|
||||
content: '';
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.mx_TabbedView_tabLabel_active .mx_TabbedView_maskedIcon:before {
|
||||
background-color: $tab-label-active-icon-bg-color;
|
||||
}
|
||||
|
||||
.mx_TabbedView_tabLabel_text {
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.mx_TabbedView_tabPanel {
|
||||
width: calc(100% - 320px);
|
||||
display: inline-block;
|
||||
margin-left: 70px;
|
||||
flex-grow: 1;
|
||||
}
|
||||
|
||||
.mx_TabbedView_tabPanelContent {
|
||||
flex-grow: 1;
|
||||
min-width: 560px;
|
||||
}
|
63
res/css/views/dialogs/_UserSettingsDialog.scss
Normal file
63
res/css/views/dialogs/_UserSettingsDialog.scss
Normal file
|
@ -0,0 +1,63 @@
|
|||
.mx_UserSettingsDialog_header {
|
||||
font-size: 24px;
|
||||
display: block;
|
||||
text-align: center;
|
||||
color: $dialog-title-fg-color;
|
||||
margin-top: 16px;
|
||||
margin-bottom: 24px;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.mx_UserSettingsDialog_close {
|
||||
position: absolute;
|
||||
top: 16px;
|
||||
right: 25px;
|
||||
}
|
||||
|
||||
.mx_UserSettingsDialog_closeIcon {
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.mx_UserSettingsDialog_closeIcon:before {
|
||||
mask: url('$(res)/img/feather-icons/cancel.svg');
|
||||
background-color: $dialog-close-fg-color;
|
||||
mask-repeat: no-repeat;
|
||||
mask-size: 16px;
|
||||
mask-position: center;
|
||||
content: '';
|
||||
position: absolute;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
}
|
||||
|
||||
|
||||
// ICONS
|
||||
// ==========================================================
|
||||
|
||||
.mx_UserSettingsDialog_settingsIcon:before {
|
||||
mask-image: url('$(res)/img/feather-icons/settings.svg');
|
||||
}
|
||||
|
||||
.mx_UserSettingsDialog_voiceIcon:before {
|
||||
mask-image: url('$(res)/img/feather-icons/phone.svg');
|
||||
}
|
||||
|
||||
.mx_UserSettingsDialog_bellIcon:before {
|
||||
mask-image: url('$(res)/img/feather-icons/notifications.svg');
|
||||
}
|
||||
|
||||
.mx_UserSettingsDialog_preferencesIcon:before {
|
||||
mask-image: url('$(res)/img/feather-icons/sliders.svg');
|
||||
}
|
||||
|
||||
.mx_UserSettingsDialog_securityIcon:before {
|
||||
mask-image: url('$(res)/img/feather-icons/lock.svg');
|
||||
}
|
||||
|
||||
.mx_UserSettingsDialog_helpIcon:before {
|
||||
mask-image: url('$(res)/img/feather-icons/help-circle.svg');
|
||||
}
|
|
@ -21,3 +21,24 @@ limitations under the License.
|
|||
.mx_AccessibleButton {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.mx_AccessibleButton_disabled {
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
.mx_AccessibleButton_hasKind {
|
||||
padding: 10px 25px;
|
||||
text-align: center;
|
||||
border-radius: 4px;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.mx_AccessibleButton_kind_primary {
|
||||
color: $button-primary-fg-color;
|
||||
background-color: $button-primary-bg-color;
|
||||
}
|
||||
|
||||
.mx_AccessibleButton_kind_primary.mx_AccessibleButton_disabled {
|
||||
color: $button-primary-disabled-fg-color;
|
||||
background-color: $button-primary-disabled-bg-color;
|
||||
}
|
||||
|
|
25
res/css/views/settings/tabs/_GeneralSettingsTab.scss
Normal file
25
res/css/views/settings/tabs/_GeneralSettingsTab.scss
Normal file
|
@ -0,0 +1,25 @@
|
|||
.mx_GeneralSettingsTab_profile {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.mx_GeneralSettingsTab_profileControls {
|
||||
flex-grow: 1;
|
||||
}
|
||||
|
||||
.mx_GeneralSettingsTab_profileControls .mx_Field #profileDisplayName {
|
||||
width: calc(100% - 20px); // subtract 10px padding on left and right
|
||||
}
|
||||
|
||||
.mx_GeneralSettingsTab_profileAvatar {
|
||||
width: 88px;
|
||||
height: 88px;
|
||||
margin-left: 13px;
|
||||
}
|
||||
|
||||
.mx_GeneralSettingsTab_profileAvatar div {
|
||||
display: block;
|
||||
width: 88px;
|
||||
height: 88px;
|
||||
border-radius: 4px;
|
||||
background-color: #ccc;
|
||||
}
|
17
res/css/views/settings/tabs/_SettingsTab.scss
Normal file
17
res/css/views/settings/tabs/_SettingsTab.scss
Normal file
|
@ -0,0 +1,17 @@
|
|||
.mx_SettingsTab_heading {
|
||||
font-size: 20px;
|
||||
font-weight: 600;
|
||||
color: $primary-fg-color;
|
||||
}
|
||||
|
||||
.mx_SettingsTab_subheading {
|
||||
font-size: 14px;
|
||||
display: block;
|
||||
font-family: $font-family-semibold;
|
||||
color: $primary-fg-color;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.mx_SettingsTab_section {
|
||||
margin-top: 10px;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue