* fix: tags in project settings to have icons and ordered correctly * fix copy in project list layout settings * fix tag item in header navigation * adjust ping ranges * add handle click tag * fix: dont show offline in project page for draft status * move tags above creators in app * preload server project page on load and optimize queries * add server project card to organization page * fix minecraft_java_server label * pnpm prepr * have user option in project create modal be circle * feat: implement better mobile project page view * disable summary line clamp for servers * fix: unlink instance doesnt update instance * increase icon upload size * small fix on button size * improve how server ping info loads * remove unnecessary pings for instance page * fix order of computing dependency diff * remove linked_project_id from world, use name+address to match for managed world instead * pnpm prepr * hide duplicate worlds with same domain name in worlds list * add install content warning for server instance * increase summary max width * add handling for server projects for bulk editing links * implement include user unlisted projects in published modpack select * pnpm prepr * filter to only user unlisted status * add bad link warnings * fix modpack tags appearing in server * cargo fmt
92 lines
1.5 KiB
Vue
92 lines
1.5 KiB
Vue
<script setup lang="ts">
|
|
import { ConfirmModal } from '@modrinth/ui'
|
|
import { useTemplateRef } from 'vue'
|
|
|
|
import { hide_ads_window, show_ads_window } from '@/helpers/ads.js'
|
|
import { useTheming } from '@/store/theme.ts'
|
|
|
|
const themeStore = useTheming()
|
|
|
|
const props = 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,
|
|
},
|
|
proceedIcon: {
|
|
type: Object,
|
|
default: undefined,
|
|
},
|
|
proceedLabel: {
|
|
type: String,
|
|
default: 'Proceed',
|
|
},
|
|
danger: {
|
|
type: Boolean,
|
|
default: true,
|
|
},
|
|
showAdOnClose: {
|
|
type: Boolean,
|
|
default: true,
|
|
},
|
|
markdown: {
|
|
type: Boolean,
|
|
default: true,
|
|
},
|
|
})
|
|
|
|
const emit = defineEmits(['proceed'])
|
|
const modal = useTemplateRef('modal')
|
|
|
|
defineExpose({
|
|
show: () => {
|
|
hide_ads_window()
|
|
modal.value?.show()
|
|
},
|
|
hide: () => {
|
|
onModalHide()
|
|
modal.value?.hide()
|
|
},
|
|
})
|
|
|
|
function onModalHide() {
|
|
if (props.showAdOnClose) {
|
|
show_ads_window()
|
|
}
|
|
}
|
|
|
|
function proceed() {
|
|
emit('proceed')
|
|
}
|
|
</script>
|
|
|
|
<template>
|
|
<ConfirmModal
|
|
ref="modal"
|
|
:confirmation-text="confirmationText"
|
|
:has-to-type="hasToType"
|
|
:title="title"
|
|
:description="description"
|
|
:proceed-icon="proceedIcon"
|
|
:proceed-label="proceedLabel"
|
|
:on-hide="onModalHide"
|
|
:noblur="!themeStore.advancedRendering"
|
|
:danger="danger"
|
|
:markdown="markdown"
|
|
@proceed="proceed"
|
|
/>
|
|
</template>
|