mirror of
https://github.com/hcengineering/platform.git
synced 2025-04-22 16:27:22 +00:00
UBER-328: fixed display in labels. Updated SelectWorkspaceMenu, AccountPopup. (#3314)
Signed-off-by: Alexander Platov <sas_lord@mail.ru>
This commit is contained in:
parent
6af43040f7
commit
58ba8fbe07
@ -15,6 +15,7 @@
|
||||
|
||||
/* CLEAR */
|
||||
a {
|
||||
min-width: 0;
|
||||
font: inherit;
|
||||
font-weight: 500;
|
||||
text-decoration: none;
|
||||
|
@ -232,6 +232,7 @@
|
||||
.ap-scroll {
|
||||
flex-grow: 1;
|
||||
margin: 0;
|
||||
min-width: 0;
|
||||
min-height: 0;
|
||||
overflow-x: hidden;
|
||||
overflow-y: auto;
|
||||
@ -246,11 +247,13 @@
|
||||
flex-direction: column;
|
||||
padding: 0;
|
||||
height: 100%;
|
||||
min-width: 0;
|
||||
}
|
||||
.ap-menuItem {
|
||||
flex-shrink: 0;
|
||||
justify-content: flex-start;
|
||||
text-align: left;
|
||||
min-width: 0;
|
||||
color: var(--theme-caption-color);
|
||||
cursor: pointer;
|
||||
|
||||
@ -278,7 +281,42 @@
|
||||
&.withIcon {
|
||||
.icon { color: var(--theme-dark-color); }
|
||||
&.hover .icon { color: var(--theme-dark-color); }
|
||||
}
|
||||
}
|
||||
&.withDrag {
|
||||
width: calc(100% - 1rem);
|
||||
padding: .5rem .5rem .5rem .125rem;
|
||||
|
||||
.drag {
|
||||
flex-shrink: 0;
|
||||
margin-right: .375rem;
|
||||
color: var(--theme-trans-color);
|
||||
}
|
||||
.icon {
|
||||
flex-shrink: 0;
|
||||
margin-right: .5rem;
|
||||
}
|
||||
.logo {
|
||||
overflow: hidden;
|
||||
flex-shrink: 0;
|
||||
margin-right: .5rem;
|
||||
width: 2rem;
|
||||
height: 2rem;
|
||||
border-radius: .25rem;
|
||||
|
||||
&.empty { background-color: var(--theme-button-pressed); }
|
||||
}
|
||||
.label { font-weight: 500; }
|
||||
.description {
|
||||
font-size: 0.6875rem;
|
||||
color: var(--theme-halfcontent-color);
|
||||
}
|
||||
.check {
|
||||
flex-shrink: 0;
|
||||
margin-left: .5rem;
|
||||
width: 1rem;
|
||||
color: var(--theme-dark-color);
|
||||
}
|
||||
}
|
||||
|
||||
// &:hover { background-color: var(--popup-bg-hover); }
|
||||
&.hover {
|
||||
|
@ -235,6 +235,24 @@ export function fitPopupElement (
|
||||
newProps.top = newProps.bottom = '15%'
|
||||
newProps.left = newProps.right = '25%'
|
||||
show = true
|
||||
} else if (element === 'logo') {
|
||||
newProps.top = '2.75rem'
|
||||
newProps.left = '5rem'
|
||||
newProps.maxWidth = '42rem'
|
||||
newProps.maxHeight = 'calc(100vh - 5.5rem)'
|
||||
show = true
|
||||
} else if (element === 'logo-mini') {
|
||||
newProps.top = '2.5rem'
|
||||
newProps.left = '.5rem'
|
||||
newProps.maxWidth = '42rem'
|
||||
newProps.maxHeight = 'calc(100vh - 5.5rem)'
|
||||
show = true
|
||||
} else if (element === 'logo-portrait') {
|
||||
newProps.bottom = 'calc(var(--app-panel-width) + .75rem)'
|
||||
newProps.left = '.5rem'
|
||||
newProps.maxWidth = 'calc(100vw - 1rem)'
|
||||
newProps.maxHeight = 'calc(100vh - var(--app-panel-width) - 1.5rem)'
|
||||
show = true
|
||||
} else if (element === 'account') {
|
||||
newProps.bottom = '2.75rem'
|
||||
newProps.left = '5rem'
|
||||
|
@ -141,6 +141,9 @@ export type PopupPosAlignment =
|
||||
| 'right'
|
||||
| 'top'
|
||||
| 'float'
|
||||
| 'logo'
|
||||
| 'logo-mini'
|
||||
| 'logo-portrait'
|
||||
| 'account'
|
||||
| 'account-portrait'
|
||||
| 'account-mobile'
|
||||
@ -159,6 +162,9 @@ export function isPopupPosAlignment (x: any): x is PopupPosAlignment {
|
||||
(x === 'right' ||
|
||||
x === 'top' ||
|
||||
x === 'float' ||
|
||||
x === 'logo' ||
|
||||
x === 'logo-mini' ||
|
||||
x === 'logo-portrait' ||
|
||||
x === 'account' ||
|
||||
x === 'full' ||
|
||||
x === 'content' ||
|
||||
|
@ -1,26 +1,7 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" style="display: none;">
|
||||
<symbol id="inviteWorkspace" viewBox="0 0 16 16">
|
||||
<path
|
||||
d="M10.2857 5.44444C10.2857 6.79447 9.26237 7.88889 8 7.88889C6.73764 7.88889 5.71429 6.79447 5.71429 5.44444C5.71429 4.09441 6.73764 3 8 3C9.26237 3 10.2857 4.09441 10.2857 5.44444Z"
|
||||
/>
|
||||
<path
|
||||
d="M3.42857 11.9603C3.42857 10.9748 3.98128 10.081 4.85831 9.7786C5.79546 9.45545 7.02325 9.11111 8 9.11111C8.97675 9.11111 10.2045 9.45545 11.1417 9.77859C12.0187 10.081 12.5714 10.9748 12.5714 11.9603V12.7778C12.5714 13.4528 12.0598 14 11.4286 14H4.57143C3.94025 14 3.42857 13.4528 3.42857 12.7778V11.9603Z"
|
||||
/>
|
||||
<path
|
||||
fill-rule="evenodd"
|
||||
clip-rule="evenodd"
|
||||
d="M4.63272 4.75066C4.59249 4.97531 4.57143 5.20725 4.57143 5.44444C4.57143 6.00206 4.68782 6.5306 4.89604 7.00381C4.59565 7.53433 4.05083 7.88889 3.42857 7.88889C2.4818 7.88889 1.71429 7.06808 1.71429 6.05556C1.71429 5.04303 2.4818 4.22222 3.42857 4.22222C3.89788 4.22222 4.32315 4.42391 4.63272 4.75066Z"
|
||||
/>
|
||||
<path
|
||||
d="M2.28571 12.7778V11.9603C2.28571 10.8522 2.76028 9.77952 3.59669 9.11537C3.5397 9.11257 3.48361 9.11111 3.42857 9.11111C2.69601 9.11111 1.77516 9.36937 1.0723 9.61172C0.414531 9.83853 0 10.5089 0 11.248V11.8611C0 12.3674 0.383756 12.7778 0.857143 12.7778H2.28571Z"
|
||||
/>
|
||||
<path
|
||||
fill-rule="evenodd"
|
||||
clip-rule="evenodd"
|
||||
d="M11.3716 4.75066C11.4118 4.97531 11.4329 5.20725 11.4329 5.44444C11.4329 6.00206 11.3166 6.5306 11.1086 7.00381C11.4087 7.53433 11.953 7.88889 12.5747 7.88889C13.5205 7.88889 14.2873 7.06808 14.2873 6.05556C14.2873 5.04303 13.5205 4.22222 12.5747 4.22222C12.1058 4.22222 11.6809 4.42391 11.3716 4.75066Z"
|
||||
/>
|
||||
<path
|
||||
d="M13.7164 12.7778V11.9603C13.7164 10.8522 13.2423 9.77952 12.4067 9.11537C12.4636 9.11257 12.5197 9.11111 12.5747 9.11111C13.3065 9.11111 14.2265 9.36937 14.9287 9.61172C15.5859 9.83853 16 10.5089 16 11.248V11.8611C16 12.3674 15.6166 12.7778 15.1437 12.7778H13.7164Z"
|
||||
/>
|
||||
<symbol id="inviteWorkspace" viewBox="0 0 32 32">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M16 18C20.4183 18 24 14.4183 24 10C24 5.58172 20.4183 2 16 2C11.5817 2 8 5.58172 8 10C8 14.4183 11.5817 18 16 18ZM16 16C19.3137 16 22 13.3137 22 10C22 6.68629 19.3137 4 16 4C12.6863 4 10 6.68629 10 10C10 13.3137 12.6863 16 16 16Z" />
|
||||
<path d="M24 21C24 20.4477 24.4477 20 25 20C25.5523 20 26 20.4477 26 21V24H29C29.5523 24 30 24.4477 30 25C30 25.5523 29.5523 26 29 26H26V29C26 29.5523 25.5523 30 25 30C24.4477 30 24 29.5523 24 29V26H21C20.4477 26 20 25.5523 20 25C20 24.4477 20.4477 24 21 24H24V21Z" />
|
||||
<path d="M13 20C9.13401 20 6 23.134 6 27V29C6 29.5523 6.44772 30 7 30C7.55228 30 8 29.5523 8 29V27C8 24.2386 10.2386 22 13 22H17C17.5523 22 18 21.5523 18 21C18 20.4477 17.5523 20 17 20H13Z" />
|
||||
</symbol>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 2.0 KiB After Width: | Height: | Size: 892 B |
@ -6,9 +6,9 @@
|
||||
<symbol id="password" viewBox="0 0 16 16">
|
||||
<path d="M14.4,5.7l-2-2l1-1c0.2-0.2,0.2-0.5,0-0.7s-0.5-0.2-0.7,0l-1.4,1.4L8.3,6.5C7.6,5.9,6.7,5.6,5.7,5.6c-2.3,0-4.2,1.9-4.2,4.2 c0,2.3,1.9,4.2,4.2,4.2s4.2-1.9,4.2-4.2c0-1-0.3-1.9-0.9-2.6l2.7-2.7l2,2c0.2,0.2,0.5,0.2,0.7,0S14.5,5.9,14.4,5.7z M5.7,13 c-1.8,0-3.2-1.4-3.2-3.2s1.4-3.2,3.2-3.2S8.9,8,8.9,9.8S7.5,13,5.7,13z"/>
|
||||
</symbol>
|
||||
<symbol id="settings" viewBox="0 0 16 16">
|
||||
<path d="M14,5.8l-1.1-1.9c-0.6-1-0.9-1.5-1.5-1.8c-0.6-0.3-1.2-0.3-2.3-0.4L8,1.7l-1.1,0c-1.1,0-1.8,0-2.3,0.4 C4,2.4,3.7,2.9,3.1,3.9L2,5.8C1.4,6.8,1.1,7.4,1.1,8S1.4,9.2,2,10.2l1.1,1.9c0.6,1,0.9,1.5,1.5,1.8c0.6,0.3,1.2,0.3,2.3,0.4l1.1,0 l1.1,0c1.1,0,1.8,0,2.3-0.4c0.6-0.3,0.9-0.9,1.5-1.8l1.1-1.9c0.6-1,0.9-1.5,0.9-2.2C14.9,7.4,14.6,6.8,14,5.8z M13.1,9.7L12,11.6 c-0.5,0.9-0.8,1.3-1.1,1.5c-0.3,0.2-0.8,0.2-1.8,0.2l-1.1,0l-1.1,0c-1.1,0-1.5,0-1.8-0.2c-0.3-0.2-0.6-0.6-1.1-1.5L2.9,9.7 C2.3,8.8,2.1,8.4,2.1,8c0-0.4,0.2-0.8,0.7-1.7L4,4.4c0.5-0.9,0.8-1.3,1.1-1.5c0.3-0.2,0.8-0.2,1.8-0.2l1.1,0l1.1,0 c1,0,1.5,0,1.8,0.2c0.3,0.2,0.6,0.6,1.1,1.5l1.1,1.9c0.5,0.9,0.7,1.3,0.7,1.7S13.6,8.8,13.1,9.7z"/>
|
||||
<path d="M8,5.5C6.6,5.5,5.5,6.6,5.5,8c0,1.4,1.1,2.5,2.5,2.5c1.4,0,2.5-1.1,2.5-2.5C10.5,6.6,9.4,5.5,8,5.5z M8,9.5 C7.2,9.5,6.5,8.8,6.5,8S7.2,6.5,8,6.5S9.5,7.2,9.5,8S8.8,9.5,8,9.5z"/>
|
||||
<symbol id="settings" viewBox="0 0 32 32">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M19.3356 7.58904L18.6277 4.75746C18.5164 4.3123 18.1164 4 17.6576 4H14.3422C13.8833 4 13.4834 4.3123 13.3721 4.75746L12.6642 7.58904L11.8634 8.00432C11.6181 8.13154 11.3793 8.26979 11.1476 8.41844L10.3867 8.90666L7.57731 8.10299C7.13614 7.97679 6.66569 8.16704 6.43626 8.56443L4.77859 11.4356C4.54915 11.833 4.61962 12.3355 4.9495 12.6545L7.0498 14.6853L7.00919 15.5863C7.00301 15.7233 6.99989 15.8612 6.99989 16C6.99989 16.1388 7.00301 16.2767 7.00919 16.4137L7.0498 17.3147L4.9495 19.3455C4.61962 19.6645 4.54915 20.167 4.77859 20.5644L6.43626 23.4356C6.66569 23.833 7.13614 24.0232 7.57731 23.897L10.3867 23.0933L11.1476 23.5816C11.3793 23.7302 11.6181 23.8685 11.8634 23.9957L12.6642 24.411L13.3721 27.2425C13.4834 27.6877 13.8833 28 14.3422 28H17.6576C18.1164 28 18.5164 27.6877 18.6277 27.2425L19.3356 24.411L20.1363 23.9957C20.3816 23.8685 20.6204 23.7302 20.8521 23.5816L21.613 23.0934L24.4225 23.897C24.8636 24.0232 25.3341 23.833 25.5635 23.4356L27.2212 20.5644C27.4506 20.167 27.3802 19.6645 27.0503 19.3455L24.95 17.3147L24.9906 16.4138C24.9968 16.2767 24.9999 16.1388 24.9999 16C24.9999 15.8612 24.9968 15.7233 24.9906 15.5862L24.95 14.6853L27.0503 12.6545C27.3801 12.3355 27.4506 11.833 27.2212 11.4356L25.5635 8.5644C25.3341 8.16701 24.8636 7.97676 24.4225 8.10296L21.613 8.90664L20.8521 8.41842C20.6204 8.26978 20.3816 8.13154 20.1363 8.00432L19.3356 7.58904ZM21.0571 6.22888L20.568 4.27239C20.2341 2.93689 19.0342 2 17.6576 2H14.3422C12.9656 2 11.7657 2.93689 11.4318 4.27239L10.9427 6.22888C10.6426 6.38449 10.3507 6.5535 10.0676 6.73514L8.12737 6.18012C6.80386 5.80152 5.39251 6.37226 4.70421 7.56443L3.04654 10.4356C2.35824 11.6278 2.56963 13.1354 3.55927 14.0923L5.01122 15.4962C5.00369 15.6632 4.99989 15.8312 4.99989 16C4.99989 16.1688 5.00369 16.3368 5.01122 16.5038L3.55927 17.9077C2.56963 18.8646 2.35824 20.3722 3.04654 21.5644L4.70421 24.4356C5.39251 25.6277 6.80386 26.1985 8.12737 25.8199L10.0676 25.2649C10.3507 25.4465 10.6426 25.6155 10.9427 25.7711L11.4318 27.7276C11.7657 29.0631 12.9656 30 14.3422 30H17.6576C19.0342 30 20.2341 29.0631 20.568 27.7276L21.0571 25.7711C21.3571 25.6155 21.6491 25.4465 21.9322 25.2649L23.8724 25.8199C25.1959 26.1985 26.6073 25.6278 27.2956 24.4356L28.9532 21.5644C29.6415 20.3723 29.4301 18.8646 28.4405 17.9077L26.9886 16.5038C26.9961 16.3368 26.9999 16.1689 26.9999 16C26.9999 15.8311 26.9961 15.6632 26.9886 15.4962L28.4405 14.0923C29.4301 13.1354 29.6415 11.6277 28.9532 10.4356L27.2956 7.5644C26.6073 6.37223 25.1959 5.80149 23.8724 6.18009L21.9322 6.73512C21.6491 6.55349 21.3571 6.38448 21.0571 6.22888Z" />
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M15.9999 20C18.209 20 19.9999 18.2091 19.9999 16C19.9999 13.7909 18.209 12 15.9999 12C13.7907 12 11.9999 13.7909 11.9999 16C11.9999 18.2091 13.7907 20 15.9999 20ZM15.9999 22C19.3136 22 21.9999 19.3137 21.9999 16C21.9999 12.6863 19.3136 10 15.9999 10C12.6862 10 9.99989 12.6863 9.99989 16C9.99989 19.3137 12.6862 22 15.9999 22Z" />
|
||||
</symbol>
|
||||
<symbol id="integration" viewBox="0 0 16 16">
|
||||
<path d="M14.2,4.1l-6-3C8.1,1,7.9,1,7.8,1.1l-6,3C1.6,4.1,1.5,4.3,1.5,4.5v7c0,0.2,0.1,0.4,0.3,0.4l6,3L8,14.5l0.2,0.4l6-3 c0.2-0.1,0.3-0.3,0.3-0.4v-7C14.5,4.3,14.4,4.1,14.2,4.1z M8,2.1l4.9,2.4L8,6.9L3.1,4.5L8,2.1z M2.5,11.2V5.3l5,2.5v5.9L2.5,11.2z M8.5,13.7V7.8l5-2.5v5.9L8.5,13.7z"/>
|
||||
@ -16,19 +16,16 @@
|
||||
<symbol id="support" viewBox="0 0 16 16">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M8,2C4.2,2,1,4.6,1,8c0,1.2,0.4,2.4,1.2,3.3c-0.1,0.3-0.3,0.7-0.5,1l-0.6,0.9c-0.1,0.2-0.1,0.4,0,0.5C1.1,13.9,1.3,14,1.5,14c1.1,0,2.2-0.2,3.2-0.7C5.7,13.7,6.8,14,8,14c3.8,0,7-2.6,7-6C15,4.6,11.8,2,8,2z M8,13c-1.1,0-2.2-0.3-3.1-0.7c-0.1-0.1-0.3-0.1-0.4,0c-0.6,0.3-1.3,0.5-2,0.6c0.3-0.5,0.6-1,0.7-1.5c0.1-0.2,0-0.3-0.1-0.5C2.4,10.1,2,9.1,2,8c0-2.7,2.6-5,6-5c3.4,0,6,2.3,6,5S11.4,13,8,13z" />
|
||||
</symbol>
|
||||
<symbol id="privacy" viewBox="0 0 24 24">
|
||||
<path d="M21.2,3.9l-9-2.6c-0.1,0-0.3,0-0.4,0l-9,2.6C2.5,4,2.2,4.3,2.2,4.6V10c0,6,3.9,10.8,9.5,12.7c0.2,0.1,0.3,0.1,0.5,0c5.6-1.9,9.5-6.7,9.5-12.7V4.6C21.8,4.3,21.5,4,21.2,3.9z M20.2,10c0,5.2-3.3,9.4-8.2,11.2c-5-1.8-8.3-6-8.3-11.2V5.2L12,2.8l8.2,2.4V10z" />
|
||||
<path d="M8.8,9c0,0.9,0.4,1.7,1,2.3c-1.5,0.8-2.5,2.4-2.5,4.2c0,0.4,0.3,0.8,0.8,0.8s0.8-0.3,0.8-0.8c0-1.8,1.5-3.2,3.2-3.2s3.2,1.5,3.2,3.2c0,0.4,0.3,0.8,0.8,0.8s0.8-0.3,0.8-0.8c0-1.8-1-3.4-2.5-4.2c0.6-0.6,1-1.4,1-2.3c0-1.8-1.5-3.2-3.2-3.2S8.8,7.2,8.8,9z M13.8,9c0,1-0.8,1.8-1.8,1.8S10.2,10,10.2,9S11,7.2,12,7.2S13.8,8,13.8,9z" />
|
||||
<symbol id="privacy" viewBox="0 0 32 32">
|
||||
<path d="M16 25.277V6H24V16.8048C24 18.0723 23.6557 19.3161 23.0041 20.4033C22.3525 21.4905 21.4178 22.3803 20.3 22.9779L16 25.277Z" />
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M4 6C4 3.79086 5.79086 2 8 2H24C26.2091 2 28 3.79086 28 6V17.0637C28 21.0891 25.8012 24.793 22.2674 26.7205L16.4789 29.8779C16.1804 30.0407 15.8196 30.0407 15.5211 29.8779L9.73263 26.7205C6.19876 24.793 4 21.0891 4 17.0637V6ZM8 4C6.89543 4 6 4.89543 6 6V17.0637C6 20.3572 7.79898 23.3876 10.6903 24.9647L16 27.8609L21.3097 24.9647C24.201 23.3876 26 20.3572 26 17.0637V6C26 4.89543 25.1046 4 24 4H8Z" />
|
||||
</symbol>
|
||||
<symbol id="terms" viewBox="0 0 16 16">
|
||||
<path d="M12,1.5H6c-2,0-3,0-3.8,0.7C1.5,3,1.5,4,1.5,6v8.7L4,13.9l2,0.7l2-0.7l2.5,0.8V6.5h2.9c0.1,0,0.1,0,0.2,0 c0.5-0.1,0.8-0.4,0.9-0.9c0,0,0-0.1,0-0.2V4C14.5,2.6,13.4,1.5,12,1.5z M9.5,4v9.3L8,12.8l-2,0.7l-2-0.7l-1.5,0.5V6 c0-1.7,0-2.6,0.4-3.1C3.4,2.5,4.3,2.5,6,2.5h4C9.7,2.9,9.5,3.4,9.5,4z M13.5,5.4L13.5,5.4l-3,0.1V4c0-0.8,0.7-1.5,1.5-1.5 s1.5,0.7,1.5,1.5V5.4z"/>
|
||||
<path d="M4.2,4.7c0,0.3,0.2,0.5,0.5,0.5h2.7c0.3,0,0.5-0.2,0.5-0.5S7.6,4.2,7.3,4.2H4.7C4.4,4.2,4.2,4.4,4.2,4.7z"/>
|
||||
<path d="M4.7,7.8h0.7c0.3,0,0.5-0.2,0.5-0.5S5.6,6.8,5.3,6.8H4.7c-0.3,0-0.5,0.2-0.5,0.5S4.4,7.8,4.7,7.8z"/>
|
||||
<path d="M6.7,9.5h-2c-0.3,0-0.5,0.2-0.5,0.5s0.2,0.5,0.5,0.5h2c0.3,0,0.5-0.2,0.5-0.5S6.9,9.5,6.7,9.5z"/>
|
||||
<symbol id="terms" viewBox="0 0 32 32">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M10 4C8.89543 4 8 4.89543 8 6V26C8 27.1046 8.89543 28 10 28H22C23.1046 28 24 27.1046 24 26V12H20C17.7909 12 16 10.2091 16 8V4H10ZM18 4.41421V8C18 9.10457 18.8954 10 20 10H23.5858L18 4.41421ZM6 6C6 3.79086 7.79086 2 10 2H17.5858C18.1162 2 18.6249 2.21071 19 2.58579L25.4142 9C25.7893 9.37507 26 9.88378 26 10.4142V26C26 28.2091 24.2091 30 22 30H10C7.79086 30 6 28.2091 6 26V6ZM10 17C10 16.4477 10.4477 16 11 16H15C15.5523 16 16 16.4477 16 17C16 17.5523 15.5523 18 15 18H11C10.4477 18 10 17.5523 10 17ZM10 21C10 20.4477 10.4477 20 11 20H21C21.5523 20 22 20.4477 22 21C22 21.5523 21.5523 22 21 22H11C10.4477 22 10 21.5523 10 21Z" />
|
||||
</symbol>
|
||||
<symbol id="signout" viewBox="0 0 16 16">
|
||||
<path d="M1.33398 8.00002L0.94355 7.68767L0.693672 8.00002L0.94355 8.31237L1.33398 8.00002ZM7.33398 8.50002C7.61013 8.50002 7.83398 8.27616 7.83398 8.00002C7.83398 7.72388 7.61013 7.50002 7.33398 7.50002V8.50002ZM3.61022 4.35434L0.94355 7.68767L1.72442 8.31237L4.39109 4.97903L3.61022 4.35434ZM0.94355 8.31237L3.61022 11.6457L4.39109 11.021L1.72442 7.68767L0.94355 8.31237ZM1.33398 8.50002H7.33398V7.50002H1.33398V8.50002Z"/>
|
||||
<path d="M7.62015 13.3438L7.88162 12.9176L7.62015 13.3438ZM6.81252 12.3904L6.34915 12.5783L6.81252 12.3904ZM14.3317 12.5015L13.8874 12.2721L14.3317 12.5015ZM12.5853 13.981L12.7385 14.4569L12.5853 13.981ZM12.5853 2.019L12.4321 2.49495L12.5853 2.019ZM14.3317 3.49848L14.776 3.26911L14.3317 3.49848ZM14.166 6.81915V9.18081H15.166V6.81915H14.166ZM7.16602 5.42127V5.29116H6.16602V5.42127H7.16602ZM9.3358 13.2714C8.42316 13.1193 8.11041 13.058 7.88162 12.9176L7.35868 13.77C7.79469 14.0375 8.34931 14.1208 9.1714 14.2578L9.3358 13.2714ZM6.16602 10.7106C6.16602 11.5437 6.15698 12.1042 6.34915 12.5783L7.2759 12.2026C7.17505 11.9538 7.16602 11.6354 7.16602 10.7106H6.16602ZM7.88162 12.9176C7.60853 12.7501 7.39626 12.4995 7.2759 12.2026L6.34915 12.5783C6.54976 13.0731 6.90354 13.4908 7.35868 13.77L7.88162 12.9176ZM14.166 9.18081C14.166 10.08 14.1656 10.725 14.1258 11.2271C14.0863 11.7251 14.0105 12.0337 13.8874 12.2721L14.776 12.7309C14.9872 12.3217 15.0786 11.861 15.1227 11.3062C15.1664 10.7553 15.166 10.0637 15.166 9.18081H14.166ZM9.1714 14.2578C10.0427 14.403 10.7251 14.5171 11.2759 14.5646C11.8306 14.6124 12.3002 14.598 12.7385 14.4569L12.4321 13.505C12.1767 13.5872 11.8598 13.6112 11.3618 13.5683C10.8598 13.525 10.2231 13.4193 9.3358 13.2714L9.1714 14.2578ZM13.8874 12.2721C13.5843 12.8593 13.0611 13.3025 12.4321 13.505L12.7385 14.4569C13.6191 14.1734 14.3516 13.5529 14.776 12.7309L13.8874 12.2721ZM9.33702 2.72838C10.224 2.58055 10.8603 2.47488 11.362 2.43165C11.8598 2.38876 12.1767 2.41274 12.4321 2.49495L12.7385 1.54305C12.3002 1.40197 11.8307 1.38756 11.2762 1.43534C10.7256 1.48277 10.0435 1.59683 9.17262 1.74198L9.33702 2.72838ZM15.166 6.81915C15.166 5.93622 15.1664 5.24464 15.1227 4.69378C15.0786 4.13893 14.9872 3.67823 14.776 3.26911L13.8874 3.72785C14.0105 3.96624 14.0863 4.27482 14.1258 4.7729C14.1656 5.27497 14.166 5.91997 14.166 6.81915H15.166ZM12.4321 2.49495C13.0611 2.69743 13.5843 3.14069 13.8874 3.72785L14.776 3.26911C14.3516 2.44709 13.6191 1.82652 12.7385 1.54305L12.4321 2.49495ZM9.17262 1.74198C8.74504 1.81325 8.39936 1.87058 8.11984 1.9373C7.83488 2.00531 7.5864 2.09002 7.35707 2.23096L7.88065 3.08293C7.98423 3.01928 8.11938 2.9655 8.35201 2.90997C8.59006 2.85315 8.8959 2.8019 9.33702 2.72838L9.17262 1.74198ZM7.16602 5.29116C7.16602 4.84396 7.16629 4.53385 7.18321 4.28969C7.19973 4.05111 7.23056 3.90895 7.27632 3.79631L6.34986 3.41992C6.24855 3.66931 6.20584 3.92833 6.1856 4.22059C6.16574 4.50728 6.16602 4.85768 6.16602 5.29116H7.16602ZM7.35707 2.23096C6.90324 2.50986 6.55036 2.92642 6.34986 3.41992L7.27632 3.79631C7.39662 3.50021 7.60835 3.25027 7.88065 3.08293L7.35707 2.23096Z"/>
|
||||
<symbol id="signout" viewBox="0 0 32 32">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M18 4C19.1046 4 20 4.89543 20 6V7C20 7.55228 20.4477 8 21 8C21.5523 8 22 7.55228 22 7V6C22 3.79086 20.2091 2 18 2H10C7.79086 2 6 3.79086 6 6V26C6 28.2091 7.79086 30 10 30H18C20.2091 30 22 28.2091 22 26V25C22 24.4477 21.5523 24 21 24C20.4477 24 20 24.4477 20 25V26C20 27.1046 19.1046 28 18 28H10C8.89543 28 8 27.1046 8 26V6C8 4.89543 8.89543 4 10 4H18Z" />
|
||||
<path d="M22.59 20.59L26.17 17H13C12.4477 17 12 16.5523 12 16C12 15.4477 12.4477 15 13 15H26.17L22.59 11.41L24 10L30 16L24 22L22.59 20.59Z" />
|
||||
</symbol>
|
||||
|
||||
<symbol id="selectWorkspace" viewBox="0 0 16 16">
|
||||
|
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
@ -44,9 +44,7 @@
|
||||
}}
|
||||
>
|
||||
<div class="color" style:background-color={color.color} />
|
||||
<span class="label overflow-label ml-1 text-sm caption-color max-w-40" style:color={color.title}
|
||||
>{value.title}</span
|
||||
>
|
||||
<span class="label overflow-label ml-1 text-sm caption-color max-w-40">{value.title}</span>
|
||||
</button>
|
||||
{:else if kind === 'list'}
|
||||
<div
|
||||
@ -57,7 +55,7 @@
|
||||
}}
|
||||
>
|
||||
<div class="color" style:background-color={color.color} />
|
||||
<span class="label overflow-label ml-1-5 max-w-40" style:color={color.title}>
|
||||
<span class="label overflow-label ml-1-5 max-w-40">
|
||||
{value.title}
|
||||
</span>
|
||||
{#if isEditable}
|
||||
|
@ -199,7 +199,7 @@
|
||||
}}
|
||||
>
|
||||
<div class="tag" style:background-color={color.color} />
|
||||
<span class="overflow-label label flex-grow" style:color={color.title}>{element.title}</span>
|
||||
<span class="overflow-label label flex-grow">{element.title}</span>
|
||||
<div class="check pointer-events-none">
|
||||
{#if isSelected(element)}
|
||||
<Icon icon={IconCheck} size={'small'} />
|
||||
|
@ -169,7 +169,7 @@
|
||||
}}
|
||||
>
|
||||
<div class="tag" style:background-color={color.color} />
|
||||
<span class="lines-limit-2 flex-grow" style:color={color.title}>{element.title}</span>
|
||||
<span class="lines-limit-2 flex-grow">{element.title}</span>
|
||||
<span class="ml-2 text-xs">
|
||||
({element.refCount ?? 0})
|
||||
</span>
|
||||
|
@ -20,6 +20,7 @@
|
||||
export let space: string | undefined = undefined
|
||||
export let special: string | undefined = undefined
|
||||
export let disabled = false
|
||||
export let shrink: number | undefined = undefined
|
||||
|
||||
$: loc = createLocation($location, app, space, special)
|
||||
|
||||
@ -60,7 +61,7 @@
|
||||
{#if disabled}
|
||||
<slot />
|
||||
{:else}
|
||||
<a class="noUnderline" {href} on:click={clickHandler}>
|
||||
<a class="noUnderline" style:flex-shrink={shrink} {href} on:click={clickHandler}>
|
||||
<slot />
|
||||
</a>
|
||||
{/if}
|
||||
|
@ -31,14 +31,12 @@
|
||||
getCurrentResolvedLocation,
|
||||
locationToUrl,
|
||||
navigate,
|
||||
resolvedLocationStore,
|
||||
setMetadataLocalStorage,
|
||||
showPopup
|
||||
} from '@hcengineering/ui'
|
||||
import view from '@hcengineering/view'
|
||||
import workbench from '../plugin'
|
||||
import HelpAndSupport from './HelpAndSupport.svelte'
|
||||
import SelectWorkspaceMenu from './SelectWorkspaceMenu.svelte'
|
||||
|
||||
let items: SettingsCategory[] = []
|
||||
|
||||
@ -67,12 +65,12 @@
|
||||
{ limit: 1 }
|
||||
)
|
||||
|
||||
function selectCategory (sp: SettingsCategory): void {
|
||||
function selectCategory (sp?: SettingsCategory): void {
|
||||
closePopup()
|
||||
closePanel()
|
||||
const loc = getCurrentResolvedLocation()
|
||||
loc.path[2] = settingId
|
||||
loc.path[3] = sp.name
|
||||
if (sp) loc.path[3] = sp.name
|
||||
loc.path.length = 4
|
||||
navigate(loc)
|
||||
}
|
||||
@ -135,23 +133,13 @@
|
||||
let actions: Action[] = []
|
||||
$: {
|
||||
actions = []
|
||||
const subActions: Action[] = getMenu(items, ['settings', 'settings-editor'])
|
||||
actions.push({
|
||||
icon: view.icon.Setting,
|
||||
label: setting.string.Settings,
|
||||
action: async () => {},
|
||||
component: Menu,
|
||||
props: { actions: subActions }
|
||||
action: async () => selectCategory()
|
||||
})
|
||||
actions.push(
|
||||
...getMenu(items, ['main']),
|
||||
{
|
||||
icon: setting.icon.SelectWorkspace,
|
||||
label: setting.string.SelectWorkspace,
|
||||
action: async () => {},
|
||||
component: SelectWorkspaceMenu,
|
||||
group: 'end'
|
||||
},
|
||||
{
|
||||
icon: login.icon.InviteWorkspace,
|
||||
label: setting.string.InviteWorkspace,
|
||||
@ -179,9 +167,8 @@
|
||||
<!-- svelte-ignore a11y-click-events-have-key-events -->
|
||||
<svelte:component this={Menu} bind:this={menu} {actions} {addClass} on:close>
|
||||
<svelte:fragment slot="header">
|
||||
<div class="p-1 ml-2 overflow-label fs-bold caption-color">{$resolvedLocationStore.path[1]}</div>
|
||||
<div
|
||||
class="ap-menuHeader mb-2"
|
||||
class="ap-menuItem hoverable flex-row-center withIcon flex-grow"
|
||||
on:mousemove={() => {
|
||||
menu.clearFocus()
|
||||
}}
|
||||
@ -199,5 +186,6 @@
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
<div class="ap-menuItem separator" />
|
||||
</svelte:fragment>
|
||||
</svelte:component>
|
||||
|
@ -47,7 +47,7 @@
|
||||
buttons={'union'}
|
||||
>
|
||||
{#each apps.filter((it) => (shown ? true : !hiddenAppsIds.includes(it._id))) as app}
|
||||
<NavLink app={app.alias}>
|
||||
<NavLink app={app.alias} shrink={0}>
|
||||
<App
|
||||
selected={app._id === active}
|
||||
icon={app.icon}
|
||||
|
@ -12,7 +12,11 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
-->
|
||||
<div class="antiLogo red">P</div>
|
||||
<script lang="ts">
|
||||
export let mini: boolean = false
|
||||
</script>
|
||||
|
||||
<div class="antiLogo red" class:mini>P</div>
|
||||
|
||||
<style lang="scss">
|
||||
.antiLogo {
|
||||
@ -20,13 +24,20 @@
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
flex-shrink: 0;
|
||||
width: 2rem;
|
||||
height: 2rem;
|
||||
font-weight: 500;
|
||||
color: var(--primary-button-color);
|
||||
border-radius: 0.25rem;
|
||||
outline: none;
|
||||
cursor: pointer;
|
||||
|
||||
&:not(.mini) {
|
||||
width: 2rem;
|
||||
height: 2rem;
|
||||
}
|
||||
&.mini {
|
||||
width: 1.5rem;
|
||||
height: 1.5rem;
|
||||
}
|
||||
&.red {
|
||||
background-color: #c93030;
|
||||
}
|
||||
|
@ -23,11 +23,14 @@
|
||||
Location,
|
||||
locationToUrl,
|
||||
navigate,
|
||||
setMetadataLocalStorage
|
||||
resolvedLocationStore,
|
||||
setMetadataLocalStorage,
|
||||
IconCheck
|
||||
} from '@hcengineering/ui'
|
||||
import { workbenchId } from '@hcengineering/workbench'
|
||||
import { onMount } from 'svelte'
|
||||
import { workspacesStore } from '../utils'
|
||||
import Drag from './icons/Drag.svelte'
|
||||
|
||||
onMount(() => {
|
||||
getResource(login.function.GetWorkspaces).then(async (f) => {
|
||||
@ -122,38 +125,48 @@
|
||||
|
||||
{#if $workspacesStore.length}
|
||||
<div class="antiPopup" on:keydown={keyDown}>
|
||||
<div class="ap-space" />
|
||||
<div class="ap-space x2" />
|
||||
<div class="ap-scroll">
|
||||
<div class="ap-box">
|
||||
{#each $workspacesStore as ws, i}
|
||||
<a class="stealth" href={getWorkspaceLink(ws)} on:click={(e) => clickHandler(e, ws.workspace)}>
|
||||
<button
|
||||
bind:this={btns[i]}
|
||||
class="ap-menuItem flex-row-center withIcon w-full"
|
||||
class="ap-menuItem flex-row-center withDrag"
|
||||
class:hover={btns[i] === activeElement}
|
||||
on:mousemove={() => {
|
||||
focusTarget(btns[i])
|
||||
}}
|
||||
>
|
||||
<span class="overflow-label pr-1 flex-grow">{ws.workspace}</span>
|
||||
<div class="drag"><Drag size={'small'} /></div>
|
||||
<!-- <div class="logo empty" /> -->
|
||||
<!-- <div class="flex-col flex-grow"> -->
|
||||
<span class="label overflow-label flex-grow">{ws.workspace}</span>
|
||||
<!-- <span class="description overflow-label">Description</span> -->
|
||||
<!-- </div> -->
|
||||
<div class="check">
|
||||
{#if $resolvedLocationStore.path[1] === ws.workspace}
|
||||
<IconCheck size={'small'} />
|
||||
{/if}
|
||||
</div>
|
||||
</button>
|
||||
</a>
|
||||
{/each}
|
||||
<a class="stealth" href={locationToUrl(loginPath)} on:click={handleOther}>
|
||||
<button
|
||||
bind:this={btns[last]}
|
||||
class="ap-menuItem flex-row-center withIcon w-full"
|
||||
class="ap-menuItem flex-grow"
|
||||
class:hover={btns[last] === activeElement}
|
||||
on:mousemove={() => {
|
||||
focusTarget(btns[last])
|
||||
}}
|
||||
>
|
||||
<span class="overflow-label pr-1 flex-grow">...</span>
|
||||
...
|
||||
</button>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="ap-space" />
|
||||
<div class="ap-space x2" />
|
||||
</div>
|
||||
{:else}
|
||||
<div class="antiPopup"><Loading /></div>
|
||||
|
@ -70,6 +70,7 @@
|
||||
import NavHeader from './NavHeader.svelte'
|
||||
import Navigator from './Navigator.svelte'
|
||||
import SpaceView from './SpaceView.svelte'
|
||||
import SelectWorkspaceMenu from './SelectWorkspaceMenu.svelte'
|
||||
import Settings from './icons/Settings.svelte'
|
||||
import TopMenu from './icons/TopMenu.svelte'
|
||||
|
||||
@ -491,6 +492,8 @@
|
||||
: appsDirection === 'vertical' && $deviceInfo.isMobile
|
||||
? 'account-mobile'
|
||||
: 'account'
|
||||
let popupSpacePosition: PopupPosAlignment
|
||||
$: popupSpacePosition = appsMini ? 'logo-mini' : appsDirection === 'horizontal' ? 'logo-portrait' : 'logo'
|
||||
let notifyPosition: PopupPosAlignment
|
||||
$: notifyPosition = appsDirection === 'horizontal' ? 'notify-mobile' : 'notify'
|
||||
|
||||
@ -563,10 +566,17 @@
|
||||
class:portrait={appsDirection === 'horizontal'}
|
||||
class:landscape={appsDirection === 'vertical'}
|
||||
>
|
||||
<div class="logo-container clear-mins">
|
||||
<Logo />
|
||||
<!-- svelte-ignore a11y-click-events-have-key-events -->
|
||||
<div
|
||||
class="logo-container clear-mins"
|
||||
class:mini={appsMini}
|
||||
on:click={() => {
|
||||
showPopup(SelectWorkspaceMenu, {}, popupSpacePosition)
|
||||
}}
|
||||
>
|
||||
<Logo mini={appsMini} />
|
||||
</div>
|
||||
<div class="topmenu-container clear-mins" class:mini={appsMini}>
|
||||
<div class="topmenu-container clear-mins flex-no-shrink" class:mini={appsMini}>
|
||||
<AppItem
|
||||
icon={TopMenu}
|
||||
label={visibileNav ? workbench.string.HideMenu : workbench.string.ShowMenu}
|
||||
@ -576,7 +586,7 @@
|
||||
/>
|
||||
</div>
|
||||
<!-- <ActivityStatus status="active" /> -->
|
||||
<NavLink app={notificationId}>
|
||||
<NavLink app={notificationId} shrink={0}>
|
||||
<AppItem
|
||||
icon={notification.icon.Inbox}
|
||||
label={notification.string.Inbox}
|
||||
@ -780,10 +790,18 @@
|
||||
width: 0.25rem;
|
||||
height: 0.25rem;
|
||||
}
|
||||
.logo-container.mini,
|
||||
.topmenu-container.mini {
|
||||
position: fixed;
|
||||
top: 4px;
|
||||
}
|
||||
.logo-container.mini {
|
||||
left: 4px;
|
||||
width: 1.5rem;
|
||||
height: 1.5rem;
|
||||
}
|
||||
.topmenu-container.mini {
|
||||
left: calc(1.5rem + 8px);
|
||||
}
|
||||
.divider {
|
||||
flex-shrink: 0;
|
||||
|
29
plugins/workbench-resources/src/components/icons/Drag.svelte
Normal file
29
plugins/workbench-resources/src/components/icons/Drag.svelte
Normal file
@ -0,0 +1,29 @@
|
||||
<script lang="ts">
|
||||
export let size: 'small' | 'medium' | 'large'
|
||||
export let fill: string = 'currentColor'
|
||||
</script>
|
||||
|
||||
<svg class="svg-{size}" {fill} viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
|
||||
<path
|
||||
d="M9 5.99988C9 6.55216 9.44772 6.99988 10 6.99988C10.5523 6.99988 11 6.55216 11 5.99988C11 5.44759 10.5523 4.99988 10 4.99988C9.44772 4.99988 9 5.44759 9 5.99988Z"
|
||||
/>
|
||||
<path
|
||||
d="M9 9.99988C9 10.5522 9.44772 10.9999 10 10.9999C10.5523 10.9999 11 10.5522 11 9.99988C11 9.44759 10.5523 8.99988 10 8.99988C9.44772 8.99988 9 9.44759 9 9.99988Z"
|
||||
/>
|
||||
<path
|
||||
d="M10 14.9999C9.44772 14.9999 9 14.5522 9 13.9999C9 13.4476 9.44772 12.9999 10 12.9999C10.5523 12.9999 11 13.4476 11 13.9999C11 14.5522 10.5523 14.9999 10 14.9999Z"
|
||||
/>
|
||||
<path
|
||||
d="M9 2C9 2.55228 9.44772 3 10 3C10.5523 3 11 2.55228 11 2C11 1.44772 10.5523 1 10 1C9.44772 1 9 1.44772 9 2Z"
|
||||
/>
|
||||
<path
|
||||
d="M5 5.99988C5 6.55216 5.44772 6.99988 6 6.99988C6.55228 6.99988 7 6.55216 7 5.99988C7 5.44759 6.55228 4.99988 6 4.99988C5.44772 4.99988 5 5.44759 5 5.99988Z"
|
||||
/>
|
||||
<path
|
||||
d="M5 9.99988C5 10.5522 5.44772 10.9999 6 10.9999C6.55228 10.9999 7 10.5522 7 9.99988C7 9.44759 6.55228 8.99988 6 8.99988C5.44772 8.99988 5 9.44759 5 9.99988Z"
|
||||
/>
|
||||
<path
|
||||
d="M6 14.9999C5.44772 14.9999 5 14.5522 5 13.9999C5 13.4476 5.44772 12.9999 6 12.9999C6.55228 12.9999 7 13.4476 7 13.9999C7 14.5522 6.55228 14.9999 6 14.9999Z"
|
||||
/>
|
||||
<path d="M5 2C5 2.55228 5.44772 3 6 3C6.55228 3 7 2.55228 7 2C7 1.44772 6.55228 1 6 1C5.44772 1 5 1.44772 5 2Z" />
|
||||
</svg>
|
@ -42,10 +42,10 @@ test.describe('contact tests', () => {
|
||||
// Click #profile-button
|
||||
await page.click('#profile-button')
|
||||
// Click button:has-text("Settings")
|
||||
await page.hover('button:has-text("Settings")')
|
||||
// await page.hover('button:has-text("Settings")')
|
||||
await page.click('button:has-text("Settings")')
|
||||
// Click text=Workspace Notifications >> button
|
||||
await page.click('text=Workspace Notifications >> button')
|
||||
await page.click('.antiPanel-navigator > div:nth-child(5)')
|
||||
await page.click('text=Templates')
|
||||
// Click .flex-center.icon-button
|
||||
await page.click('#create-template')
|
||||
@ -75,10 +75,10 @@ test.describe('contact tests', () => {
|
||||
// Click #profile-button
|
||||
await page.click('#profile-button')
|
||||
// await page.click('text=Workspace')
|
||||
await page.hover('button:has-text("Settings")')
|
||||
// await page.hover('button:has-text("Settings")')
|
||||
await page.click('button:has-text("Settings")')
|
||||
// Click text=Workspace Notifications >> button
|
||||
await page.click('text=Workspace Notifications >> button')
|
||||
await page.click('.antiPanel-navigator > div:nth-child(5)')
|
||||
// Click button:has-text("Manage Templates")
|
||||
await page.click('text="Manage Templates"')
|
||||
// Click text=Vacancies
|
||||
|
Loading…
Reference in New Issue
Block a user