Skip to content

Commit

Permalink
corrige botões de login por rede social que apareciam duplicados
Browse files Browse the repository at this point in the history
  • Loading branch information
rafaelchavesfreitas committed Sep 12, 2023
1 parent a2e7c46 commit 1c4074c
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
6 changes: 5 additions & 1 deletion assets-src/sass/4-components/_c-login.scss
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,13 @@

&__social-buttons {
display: grid;
grid-template-columns: 1fr 1fr;

gap: 31px;

&--multiple {
grid-template-columns: 1fr 1fr;
}

.social-login {
align-items: center;
display: flex;
Expand Down
4 changes: 4 additions & 0 deletions components/login/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,10 @@ app.component('login', {
configs() {
return JSON.parse(this.config);
},

multiple() {
return this.configs.strategies.Google?.visible && this.configs.strategies.govbr?.visible;
}
},

methods: {
Expand Down
10 changes: 1 addition & 9 deletions components/login/template.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
<span class="divider__text"> <?= i::__('Ou entre com') ?> </span>
</div>

<div class="login__social-buttons">
<div class="login__social-buttons" :class="{'login__social-buttons--multiple': multiple}">
<a v-if="configs.strategies.govbr?.visible" class="social-login--button button button--icon button--large button--md govbr" href="<?php echo $app->createUrl('auth', 'govbr') ?>">
<div class="img"> <img height="16" class="br-sign-in-img" src="<?php $this->asset('img/govbr-white.png'); ?>" /> </div>
<?= i::__('Entrar com Gov.br') ?>
Expand All @@ -60,14 +60,6 @@
<?= i::__('Entrar com Google') ?>
</a>

<a v-if="configs.strategies.govbr?.visible" class="social-login--button button button--md button--large govbr" href="<?php echo $app->createUrl('auth', 'govbr') ?>">
<div class="img"> <img height="16" class="br-sign-in-img" src="<?php $this->asset('img/govbr-white.png'); ?>" /> </div>
</a>

<a v-if="configs.strategies.Google?.visible" class="social-login--button button button--icon button--md button--large google" href="<?php echo $app->createUrl('auth', 'google') ?>">
<div class="img"> <img height="16" src="<?php $this->asset('img/g.png'); ?>" /> </div>
<?= i::__('Google') ?>
</a>
</div>
</div>

Expand Down

0 comments on commit 1c4074c

Please sign in to comment.