Skip to content

Commit

Permalink
instead of v-html used v-if & v-else
Browse files Browse the repository at this point in the history
  • Loading branch information
zmigroo committed Jan 14, 2024
1 parent afad700 commit 9c8e316
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
4 changes: 3 additions & 1 deletion lang/pl.json
Original file line number Diff line number Diff line change
Expand Up @@ -154,5 +154,7 @@
"Rules import started.": "Import zasad uruchomiony.",
"Run rules import": "Uruchom import zasad",

"Found": "Znaleziono"
"Found": "Znaleziono",
"loading info about rules, please wait":"ładowanie informacji o zasadach, proszę czekać"

}
11 changes: 7 additions & 4 deletions resources/js/Pages/City/Index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const toast = useToast()
const page = usePage()
const isAuth = computed(() => page.props.auth.isAuth)
const regulationsOpen = ref(false)
const rules = reactive({ pl: '<i class="text-gray-400">ładowanie informacji o zasadach, proszę czekać...</i>', en: '<i class="text-gray-400">loading info about rules, please wait...</i>' })
const rules = reactive({ pl: '', en: '' })
fetchRegulations()
const props = defineProps({
Expand Down Expand Up @@ -135,10 +135,13 @@ function createOpinion() {
<div class="my-3 flex cursor-pointer items-center text-2xl font-bold text-gray-700" @click="toggleRegulations()">
{{ __('Rules') }} <ArrowDownIcon :class="regulationsOpen ? 'rotated' : ''" class="absolute right-3 inline-block h-6 w-6 transition-all" />
</div>
<div :class="regulationsOpen?'show':''" class="overflow-scroll transition">
{{ currentRules }}
<div v-if="currentRules == ''" :class="regulationsOpen ? 'show' : ''" class="overflow-scroll transition">

Check failure on line 138 in resources/js/Pages/City/Index.vue

View workflow job for this annotation

GitHub Actions / Test & lint JS codebase

Expected indentation of 12 spaces but found 14 spaces
<i class="text-gray-400">{{ __('loading info about rules, please wait') }}...</i>

Check failure on line 139 in resources/js/Pages/City/Index.vue

View workflow job for this annotation

GitHub Actions / Test & lint JS codebase

Expected indentation of 14 spaces but found 16 spaces
</div>

Check failure on line 140 in resources/js/Pages/City/Index.vue

View workflow job for this annotation

GitHub Actions / Test & lint JS codebase

Expected indentation of 12 spaces but found 14 spaces
<div v-else :class="regulationsOpen ? 'show' : ''" class="overflow-scroll transition">

Check failure on line 141 in resources/js/Pages/City/Index.vue

View workflow job for this annotation

GitHub Actions / Test & lint JS codebase

Expected indentation of 12 spaces but found 14 spaces
{{ currentRules }}

Check failure on line 142 in resources/js/Pages/City/Index.vue

View workflow job for this annotation

GitHub Actions / Test & lint JS codebase

Expected indentation of 14 spaces but found 16 spaces
</div>

Check failure on line 143 in resources/js/Pages/City/Index.vue

View workflow job for this annotation

GitHub Actions / Test & lint JS codebase

Expected indentation of 12 spaces but found 14 spaces
</div>

Check failure on line 144 in resources/js/Pages/City/Index.vue

View workflow job for this annotation

GitHub Actions / Test & lint JS codebase

Expected indentation of 10 spaces but found 12 spaces
</div>
<form v-if="isAuth" class="mt-8 flex flex-col" @submit.prevent="createOpinion">
<p class="mb-2 text-xs font-medium text-gray-700">
{{ __('Add opinion') }}
Expand Down

0 comments on commit 9c8e316

Please sign in to comment.