Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

style: Fix mobile version margins #2196

Merged
merged 3 commits into from
Mar 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -174,8 +174,11 @@ <h1 class="orc-font-heading-small" i18n="@@authorize.authorize">
You are currently signed in as:
</p>
<mat-divider class="orcid-divider"></mat-divider>
<div class="row">
<div class="col l3 profile-icon-wrapper">
<div
class="row"
[ngClass]="{ 'center-content': platformInfo.columns4 }"
>
<div class="col l2 profile-icon-wrapper">
<div class="icon">
<mat-icon
class="profile-icon"
Expand All @@ -186,7 +189,10 @@ <h1 class="orc-font-heading-small" i18n="@@authorize.authorize">
</div>
</div>
<div class="col l9 user-wrapper">
<div class="row">
<div
class="row"
[ngClass]="{ 'center-content': platformInfo.columns4 }"
>
<div class="m-b-8">
<div class="mat-body-2">
<strong id="user-name">{{ userName }}</strong>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ mat-card-content.authorize-content {

div.profile-icon-wrapper {
padding: 0 !important;
margin-right: 16px;
}

div.user-wrapper {
Expand All @@ -118,4 +119,8 @@ mat-card-content.authorize-content {
.user-links {
width: 100%;
}

.center-content {
justify-content: center;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { Component, Inject, Input, OnDestroy, OnInit } from '@angular/core'
import { Router } from '@angular/router'
import { forkJoin, Observable, Subject } from 'rxjs'
import { catchError, map, take, takeUntil } from 'rxjs/operators'
import { PlatformInfoService } from 'src/app/cdk/platform-info'
import { PlatformInfo, PlatformInfoService } from 'src/app/cdk/platform-info'
import { WINDOW } from 'src/app/cdk/window'
import { ApplicationRoutes } from 'src/app/constants'
import { UserService } from 'src/app/core'
Expand Down Expand Up @@ -42,6 +42,7 @@ export class FormAuthorizeComponent implements OnInit, OnDestroy {

oauthRequest: RequestInfoForm
trustedIndividuals: TrustedIndividuals
platformInfo: PlatformInfo

authorizeAccessFor = $localize`:@@authorize.authorizeAccessFor:Authorize access for`
orcid = $localize`:@@authorize.dashOrcid:- ORCID`
Expand All @@ -58,6 +59,11 @@ export class FormAuthorizeComponent implements OnInit, OnDestroy {
private _trustedIndividuals: TrustedIndividualsService,
private _titleService: Title
) {
this._platformInfo
.get()
.pipe(take(1))
.subscribe((platform) => this.platformInfo = platform)

this._user
.getUserSession()
.pipe(
Expand Down
2 changes: 1 addition & 1 deletion src/app/authorize/pages/authorize/authorize.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
'orcid-wizard-2': !signInUpdatesV1Togglz,
'orcid-wizard': signInUpdatesV1Togglz,
'authorize-wrapper': signInUpdatesV1Togglz,
mobile: !platform.columns12
mobile: platform.columns4
}"
>
<app-form-authorize
Expand Down
Loading