FreeTube/src/renderer/components/top-nav/top-nav.vue

112 lines
3.1 KiB
Vue
Raw Normal View History

2020-02-16 19:30:00 +01:00
<template>
<div
class="topNav"
:class="{ topNavBarColor: barColor }"
>
2020-03-24 15:34:55 +01:00
<div class="side">
<font-awesome-icon
2020-03-26 15:17:59 +01:00
class="menuIcon navIcon"
:icon="['fas', 'bars']"
role="button"
tabindex="0"
2020-03-24 15:34:55 +01:00
@click="toggleSideNav"
@keydown.enter.prevent="toggleSideNav"
2020-03-24 15:34:55 +01:00
/>
<font-awesome-icon
ref="historyArrowBack"
class="navBackIcon navIcon fa-arrow-left"
:icon="['fas', 'arrow-left']"
role="button"
tabindex="0"
:title="backwardText"
2020-03-24 15:34:55 +01:00
@click="historyBack"
@keydown.enter.prevent="historyBack"
2020-02-16 19:30:00 +01:00
/>
<font-awesome-icon
ref="historyArrowForward"
class="navForwardIcon navIcon fa-arrow-right"
:icon="['fas', 'arrow-right']"
role="button"
tabindex="0"
2021-05-01 02:36:46 +02:00
:title="forwardText"
2020-03-24 15:34:55 +01:00
@click="historyForward"
@keydown.enter.prevent="historyForward"
2020-03-24 15:34:55 +01:00
/>
<font-awesome-icon
v-if="!hideSearchBar"
2020-03-24 15:34:55 +01:00
class="navSearchIcon navIcon"
:icon="['fas', 'search']"
role="button"
tabindex="0"
2020-03-24 15:34:55 +01:00
@click="toggleSearchContainer"
@keydown.enter.prevent="toggleSearchContainer"
2020-03-24 15:34:55 +01:00
/>
2021-04-15 20:28:35 +02:00
<font-awesome-icon
class="navNewWindowIcon navIcon"
:icon="['fas', 'clone']"
:title="newWindowText"
role="button"
tabindex="0"
2021-05-01 02:36:46 +02:00
@click="createNewWindow"
@keydown.enter.prevent="createNewWindow"
2021-04-15 20:28:35 +02:00
/>
<div
v-if="!hideHeaderLogo"
class="logo"
role="link"
tabindex="0"
:title="$t('Subscriptions.Subscriptions')"
@click="navigate('subscriptions')"
@keydown.space.prevent="navigate('subscriptions')"
@keydown.enter.prevent="navigate('subscriptions')"
>
2020-03-24 15:34:55 +01:00
<div
class="logoIcon"
/>
<div
class="logoText"
/>
</div>
</div>
<div class="middle">
<div
v-if="!hideSearchBar"
v-show="showSearchContainer"
ref="searchContainer"
class="searchContainer"
>
2020-03-24 15:34:55 +01:00
<ft-input
ref="searchInput"
:placeholder="$t('Search / Go to URL')"
2020-03-24 15:34:55 +01:00
class="searchInput"
:is-search="true"
:data-list="searchSuggestionsDataList"
:spellcheck="false"
:show-clear-text-button="true"
@input="getSearchSuggestionsDebounce"
2020-03-24 15:34:55 +01:00
@click="goToSearch"
/>
<font-awesome-icon
class="navFilterIcon navIcon"
:class="{ filterChanged: searchFilterValueChanged }"
:icon="['fas', 'filter']"
role="button"
tabindex="0"
2020-03-24 15:34:55 +01:00
@click="showFilters = !showFilters"
@keydown.enter.prevent="showFilters = !showFilters"
2020-03-24 15:34:55 +01:00
/>
</div>
<ft-search-filters
v-if="!hideSearchBar"
2020-03-24 15:34:55 +01:00
v-show="showFilters"
class="searchFilters"
@filterValueUpdated="handleSearchFilterValueChanged"
2020-02-16 19:30:00 +01:00
/>
</div>
<ft-profile-selector class="side profiles" />
2020-02-16 19:30:00 +01:00
</div>
</template>
<script src="./top-nav.js" />
<style scoped lang="scss" src="./top-nav.scss" />