Skip to content

Commit

Permalink
Added github issue render UI
Browse files Browse the repository at this point in the history
  • Loading branch information
Shubham Sharma committed Dec 2, 2023
1 parent c71f05a commit 914c566
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 1 deletion.
6 changes: 6 additions & 0 deletions taskRequests/details/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,12 @@
<script src="/taskRequests/constants.js"></script>
<script src="/utils/time/index.js"></script>
<script src="/taskRequests/details/script.js" defer></script>
<script
src="https://cdnjs.cloudflare.com/ajax/libs/showdown/2.1.0/showdown.min.js"
integrity="sha512-LhccdVNGe2QMEfI3x4DVV3ckMRe36TfydKss6mJpdHjNFiV07dFpS2xzeZedptKZrwxfICJpez09iNioiSZ3hA=="
crossorigin="anonymous"
referrerpolicy="no-referrer"
></script>
</head>
<body>
<div class="header">
Expand Down
11 changes: 10 additions & 1 deletion taskRequests/details/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,16 @@ const renderTaskRequest = async () => {
taskRequestSkeleton.classList.add('hidden');
renderRejectButton(taskRequest);
renderTaskRequestDetails(taskRequest);
renderTaskDetails(taskRequest);

if (taskRequest?.requestType === 'CREATION') {
converter = new showdown.Converter();
text = await fetch(taskRequest?.externalIssueUrl);
text = await text.json();
html = converter.makeHtml(text?.body);
taskContainer.innerHTML = html;
} else if (taskRequest?.requestType === 'ASSIGNMENT') {
renderTaskDetails(taskRequest);
}
renderRequestors(taskRequest);
} catch (e) {
console.error(e);
Expand Down
6 changes: 6 additions & 0 deletions taskRequests/details/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -450,3 +450,9 @@ p:hover {
background-color: rgba(0, 0, 0, 0.5);
display: none;
}

#task-details img {
max-width: 100%;
border: 1px solid #78716c;
border-radius: 0.5rem;
}

0 comments on commit 914c566

Please sign in to comment.