mirror of
https://github.com/Drop-OSS/drop.git
synced 2025-11-13 00:02:37 +10:00
Various bug fixes (#102)
* feat: set lang in html head * fix: add # in front of git ref * fix: remove unused vars from example env * fix: package name and license field * fix: enable sourcemap for client and server * fix: emojis not showing in prod this is extremely cursed, but it works * chore: refactor auth manager * feat: disable invitations if simple auth disabled * feat: add drop version to footer * feat: translate auth endpoints * chore: move oidc module * feat: add weekly tasks enabled object cleanup as weekly task * feat: add timestamp to task log msgs * feat: add guard to prevent invalid progress % * fix: add missing global scope to i18n components * feat: set base url for i18n * feat: switch task log to json format * ci: run ci on develop branch only * fix: UserWidget text not updating #109 * fix: EXTERNAL_URL being computed at build * feat: add basic language outlines for translation * feat: add more english dialects
This commit is contained in:
@ -14,7 +14,11 @@
|
||||
to="/admin/library/sources"
|
||||
class="block rounded-md bg-blue-600 px-3 py-2 text-center text-sm font-semibold text-white shadow-sm transition-all duration-200 hover:bg-blue-500 hover:scale-105 hover:shadow-lg hover:shadow-blue-500/25 active:scale-95 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-blue-600"
|
||||
>
|
||||
<i18n-t keypath="library.admin.sources.link" tag="span">
|
||||
<i18n-t
|
||||
keypath="library.admin.sources.link"
|
||||
tag="span"
|
||||
scope="global"
|
||||
>
|
||||
<template #arrow>
|
||||
<span aria-hidden="true">{{ $t("chars.arrow") }}</span>
|
||||
</template>
|
||||
@ -39,7 +43,11 @@
|
||||
href="/admin/library/import"
|
||||
class="whitespace-nowrap font-medium text-blue-400 hover:text-blue-500"
|
||||
>
|
||||
<i18n-t keypath="library.admin.import.link" tag="span">
|
||||
<i18n-t
|
||||
keypath="library.admin.import.link"
|
||||
tag="span"
|
||||
scope="global"
|
||||
>
|
||||
<template #arrow>
|
||||
<span aria-hidden="true">{{ $t("chars.arrow") }}</span>
|
||||
</template>
|
||||
@ -140,7 +148,11 @@
|
||||
:href="`/admin/library/${game.id}/import`"
|
||||
class="whitespace-nowrap font-medium text-blue-400 hover:text-blue-500"
|
||||
>
|
||||
<i18n-t keypath="library.admin.import.link" tag="span">
|
||||
<i18n-t
|
||||
keypath="library.admin.import.link"
|
||||
tag="span"
|
||||
scope="global"
|
||||
>
|
||||
<template #arrow>
|
||||
<span aria-hidden="true">{{ $t("chars.arrow") }}</span>
|
||||
</template>
|
||||
|
||||
@ -54,7 +54,9 @@
|
||||
<div
|
||||
class="relative bg-zinc-950/50 rounded-md p-2 text-zinc-100 h-[80vh] overflow-y-scroll"
|
||||
>
|
||||
<pre v-for="(line, idx) in task.log" :key="idx">{{ line }}</pre>
|
||||
<pre v-for="(line, idx) in task.log" :key="idx">{{
|
||||
formatLine(line)
|
||||
}}</pre>
|
||||
</div>
|
||||
</div>
|
||||
<div v-else role="status" class="w-full flex items-center justify-center">
|
||||
@ -88,6 +90,11 @@ const taskId = route.params.id.toString();
|
||||
|
||||
const task = useTask(taskId);
|
||||
|
||||
function formatLine(line: string): string {
|
||||
const res = parseTaskLog(line);
|
||||
return `[${res.timestamp}] ${res.message}`;
|
||||
}
|
||||
|
||||
definePageMeta({
|
||||
layout: "admin",
|
||||
});
|
||||
|
||||
@ -115,7 +115,7 @@
|
||||
{{ task.id }}
|
||||
</p>
|
||||
<p class="mt-1 truncate text-sm text-zinc-400">
|
||||
{{ task.log.at(-1) }}
|
||||
{{ parseTaskLog(task.log.at(-1) ?? "").message }}
|
||||
</p>
|
||||
<NuxtLink
|
||||
type="button"
|
||||
@ -151,11 +151,34 @@
|
||||
<div class="flex-1">
|
||||
<div class="flex items-center space-x-2">
|
||||
<h3 class="text-sm font-medium text-zinc-100">
|
||||
{{ dailyScheduledTasks[task].name }}
|
||||
{{ scheduledTasks[task].name }}
|
||||
</h3>
|
||||
</div>
|
||||
<p class="mt-1 text-sm text-zinc-400">
|
||||
{{ dailyScheduledTasks[task].description }}
|
||||
{{ scheduledTasks[task].description }}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
<h2 class="text-sm font-medium text-zinc-400 mt-8">
|
||||
{{ $t("tasks.admin.weeklyScheduledTitle") }}
|
||||
</h2>
|
||||
<ul role="list" class="mt-4 grid grid-cols-1 lg:grid-cols-2 gap-6">
|
||||
<li
|
||||
v-for="task in weeklyTasks"
|
||||
:key="task"
|
||||
class="col-span-1 divide-y divide-gray-200 rounded-lg bg-zinc-800 border border-zinc-700 shadow-sm"
|
||||
>
|
||||
<div class="flex w-full items-center justify-between space-x-6 p-6">
|
||||
<div class="flex-1">
|
||||
<div class="flex items-center space-x-2">
|
||||
<h3 class="text-sm font-medium text-zinc-100">
|
||||
{{ scheduledTasks[task].name }}
|
||||
</h3>
|
||||
</div>
|
||||
<p class="mt-1 text-sm text-zinc-400">
|
||||
{{ scheduledTasks[task].description }}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
@ -179,12 +202,12 @@ definePageMeta({
|
||||
|
||||
const { t } = useI18n();
|
||||
|
||||
const { runningTasks, historicalTasks, dailyTasks } =
|
||||
const { runningTasks, historicalTasks, dailyTasks, weeklyTasks } =
|
||||
await $dropFetch("/api/v1/admin/task");
|
||||
|
||||
const liveRunningTasks = await Promise.all(runningTasks.map((e) => useTask(e)));
|
||||
|
||||
const dailyScheduledTasks: {
|
||||
const scheduledTasks: {
|
||||
[key in TaskGroup]: { name: string; description: string };
|
||||
} = {
|
||||
"cleanup:invitations": {
|
||||
|
||||
Reference in New Issue
Block a user