Skip to content

Commit

Permalink
removed client-only and upgrade buefy
Browse files Browse the repository at this point in the history
  • Loading branch information
Ratatinator97 committed Jun 12, 2024
1 parent 9752fbd commit 0cf043e
Show file tree
Hide file tree
Showing 8 changed files with 261 additions and 335 deletions.
50 changes: 24 additions & 26 deletions components/auth/signinModal.vue
Original file line number Diff line number Diff line change
@@ -1,31 +1,29 @@
<template>
<client-only>
<form action @keyup.enter="onSubmit()">
<div class="modal-card" style="min-height: 30vh">
<header class="modal-card-head">
<b-button class="button" type="is-danger" icon-left="close" @click="$parent.close()" />
<p align="center" class="modal-card-title">{{ $t("LogIn") }}</p>
</header>
<section class="modal-card-body">
<b-field :label="$t('Email')">
<b-input data-cy="signin-email" type="email" lazy maxlength="64" v-model="username"
:placeholder="$t('PlaceHolderEmail')" required></b-input>
</b-field>
<form action @keyup.enter="onSubmit()">
<div class="modal-card" style="min-height: 30vh">
<header class="modal-card-head">
<b-button class="button" type="is-danger" icon-left="close" @click="$parent.close()" />
<p align="center" class="modal-card-title">{{ $t("LogIn") }}</p>
</header>
<section class="modal-card-body">
<b-field :label="$t('Email')">
<b-input data-cy="signin-email" type="email" lazy maxlength="64" v-model="username"
:placeholder="$t('PlaceHolderEmail')" required></b-input>
</b-field>

<b-field :label="$t('Password')">
<b-input data-cy="signin-password" type="password" lazy v-model="password" password-reveal
:placeholder="$t('PlaceHolderPassword')" required></b-input>
</b-field>
<a href="/changePassword">{{ $t("ForgotPswd") }}</a>
</section>
<footer class="modal-card-foot">
<b-button data-cy="signin-signin" class="is-primary" :loading="loading" @click="onSubmit">{{
$t("LogIn")
}}</b-button>
</footer>
</div>
</form>
</client-only>
<b-field :label="$t('Password')">
<b-input data-cy="signin-password" type="password" lazy v-model="password" password-reveal
:placeholder="$t('PlaceHolderPassword')" required></b-input>
</b-field>
<a href="/changePassword">{{ $t("ForgotPswd") }}</a>
</section>
<footer class="modal-card-foot">
<b-button data-cy="signin-signin" class="is-primary" :loading="loading" @click="onSubmit">{{
$t("LogIn")
}}</b-button>
</footer>
</div>
</form>
</template>
<script>
import signup from "@/components/auth/signupModal";
Expand Down
364 changes: 179 additions & 185 deletions components/auth/signupModal.vue

Large diffs are not rendered by default.

38 changes: 18 additions & 20 deletions components/navigation/navbar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -18,27 +18,25 @@
class="bolder">{{ $t("Tutorial") }}</b> 🚀</b-navbar-item>
</template>
<template slot="end">
<client-only>
<b-navbar-dropdown tag="div" collapsible :label="getEmoji(localeIso())">
<b-navbar-item href="#" v-for="locale in availableLocales" :key="locale.code"
@click.prevent.stop="$i18n.setLocale(locale.code)">{{ getEmoji(locale.iso) }}</b-navbar-item>
</b-navbar-dropdown>
<b-navbar-item tag="div">
<div class="buttons bottomOffset">
<b-button data-cy="navbar-signin-button" class="bolder customButton" v-if="!isLogged"
@click="openSignInModal()" type="is-primary">{{ $t("LogIn") }}</b-button>
<b-button v-else class="bolder customButton" tag="nuxt-link" :to="pictalkHome" type="is-primary"
icon-right="home"></b-button>
<b-navbar-dropdown tag="div" collapsible :label="getEmoji(localeIso())">
<b-navbar-item href="#" v-for="locale in availableLocales" :key="locale.code"
@click.prevent.stop="$i18n.setLocale(locale.code)">{{ getEmoji(locale.iso) }}</b-navbar-item>
</b-navbar-dropdown>
<b-navbar-item tag="div">
<div class="buttons bottomOffset">
<b-button data-cy="navbar-signin-button" class="bolder customButton" v-if="!isLogged"
@click="openSignInModal()" type="is-primary">{{ $t("LogIn") }}</b-button>
<b-button v-else class="bolder customButton" tag="nuxt-link" :to="pictalkHome" type="is-primary"
icon-right="home"></b-button>

