Skip to content

Commit f450946

Browse files
committed
Merge branch 'develop' into oauth2
2 parents 1c8c8f0 + 7d31179 commit f450946

File tree

2 files changed

+13
-6
lines changed

2 files changed

+13
-6
lines changed

src/assets/main.css

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,3 +73,10 @@ main {
7373
font-size: 16px !important;
7474
}
7575

76+
code[class*='language-'],
77+
pre[class*='language-'],
78+
.content code,
79+
.content pre {
80+
color: #000000;
81+
}
82+

src/components/HeaderNav.vue

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ const headerLinksHoverColor = ref(headerLinksHoverColorSetting)
5858
const headerLinksBackgroundColor = ref(headerLinksBackgroundColorSetting)
5959
6060
const clearActiveTab = () => {
61-
const activeLinks = document.querySelectorAll('.router-link')
61+
const activeLinks = document.querySelectorAll<HTMLElement>('.router-link')
6262
for (const active of activeLinks) {
6363
// Skip login and logoff buttons
6464
if (active.id && active.id !== 'login' && active.id !== 'logoff') {
@@ -68,7 +68,7 @@ const clearActiveTab = () => {
6868
}
6969
}
7070
71-
const setActive = (target) => {
71+
const setActive = (target: HTMLElement | null) => {
7272
if (target) {
7373
clearActiveTab()
7474
target.style.backgroundColor = headerLinksBackgroundColor.value
@@ -102,11 +102,11 @@ onMounted(async () => {
102102
})
103103
104104
watchEffect(() => {
105-
const path = route.name
106-
if (path && route.params && !route.params.id) {
107-
setActive(document.getElementById('header-nav-' + path))
105+
const routeName = typeof route.name === 'string' ? route.name : null
106+
if (routeName && route.params && !route.params.id) {
107+
setActive(document.getElementById(`header-nav-${routeName}`))
108108
} else {
109-
if (path == 'message-docs') {
109+
if (routeName === 'message-docs') {
110110
clearActiveTab()
111111
} else {
112112
setActive(document.getElementById('header-nav-tags'))

0 commit comments

Comments
 (0)