Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion src/renderer/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ export default defineComponent({
return this.$store.getters.getShowProgressBar
},
isRightAligned: function () {
return this.$i18n.locale === 'ar'
return this.locale === 'ar' || this.locale === 'he'
},
checkForUpdates: function () {
return this.$store.getters.getCheckForUpdates
Expand Down Expand Up @@ -102,6 +102,10 @@ export default defineComponent({
return this.$store.getters.getSecColor
},

locale: function() {
return this.$i18n.locale.replace('_', '-')
},

systemTheme: function () {
return window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light'
},
Expand All @@ -126,6 +130,8 @@ export default defineComponent({

secColor: 'checkThemeSettings',

locale: 'setLocale',

$route () {
// react to route changes...
// Hide top nav filter panel on page change
Expand All @@ -135,6 +141,7 @@ export default defineComponent({
created () {
this.checkThemeSettings()
this.setWindowTitle()
this.setLocale()
},
mounted: function () {
this.grabUserSettings().then(async () => {
Expand Down Expand Up @@ -500,6 +507,10 @@ export default defineComponent({
}
},

setLocale: function() {
document.documentElement.setAttribute('lang', this.locale)
},

/**
* provided to all child components, see `provide` near the top of this file
* after injecting it, they can show outlines during keyboard navigation
Expand Down
1 change: 1 addition & 0 deletions src/renderer/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
<side-nav ref="sideNav" />
<ft-flex-box
class="flexBox routerView"
role="main"
>
<div
v-if="showUpdatesBanner || showBlogBanner"
Expand Down
1 change: 1 addition & 0 deletions src/renderer/components/ft-input/ft-input.vue
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@
:placeholder="placeholder"
:disabled="disabled"
:spellcheck="spellcheck"
:aria-label="!showLabel ? placeholder : null"
@input="e => handleInput(e.target.value)"
@focus="handleFocus"
@blur="handleInputBlur"
Expand Down
5 changes: 4 additions & 1 deletion src/renderer/components/ft-list-channel/ft-list-channel.vue
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
<router-link
:to="`/channel/${id}`"
tabindex="-1"
aria-hidden="true"
>
<img
:src="thumbnail"
Expand All @@ -24,7 +25,9 @@
class="title"
:to="`/channel/${id}`"
>
{{ channelName }}
<h3 class="h3Title">
{{ channelName }}
</h3>
</router-link>
<div class="infoLine">
<span
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
<router-link
class="thumbnailLink"
:to="`/playlist/${playlistId}`"
tabindex="-1"
aria-hidden="true"
>
<img
alt=""
Expand All @@ -32,7 +34,7 @@
class="title"
:to="`/playlist/${playlistId}`"
>
{{ title }}
<h3 class="h3Title">{{ title }}</h3>
</router-link>
<div class="infoLine">
<router-link
Expand Down
3 changes: 2 additions & 1 deletion src/renderer/components/ft-list-video/ft-list-video.vue
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
<router-link
class="thumbnailLink"
tabindex="-1"
aria-hidden="true"
:to="{
path: `/watch/${id}`,
query: playlistIdFinal ? {playlistId: playlistIdFinal} : {}
Expand Down Expand Up @@ -75,7 +76,7 @@
query: playlistIdFinal ? {playlistId: playlistIdFinal} : {}
}"
>
{{ displayTitle }}
<h3 class="h3Title">{{ displayTitle }}</h3>
</router-link>
<div class="infoLine">
<router-link
Expand Down
1 change: 1 addition & 0 deletions src/renderer/components/side-nav/side-nav.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
ref="sideNav"
class="sideNav"
:class="[{closed: !isOpen}, applyHiddenLabels]"
role="navigation"
>
<div
class="inner"
Expand Down
1 change: 1 addition & 0 deletions src/renderer/components/top-nav/top-nav.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
<div
class="topNav"
:class="{ topNavBarColor: barColor }"
role="navigation"
>
<div class="side">
<font-awesome-icon
Expand Down
8 changes: 8 additions & 0 deletions src/renderer/scss-partials/_ft-list-item.scss
Original file line number Diff line number Diff line change
Expand Up @@ -304,3 +304,11 @@ $watched-transition-duration: 0.5s;
.upcoming {
text-transform: uppercase;
}

// we use h3 for semantic reasons but don't want to keep the h3 style
.h3Title {
margin-block-start: inherit;
margin-block-end: inherit;
font-size: inherit;
font-weight: inherit;
}
2 changes: 1 addition & 1 deletion src/renderer/views/Hashtag/Hashtag.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
/>
<div v-else>
<ft-card>
<h3>{{ hashtag }}</h3>
<h2>{{ hashtag }}</h2>
<div
class="elementList"
>
Expand Down
2 changes: 1 addition & 1 deletion src/renderer/views/History/History.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
v-show="!isLoading"
class="card"
>
<h3>{{ $t("History.History") }}</h3>
<h2>{{ $t("History.History") }}</h2>
<ft-input
v-show="fullData.length > 0"
ref="searchBar"
Expand Down
2 changes: 1 addition & 1 deletion src/renderer/views/Popular/Popular.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
v-else
class="card"
>
<h3>{{ $t("Most Popular") }}</h3>
<h2>{{ $t("Most Popular") }}</h2>
<ft-element-list
:data="shownResults"
/>
Expand Down
2 changes: 1 addition & 1 deletion src/renderer/views/ProfileSettings/ProfileSettings.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<template>
<div>
<ft-card class="card">
<h3>{{ $t("Profile.Profile Manager") }}</h3>
<h2>{{ $t("Profile.Profile Manager") }}</h2>
<ft-flex-box
class="profileList"
>
Expand Down
2 changes: 1 addition & 1 deletion src/renderer/views/Search/Search.vue
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
v-else
class="card"
>
<h3>{{ $t("Search Filters.Search Results") }}</h3>
<h2>{{ $t("Search Filters.Search Results") }}</h2>
<ft-element-list
:data="shownResults"
/>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<template>
<div>
<ft-card class="card">
<h3>{{ $t('Channels.Title') }}</h3>
<h2>{{ $t('Channels.Title') }}</h2>
<ft-input
v-show="subscribedChannels.length > 0"
ref="searchBarChannels"
Expand Down
2 changes: 1 addition & 1 deletion src/renderer/views/Subscriptions/Subscriptions.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<template>
<div>
<ft-card class="card">
<h3>{{ $t("Subscriptions.Subscriptions") }}</h3>
<h2>{{ $t("Subscriptions.Subscriptions") }}</h2>
<ft-flex-box
class="subscriptionTabs"
role="tablist"
Expand Down
2 changes: 1 addition & 1 deletion src/renderer/views/Trending/Trending.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
v-else
class="card"
>
<h3>{{ $t("Trending.Trending") }}</h3>
<h2>{{ $t("Trending.Trending") }}</h2>
<ft-flex-box
class="trendingInfoTabs"
role="tablist"
Expand Down
4 changes: 2 additions & 2 deletions src/renderer/views/UserPlaylists/UserPlaylists.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@
v-show="!isLoading"
class="card"
>
<h3>
<h2>
{{ $t("User Playlists.Your Playlists") }}
<ft-tooltip
class="selectTooltip"
position="bottom"
:tooltip="$t('User Playlists.Playlist Message')"
/>
</h3>
</h2>
<ft-input
v-show="fullData.length > 0"
ref="searchBar"
Expand Down