Skip to content

Commit

Permalink
feat: new plugins & subgroups homepages
Browse files Browse the repository at this point in the history
closes #1503
  • Loading branch information
brian-mulier-p committed Feb 18, 2025
1 parent d8fac10 commit 8dc2039
Show file tree
Hide file tree
Showing 16 changed files with 469 additions and 393 deletions.
4 changes: 4 additions & 0 deletions app.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@
import DefaultLayout from "~/layouts/default.vue";
import "@kestra-io/ui-libs/style.css";
String.prototype.capitalize = function () {
return this.charAt(0).toUpperCase() + this.slice(1)
}
useHead({
htmlAttrs: {
lang: "en",
Expand Down
1 change: 1 addition & 0 deletions assets/styles/docs.scss
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ $bd-gutter-x: 3rem;

h4 {
padding-top: 1rem;
color: $white;
font-size: $h5-font-size;
}

Expand Down
1 change: 1 addition & 0 deletions assets/styles/theme.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
#{--kestra-io-token-color-background-primary}: #111113;
#{--kestra-io-token-color-background-hover-primary}: #404559;
#{--kestra-io-token-color-background-secondary}: #161617;
#{--tokens-border-border-active}: #8405FF;
#{--kestra-io-token-color-border-primary}: #3D3D3F;
#{--kestra-io-token-color-border-secondary}: #252526;
#{--kestra-io-token-color-white}: #FFFFFF;
Expand Down
4 changes: 0 additions & 4 deletions components/blueprints/ListCard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,6 @@
</NuxtLink>
</template>

<script setup>
import {slugify} from "~/utils/url.js";
</script>

<script>
export default {
props: {
Expand Down
8 changes: 6 additions & 2 deletions components/plugins/PluginCard.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<NuxtLink :href="`/plugins/${plugin.name}`">
<NuxtLink :href="href">
<div class="plugin d-flex align-items-center gap-2 bg-dark-2" ref="root" data-bs-toogle="tooltip"
data-bs-html="true" data-bs-custom-class="plugin-tooltip" :data-bs-original-title="plugin.tooltipContent">
<div class="icon-content">
Expand All @@ -12,7 +12,9 @@
</NuxtLink>
</template>
<script setup>
const {$bootstrap} = useNuxtApp()
import {slugify} from "@kestra-io/ui-libs"
const {$bootstrap} = useNuxtApp();
const props = defineProps({
plugin: {
type: Object,
Expand All @@ -26,6 +28,8 @@
const root = ref(null);
const href = `/plugins/${props.plugin.name}${props.plugin.subGroup === undefined ? '' : ('/' + slugify(props.plugin.title))}`
onMounted(() => {
if (process.client) {
new $bootstrap.Tooltip(root.value, {
Expand Down
2 changes: 1 addition & 1 deletion components/stories/Card.vue
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
</template>

<script setup>
import {slugify} from "~/utils/url.js";
import {slugify} from "@kestra-io/ui-libs";
defineProps({
story: {
Expand Down
2 changes: 1 addition & 1 deletion components/stories/RowCard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
</template>

<script setup>
import {slugify} from "~/utils/url.js";
import {slugify} from "@kestra-io/ui-libs";
const props = defineProps({
story: {
Expand Down
4 changes: 2 additions & 2 deletions middleware/redirect.global.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ export default function ({ route, redirect }) {

plugins.forEach(plugin => {
plugin.taskRunners.forEach(taskRunner => {
const standardPath = `/plugins/plugin-${plugin.base}/task-runners/io.kestra.plugin.${plugin.base}.runner.${taskRunner}`;
const eePath = `/plugins/plugin-ee-${plugin.base}/task-runners/io.kestra.plugin.ee.${plugin.base}.runner.${taskRunner}`;
const standardPath = `/plugins/plugin-${plugin.base}/io.kestra.plugin.${plugin.base}.runner.${taskRunner}`;
const eePath = `/plugins/plugin-ee-${plugin.base}/io.kestra.plugin.ee.${plugin.base}.runner.${taskRunner}`;

if (route?.path === standardPath) {
return redirect(eePath);
Expand Down
67 changes: 34 additions & 33 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"analyze": "nuxt analyze"
},
"dependencies": {
"@kestra-io/ui-libs": "^0.0.136",
"@kestra-io/ui-libs": "^0.0.141",
"@popperjs/core": "^2.11.8",
"@rive-app/canvas": "^2.26.1",
"@vue-flow/background": "^1.3.2",
Expand Down
Loading

0 comments on commit 8dc2039

Please sign in to comment.