Skip to content

Commit 1c4074c

Browse files
corrige botões de login por rede social que apareciam duplicados
1 parent a2e7c46 commit 1c4074c

3 files changed

Lines changed: 10 additions & 10 deletions

File tree

assets-src/sass/4-components/_c-login.scss

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,9 +63,13 @@
6363

6464
&__social-buttons {
6565
display: grid;
66-
grid-template-columns: 1fr 1fr;
66+
6767
gap: 31px;
6868

69+
&--multiple {
70+
grid-template-columns: 1fr 1fr;
71+
}
72+
6973
.social-login {
7074
align-items: center;
7175
display: flex;

components/login/script.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,10 @@ app.component('login', {
4545
configs() {
4646
return JSON.parse(this.config);
4747
},
48+
49+
multiple() {
50+
return this.configs.strategies.Google?.visible && this.configs.strategies.govbr?.visible;
51+
}
4852
},
4953

5054
methods: {

components/login/template.php

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
<span class="divider__text"> <?= i::__('Ou entre com') ?> </span>
5050
</div>
5151

52-
<div class="login__social-buttons">
52+
<div class="login__social-buttons" :class="{'login__social-buttons--multiple': multiple}">
5353
<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') ?>">
5454
<div class="img"> <img height="16" class="br-sign-in-img" src="<?php $this->asset('img/govbr-white.png'); ?>" /> </div>
5555
<?= i::__('Entrar com Gov.br') ?>
@@ -60,14 +60,6 @@
6060
<?= i::__('Entrar com Google') ?>
6161
</a>
6262

63-
<a v-if="configs.strategies.govbr?.visible" class="social-login--button button button--md button--large govbr" href="<?php echo $app->createUrl('auth', 'govbr') ?>">
64-
<div class="img"> <img height="16" class="br-sign-in-img" src="<?php $this->asset('img/govbr-white.png'); ?>" /> </div>
65-
</a>
66-
67-
<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') ?>">
68-
<div class="img"> <img height="16" src="<?php $this->asset('img/g.png'); ?>" /> </div>
69-
<?= i::__('Google') ?>
70-
</a>
7163
</div>
7264
</div>
7365

0 commit comments

Comments
 (0)