More PR details follow-ups (#5073)

- Add a dedicated 'open PR in browser' button
- Fix the description generation in the modal
This commit is contained in:
Esteban Vega 2024-10-10 00:02:01 +02:00 committed by GitHub
parent e28a4b697c
commit 857cf7816c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 22 additions and 12 deletions

View File

@ -236,12 +236,12 @@
commitMessages: commits.map((c) => c.description), commitMessages: commits.map((c) => c.description),
prBodyTemplate: pullRequestTemplateBody, prBodyTemplate: pullRequestTemplateBody,
userToken: $user.access_token, userToken: $user.access_token,
onToken: (t) => { onToken: async (t) => {
if (firstToken) { if (firstToken) {
inputBody = '';
firstToken = false; firstToken = false;
} }
inputBody += t; inputBody += t;
inputBody = '';
} }
}); });

View File

@ -203,16 +203,21 @@
style="ghost" style="ghost"
outline outline
icon="description-small" icon="description-small"
onclick={(e: MouseEvent) => { onclick={() => {
if (e.ctrlKey || e.metaKey) {
openExternalUrl($pr.htmlUrl);
return;
}
prDetailsModal?.show(); prDetailsModal?.show();
}} }}
> >
PR details PR details
</Button> </Button>
<Button
icon="open-link"
size="tag"
style="ghost"
outline
onclick={() => {
openExternalUrl($pr.htmlUrl);
}}
/>
<Button <Button
icon="update-small" icon="update-small"
size="tag" size="tag"

View File

@ -206,16 +206,21 @@
style="ghost" style="ghost"
outline outline
icon="description-small" icon="description-small"
onclick={(e: MouseEvent) => { onclick={() => {
if (e.ctrlKey || e.metaKey) {
openExternalUrl(pr.htmlUrl);
return;
}
prDetailsModal?.show(); prDetailsModal?.show();
}} }}
> >
PR details PR details
</Button> </Button>
<Button
icon="open-link"
size="tag"
style="ghost"
outline
onclick={() => {
openExternalUrl(pr.htmlUrl);
}}
/>
<Button <Button
icon="update-small" icon="update-small"
size="tag" size="tag"