mirror of
https://github.com/penpot/penpot.git
synced 2025-08-03 21:48:29 +02:00
♻️ Refactor dashboard (add teams)
This commit is contained in:
parent
47d347f357
commit
b3252ec2b2
52 changed files with 1842 additions and 1421 deletions
|
@ -2,104 +2,335 @@
|
|||
// License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
//
|
||||
// Copyright (c) 2015-2016 Andrey Antukh <niwi@niwi.nz>
|
||||
// Copyright (c) 2015-2016 Juan de la Cruz <delacruzgarciajuan@gmail.com>
|
||||
// This Source Code Form is "Incompatible With Secondary Licenses", as
|
||||
// defined by the Mozilla Public License, v. 2.0.
|
||||
//
|
||||
// Copyright (c) 2020 UXBOX Labs SL
|
||||
|
||||
.dashboard-sidebar {
|
||||
background-color: $color-white;
|
||||
|
||||
.sidebar-team {
|
||||
.sidebar-inside {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
padding: $size-4 0;
|
||||
border-top: 1px solid $color-gray-10;
|
||||
height: 100%;
|
||||
padding-bottom: 2.8rem;
|
||||
padding-top: $size-2;
|
||||
}
|
||||
|
||||
.dashboard-sidebar-inside {
|
||||
.sidebar-content {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
height: 100%;
|
||||
border-right: 1px solid $color-gray-10;
|
||||
overflow-y: auto;
|
||||
padding: 0;
|
||||
|
||||
.dashboard-elements {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
overflow-y: auto;
|
||||
hr {
|
||||
margin: 10px 15px;
|
||||
border-color: $color-gray-10;
|
||||
}
|
||||
}
|
||||
|
||||
.dropdown {
|
||||
position: absolute;
|
||||
max-height: 30rem;
|
||||
overflow-y: auto;
|
||||
background-color: $color-white;
|
||||
border-radius: 4px;
|
||||
box-shadow: 0px 2px 8px rgba(0, 0, 0, 0.25);
|
||||
|
||||
hr {
|
||||
margin: 0;
|
||||
border-color: $color-gray-10;
|
||||
}
|
||||
|
||||
&.dashboard-common {
|
||||
overflow: unset;
|
||||
li {
|
||||
color: $color-gray-60;
|
||||
cursor: pointer;
|
||||
font-size: $fs14;
|
||||
display: flex;
|
||||
padding: 13px 16px;
|
||||
|
||||
&.title {
|
||||
font-weight: 600;
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
li {
|
||||
align-items: center;
|
||||
cursor: pointer;
|
||||
&.team-item {
|
||||
display: flex;
|
||||
flex-shrink: 0;
|
||||
padding: $size-2;
|
||||
|
||||
svg {
|
||||
border-radius: 3px;
|
||||
fill: $color-black;
|
||||
margin-right: 8px;
|
||||
height: $size-3;
|
||||
width: $size-3;
|
||||
}
|
||||
|
||||
span.element-title {
|
||||
color: $color-gray-60;
|
||||
font-size: $fs14;
|
||||
overflow-x: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
&.recent-projects {
|
||||
.icon {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding-right: 10px;
|
||||
svg {
|
||||
fill: $color-white;
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
fill: $color-gray-60;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
& .edit-wrapper {
|
||||
display: flex;
|
||||
}
|
||||
&:hover {
|
||||
background-color: $color-primary-lighter;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
input.element-title {
|
||||
border: 0;
|
||||
height: 30px;
|
||||
padding: 5px;
|
||||
margin: 0;
|
||||
width: 100%;
|
||||
background-color: $color-white;
|
||||
}
|
||||
.sidebar-team-switch {
|
||||
position: relative;
|
||||
display: flex;
|
||||
margin: 5px 15px;
|
||||
|
||||
.close {
|
||||
background-color: $color-white;
|
||||
cursor: pointer;
|
||||
padding: 3px 5px;
|
||||
.teams-dropdown {
|
||||
left: 0;
|
||||
top: 50px;
|
||||
z-index: 12;
|
||||
max-height: 30rem;
|
||||
min-width: 189px;
|
||||
}
|
||||
|
||||
svg {
|
||||
fill: $color-gray-30;
|
||||
height: 15px;
|
||||
transform: rotate(45deg) translateY(7px);
|
||||
width: 15px;
|
||||
margin: 0;
|
||||
}
|
||||
}
|
||||
.options-dropdown {
|
||||
left: 80px;
|
||||
top: 50px;
|
||||
z-index: 12;
|
||||
max-height: 30rem;
|
||||
min-width: 110px;
|
||||
}
|
||||
|
||||
.element-subtitle {
|
||||
color: $color-gray-20;
|
||||
font-style: italic;
|
||||
}
|
||||
.switch-content {
|
||||
height: 40px;
|
||||
display: flex;
|
||||
width: 100%;
|
||||
border: 1px solid $color-gray-10;
|
||||
border-radius: 6px;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
&:hover,
|
||||
&.current {
|
||||
background-color: $color-primary-lighter;
|
||||
.switch-options {
|
||||
display: flex;
|
||||
max-width: 22px;
|
||||
min-width: 22px;
|
||||
border-left: 1px solid $color-gray-10;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
cursor: pointer;
|
||||
|
||||
svg {
|
||||
width: 15px;
|
||||
height: 13px;
|
||||
fill: $color-gray-60;
|
||||
}
|
||||
}
|
||||
|
||||
.current-team {
|
||||
padding: 0px 10px;
|
||||
display: flex;
|
||||
flex-grow: 1;
|
||||
|
||||
.team-name {
|
||||
flex-grow: 1;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
.team-text {
|
||||
color: $color-gray-60;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.team-icon {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding-right: 10px;
|
||||
|
||||
svg {
|
||||
width: 23px;
|
||||
height: 23px;
|
||||
fill: $color-gray-60;
|
||||
}
|
||||
}
|
||||
|
||||
.switch-icon {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
cursor: pointer;
|
||||
|
||||
svg {
|
||||
width: 10px;
|
||||
height: 10px;
|
||||
fill: $color-gray-60;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.sidebar-empty-placeholder {
|
||||
padding: 10px 12px;
|
||||
color: $color-gray-30;
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
|
||||
.icon {
|
||||
padding: 0px 10px;
|
||||
svg {
|
||||
fill: $color-gray-30;
|
||||
width: 12px;
|
||||
height: 12px;
|
||||
}
|
||||
}
|
||||
.text {
|
||||
font-size: $fs13;
|
||||
}
|
||||
}
|
||||
|
||||
.sidebar-nav {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
overflow-y: auto;
|
||||
margin: 0;
|
||||
|
||||
// TODO: should be deprecated / unclear name
|
||||
&.dashboard-common {
|
||||
overflow: unset;
|
||||
}
|
||||
|
||||
&.no-overflow {
|
||||
overflow: unset;
|
||||
}
|
||||
|
||||
li {
|
||||
align-items: center;
|
||||
cursor: pointer;
|
||||
display: flex;
|
||||
flex-shrink: 0;
|
||||
padding: $size-2;
|
||||
|
||||
svg {
|
||||
border-radius: 3px;
|
||||
fill: $color-black;
|
||||
margin-right: 8px;
|
||||
height: $size-3;
|
||||
width: $size-3;
|
||||
}
|
||||
|
||||
span.element-title {
|
||||
color: $color-gray-60;
|
||||
font-size: $fs14;
|
||||
overflow-x: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
&::before {
|
||||
background-color: transparent;
|
||||
border-radius: $br-small;
|
||||
content: "";
|
||||
height: 26px;
|
||||
margin-right: 6px;
|
||||
width: 4px;
|
||||
}
|
||||
|
||||
&.recent-projects {
|
||||
svg {
|
||||
fill: $color-white;
|
||||
}
|
||||
}
|
||||
|
||||
& .edit-wrapper {
|
||||
border: 1px solid $color-gray-10;
|
||||
border-radius: $br-small;
|
||||
display: flex;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
input.element-title {
|
||||
border: 0;
|
||||
height: 30px;
|
||||
padding: 5px;
|
||||
margin: 0;
|
||||
width: 100%;
|
||||
background-color: $color-white;
|
||||
}
|
||||
|
||||
.close {
|
||||
background-color: $color-white;
|
||||
cursor: pointer;
|
||||
padding: 3px 5px;
|
||||
|
||||
svg {
|
||||
fill: $color-gray-30;
|
||||
height: 15px;
|
||||
transform: rotate(45deg) translateY(7px);
|
||||
width: 15px;
|
||||
margin: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.element-subtitle {
|
||||
color: $color-gray-20;
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
&:hover {
|
||||
&::before {
|
||||
background-color: $color-gray-10;
|
||||
}
|
||||
}
|
||||
|
||||
&.current {
|
||||
font-weight: bold;
|
||||
|
||||
&::before {
|
||||
background-color: $color-primary;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.sidebar-search {
|
||||
align-items: center;
|
||||
border: 1px solid $color-gray-10;
|
||||
border-radius: 4px;
|
||||
display: flex;
|
||||
margin: 5px 15px;
|
||||
|
||||
.input-text {
|
||||
background: $color-white;
|
||||
border: 0;
|
||||
color: $color-gray-60;
|
||||
font-size: $fs14;
|
||||
padding: 6px;
|
||||
margin: 0;
|
||||
max-width: 170px;
|
||||
width: 100%;
|
||||
height: 40px;
|
||||
}
|
||||
|
||||
&:focus,
|
||||
&:focus-within {
|
||||
border-color: $color-black;
|
||||
}
|
||||
|
||||
.clear-search {
|
||||
align-items: center;
|
||||
cursor: pointer;
|
||||
display: flex;
|
||||
height: 22px;
|
||||
margin-left: auto;
|
||||
padding: 0 $small;
|
||||
width: 32px;
|
||||
|
||||
svg {
|
||||
fill: $color-gray-30;
|
||||
height: 15px;
|
||||
transform: rotate(45deg);
|
||||
width: 15px;
|
||||
|
||||
&:hover {
|
||||
fill: $color-danger;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -117,6 +348,7 @@
|
|||
display: flex;
|
||||
margin-top: 1rem;
|
||||
padding: $size-2;
|
||||
position: relative;
|
||||
|
||||
span {
|
||||
color: $color-gray-30;
|
||||
|
@ -126,50 +358,87 @@
|
|||
.btn-icon-light {
|
||||
margin-left: auto;
|
||||
}
|
||||
|
||||
&::before {
|
||||
background-color: $color-gray-10;
|
||||
content: "";
|
||||
height: 1px;
|
||||
left: 4%;
|
||||
position: absolute;
|
||||
right: 4%;
|
||||
top: -5px;
|
||||
width: 92%;
|
||||
}
|
||||
}
|
||||
|
||||
.dashboard-search {
|
||||
align-items: center;
|
||||
border: 1px solid $color-gray-10;
|
||||
display: flex;
|
||||
margin: $size-2;
|
||||
|
||||
.input-text {
|
||||
background: $color-white;
|
||||
border: 0;
|
||||
color: $color-gray-60;
|
||||
font-size: $fs14;
|
||||
padding: 4px 8px;
|
||||
margin: 0;
|
||||
max-width: 170px;
|
||||
width: 100%;
|
||||
.team-form-modal {
|
||||
h2 {
|
||||
font-weight: 400;
|
||||
color: $color-gray-40;
|
||||
font-size: 28px;
|
||||
margin-bottom: 30px;
|
||||
}
|
||||
|
||||
&:focus,
|
||||
&:focus-within {
|
||||
border-color: $color-black;
|
||||
}
|
||||
|
||||
.clear-search {
|
||||
align-items: center;
|
||||
cursor: pointer;
|
||||
.buttons-row {
|
||||
margin-top: 20px;
|
||||
display: flex;
|
||||
height: 22px;
|
||||
padding: 0 5px;
|
||||
width: 22px;
|
||||
|
||||
svg {
|
||||
fill: $color-gray-30;
|
||||
height: 15px;
|
||||
transform: rotate(45deg);
|
||||
width: 15px;
|
||||
|
||||
&:hover {
|
||||
fill: $color-danger;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
input[type=submit] {
|
||||
width: 120px;
|
||||
margin-bottom: 0px;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.profile-section {
|
||||
align-items: center;
|
||||
cursor: pointer;
|
||||
display: flex;
|
||||
padding: $small;
|
||||
position: relative;
|
||||
|
||||
span {
|
||||
@include text-ellipsis;
|
||||
color: $color-black;
|
||||
margin: $small;
|
||||
font-size: $fs12;
|
||||
max-width: 135px;
|
||||
}
|
||||
|
||||
img {
|
||||
border-radius: 50%;
|
||||
flex-shrink: 0;
|
||||
height: 25px;
|
||||
width: 25px;
|
||||
}
|
||||
|
||||
.dropdown {
|
||||
left: 15px;
|
||||
bottom: 50px;
|
||||
z-index: 12;
|
||||
max-height: 30rem;
|
||||
min-width: 189px;
|
||||
|
||||
position: absolute;
|
||||
bottom: 45px;
|
||||
z-index: 12;
|
||||
width: 170px;
|
||||
|
||||
@include animation(0,.2s,fadeInUp);
|
||||
|
||||
li {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
font-size: $fs13;
|
||||
padding: 5px 10px;
|
||||
|
||||
svg {
|
||||
fill: $color-gray-20;
|
||||
height: 12px;
|
||||
width: 12px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue