Skip to content

Commit 2d249dc

Browse files
feat: a lot of wip stuff
1 parent 5353793 commit 2d249dc

32 files changed

+1262
-1012
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,6 @@ Pull Requests: [Pull Requests](https://github.com/hexadecimal233/cloudie/pulls)
7272
- [ ] Proxy support
7373
- [ ] Scrobbling support
7474
- [ ] DJ Support
75-
- [ ] OEmbed Support
75+
- [ ] Watch Router updates on dynamic views
7676
- [ ] Lyrics service
7777
-->

src/App.vue

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@
8181
<i-mdi-chevron-left />
8282
</button>
8383
<input type="text" :placeholder="$t('cloudie.main.searchBar')"
84-
class="input input-bordered join-item w-1/4" />
84+
class="input input-bordered join-item w-1/4" v-model="searchQuery" @keyup.enter="handleSearch" />
8585
</div>
8686
<div class="flex flex-col py-8">
8787
<span class="mb-4 text-3xl font-bold">
@@ -106,7 +106,7 @@
106106

107107
<script setup lang="ts">
108108
import { onMounted, ref } from "vue"
109-
import { useRoute } from "vue-router"
109+
import { useRoute, useRouter } from "vue-router"
110110
import { useI18n } from "vue-i18n"
111111
import { BasicUserInfo, updateUserInfo, userInfo } from "@/utils/api"
112112
import { Toaster } from "vue-sonner"
@@ -116,6 +116,7 @@ import "vue-final-modal/style.css"
116116
import AudioPlayer from "./components/AudioPlayer.vue"
117117
118118
const route = useRoute()
119+
const router = useRouter()
119120
const i18n = useI18n()
120121
const user = ref<BasicUserInfo>()
121122
const loading = ref(true)
@@ -134,4 +135,12 @@ function getPageTitle() {
134135
const firstSegment = pathSegments[0]
135136
return i18n.t(`cloudie.main.${firstSegment}`)
136137
}
138+
139+
const searchQuery = ref("")
140+
141+
function handleSearch() {
142+
if (searchQuery.value.trim()) {
143+
router.push(`/search/${searchQuery.value}`)
144+
}
145+
}
137146
</script>

src/assets/i18n/en.json

Lines changed: 46 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,41 @@
55
"searchBar": "Search (unimplemented yet)",
66
"likes": "Likes",
77
"playlists": "Playlists & Albums",
8-
"playlist": "Playlist",
98
"radio": "Radio",
109
"history": "Play History",
1110
"downloads": "Downloads",
1211
"settings": "Settings",
1312
"feeds": "Feeds",
14-
"following": "Following"
13+
"following": "Following",
14+
"track": "Track",
15+
"search": "Search",
16+
"user": "User",
17+
"playlist": "Playlist"
18+
},
19+
"search": {
20+
"result": "Found {playlists} playlists, {tracks} tracks, {users} people",
21+
"filters": {
22+
"created_at": "Created At",
23+
"last_hour": "Past hour",
24+
"last_day": "Past day",
25+
"last_week": "Past week",
26+
"last_month": "Past month",
27+
"last_year": "Past year",
28+
"any_time": "Any time",
29+
"length": "Length",
30+
"short": "Short",
31+
"medium": "Medium",
32+
"long": "Long",
33+
"epic": "Epic",
34+
"any_length": "Any length",
35+
"license": "License",
36+
"to_modify_commercially": "To Modify Commercially",
37+
"to_use_commercially": "To Use Commercially",
38+
"to_share": "To Share",
39+
"any_license": "Any License",
40+
"location": "Location",
41+
"genre": "Genre"
42+
}
1543
},
1644
"following": {
1745
"title": "Following",
@@ -97,7 +125,8 @@
97125
"loadMore": "Load More",
98126
"loadFail": "Failed to load data...",
99127
"empty": "Nothing Here (。・ω・。)",
100-
"emptyDesc": "Please try refreshing or adjusting your query."
128+
"emptyDesc": "Please try refreshing or adjusting your query.",
129+
"play": "Play"
101130
},
102131
"toasts": {
103132
"playlistOpenFailed": "Failed to open playlist",
@@ -111,7 +140,18 @@
111140
"cancel": "Cancel",
112141
"close": "Close",
113142
"userInfoErr": "Failed to Update User Info.",
114-
"loadFailed": "Failed to load track. Will try next track in 5 seconds."
143+
"loadFailed": "Failed to load track. Will try next track in 5 seconds.",
144+
"clearCacheSuccess": "Cache cleared successfully",
145+
"clearCacheFailed": "Failed to clear cache"
146+
},
147+
"trackView": {
148+
"description": "Description",
149+
"playCount": "Play Count",
150+
"likes": "Likes",
151+
"reposts": "Reposts",
152+
"comments": "Comments",
153+
"relatedTracks": "Related Tracks",
154+
"noComments": "No comments found"
115155
},
116156
"settings": {
117157
"config": {
@@ -122,7 +162,6 @@
122162
"mp3ConvertExts": "Convert following extensions to MP3 (WARNING: Lossy)",
123163
"fileNaming": "File Naming",
124164
"addCover": "Embed Cover",
125-
"analyzeBpmAndKey": "Analyze BPM and Key Locally",
126165
"virtualDjSupport": "VirtualDJ Support",
127166
"clientId": "Soundcloud Client ID",
128167
"oauthToken": "Soundcloud OAuth Token",
@@ -152,7 +191,8 @@
152191
"issue": "Report Issue"
153192
},
154193
"etc": {
155-
"loginSoundcloud": "Login to Soundcloud"
194+
"loginSoundcloud": "Login to Soundcloud",
195+
"clearCache": "Clear Cache"
156196
}
157197
}
158198
}

src/assets/i18n/zh-CN.json

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,13 +104,25 @@
104104
"userInfoErr": "更新用户信息失败",
105105
"loadFailed": "加载曲目失败, 将在5秒后播放下一单曲"
106106
},
107+
"trackView": {
108+
"description": "描述",
109+
"playCount": "播放次数",
110+
"likes": "喜欢",
111+
"reposts": "转发",
112+
"comments": "评论",
113+
"relatedTracks": "相关曲目",
114+
"relatedAlbums": "相关专辑",
115+
"relatedPlaylists": "相关播单",
116+
"noComments": "暂无评论"
117+
},
107118
"common": {
108119
"loading": "加载中...",
109120
"noMore": "没有更多了",
110121
"loadMore": "加载更多",
111122
"loadFail": "加载失败...",
112123
"empty": "这里空空如也 (。・ω・。)",
113-
"emptyDesc": "请尝试刷新或者调整搜索条件"
124+
"emptyDesc": "请尝试刷新或者调整搜索条件",
125+
"play": "播放"
114126
},
115127
"settings": {
116128
"config": {
@@ -121,7 +133,6 @@
121133
"mp3ConvertExts": "转换以下扩展名到 MP3 (警告: 有损压缩)",
122134
"fileNaming": "文件命名方式",
123135
"addCover": "嵌入封面",
124-
"analyzeBpmAndKey": "将 BPM 和调性保存到本地",
125136
"virtualDjSupport": "VirtualDJ 助手",
126137
"clientId": "Soundcloud 客户端 ID",
127138
"oauthToken": "Soundcloud OAuth 令牌",

src/assets/i18n/zh-TW.json

Lines changed: 0 additions & 158 deletions
This file was deleted.

0 commit comments

Comments
 (0)