Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update vnext #314

Merged
merged 7 commits into from
Nov 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/.vitepress/config.mts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ export default defineConfig({
},
// https://vitepress.dev/reference/default-theme-config
nav: [
{ text: 'API', link: 'https://redocly.github.io/redoc/?url=https://raw.githubusercontent.com/sysadminsmedia/homebox/main/docs/docs/api/openapi-2.0.json' },
{ text: 'API Docs', link: '/en/api' },
{ text: 'Demo', link: 'https://demo.homebox.software' },
],

Expand Down
37 changes: 37 additions & 0 deletions docs/en/api.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
---
layout: page
sidebar: false
---

<script setup lang="ts">
import { useData } from 'vitepress';

const elementScript = document.createElement('script');
elementScript.src = 'https://unpkg.com/@stoplight/elements/web-components.min.js';
document.head.appendChild(elementScript);

const elementStyle = document.createElement('link');
elementStyle.rel = 'stylesheet';
elementStyle.href = 'https://unpkg.com/@stoplight/elements/styles.min.css';
document.head.appendChild(elementStyle);

const { isDark } = useData();
let theme = 'light';
if (isDark.value) {
theme = 'dark';
}
</script>

<style>
.TryItPanel {
display: none;
}
</style>

<elements-api
apiDescriptionUrl="https://cdn.jsdelivr.net/gh/sysadminsmedia/homebox@main/docs/docs/api/openapi-2.0.json"
router="hash"
layout="responsive"
hideSchemas="true"
:data-theme="theme"
/>
2 changes: 1 addition & 1 deletion frontend/layouts/404.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<main class="grid min-h-screen w-full place-items-center bg-blue-100">
<main class="grid min-h-screen w-full place-items-center">
<slot></slot>
</main>
</template>
3 changes: 2 additions & 1 deletion frontend/pages/[...all].vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,9 @@
</script>

<template>
<h1 class="flex flex-col text-center font-extrabold text-blue-500">
<h1 class="flex flex-col text-center font-extrabold">
<span class="text-7xl">404.</span>
<span class="mt-5 text-5xl"> Page Not Found </span>
<NuxtLink to="/" class="btn mt-5 text-xl"> Return Home </NuxtLink>
</h1>
</template>
9 changes: 5 additions & 4 deletions frontend/pages/tools.vue
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
<DetailAction @action="modals.import = true">
<template #title> {{ $t("tools.import_export_set.import") }} </template>
<!-- eslint-disable-next-line vue/no-v-html -->
<div v-html="$t('tools.import_export_set.import_sub')"></div>
<div v-html="DOMPurify.sanitize($t('tools.import_export_set.import_sub'))"></div>
<template #button> {{ $t("tools.import_export_set.import_button") }} </template>
</DetailAction>
<DetailAction @action="getExportCSV()">
Expand All @@ -57,7 +57,7 @@
<span> {{ $t("tools.actions") }} </span>
<template #description>
<!-- eslint-disable-next-line vue/no-v-html -->
<div v-html="$t('tools.actions_sub')"></div>
<div v-html="DOMPurify.sanitize($t('tools.actions_sub'))"></div>
</template>
</BaseSectionHeader>
</template>
Expand All @@ -75,13 +75,13 @@
<DetailAction @action="resetItemDateTimes">
<template #title> {{ $t("tools.actions_set.zero_datetimes") }} </template>
<!-- eslint-disable-next-line vue/no-v-html -->
<div v-html="$t('tools.actions_set.zero_datetimes_sub')"></div>
<div v-html="DOMPurify.sanitize($t('tools.actions_set.zero_datetimes_sub'))"></div>
<template #button> {{ $t("tools.actions_set.zero_datetimes_button") }} </template>
</DetailAction>
<DetailAction @action="setPrimaryPhotos">
<template #title> {{ $t("tools.actions_set.set_primary_photo") }} </template>
<!-- eslint-disable-next-line vue/no-v-html -->
<div v-html="$t('tools.actions_set.set_primary_photo_sub')"></div>
<div v-html="DOMPurify.sanitize($t('tools.actions_set.set_primary_photo_sub'))"></div>
<template #button> {{ $t("tools.actions_set.set_primary_photo_button") }} </template>
</DetailAction>
</div>
Expand All @@ -91,6 +91,7 @@
</template>

<script setup lang="ts">
import DOMPurify from "dompurify";
import MdiFileChart from "~icons/mdi/file-chart";
import MdiArrowRight from "~icons/mdi/arrow-right";
import MdiDatabase from "~icons/mdi/database";
Expand Down
Loading