You've already forked AstralRinth
forked from didirus/AstralRinth
* Fix auto updater, add failure message, fix modals * Fix ads hiding, updater UI * dummy version, fix gh actions cache * fix release conf * actual version bump * Fix ads hiding sometimes * Fix event state init * fix remaining bugs * Fix lint on linux * Fix deep linking on Windows * Fix ad links opening multiple times
70 lines
1.2 KiB
Vue
70 lines
1.2 KiB
Vue
<script setup lang="ts">
|
|
import { ref } from 'vue'
|
|
import { ConfirmModal } from '@modrinth/ui'
|
|
import { show_ads_window, hide_ads_window } from '@/helpers/ads.js'
|
|
import { useTheming } from '@/store/theme.js'
|
|
|
|
const themeStore = useTheming()
|
|
|
|
defineProps({
|
|
confirmationText: {
|
|
type: String,
|
|
default: '',
|
|
},
|
|
hasToType: {
|
|
type: Boolean,
|
|
default: false,
|
|
},
|
|
title: {
|
|
type: String,
|
|
default: 'No title defined',
|
|
required: true,
|
|
},
|
|
description: {
|
|
type: String,
|
|
default: 'No description defined',
|
|
required: true,
|
|
},
|
|
proceedLabel: {
|
|
type: String,
|
|
default: 'Proceed',
|
|
},
|
|
})
|
|
|
|
const emit = defineEmits(['proceed'])
|
|
const modal = ref(null)
|
|
|
|
defineExpose({
|
|
show: () => {
|
|
hide_ads_window()
|
|
modal.value.show()
|
|
},
|
|
hide: () => {
|
|
onModalHide()
|
|
modal.value.hide()
|
|
},
|
|
})
|
|
|
|
function onModalHide() {
|
|
show_ads_window()
|
|
}
|
|
|
|
function proceed() {
|
|
emit('proceed')
|
|
}
|
|
</script>
|
|
|
|
<template>
|
|
<ConfirmModal
|
|
ref="modal"
|
|
:confirmation-text="confirmationText"
|
|
:has-to-type="hasToType"
|
|
:title="title"
|
|
:description="description"
|
|
:proceed-label="proceedLabel"
|
|
:on-hide="onModalHide"
|
|
:noblur="!themeStore.advancedRendering"
|
|
@proceed="proceed"
|
|
/>
|
|
</template>
|