Compare commits

...

2 Commits

Author SHA1 Message Date
Zack Spear
eeb1340517 refactor: header os version async viewReleaseNotes 2023-12-21 13:24:16 -05:00
Zack Spear
05b681cd86 feat: create WebguiCheckForOsUpdate endpoint & prep viewReleaseNotes to trigger it 2023-12-21 13:24:16 -05:00
2 changed files with 21 additions and 1 deletions

View File

@@ -1,4 +1,7 @@
<script lang="ts" setup>
/**
* @todo run the unraidcheck when opening the changelog
*/
import {
BellAlertIcon,
ExclamationTriangleIcon,
@@ -10,6 +13,7 @@ import { useI18n } from 'vue-i18n';
import 'tailwindcss/tailwind.css';
import '~/assets/main.css';
// import { WebguiCheckForOsUpdate } from '~/composables/services/webgui';
import { WEBGUI_TOOLS_DOWNGRADE, WEBGUI_TOOLS_UPDATE } from '~/helpers/urls';
import { useServerStore } from '~/store/server';
import { useUpdateOsStore } from '~/store/updateOs';
@@ -36,6 +40,15 @@ const rebootRequiredLink = computed(() => {
}
return '';
});
const viewReleaseNotes = async () => {
await updateOsActionsStore.viewReleaseNotes(t('{0} Release Notes', [osVersion.value]));
// try {
// await WebguiCheckForOsUpdate.get();
// } catch (error) {
// console.error('[WebguiCheckForOsUpdate] error', error);
// }
};
</script>
<template>
@@ -43,7 +56,7 @@ const rebootRequiredLink = computed(() => {
<button
class="group leading-none"
:title="t('View release notes')"
@click="updateOsActionsStore.viewReleaseNotes(t('{0} Release Notes', [osVersion]))"
@click="viewReleaseNotes"
>
<UiBadge
color="custom"

View File

@@ -35,6 +35,13 @@ export const WebguiUpdateDns = request.url('/webGui/include/UpdateDNS.php');
* @type GET
*/
export const WebguiState = request.url('/plugins/dynamix.my.servers/data/server-state.php');
/**
* @name WebguiCheckForOsUpdate
* @description used to check for OS updates in the background…will send a notification in unraid if an update is available
* @type GET
* @todo this doesn't seem to work…
*/
export const WebguiCheckForOsUpdate = request.url('/plugins/dynamix.plugin.manager/scripts/unraidcheck');
/**
* Run unraid-api command's via php requests
*/