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),
prBodyTemplate: pullRequestTemplateBody,
userToken: $user.access_token,
onToken: (t) => {
onToken: async (t) => {
if (firstToken) {
inputBody = '';
firstToken = false;
}
inputBody += t;
inputBody = '';
}
});

View File

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

View File

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