forked from didirus/AstralRinth
* Start of app redesign * format * continue progress * Content page nearly done * Fix recursion issues with content page * Fix update all alignment * Discover page progress * Settings progress * Removed unlocked-size hack that breaks web * Revamp project page, refactor web project page to share code with app, fixed loading bar, misc UI/UX enhancements, update ko-fi logo, update arrow icons, fix web issues caused by floating-vue migration, fix tooltip issues, update web tooltips, clean up web hydration issues * Ads + run prettier * Begin auth refactor, move common messages to ui lib, add i18n extraction to all apps, begin Library refactor * fix ads not hiding when plus log in * rev lockfile changes/conflicts * Fix sign in page * Add generated * (mostly) Data driven search * Fix search mobile issue * profile fixes * Project versions page, fix typescript on UI lib and misc fixes * Remove unused gallery component * Fix linkfunction err * Search filter controls at top, localization for locked filters * Fix provided filter names * Fix navigating from instance browse to main browse * Friends frontend (#2995) * Friends system frontend * (almost) finish frontend * finish friends, fix lint * Fix lint --------- Signed-off-by: Geometrically <18202329+Geometrically@users.noreply.github.com> * Refresh macOS app icon * Update web search UI more * Fix link opens * Fix frontend build --------- Signed-off-by: Geometrically <18202329+Geometrically@users.noreply.github.com> Co-authored-by: Jai A <jaiagr+gpg@pm.me> Co-authored-by: Geometrically <18202329+Geometrically@users.noreply.github.com>
61 lines
1.6 KiB
Vue
61 lines
1.6 KiB
Vue
<template>
|
|
<div
|
|
class="flex h-full flex-col gap-4 py-6"
|
|
:class="
|
|
'flex h-full flex-col gap-4 py-6' +
|
|
(danger
|
|
? ' rounded-2xl border-2 border-solid border-[#cb2245] bg-[#fff5f6] dark:border-[#FF496E] dark:bg-[#270B11]'
|
|
: '')
|
|
"
|
|
>
|
|
<div class="mb-2 flex items-center justify-between gap-4 px-6">
|
|
<div class="flex w-full items-center gap-4">
|
|
<UiServersServerIcon v-if="data" :image="data.image" class="h-12 w-12 rounded-lg" />
|
|
<div class="text-2xl font-extrabold text-contrast">{{ props.header }}</div>
|
|
</div>
|
|
<button
|
|
:class="
|
|
'h-8 w-8 rounded-full bg-button-bg p-2 text-contrast hover:bg-button-bgActive' +
|
|
(danger ? 'hover:bg-[#ffffff20] [&&]:bg-[#ffffff10]' : '')
|
|
"
|
|
@click="$emit('modal')"
|
|
>
|
|
<XIcon class="h-4 w-4" />
|
|
</button>
|
|
</div>
|
|
<div
|
|
class="border-0 border-b border-solid"
|
|
:class="danger ? 'border-[#cb2245] dark:border-[#612d38]' : 'border-divider'"
|
|
></div>
|
|
<div class="mt-2 h-full w-full overflow-auto px-6">
|
|
<slot />
|
|
</div>
|
|
</div>
|
|
</template>
|
|
|
|
<script setup lang="ts">
|
|
import { XIcon } from "@modrinth/assets";
|
|
|
|
const emit = defineEmits(["modal"]);
|
|
|
|
const props = defineProps<{
|
|
header?: string;
|
|
data?: any;
|
|
danger?: boolean;
|
|
}>();
|
|
|
|
const onEscKeyRelease = (event: KeyboardEvent) => {
|
|
if (event.key === "Escape") {
|
|
emit("modal");
|
|
}
|
|
};
|
|
|
|
onMounted(() => {
|
|
document.body.addEventListener("keyup", onEscKeyRelease);
|
|
});
|
|
|
|
onBeforeUnmount(() => {
|
|
document.removeEventListener("keyup", onEscKeyRelease);
|
|
});
|
|
</script>
|