update
Some checks failed
Deploy / deploy (build, debian, 22) (push) Has been cancelled
Deploy / deploy (build:staging, school, 8822) (push) Has been cancelled

This commit is contained in:
2026-06-14 06:32:09 -06:00
parent 5bb8a1eaa3
commit 681c6ff4f4

View File

@@ -79,10 +79,12 @@
<script setup lang="ts"> <script setup lang="ts">
import { onMounted, ref } from "vue" import { onMounted, ref } from "vue"
import { useRouter } from "vue-router"
import { Icon } from "@iconify/vue" import { Icon } from "@iconify/vue"
import { Showcase, Submission } from "../api" import { Showcase } from "../api"
import type { AwardSection, ShowcaseItem } from "../utils/type" import type { AwardSection, ShowcaseItem } from "../utils/type"
const router = useRouter()
const loading = ref(true) const loading = ref(true)
const awards = ref<AwardSection[]>([]) const awards = ref<AwardSection[]>([])
@@ -93,14 +95,11 @@ function buildSrcdoc(item: ShowcaseItem): string {
} }
function openDetail(item: ShowcaseItem) { function openDetail(item: ShowcaseItem) {
const srcdoc = buildSrcdoc(item) const { href } = router.resolve({
const win = window.open("", "_blank") name: "submission",
if (win) { params: { id: item.submission_id },
win.document.open() })
win.document.write(srcdoc) window.open(href, "_blank")
win.document.close()
}
void Submission.incrementView(item.submission_id)
} }
async function init() { async function init() {