Skip to content
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
1 change: 1 addition & 0 deletions eslint.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -924,6 +924,7 @@ export default defineConfig([
'vue/html-closing-bracket-spacing': [2, {startTag: 'never', endTag: 'never', selfClosingTag: 'never'}],
'vue/max-attributes-per-line': [0],
'vue/singleline-html-element-content-newline': [0],
'vue/require-typed-ref': [2],
},
},
{
Expand Down
7 changes: 4 additions & 3 deletions web_src/js/components/ContextPopup.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,17 @@ 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,
loadIssueInfoUrl: string,
}>();

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'});
Expand All @@ -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) {
Expand Down
16 changes: 11 additions & 5 deletions web_src/js/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,14 +52,20 @@ export type IssuePageInfo = {
};

export type Issue = {
id: number;
number: number;
title: string;
state: 'open' | 'closed';
id: number,
number: number,
title: string,
body: string,
state: 'open' | 'closed',
created_at: string,
pull_request?: {
draft: boolean;
merged: boolean;
};
},
repository: {
full_name: string,
},
labels: Array<string>,
};

export type FomanticInitFunction = {
Expand Down