Skip to content

Commit

Permalink
🐛 fix: update sorting on updated time (#121)
Browse files Browse the repository at this point in the history
* 🐛 fix: update sorting on updated time

* ⚰️ chore: remove yarn.lock

* 💄 style: uipdate profile ui
  • Loading branch information
megasanjay authored Dec 14, 2024
1 parent 696fe3b commit 1ca6f1d
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 7 deletions.
3 changes: 1 addition & 2 deletions ui/error.vue
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,7 @@ if (props.error) {
} catch (error) {
console.error("Redirection error:", error);
}
}
else {
} else {
push.error({
title: "Something went wrong",
});
Expand Down
11 changes: 7 additions & 4 deletions ui/pages/profile.vue
Original file line number Diff line number Diff line change
Expand Up @@ -53,17 +53,20 @@ const purgeTokens = async () => {
</p>
</n-card>

<n-card title="Purge tokens">
<p class="m-0">
This will remove all tokens associated with your account.
<n-card title="Purge Tokens">
<n-flex justify="space-between">
<p class="">
This will remove all Zenodo and GitHub tokens associated with your
account.
</p>

<n-button type="error" @click="purgeTokens">
<template #icon>
<Icon name="fa:trash" size="16" />
</template>
Purge tokens
</n-button>
</p>
</n-flex>
</n-card>
</n-flex>
</section>
Expand Down
3 changes: 3 additions & 0 deletions ui/server/api/dashboard/[owner]/index.get.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ export default defineEventHandler(async (event) => {

// Get all installations for the owner
const installations = await prisma.installation.findMany({
orderBy: {
updated_at: "desc",
},
where: {
owner,
},
Expand Down
4 changes: 3 additions & 1 deletion ui/server/routes/login/github/callback.get.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,9 @@ export default defineEventHandler(async (event) => {

return sendRedirect(
event,
requestedRedirect ? decodeURIComponent(requestedRedirect) : "/",
requestedRedirect
? decodeURIComponent(requestedRedirect)
: `/dashboard/${githubUser.login}`,
);
}

Expand Down

0 comments on commit 1ca6f1d

Please sign in to comment.