From 348d1d0f322ca57c459acd902f54821d687ca804 Mon Sep 17 00:00:00 2001 From: Anbraten <6918444+anbraten@users.noreply.github.com> Date: Mon, 28 Oct 2024 21:15:05 +0100 Subject: [PATCH] Migrate vue components to setup (#32329) Migrated a handful Vue components to the `setup` syntax using composition api as it has better Typescript support and is becoming the new default in the Vue ecosystem. - [x] ActionRunStatus.vue - [x] ActivityHeatmap.vue - [x] ContextPopup.vue - [x] DiffFileList.vue - [x] DiffFileTree.vue - [x] DiffFileTreeItem.vue - [x] PullRequestMergeForm.vue - [x] RepoActivityTopAuthors.vue - [x] RepoCodeFrequency.vue - [x] RepoRecentCommits.vue - [x] ScopedAccessTokenSelector.vue Left some larger components untouched for now to not go to crazy in this single PR: - [ ] DiffCommitSelector.vue - [ ] RepoActionView.vue - [ ] RepoContributors.vue - [ ] DashboardRepoList.vue - [ ] RepoBranchTagSelector.vue --- web_src/js/components/ActionRunStatus.vue | 34 +-- web_src/js/components/ActivityHeatmap.vue | 96 ++++--- web_src/js/components/ContextPopup.vue | 156 ++++++------ web_src/js/components/DiffFileList.vue | 68 ++--- web_src/js/components/DiffFileTree.vue | 238 +++++++++--------- web_src/js/components/DiffFileTreeItem.vue | 58 +++-- .../js/components/PullRequestMergeForm.vue | 150 +++++------ .../js/components/RepoActivityTopAuthors.vue | 106 ++++---- web_src/js/components/RepoCodeFrequency.vue | 205 ++++++++------- web_src/js/components/RepoRecentCommits.vue | 169 +++++++------ .../components/ScopedAccessTokenSelector.vue | 116 ++++----- web_src/js/features/repo-common.ts | 9 + web_src/js/index.ts | 3 +- web_src/js/types.ts | 10 + web_src/js/utils/time.ts | 4 +- 15 files changed, 708 insertions(+), 714 deletions(-) diff --git a/web_src/js/components/ActionRunStatus.vue b/web_src/js/components/ActionRunStatus.vue index 5181c2c475..558b881dfe 100644 --- a/web_src/js/components/ActionRunStatus.vue +++ b/web_src/js/components/ActionRunStatus.vue @@ -2,31 +2,21 @@ Please also update the template file above if this vue is modified. action status accepted: success, skipped, waiting, blocked, running, failure, cancelled, unknown --> - +