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
|
backOnSmallScreen?: boolean
|
||||||
/** Show the back button on both small and big screens */
|
/** Show the back button on both small and big screens */
|
||||||
back?: boolean
|
back?: boolean
|
||||||
|
noOverflowHidden?: boolean
|
||||||
}>()
|
}>()
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
@ -15,7 +16,7 @@ defineProps<{
|
||||||
border="b base" bg="[rgba(var(--rbg-bg-base),0.7)]"
|
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 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
|
<NuxtLink
|
||||||
v-if="backOnSmallScreen || back" flex="~ gap1" items-center btn-text p-0 xl:hidden
|
v-if="backOnSmallScreen || back" flex="~ gap1" items-center btn-text p-0 xl:hidden
|
||||||
:aria-label="$t('nav.back')"
|
:aria-label="$t('nav.back')"
|
||||||
|
@ -23,7 +24,7 @@ defineProps<{
|
||||||
>
|
>
|
||||||
<div i-ri:arrow-left-line class="rtl-flip" />
|
<div i-ri:arrow-left-line class="rtl-flip" />
|
||||||
</NuxtLink>
|
</NuxtLink>
|
||||||
<div truncate>
|
<div :truncate="!noOverflowHidden ? '' : false" w-full>
|
||||||
<slot name="title" />
|
<slot name="title" />
|
||||||
</div>
|
</div>
|
||||||
<div h-7 w-1px />
|
<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">
|
<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 />
|
<div i-ri:home-5-line />
|
||||||
</NuxtLink>
|
</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 />
|
<div i-ri:search-line />
|
||||||
</NuxtLink>
|
</NuxtLink>
|
||||||
<NuxtLink to="/notifications" :active-class="moreMenuVisible ? '' : 'text-primary'" flex flex-row items-center place-content-center h-full flex-1 @click="$scrollToTop">
|
<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<{
|
const { command } = defineProps<{
|
||||||
command?: boolean
|
command?: boolean
|
||||||
}>()
|
}>()
|
||||||
|
|
||||||
const { notifications } = useNotifications()
|
const { notifications } = useNotifications()
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<nav sm:px3 flex="~ col gap2" shrink text-size-base leading-normal md:text-lg>
|
<nav sm:px3 flex="~ col gap2" shrink text-size-base leading-normal md:text-lg h-full>
|
||||||
<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" />
|
|
||||||
|
|
||||||
<div shrink hidden sm:block mt-4 />
|
<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.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">
|
<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 -->
|
<!-- Use external to force refresh page and jump to top of timeline -->
|
||||||
<div flex justify-between>
|
<div flex justify-between>
|
||||||
<NuxtLink
|
<NuxtLink
|
||||||
flex items-end gap-4
|
flex items-end gap-3
|
||||||
py2 px-5
|
py2 px-5
|
||||||
text-2xl
|
text-2xl
|
||||||
select-none
|
select-none
|
||||||
|
|
|
@ -1,10 +1,15 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
|
const { position } = defineProps<{
|
||||||
|
position?: 'top' | 'bottom'
|
||||||
|
}>()
|
||||||
|
|
||||||
const query = ref('')
|
const query = ref('')
|
||||||
const { accounts, hashtags, loading, statuses } = useSearch(query)
|
const { accounts, hashtags, loading, statuses } = useSearch(query)
|
||||||
const index = ref(0)
|
const index = ref(0)
|
||||||
|
|
||||||
const { t } = useI18n()
|
const { t } = useI18n()
|
||||||
const el = ref<HTMLElement>()
|
const el = ref<HTMLElement>()
|
||||||
|
const input = ref<HTMLInputElement>()
|
||||||
const router = useRouter()
|
const router = useRouter()
|
||||||
const { focused } = useFocusWithin(el)
|
const { focused } = useFocusWithin(el)
|
||||||
|
|
||||||
|
@ -75,7 +80,7 @@ const activate = () => {
|
||||||
>
|
>
|
||||||
</div>
|
</div>
|
||||||
<!-- Results -->
|
<!-- 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>
|
<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>
|
<span v-if="query.trim().length === 0" block text-center text-sm text-secondary>
|
||||||
{{ t('search.search_desc') }}
|
{{ t('search.search_desc') }}
|
||||||
|
|
|
@ -4,3 +4,4 @@ export const breakpoints = useBreakpoints(breakpointsTailwind)
|
||||||
|
|
||||||
export const isSmallScreen = breakpoints.smallerOrEqual('md')
|
export const isSmallScreen = breakpoints.smallerOrEqual('md')
|
||||||
export const isMediumScreen = breakpoints.smallerOrEqual('lg')
|
export const isMediumScreen = breakpoints.smallerOrEqual('lg')
|
||||||
|
export const isExtraLargeScreen = breakpoints.smallerOrEqual('xl')
|
||||||
|
|
|
@ -17,14 +17,13 @@ const isGrayscale = usePreferences('grayscaleMode')
|
||||||
<template>
|
<template>
|
||||||
<div h-full :data-mode="isHydrated && isGrayscale ? 'grayscale' : ''">
|
<div h-full :data-mode="isHydrated && isGrayscale ? 'grayscale' : ''">
|
||||||
<main flex w-full mxa lg:max-w-80rem>
|
<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>
|
<div sticky top-0 w-20 xl:w-100 h-screen flex="~ col" lt-xl-items-center>
|
||||||
<slot name="left">
|
<slot name="left">
|
||||||
<div flex="~ col" overflow-y-auto justify-between h-full max-w-full mt-5>
|
<div flex="~ col" overflow-y-auto justify-between h-full max-w-full mt-5>
|
||||||
<NavTitle />
|
<NavTitle />
|
||||||
<NavSide command />
|
<NavSide command />
|
||||||
<div flex-auto />
|
<div v-if="isHydrated" flex flex-col sticky bottom-0 bg-base>
|
||||||
<div v-if="isHydrated" flex flex-col>
|
|
||||||
<div hidden xl:block>
|
<div hidden xl:block>
|
||||||
<UserSignInEntry v-if="!currentUser" />
|
<UserSignInEntry v-if="!currentUser" />
|
||||||
</div>
|
</div>
|
||||||
|
@ -59,9 +58,10 @@ const isGrayscale = usePreferences('grayscaleMode')
|
||||||
<NavBottom v-if="isHydrated" sm:hidden />
|
<NavBottom v-if="isHydrated" sm:hidden />
|
||||||
</div>
|
</div>
|
||||||
</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>
|
<div sticky top-0 h-screen flex="~ col" gap-2 py3 ms-2>
|
||||||
<slot name="right">
|
<slot name="right">
|
||||||
|
<SearchWidget v-if="!isExtraLargeScreen" mt-6 ms-2 position="top" />
|
||||||
<div flex-auto />
|
<div flex-auto />
|
||||||
<PwaPrompt />
|
<PwaPrompt />
|
||||||
<NavFooter />
|
<NavFooter />
|
||||||
|
|
|
@ -91,6 +91,7 @@
|
||||||
"toggle_zen_mode": "Toggle zen mode"
|
"toggle_zen_mode": "Toggle zen mode"
|
||||||
},
|
},
|
||||||
"common": {
|
"common": {
|
||||||
|
"and": "and",
|
||||||
"end_of_list": "End of the list",
|
"end_of_list": "End of the list",
|
||||||
"error": "ERROR",
|
"error": "ERROR",
|
||||||
"in": "in",
|
"in": "in",
|
||||||
|
|
|
@ -83,6 +83,7 @@
|
||||||
"toggle_zen_mode": "Passer en mode zen"
|
"toggle_zen_mode": "Passer en mode zen"
|
||||||
},
|
},
|
||||||
"common": {
|
"common": {
|
||||||
|
"and": "et",
|
||||||
"end_of_list": "Fin de liste",
|
"end_of_list": "Fin de liste",
|
||||||
"error": "ERREUR",
|
"error": "ERREUR",
|
||||||
"in": "sur",
|
"in": "sur",
|
||||||
|
@ -173,7 +174,7 @@
|
||||||
"muted_users": "Utilisateur·ice·s masqué·e·s",
|
"muted_users": "Utilisateur·ice·s masqué·e·s",
|
||||||
"notifications": "Notifications",
|
"notifications": "Notifications",
|
||||||
"profile": "Profil",
|
"profile": "Profil",
|
||||||
"search": "Rechercher",
|
"search": "Recherche",
|
||||||
"select_feature_flags": "Activer/Désactiver Feature Flags",
|
"select_feature_flags": "Activer/Désactiver Feature Flags",
|
||||||
"select_font_size": "Taille de la police",
|
"select_font_size": "Taille de la police",
|
||||||
"select_language": "Sélectionner langue",
|
"select_language": "Sélectionner langue",
|
||||||
|
|
|
@ -24,12 +24,9 @@ const tabs = $computed(() => [
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<MainContent>
|
<MainContent no-overflow-hidden :back-on-small-screen="isExtraLargeScreen">
|
||||||
<template #title>
|
<template #title>
|
||||||
<span timeline-title-style flex items-center gap-2 cursor-pointer @click="$scrollToTop">
|
<SearchWidget ref="search" class="m-1" />
|
||||||
<div i-ri:hashtag />
|
|
||||||
<span>{{ t('nav.explore') }}</span>
|
|
||||||
</span>
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<template #header>
|
<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