<b-button class="bolder customButton" v-if="!isLogged" @click="openSignUpModal()" type="is-success"
outlined>{{ $t("SignUp") }}</b-button>
<b-button v-else class="bolder customButton" type="is-light" icon-right="logout" @click="onLogout" />
<b-button class="bolder customButton" outlined v-if="!isLogged" tag="nuxt-link"
to="/public?fatherCollectionId=346" type="is-primary" icon-right="arrow-right-box">{{
$t("TryPictalk") }}</b-button>
</div>
</b-navbar-item>
</client-only>
<b-button class="bolder customButton" v-if="!isLogged" @click="openSignUpModal()" type="is-success"
outlined>{{ $t("SignUp") }}</b-button>
<b-button v-else class="bolder customButton" type="is-light" icon-right="logout" @click="onLogout" />
<b-button class="bolder customButton" outlined v-if="!isLogged" tag="nuxt-link"
to="/public?fatherCollectionId=346" type="is-primary" icon-right="arrow-right-box">{{
$t("TryPictalk") }}</b-button>
</div>
</b-navbar-item>
</template>
</b-navbar>
</div>
Expand Down
12 changes: 5 additions & 7 deletions layouts/pictalk.vue
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
<template>
<div>
<link rel="preconnect" href="https://cdn.jsdelivr.net" />
<client-only>
<div class="wrapper">
<pictalkNavbar />
<hr class="margins" />
<nuxt />
</div>
</client-only>
<div class="wrapper">
<pictalkNavbar />
<hr class="margins" />
<nuxt />
</div>
</div>
</template>

Expand Down
10 changes: 4 additions & 6 deletions layouts/public.vue
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
<template>
<div class="wrapper">
<client-only>
<navbar />
<hr style="margin: 20px" />
<nuxt />
<br />
</client-only>
<navbar />
<hr style="margin: 20px" />
<nuxt />
<br />
</div>
</template>
<script>
Expand Down
108 changes: 25 additions & 83 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
"merge-images-horizontally-with-text": "^1.0.2",
"node-sass": "^6.0.1",
"nuxt": "^2.15.8",
"nuxt-buefy": "^0.4.22",
"nuxt-buefy": "^0.4.29",
"nuxt-clipboard2": "^0.2.1",
"nuxt-compress": "^5.0.0",
"nuxt-responsive-loader": "^2.0.1",
Expand Down
12 changes: 5 additions & 7 deletions pages/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,11 @@
<div style="white-space: nowrap;" class="title is-4 isPictalkColor">{{ $t('CommunicateDemo') }}</div>
</section>
</b-carousel-item>
<client-only>
<b-carousel-item v-show="this.getUserLang == 'fr'" class="containing">
<video id="pictalk-video" preload="none" style="aspect-ratio: 16/9; width: 100%; height: 99.1%;"
alt="video of Alex talking about pictalk" :src="require('@/static/pictalk.mp4')" controls muted
:poster="require('@/assets/pictalk-video-poster.webp')" class="slightly-rounded"></video>
</b-carousel-item>
</client-only>
<b-carousel-item v-show="this.getUserLang == 'fr'" class="containing">
<video id="pictalk-video" preload="none" style="aspect-ratio: 16/9; width: 100%; height: 99.1%;"
alt="video of Alex talking about pictalk" :src="require('@/static/pictalk.mp4')" controls muted
:poster="require('@/assets/pictalk-video-poster.webp')" class="slightly-rounded"></video>
</b-carousel-item>
<b-carousel-item class="containing">
<b-image style="aspect-ratio: 16/9;" alt="A device running Pictalk sharing pictograms with another device"
:srcset="require('@/assets/Share.png').srcSet" :placeholder="require('@/assets/Share.png').placeholder"
Expand Down

0 comments on commit 0cf043e

Please sign in to comment.