-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: added what's new to highlight new feature releases
- Loading branch information
Showing
8 changed files
with
81 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
<script setup lang="ts"> | ||
import { | ||
Dialog, | ||
DialogContent, | ||
DialogHeader, | ||
DialogTitle, | ||
} from "@/components/ui/dialog"; | ||
import { injectStrict } from "@/lib/utils"; | ||
import { SettingsContextStateKey } from "@/providers/SettingsContextProvider"; | ||
import { getVersion } from "@tauri-apps/api/app"; | ||
import metadata from "@/components/whats-new/metadata.json"; | ||
const { settings } = injectStrict(SettingsContextStateKey); | ||
const shouldShowWhatsNew = ref(false); | ||
const currentVersion = ref<string | null>(null); | ||
const whatsNewComponent = ref<any>(null); | ||
onMounted(async () => { | ||
const lastSeenVersion = settings.value.updates.whatsNew; | ||
currentVersion.value = await getVersion(); | ||
if ( | ||
lastSeenVersion !== currentVersion.value && | ||
Object.keys(metadata).includes(currentVersion.value) | ||
) { | ||
whatsNewComponent.value = defineAsyncComponent( | ||
// eslint-disable-next-line security/detect-object-injection | ||
() => | ||
import( | ||
`@/components/whats-new/${ | ||
metadata[currentVersion.value as keyof typeof metadata] | ||
}.vue` | ||
) | ||
); | ||
shouldShowWhatsNew.value = true; | ||
} | ||
}); | ||
const storeLatestWhatsNew = (open: boolean) => { | ||
if (!open) { | ||
settings.value.updates.whatsNew = currentVersion.value; | ||
shouldShowWhatsNew.value = false; | ||
} | ||
}; | ||
</script> | ||
<template> | ||
<Dialog :open="shouldShowWhatsNew" @update:open="storeLatestWhatsNew"> | ||
<DialogContent class="min-w-[700px]"> | ||
<DialogHeader> | ||
<DialogTitle>What's new in JET Pilot {{ currentVersion }}</DialogTitle> | ||
</DialogHeader> | ||
<component :is="whatsNewComponent" /> | ||
</DialogContent> | ||
</Dialog> | ||
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,9 @@ | ||
<script setup lang="ts"> | ||
import { DialogRoot, type DialogRootProps } from "radix-vue"; | ||
const props = defineProps<DialogRootProps>(); | ||
import { DialogRoot } from "radix-vue"; | ||
</script> | ||
|
||
<template> | ||
<DialogRoot v-bind="props"> | ||
<DialogRoot> | ||
<slot /> | ||
</DialogRoot> | ||
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<template> | ||
<div> | ||
<img | ||
src="@/assets/whats-new/port-forwarding.gif" | ||
alt="Port Forwarding" | ||
class="w-full rounded-lg" | ||
/> | ||
<h1 class="font-bold mt-5">Port Forwarding</h1> | ||
<p class="text-sm"> | ||
You can now forward ports from Pods, Deployments and Services to your | ||
local machine. | ||
</p> | ||
</div> | ||
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"1.29.0": "1-29-0" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters