Skip to content

Commit

Permalink
fix: after context docs, some light fixes and cleanup (#6030)
Browse files Browse the repository at this point in the history
  • Loading branch information
elevatebart authored Nov 21, 2024
1 parent 5ad0fc3 commit 62fd559
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 243 deletions.
12 changes: 2 additions & 10 deletions ui/src/components/ContextInfoBar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,6 @@
const panelWidth = ref(640)
const panel = ref<HTMLElement | null>(null)
const activeTab = ref("")
const {startResizing, resizing} = useResizablePanel(activeTab)
Expand Down Expand Up @@ -70,12 +68,6 @@
return {startResizing, resizing}
}
function scrollToTop(){
if(panel.value) {
panel.value.scrollTop = 0
}
}
function setActiveTab(tab: string){
if(activeTab.value === tab){
activeTab.value = ""
Expand Down Expand Up @@ -120,12 +112,12 @@
<span class="commitNumber">{{ configs?.commitId }}</span>
</el-tooltip>
</div>
<div ref="panel" class="panelWrapper" :class="{panelTabResizing: resizing}" :style="{width: activeTab?.length ? `${panelWidth}px` : 0}">
<div class="panelWrapper" :class="{panelTabResizing: resizing}" :style="{width: activeTab?.length ? `${panelWidth}px` : 0}">
<div :style="{overflow: 'hidden', width:`${panelWidth}px`}">
<button v-if="activeTab.length" class="closeButton" @click="activeTab = ''">
<Close />
</button>
<ContextDocs v-if="activeTab === 'docs'" @update:doc-path="scrollToTop" />
<ContextDocs v-if="activeTab === 'docs'" />
<ContextNews v-else-if="activeTab === 'news'" />
<template v-else>
{{ activeTab }}
Expand Down
8 changes: 4 additions & 4 deletions ui/src/components/docs/ContextDocs.vue
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@
const store = useStore();
const {t} = useI18n();
const docWrapper = ref<HTMLDivElement | null>(null);
const pageMetadata = computed(() => store.getters["doc/pageMetadata"]);
const docPath = computed(() => store.getters["doc/docPath"]);
const routeInfo = computed(() => ({
title: pageMetadata.value?.title ?? t("docs"),
}))
const emit = defineEmits(["update:docPath"]);
onUnmounted(() => {
ast.value = undefined
store.commit("doc/setDocPath", undefined);
Expand All @@ -42,7 +42,7 @@
watch(docPath, async (val) => {
refreshPage(val);
nextTick(() => {
emit("update:docPath", val);
docWrapper.value?.scrollTo(0, 0);
});
}, {immediate: true});
Expand All @@ -58,7 +58,7 @@
</script>

<template>
<div class="docWrapper">
<div class="docWrapper" ref="docWrapper">
<h2 class="docTitle">
<router-link
:to="{
Expand Down
8 changes: 7 additions & 1 deletion ui/src/components/layout/ContextNews.vue
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@

<template>
<div class="allContextNews">
<h3>{{ t("feeds.title") }}</h3>
<h2 class="newsTitle">
{{ t("feeds.title") }}
</h2>
<el-divider style="margin: var(--spacer) 0;" />
<div class="post" :class="{lastPost: index === 0, expanded: expanded[feed.id]}" v-for="(feed, index) in feeds" :key="feed.id">
<div v-if="feed.image" class="mr-2">
Expand Down Expand Up @@ -70,6 +72,10 @@
padding: var(--spacer);
}
.newsTitle{
font-size: 18px;
}
.post {
h5 {
font-weight: medium;
Expand Down
153 changes: 0 additions & 153 deletions ui/src/components/layout/News.vue

This file was deleted.

75 changes: 0 additions & 75 deletions ui/src/components/layout/TopNavBar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -33,67 +33,6 @@
</div>
<slot name="additional-right" />
<div class="d-flex fixed-buttons icons">
<el-dropdown popper-class="">
<el-button class="no-focus dropdown-button">
<HelpBox />
</el-button>
<template #dropdown>
<el-dropdown-menu>
<a
href="https://kestra.io/slack?utm_source=app&utm_campaign=slack&utm_content=top-nav-bar"
target="_blank"
class="d-flex gap-2 el-dropdown-menu__item"
>
<HelpBox class="align-middle" /> {{ $t("live help") }}
</a>
<a
v-if="tourEnabled"
@click="restartGuidedTour"
class="d-flex gap-2 el-dropdown-menu__item"
>
<ProgressQuestion class="align-middle" /> {{ $t('Reset guided tour') }}
</a>

<router-link
class="d-flex gap-2 el-dropdown-menu__item"
:to="{name: 'docs/view'}"
>
<BookMultipleOutline class="align-middle" /> {{ $t("documentation.documentation") }}
</router-link>

<a
href="https://github.com/kestra-io/kestra/issues"
target="_blank"
class="d-flex gap-2 el-dropdown-menu__item"
>
<Github class="align-middle" /> {{ $t("documentation.github") }}
</a>
<a
href="https://kestra.io/slack?utm_source=app&utm_campaign=slack&utm_content=top-nav-bar"
target="_blank"
class="d-flex gap-2 el-dropdown-menu__item"
>
<Slack class="align-middle" /> {{ $t("join community") }}
</a>
<a
href="https://kestra.io/demo?utm_source=app&utm_campaign=sales&utm_content=top-nav-bar"
target="_blank"
class="d-flex gap-2 el-dropdown-menu__item"
>
<EmailHeartOutline class="align-middle" /> {{ $t("reach us") }}
</a>
<a
v-if="version"
:href="version.url"
target="_blank"
class="d-flex gap-2 el-dropdown-menu__item"
>
<Update class="align-middle text-danger" /> <span class="text-danger">{{ $t("new version", {"version": version.latest}) }}</span>
</a>
</el-dropdown-menu>
</template>
</el-dropdown>

<impersonating />
<auth />
</div>
Expand All @@ -105,13 +44,6 @@
import {mapState, mapGetters} from "vuex";
import Auth from "override/components/auth/Auth.vue";
import Impersonating from "override/components/auth/Impersonating.vue";
import HelpBox from "vue-material-design-icons/HelpBox.vue";
import BookMultipleOutline from "vue-material-design-icons/BookMultipleOutline.vue";
import Github from "vue-material-design-icons/Github.vue";
import Slack from "vue-material-design-icons/Slack.vue";
import EmailHeartOutline from "vue-material-design-icons/EmailHeartOutline.vue";
import Update from "vue-material-design-icons/Update.vue";
import ProgressQuestion from "vue-material-design-icons/ProgressQuestion.vue";
import GlobalSearch from "./GlobalSearch.vue";
import TrashCan from "vue-material-design-icons/TrashCan.vue";
import StarOutlineIcon from "vue-material-design-icons/StarOutline.vue";
Expand All @@ -121,13 +53,6 @@
export default {
components: {
Auth,
HelpBox,
BookMultipleOutline,
Github,
Slack,
EmailHeartOutline,
Update,
ProgressQuestion,
GlobalSearch,
TrashCan,
Impersonating
Expand Down

0 comments on commit 62fd559

Please sign in to comment.