File tree Expand file tree Collapse file tree 3 files changed +6
-6
lines changed
plugins/search/plugin-docsearch/src/client/utils
themes/theme-default/src/client/composables
tools/shiki-twoslash/src/client Expand file tree Collapse file tree 3 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ export const getSearchButtonTemplate = ({
1212 buttonText = 'Search' ,
1313 buttonAriaLabel = buttonText ,
1414} : DocSearchTranslation [ 'button' ] = { } ) : string => {
15- const isApple = __VUEPRESS_SSR__ ? false : isMacOS ( ) || isiPad ( ) || isiPhone ( )
15+ const isApple = ! __VUEPRESS_SSR__ && ( isMacOS ( ) || isiPad ( ) || isiPhone ( ) )
1616
1717 return `<button type="button" aria-label="${ buttonAriaLabel } " aria-keyshortcuts="${ isApple ? 'Command' : 'Control' } +k" class="DocSearch DocSearch-Button"><span class="DocSearch-Button-Container"><svg width="20" height="20" viewBox="0 0 24 24" aria-hidden="true" class="DocSearch-Search-Icon"><circle cx="11" cy="11" r="8" stroke="currentColor" fill="none" stroke-width="1.4"></circle><path d="m21 21-4.3-4.3" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"></path></svg><span class="DocSearch-Button-Placeholder">${ buttonText } </span></span><span class="DocSearch-Button-Keys"><kbd class="DocSearch-Button-Key ${ isApple ? '' : 'DocSearch-Button-Key--ctrl' } ">${ isApple ? '⌘' : 'Ctrl' } </kbd><kbd class="DocSearch-Button-Key">K</kbd></span></button>`
1818}
Original file line number Diff line number Diff line change @@ -187,10 +187,10 @@ export const setupSidebarItems = (): void => {
187187 const headers = useHeaders ( )
188188 const routePath = useRoutePath ( )
189189
190- const sidebarConfig = computed < SidebarOptions | false > ( ( ) =>
191- frontmatter . value . home
192- ? false
193- : ( ( frontmatter . value as DefaultThemeNormalPageFrontmatter ) . sidebar ??
190+ const sidebarConfig = computed < SidebarOptions | false > (
191+ ( ) =>
192+ ! frontmatter . value . home &&
193+ ( ( frontmatter . value as DefaultThemeNormalPageFrontmatter ) . sidebar ??
194194 themeLocale . value . sidebar ??
195195 'heading' ) ,
196196 )
Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ import 'floating-vue/dist/style.css'
2323 * ```
2424 */
2525export const enhanceTwoslash = ( app : App ) : void => {
26- const isMobileDevice = __VUEPRESS_SSR__ ? false : isMobile ( )
26+ const isMobileDevice = ! __VUEPRESS_SSR__ && isMobile ( )
2727
2828 if ( ! __VUEPRESS_SSR__ ) {
2929 // Recompute poppers when clicking on a tab
You can’t perform that action at this time.
0 commit comments