diff --git a/ui/components.d.ts b/ui/components.d.ts index 3153f64b..01eda1f3 100644 --- a/ui/components.d.ts +++ b/ui/components.d.ts @@ -17,23 +17,18 @@ declare module 'vue' { NCheckbox: typeof import('naive-ui')['NCheckbox'] NCollapse: typeof import('naive-ui')['NCollapse'] NCollapseItem: typeof import('naive-ui')['NCollapseItem'] - NCollapseTransition: typeof import('naive-ui')['NCollapseTransition'] - NDatePicker: typeof import('naive-ui')['NDatePicker'] NDivider: typeof import('naive-ui')['NDivider'] NDropdown: typeof import('naive-ui')['NDropdown'] - NDynamicInput: typeof import('naive-ui')['NDynamicInput'] NFlex: typeof import('naive-ui')['NFlex'] NForm: typeof import('naive-ui')['NForm'] NFormItem: typeof import('naive-ui')['NFormItem'] NInput: typeof import('naive-ui')['NInput'] NModal: typeof import('naive-ui')['NModal'] - NPopconfirm: typeof import('naive-ui')['NPopconfirm'] NPopover: typeof import('naive-ui')['NPopover'] NRadio: typeof import('naive-ui')['NRadio'] NRadioButton: typeof import('naive-ui')['NRadioButton'] NRadioGroup: typeof import('naive-ui')['NRadioGroup'] NSelect: typeof import('naive-ui')['NSelect'] - NSpace: typeof import('naive-ui')['NSpace'] NSpin: typeof import('naive-ui')['NSpin'] NTag: typeof import('naive-ui')['NTag'] NTooltip: typeof import('naive-ui')['NTooltip'] diff --git a/ui/pages/dashboard/[owner]/[repo]/release/zenodo.vue b/ui/pages/dashboard/[owner]/[repo]/release/zenodo.vue index c6c120a2..9ea2f189 100644 --- a/ui/pages/dashboard/[owner]/[repo]/release/zenodo.vue +++ b/ui/pages/dashboard/[owner]/[repo]/release/zenodo.vue @@ -500,6 +500,25 @@ const validateZenodoForm = () => { }); }; +const loginToZenodo = async () => { + // Send api request to purge the Zenodo token + await $fetch(`/api/user/zenodo`, { + headers: useRequestHeaders(["cookie"]), + method: "DELETE", + }) + .then(() => { + // Redirect to the Zenodo login page + window.location.href = zenodoLoginUrl.value; + }) + .catch((error) => { + console.error("Failed to purge Zenodo token:", error); + push.error({ + title: "Failed to purge Zenodo token", + message: "Please try again later", + }); + }); +} + const githubReleaseInterval = ref(null); onMounted(() => { @@ -760,7 +779,7 @@ onBeforeUnmount(() => { login to Zenodo to continue.

- +