[bug] hopefully fix issue with english version profiles breaking hydration for some reason...

This commit is contained in:
Avris 2021-06-16 19:18:51 +02:00
parent 66bd897b1f
commit 80f3307e90
3 changed files with 30 additions and 18 deletions

View File

@ -39,6 +39,7 @@
"sqlite3": "^5.0.0", "sqlite3": "^5.0.0",
"suml-loader": "^0.1.1", "suml-loader": "^0.1.1",
"ulid": "^2.3.0", "ulid": "^2.3.0",
"vue-client-only": "^2.1.0",
"vue-matomo": "^3.13.5-0", "vue-matomo": "^3.13.5-0",
"vuedraggable": "^2.24.3", "vuedraggable": "^2.24.3",
"webpack": "^5.0", "webpack": "^5.0",

View File

@ -31,15 +31,17 @@
</div> </div>
</div> </div>
<section v-if="$isGranted('users') && profile.bannedReason"> <client-only>
<div class="alert alert-warning"> <section v-if="$isGranted('users') && profile.bannedReason">
<p class="h4"> <div class="alert alert-warning">
<Icon v="ban"/> <p class="h4">
{{$t('ban.banned')}} <Icon v="ban"/>
</p> {{$t('ban.banned')}}
<p class="mb-0">{{profile.bannedReason}}</p> </p>
</div> <p class="mb-0">{{profile.bannedReason}}</p>
</section> </div>
</section>
</client-only>
<section v-if="profile.age ||profile.description.trim().length"> <section v-if="profile.age ||profile.description.trim().length">
<p v-for="line in profile.description.split('\n')" class="mb-1"> <p v-for="line in profile.description.split('\n')" class="mb-1">
@ -121,15 +123,17 @@
<OpinionLegend/> <OpinionLegend/>
</section> </section>
<section v-if="$isGranted('users')"> <client-only>
<div class="alert alert-warning"> <section v-if="$isGranted('users')">
<textarea v-model="profile.bannedReason" class="form-control" rows="3" :placeholder="$t('ban.reason')" :disabled="saving"></textarea> <div class="alert alert-warning">
<button class="btn btn-danger d-block w-100 mt-2" :disabled="saving" @click="ban"> <textarea v-model="profile.bannedReason" class="form-control" rows="3" :placeholder="$t('ban.reason')" :disabled="saving"></textarea>
<Icon v="ban"/> <button class="btn btn-danger d-block w-100 mt-2" :disabled="saving" @click="ban">
{{$t('ban.action')}} <Icon v="ban"/>
</button> {{$t('ban.action')}}
</div> </button>
</section> </div>
</section>
</client-only>
<Separator icon="heart"/> <Separator icon="heart"/>
<Support/> <Support/>
@ -160,8 +164,10 @@
import {head, listToDict} from "../src/helpers"; import {head, listToDict} from "../src/helpers";
import { pronouns } from "~/src/data"; import { pronouns } from "~/src/data";
import { buildPronoun } from "../src/buildPronoun"; import { buildPronoun } from "../src/buildPronoun";
import ClientOnly from 'vue-client-only'
export default { export default {
components: { ClientOnly },
data() { data() {
return { return {
profiles: {}, profiles: {},

View File

@ -9379,6 +9379,11 @@ vue-client-only@^2.0.0:
resolved "https://registry.yarnpkg.com/vue-client-only/-/vue-client-only-2.0.0.tgz#ddad8d675ee02c761a14229f0e440e219de1da1c" resolved "https://registry.yarnpkg.com/vue-client-only/-/vue-client-only-2.0.0.tgz#ddad8d675ee02c761a14229f0e440e219de1da1c"
integrity sha512-arhk1wtWAfLsJyxGMoEYhoBowM87/i6HLSG2LH/03Yog6i2d9JEN1peMP0Ceis+/n9DxdenGYZZTxbPPJyHciA== integrity sha512-arhk1wtWAfLsJyxGMoEYhoBowM87/i6HLSG2LH/03Yog6i2d9JEN1peMP0Ceis+/n9DxdenGYZZTxbPPJyHciA==
vue-client-only@^2.1.0:
version "2.1.0"
resolved "https://registry.yarnpkg.com/vue-client-only/-/vue-client-only-2.1.0.tgz#1a67a47b8ecacfa86d75830173fffee3bf8a4ee3"
integrity sha512-vKl1skEKn8EK9f8P2ZzhRnuaRHLHrlt1sbRmazlvsx6EiC3A8oWF8YCBrMJzoN+W3OnElwIGbVjsx6/xelY1AA==
vue-hot-reload-api@^2.3.0: vue-hot-reload-api@^2.3.0:
version "2.3.4" version "2.3.4"
resolved "https://registry.yarnpkg.com/vue-hot-reload-api/-/vue-hot-reload-api-2.3.4.tgz#532955cc1eb208a3d990b3a9f9a70574657e08f2" resolved "https://registry.yarnpkg.com/vue-hot-reload-api/-/vue-hot-reload-api-2.3.4.tgz#532955cc1eb208a3d990b3a9f9a70574657e08f2"