|
|
|
|
@ -3,6 +3,7 @@ import {SvgIcon} from '../svg.ts';
|
|
|
|
|
import {GET} from '../modules/fetch.ts';
|
|
|
|
|
import {getIssueColor, getIssueIcon} from '../features/issue.ts';
|
|
|
|
|
import {computed, onMounted, shallowRef} from 'vue';
|
|
|
|
|
import type {Issue} from '../types.ts';
|
|
|
|
|
|
|
|
|
|
const props = defineProps<{
|
|
|
|
|
repoLink: string,
|
|
|
|
|
@ -10,9 +11,9 @@ const props = defineProps<{
|
|
|
|
|
}>();
|
|
|
|
|
|
|
|
|
|
const loading = shallowRef(false);
|
|
|
|
|
const issue = shallowRef(null);
|
|
|
|
|
const issue = shallowRef<Issue>(null);
|
|
|
|
|
const renderedLabels = shallowRef('');
|
|
|
|
|
const errorMessage = shallowRef(null);
|
|
|
|
|
const errorMessage = shallowRef('');
|
|
|
|
|
|
|
|
|
|
const createdAt = computed(() => {
|
|
|
|
|
return new Date(issue.value.created_at).toLocaleDateString(undefined, {year: 'numeric', month: 'short', day: 'numeric'});
|
|
|
|
|
@ -25,7 +26,7 @@ const body = computed(() => {
|
|
|
|
|
|
|
|
|
|
onMounted(async () => {
|
|
|
|
|
loading.value = true;
|
|
|
|
|
errorMessage.value = null;
|
|
|
|
|
errorMessage.value = '';
|
|
|
|
|
try {
|
|
|
|
|
const resp = await GET(props.loadIssueInfoUrl);
|
|
|
|
|
if (!resp.ok) {
|
|
|
|
|
|