| <style include="profile-picker-shared cr-hidden-style cr-shared-style"> |
| :host { |
| --profile-item-border-width: 1px; |
| --profile-item-margin: 4px; |
| } |
| |
| .flex-container { |
| display: flex; |
| flex-flow: column; |
| height: calc(100% - var(--cr-button-height) - 2 * var(--footer-spacing)); |
| justify-content: space-evenly; |
| } |
| |
| .title-container { |
| /* TODO(crbug.com/1441029): dedupe with |--tangible-sync-style-banner-width| |
| * from |tangible_sync_style_shared.css| */ |
| --banner-width: 17vw; |
| |
| flex: 0 1 auto; |
| margin: 30px auto 0 auto; |
| max-width: 490px; |
| padding-inline-end: var(--banner-width); |
| padding-inline-start: var(--banner-width); |
| text-align: center; |
| } |
| |
| #product-logo { |
| height: 32px; |
| } |
| |
| .title { |
| margin-bottom: 8px; |
| } |
| |
| .subtitle { |
| margin-top: 8px; |
| } |
| |
| #wrapper { |
| display: flex; |
| flex: 0 1 auto; |
| margin-bottom: 4px; |
| margin-inline-end: 140px; |
| margin-inline-start: 140px; |
| min-height: calc(var(--profile-item-height) + 2*var(--profile-item-margin) |
| + 2*var(--profile-item-border-width)); |
| overflow-x: hidden; |
| overflow-y: auto; |
| } |
| |
| #profilesContainer { |
| --grid-gutter: 8px; |
| align-items: center; |
| display: grid; |
| /* Actual gap: --grid-gutter + 2 * --profile-item-margin = 16px */ |
| grid-column-gap: var(--grid-gutter); |
| grid-row-gap: var(--grid-gutter); |
| grid-template-columns: repeat(auto-fit, calc(var(--profile-item-width) + |
| 2 * var(--profile-item-margin))); |
| justify-content: center; |
| margin: auto; |
| max-height: 100%; |
| overflow-x: hidden; |
| overflow-y: auto; |
| padding-inline-end: var(--scrollbar-width); |
| padding-inline-start: var(--scrollbar-width); |
| width: 100%; |
| } |
| |
| .profile-item { |
| align-items: center; |
| border: 1px solid var(--google-grey-300); |
| border-radius: 8px; |
| display: flex; |
| flex-direction: column; |
| height: var(--profile-item-height); |
| justify-content: center; |
| margin: var(--profile-item-margin); |
| width: var(--profile-item-width); |
| } |
| |
| .profile-item:focus-within, |
| .profile-item:hover { |
| background-color: var(--profile-card-hover-color); |
| } |
| |
| #addProfile.profile-item { |
| --hover-bg-color: none; |
| border: var(--profile-item-border-width) dashed var(--google-grey-300); |
| box-shadow: none; |
| position: relative; |
| } |
| |
| #addProfileButtonLabel { |
| top: 0; |
| } |
| |
| :host-context([chrome-refresh-2023]) #addProfileButtonLabel { |
| left: 0; |
| } |
| |
| iron-icon[icon='profiles:add'] { |
| --iron-icon-height: var(--profile-card-avatar-icon-size); |
| --iron-icon-width: var(--profile-card-avatar-icon-size); |
| --iron-icon-fill-color: var(--google-grey-100); |
| --iron-icon-stroke-color: var(--google-grey-700); |
| } |
| |
| #browseAsGuestButton { |
| margin-inline-start: var(--footer-spacing); |
| padding: 8px 16px; |
| } |
| |
| #browseAsGuestButton > iron-icon { |
| margin-inline-end: 0; |
| --iron-icon-height: 24px; |
| --iron-icon-width: 24px; |
| } |
| |
| cr-checkbox { |
| --cr-checkbox-label-color: var(--cr-secondary-text-color); |
| --cr-checkbox-label-padding-start: 8px; |
| justify-content: flex-end; |
| margin-inline-end: var(--footer-spacing); |
| margin-inline-start: auto; |
| padding-inline-end: 5px; |
| padding-inline-start: 5px; |
| } |
| |
| @media (prefers-color-scheme: dark) { |
| .profile-item, |
| #addProfile.profile-item { |
| border-color: var(--google-grey-700); |
| } |
| |
| iron-icon[icon='profiles:add'] { |
| --iron-icon-fill-color: var(--google-grey-500); |
| --iron-icon-stroke-color: rgb(48, 48, 50); |
| } |
| } |
| </style> |
| |
| <div class="flex-container"> |
| <div class="title-container"> |
| <img id="product-logo" on-click="onProductLogoClick_" |
| srcset="chrome://theme/current-channel-logo@1x 1x, |
| chrome://theme/current-channel-logo@2x 2x" |
| role="presentation"> |
| <h1 class="title">$i18n{mainViewTitle}</h1> |
| <div class="subtitle">$i18n{mainViewSubtitle}</div> |
| </div> |
| <div id="wrapper"> |
| <div id="profilesContainer" class="custom-scrollbar" |
| hidden$="[[!profilesListLoaded_]]"> |
| <template is="dom-repeat" items="[[profilesList_]]"> |
| <profile-card |
| class="profile-item" profile-state="[[item]]"> |
| </profile-card> |
| </template> |
| <cr-button id="addProfile" class="profile-item" |
| on-click="onAddProfileClick_" |
| aria-labelledby="addProfileButtonLabel"> |
| <div id="addProfileButtonLabel" |
| class="profile-card-info prominent-text"> |
| $i18n{addSpaceButton} |
| </div> |
| <iron-icon icon="profiles:add"></iron-icon> |
| </cr-button> |
| </div> |
| </div> |
| </div> |
| <div class="footer"> |
| <cr-button id="browseAsGuestButton" on-click="onLaunchGuestProfileClick_"> |
| <iron-icon icon="profiles:account-circle" slot="prefix-icon"></iron-icon> |
| $i18n{browseAsGuestButton} |
| </cr-button> |
| <cr-checkbox id="askOnStartup" checked="{{askOnStartup_}}" |
| on-change="onAskOnStartupChangedByUser_" hidden$="[[hideAskOnStartup_]]"> |
| $i18n{askOnStartupCheckboxText} |
| </cr-checkbox> |
| </div> |