Merge branch 'master' into style/rounded-channel-thumbnails

This commit is contained in:
iatenine 2023-07-16 13:26:56 -05:00
commit f61bcf5156
2 changed files with 51 additions and 12 deletions

View file

@ -27,6 +27,9 @@
/> />
<span v-if="searchText" class="delete-search" @click="searchText = ''"></span> <span v-if="searchText" class="delete-search" @click="searchText = ''"></span>
</div> </div>
<button @click="onSearchClick" id="search-btn" class="input btn mx-1 h-10">
<div class="i-fa6-solid:magnifying-glass"></div>
</button>
<!-- three vertical lines for toggling the hamburger menu on mobile --> <!-- three vertical lines for toggling the hamburger menu on mobile -->
<button class="md:hidden flex flex-col justify-end mr-3" @click="showTopNav = !showTopNav"> <button class="md:hidden flex flex-col justify-end mr-3" @click="showTopNav = !showTopNav">
<span class="line"></span> <span class="line"></span>
@ -172,12 +175,7 @@ export default {
}, },
onKeyPress(e) { onKeyPress(e) {
if (e.key === "Enter") { if (e.key === "Enter") {
e.target.blur(); this.submitSearch();
this.$router.push({
name: "SearchResults",
query: { search_query: this.searchText },
});
return;
} }
}, },
onInputFocus() { onInputFocus() {
@ -195,6 +193,17 @@ export default {
this.registrationDisabled = config?.registrationDisabled === true; this.registrationDisabled = config?.registrationDisabled === true;
}); });
}, },
onSearchClick(e) {
this.submitSearch(e);
},
submitSearch(e) {
e.target.blur();
this.$router.push({
name: "SearchResults",
query: { search_query: this.searchText },
});
return;
},
}, },
}; };
</script> </script>
@ -210,4 +219,10 @@ export default {
.mobile-nav div { .mobile-nav div {
@apply mx-1; @apply mx-1;
} }
@media screen and (max-width: 848px) {
#search-btn {
display: none;
}
}
</style> </style>

View file

@ -112,7 +112,14 @@
"show_search_suggestions": "顯示搜尋建議", "show_search_suggestions": "顯示搜尋建議",
"copy_link": "複製連結", "copy_link": "複製連結",
"time_code": "時間碼(以秒計算)", "time_code": "時間碼(以秒計算)",
"minimize_chapters_default": "預設收起章節" "minimize_chapters_default": "預設收起章節",
"dismiss": "解散",
"chapters_layout_mobile": "在手提裝置上的章節佈局",
"hide_watched": "在摘要中隱藏看過的影片",
"reply_count": "{count} 個回覆",
"minimize_recommendations_default": "預設收起推薦影片",
"show_watch_on_youtube": "顯示「在Youtube 觀看」按鈕",
"show_less": "顯示更少"
}, },
"titles": { "titles": {
"history": "歷史記錄", "history": "歷史記錄",
@ -136,7 +143,9 @@
"version": "版本", "version": "版本",
"has_cdn": "是否有 CDN", "has_cdn": "是否有 CDN",
"instance_name": "站台名稱", "instance_name": "站台名稱",
"instance_locations": "站台位置" "instance_locations": "站台位置",
"up_to_date": "最新?",
"ssl_score": "SSL 分數"
}, },
"login": { "login": {
"username": "使用者名", "username": "使用者名",
@ -147,7 +156,14 @@
"watched": "有看過", "watched": "有看過",
"sponsor_segments": "贊助廣告片段", "sponsor_segments": "贊助廣告片段",
"ratings_disabled": "評價已停用", "ratings_disabled": "評價已停用",
"chapters": "章節" "chapters": "章節",
"shorts": "短影片",
"category": "類別",
"chapters_horizontal": "水平",
"chapters_vertical": "垂直",
"views": "觀看次數:{views}",
"live": "{0} 直播",
"all": "全部"
}, },
"search": { "search": {
"did_you_mean": "您是否想找 {0}", "did_you_mean": "您是否想找 {0}",
@ -158,20 +174,28 @@
"playlists": "YouTube播放清單", "playlists": "YouTube播放清單",
"music_songs": "YT Music歌曲", "music_songs": "YT Music歌曲",
"music_videos": "YT Music影片", "music_videos": "YT Music影片",
"music_albums": "YT Music專輯" "music_albums": "YT Music專輯",
"music_artists": "YT Music: 藝人"
}, },
"comment": { "comment": {
"pinned_by": "置頂者: {author}", "pinned_by": "置頂者: {author}",
"disabled": "上傳者停用了留言功能。", "disabled": "上傳者停用了留言功能。",
"loading": "留言載入中……" "loading": "留言載入中……",
"user_disabled": "留言在設置中被關閉。"
}, },
"info": { "info": {
"copied": "已複製!", "copied": "已複製!",
"cannot_copy": "無法複製!", "cannot_copy": "無法複製!",
"page_not_found": "找不到頁面", "page_not_found": "找不到頁面",
"preferences_note": "註:偏好設定儲存在本機的瀏覽器的儲存空間內。如果清除瀏覽器的資料,偏好設定就會重設。" "preferences_note": "註:偏好設定儲存在本機的瀏覽器的儲存空間內。如果清除瀏覽器的資料,偏好設定就會重設。",
"register_no_email_note": "不建議使用電子郵件地址作為用戶名稱。仍要繼續嗎?",
"local_storage": "此動作需要儲存資料在本機請確認是否啟用了Cookies",
"next_video_countdown": "在{0}秒後播放下一段影片"
}, },
"player": { "player": {
"watch_on": "在 {0} 觀看" "watch_on": "在 {0} 觀看"
},
"subscriptions": {
"subscribed_channels_count": "己訂閱: {0}"
} }
} }