fix(front): [WIP] replace `semantic-modal` with `ui/Modal` component
This commit is contained in:
parent
aa2016ce59
commit
c369f3168a
|
@ -9,7 +9,7 @@ import { useRoute } from 'vue-router'
|
||||||
import { useStore } from '~/store'
|
import { useStore } from '~/store'
|
||||||
import { useI18n } from 'vue-i18n'
|
import { useI18n } from 'vue-i18n'
|
||||||
|
|
||||||
import SemanticModal from '~/components/semantic/Modal.vue'
|
import Modal from '~/components/ui/Modal.vue'
|
||||||
import UserModal from '~/components/common/UserModal.vue'
|
import UserModal from '~/components/common/UserModal.vue'
|
||||||
import SearchBar from '~/components/audio/SearchBar.vue'
|
import SearchBar from '~/components/audio/SearchBar.vue'
|
||||||
import UserMenu from '~/components/common/UserMenu.vue'
|
import UserMenu from '~/components/common/UserMenu.vue'
|
||||||
|
@ -97,7 +97,7 @@ const moderationNotifications = computed(() =>
|
||||||
+ store.state.ui.notifications.pendingReviewRequests
|
+ store.state.ui.notifications.pendingReviewRequests
|
||||||
)
|
)
|
||||||
|
|
||||||
const showLanguageModal = ref(false)
|
const isLanguageModalOpen = ref(false)
|
||||||
const locale = ref(i18nLocale.value)
|
const locale = ref(i18nLocale.value)
|
||||||
watch(locale, (locale) => {
|
watch(locale, (locale) => {
|
||||||
setI18nLanguage(locale)
|
setI18nLanguage(locale)
|
||||||
|
@ -106,8 +106,8 @@ watch(locale, (locale) => {
|
||||||
const isProduction = import.meta.env.PROD
|
const isProduction = import.meta.env.PROD
|
||||||
const isTauri = checkTauri()
|
const isTauri = checkTauri()
|
||||||
|
|
||||||
const showUserModal = ref(false)
|
const isUserModalOpen = ref(false)
|
||||||
const showThemeModal = ref(false)
|
const isThemeModalOpen = ref(false)
|
||||||
|
|
||||||
// const el = useCurrentElement()
|
// const el = useCurrentElement()
|
||||||
// watchEffect(() => {
|
// watchEffect(() => {
|
||||||
|
@ -243,7 +243,7 @@ onMounted(() => {
|
||||||
<a
|
<a
|
||||||
href=""
|
href=""
|
||||||
class="item"
|
class="item"
|
||||||
@click.prevent.exact="showUserModal = !showUserModal"
|
@click.prevent.exact="isUserModalOpen = !isUserModalOpen"
|
||||||
>
|
>
|
||||||
<img
|
<img
|
||||||
v-if="store.state.auth.authenticated && store.state.auth.profile?.avatar?.urls.medium_square_crop"
|
v-if="store.state.auth.authenticated && store.state.auth.profile?.avatar?.urls.medium_square_crop"
|
||||||
|
@ -268,19 +268,21 @@ onMounted(() => {
|
||||||
</a>
|
</a>
|
||||||
</template>
|
</template>
|
||||||
<user-modal
|
<user-modal
|
||||||
v-model:show="showUserModal"
|
v-model:show="isUserModalOpen"
|
||||||
@show-theme-modal-event="showThemeModal=true"
|
@show-theme-modal-event="isThemeModalOpen=true"
|
||||||
@show-language-modal-event="showLanguageModal=true"
|
@show-language-modal-event="isLanguageModalOpen=true"
|
||||||
/>
|
/>
|
||||||
<semantic-modal
|
<Modal
|
||||||
|
:title="labels.language"
|
||||||
ref="languageModal"
|
ref="languageModal"
|
||||||
v-model:show="showLanguageModal"
|
v-model="isLanguageModalOpen"
|
||||||
:fullscreen="false"
|
:fullscreen="false"
|
||||||
>
|
>
|
||||||
|
<!-- TODO: Is this actually a popover menu, not a modal? -->
|
||||||
<i
|
<i
|
||||||
role="button"
|
role="button"
|
||||||
class="left chevron back inside icon"
|
class="left chevron back inside icon"
|
||||||
@click.prevent.exact="showUserModal = !showUserModal"
|
@click.prevent.exact="isUserModalOpen = !isUserModalOpen"
|
||||||
/>
|
/>
|
||||||
<div class="header">
|
<div class="header">
|
||||||
<h3 class="title">
|
<h3 class="title">
|
||||||
|
@ -302,16 +304,16 @@ onMounted(() => {
|
||||||
<label :for="`${key}`">{{ language }}</label>
|
<label :for="`${key}`">{{ language }}</label>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
</div>
|
</div>
|
||||||
</semantic-modal>
|
</Modal>
|
||||||
<semantic-modal
|
<Modal
|
||||||
ref="themeModal"
|
ref="themeModal"
|
||||||
v-model:show="showThemeModal"
|
v-model:show="isThemeModalOpen"
|
||||||
:fullscreen="false"
|
:fullscreen="false"
|
||||||
>
|
>
|
||||||
<i
|
<i
|
||||||
role="button"
|
role="button"
|
||||||
class="left chevron back inside icon"
|
class="left chevron back inside icon"
|
||||||
@click.prevent.exact="showUserModal = !showUserModal"
|
@click.prevent.exact="isUserModalOpen = !isUserModalOpen"
|
||||||
/>
|
/>
|
||||||
<div class="header">
|
<div class="header">
|
||||||
<h3 class="title">
|
<h3 class="title">
|
||||||
|
@ -333,7 +335,7 @@ onMounted(() => {
|
||||||
<label :for="th.key">{{ th.name }}</label>
|
<label :for="th.key">{{ th.name }}</label>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
</div>
|
</div>
|
||||||
</semantic-modal>
|
</Modal>
|
||||||
<div class="item collapse-button-wrapper">
|
<div class="item collapse-button-wrapper">
|
||||||
<button
|
<button
|
||||||
:class="['ui', 'basic', 'big', {'vibrant': !isCollapsed}, 'inverted icon', 'collapse', 'button']"
|
:class="['ui', 'basic', 'big', {'vibrant': !isCollapsed}, 'inverted icon', 'collapse', 'button']"
|
||||||
|
|
Loading…
Reference in New Issue