forked from Mirrors/elk
Compare commits
9 commits
main
...
feat/explo
Author | SHA1 | Date | |
---|---|---|---|
|
6381bcfb4a | ||
|
e343b0a61a | ||
|
4832124659 | ||
|
4ee298d563 | ||
|
868c5f5d2b | ||
|
72dc3617dd | ||
|
4d30e80751 | ||
|
07ea1a8152 | ||
|
2bdbb4fdf4 |
11 changed files with 23 additions and 43 deletions
|
@ -4,6 +4,7 @@ defineProps<{
|
|||
backOnSmallScreen?: boolean
|
||||
/** Show the back button on both small and big screens */
|
||||
back?: boolean
|
||||
noOverflowHidden?: boolean
|
||||
}>()
|
||||
</script>
|
||||
|
||||
|
@ -15,7 +16,7 @@ defineProps<{
|
|||
border="b base" bg="[rgba(var(--rbg-bg-base),0.7)]"
|
||||
>
|
||||
<div flex justify-between px5 py2 :class="{ 'xl:hidden': $route.name !== 'tag' }" data-tauri-drag-region>
|
||||
<div flex gap-3 items-center overflow-hidden py2>
|
||||
<div flex gap-3 items-center :overflow-hidden="!noOverflowHidden ? '' : false" py2 w-full>
|
||||
<NuxtLink
|
||||
v-if="backOnSmallScreen || back" flex="~ gap1" items-center btn-text p-0 xl:hidden
|
||||
:aria-label="$t('nav.back')"
|
||||
|
@ -23,7 +24,7 @@ defineProps<{
|
|||
>
|
||||
<div i-ri:arrow-left-line class="rtl-flip" />
|
||||
</NuxtLink>
|
||||
<div truncate>
|
||||
<div :truncate="!noOverflowHidden ? '' : false" w-full>
|
||||
<slot name="title" />
|
||||
</div>
|
||||
<div h-7 w-1px />
|
||||
|
|
|
@ -14,7 +14,7 @@ const moreMenuVisible = ref(false)
|
|||
<NuxtLink to="/home" :active-class="moreMenuVisible ? '' : 'text-primary'" flex flex-row items-center place-content-center h-full flex-1 @click="$scrollToTop">
|
||||
<div i-ri:home-5-line />
|
||||
</NuxtLink>
|
||||
<NuxtLink to="/search" :active-class="moreMenuVisible ? '' : 'text-primary'" flex flex-row items-center place-content-center h-full flex-1 @click="$scrollToTop">
|
||||
<NuxtLink :to="isHydrated ? `/${currentServer}/explore` : '/explore'" :active-class="moreMenuVisible ? '' : 'text-primary'" flex flex-row items-center place-content-center h-full flex-1 @click="$scrollToTop">
|
||||
<div i-ri:search-line />
|
||||
</NuxtLink>
|
||||
<NuxtLink to="/notifications" :active-class="moreMenuVisible ? '' : 'text-primary'" flex flex-row items-center place-content-center h-full flex-1 @click="$scrollToTop">
|
||||
|
|
|
@ -2,15 +2,12 @@
|
|||
const { command } = defineProps<{
|
||||
command?: boolean
|
||||
}>()
|
||||
|
||||
const { notifications } = useNotifications()
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<nav sm:px3 flex="~ col gap2" shrink text-size-base leading-normal md:text-lg>
|
||||
<div shrink hidden sm:block mt-4 />
|
||||
<SearchWidget lg:ms-1 lg:me-5 hidden xl:block />
|
||||
<NavSideItem :text="$t('nav.search')" to="/search" icon="i-ri:search-line" xl:hidden :command="command" />
|
||||
|
||||
<nav sm:px3 flex="~ col gap2" shrink text-size-base leading-normal md:text-lg h-full>
|
||||
<div shrink hidden sm:block mt-4 />
|
||||
<NavSideItem :text="$t('nav.home')" to="/home" icon="i-ri:home-5-line" user-only :command="command" />
|
||||
<NavSideItem :text="$t('nav.notifications')" to="/notifications" icon="i-ri:notification-4-line" user-only :command="command">
|
||||
|
|
|
@ -14,7 +14,7 @@ router.afterEach(() => {
|
|||
<!-- Use external to force refresh page and jump to top of timeline -->
|
||||
<div flex justify-between>
|
||||
<NuxtLink
|
||||
flex items-end gap-4
|
||||
flex items-end gap-3
|
||||
py2 px-5
|
||||
text-2xl
|
||||
select-none
|
||||
|
|
|
@ -1,10 +1,15 @@
|
|||
<script setup lang="ts">
|
||||
const { position } = defineProps<{
|
||||
position?: 'top' | 'bottom'
|
||||
}>()
|
||||
|
||||
const query = ref('')
|
||||
const { accounts, hashtags, loading, statuses } = useSearch(query)
|
||||
const index = ref(0)
|
||||
|
||||
const { t } = useI18n()
|
||||
const el = ref<HTMLElement>()
|
||||
const input = ref<HTMLInputElement>()
|
||||
const router = useRouter()
|
||||
const { focused } = useFocusWithin(el)
|
||||
|
||||
|
@ -75,7 +80,7 @@ const activate = () => {
|
|||
>
|
||||
</div>
|
||||
<!-- Results -->
|
||||
<div left-0 top-12 absolute w-full z10 group-focus-within="pointer-events-auto visible" invisible pointer-events-none>
|
||||
<div top-12 left-0 absolute w-full z10 group-focus-within="pointer-events-auto visible" invisible pointer-events-none>
|
||||
<div w-full bg-base border="~ base" rounded-3 max-h-100 overflow-auto py2>
|
||||
<span v-if="query.trim().length === 0" block text-center text-sm text-secondary>
|
||||
{{ t('search.search_desc') }}
|
||||
|
|
|
@ -4,3 +4,4 @@ export const breakpoints = useBreakpoints(breakpointsTailwind)
|
|||
|
||||
export const isSmallScreen = breakpoints.smallerOrEqual('md')
|
||||
export const isMediumScreen = breakpoints.smallerOrEqual('lg')
|
||||
export const isExtraLargeScreen = breakpoints.smallerOrEqual('xl')
|
||||
|
|
|
@ -17,14 +17,13 @@ const isGrayscale = usePreferences('grayscaleMode')
|
|||
<template>
|
||||
<div h-full :data-mode="isHydrated && isGrayscale ? 'grayscale' : ''">
|
||||
<main flex w-full mxa lg:max-w-80rem>
|
||||
<aside class="hidden sm:flex w-1/8 md:w-1/6 lg:w-1/5 xl:w-1/4 justify-end xl:me-4 zen-hide" relative>
|
||||
<aside class="justify-end hidden sm:flex w-1/8 md:w-1/6 lg:w-1/5 xl:w-1/4 xl:me-4 zen-hide" relative>
|
||||
<div sticky top-0 w-20 xl:w-100 h-screen flex="~ col" lt-xl-items-center>
|
||||
<slot name="left">
|
||||
<div flex="~ col" overflow-y-auto justify-between h-full max-w-full mt-5>
|
||||
<NavTitle />
|
||||
<NavSide command />
|
||||
<div flex-auto />
|
||||
<div v-if="isHydrated" flex flex-col>
|
||||
<div v-if="isHydrated" flex flex-col sticky bottom-0 bg-base>
|
||||
<div hidden xl:block>
|
||||
<UserSignInEntry v-if="!currentUser" />
|
||||
</div>
|
||||
|
@ -59,9 +58,10 @@ const isGrayscale = usePreferences('grayscaleMode')
|
|||
<NavBottom v-if="isHydrated" sm:hidden />
|
||||
</div>
|
||||
</div>
|
||||
<aside v-if="isHydrated && !wideLayout" class="hidden sm:none lg:block w-1/4 zen-hide">
|
||||
<aside v-if="isHydrated && !wideLayout" class="hidden w-1/4 sm:none lg:block zen-hide">
|
||||
<div sticky top-0 h-screen flex="~ col" gap-2 py3 ms-2>
|
||||
<slot name="right">
|
||||
<SearchWidget v-if="!isExtraLargeScreen" mt-6 ms-2 position="top" />
|
||||
<div flex-auto />
|
||||
<PwaPrompt />
|
||||
<NavFooter />
|
||||
|
|
|
@ -91,6 +91,7 @@
|
|||
"toggle_zen_mode": "Toggle zen mode"
|
||||
},
|
||||
"common": {
|
||||
"and": "and",
|
||||
"end_of_list": "End of the list",
|
||||
"error": "ERROR",
|
||||
"in": "in",
|
||||
|
|
|
@ -83,6 +83,7 @@
|
|||
"toggle_zen_mode": "Passer en mode zen"
|
||||
},
|
||||
"common": {
|
||||
"and": "et",
|
||||
"end_of_list": "Fin de liste",
|
||||
"error": "ERREUR",
|
||||
"in": "sur",
|
||||
|
@ -173,7 +174,7 @@
|
|||
"muted_users": "Utilisateur·ice·s masqué·e·s",
|
||||
"notifications": "Notifications",
|
||||
"profile": "Profil",
|
||||
"search": "Rechercher",
|
||||
"search": "Recherche",
|
||||
"select_feature_flags": "Activer/Désactiver Feature Flags",
|
||||
"select_font_size": "Taille de la police",
|
||||
"select_language": "Sélectionner langue",
|
||||
|
|
|
@ -24,12 +24,9 @@ const tabs = $computed(() => [
|
|||
</script>
|
||||
|
||||
<template>
|
||||
<MainContent>
|
||||
<MainContent no-overflow-hidden :back-on-small-screen="isExtraLargeScreen">
|
||||
<template #title>
|
||||
<span timeline-title-style flex items-center gap-2 cursor-pointer @click="$scrollToTop">
|
||||
<div i-ri:hashtag />
|
||||
<span>{{ t('nav.explore') }}</span>
|
||||
</span>
|
||||
<SearchWidget ref="search" class="m-1" />
|
||||
</template>
|
||||
|
||||
<template #header>
|
||||
|
|
|
@ -1,23 +0,0 @@
|
|||
<script setup lang="ts">
|
||||
import { useI18n } from 'vue-i18n'
|
||||
|
||||
const { t } = useI18n()
|
||||
useHeadFixed({
|
||||
title: () => t('nav.search'),
|
||||
})
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<MainContent>
|
||||
<template #title>
|
||||
<NuxtLink to="/search" timeline-title-style flex items-center gap-2 @click="$scrollToTop">
|
||||
<div i-ri:search-line class="rtl-flip" />
|
||||
<span>{{ $t('nav.search') }}</span>
|
||||
</NuxtLink>
|
||||
</template>
|
||||
|
||||
<div px2 mt3>
|
||||
<SearchWidget v-if="isHydrated" />
|
||||
</div>
|
||||
</MainContent>
|
||||
</template>
|
Loading…
Reference in a new issue