Skip to content

Commit

Permalink
Merge branch 'dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
angus6b23 committed Jan 16, 2024
2 parents 148b910 + 8a5e60c commit 6dee598
Show file tree
Hide file tree
Showing 32 changed files with 608 additions and 329 deletions.
11 changes: 8 additions & 3 deletions electron/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ const fs = require('fs')
const os = require('node:os')
const du = require('du')
const Readable = require('stream').Readable
const root = path.join(__dirname, '../dist')
const {
app,
BrowserWindow,
Expand All @@ -29,7 +30,7 @@ function createWindow() {
// Create the browser window.
win = new BrowserWindow({
autoHideMenuBar: true,
icon: `${__dirname}/../public/icons/png/512x512.png`,
icon: `${root}/icons/png/256x256.png`,
webPreferences: {
nodeIntegration: true,
nodeIntegrationInWorker: false,
Expand Down Expand Up @@ -111,7 +112,11 @@ function createWindow() {
const toggleWinDisplay = () => {
win.isVisible() ? win.hide() : win.show()
}
tray = new Tray('public/icons/png/256x256.png')
if (process.env.NODE_ENV === 'developement') {
tray = new Tray('public/icons/png/256x256.png')
} else {
tray = new Tray(`${root}/icons/png/256x256.png`)
}
tray.setToolTip('Kiku - a electron based youtube music player')
tray.on('click', toggleWinDisplay)
const trayMenuTemplate = [
Expand Down Expand Up @@ -261,7 +266,7 @@ ipcMain.on('update-menu', (_, json) => {
},
{
label: translation['Quit'],
role: 'quit'
role: 'quit',
},
],
},
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@
"lint": "eslint . --ext ts,tsx --report-unused-disable-directives",
"postinstall": "cpy --flat ./node_modules/framework7-icons/fonts/*.* ./src/fonts/ && cpy --flat ./node_modules/material-icons/iconfont/*.* ./src/fonts/",
"i18n": "npx i18next-parser",
"electron-builder": "npx electron-builder -lw"
"electron-builder": "npx electron-builder -lw",
"prettier-write": "yarn prettier --write ."
},
"browserslist": [
"IOS >= 15",
Expand Down
Binary file added public/images/layout-bg.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/images/layout-classic.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
30 changes: 15 additions & 15 deletions public/locales/en/common.json
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
{
"Search-here": "Search here",
"Search": "Search",
"Now-Playing": "Now Playing",
"Search-Result": "Search Result",
"Setting": "Setting",
"Videos": "Videos",
"views": "views",
"Channel": "Channel",
"Playlists": "Playlists",
"Load-More": "Load More",
"Playlist": "Playlist",
"Search-Results": "Search Results",
"URL": "URL:",
"Global-UI": "Global UI",
"setting": "setting"
"Search-here": "Search here",
"Search": "Search",
"Now-Playing": "Now Playing",
"Search-Result": "Search Result",
"Setting": "Setting",
"Videos": "Videos",
"views": "views",
"Channel": "Channel",
"Playlists": "Playlists",
"Load-More": "Load More",
"Playlist": "Playlist",
"Search-Results": "Search Results",
"URL": "URL:",
"Global-UI": "Global UI",
"setting": "setting"
}
23 changes: 12 additions & 11 deletions public/locales/en/menu.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
{
"File": "File",
"Close": "Close",
"Quit": "Quit",
"Player": "Player",
"Play-/-pause": "Play / pause",
"Next-song": "Next song",
"Previous-song": "Previous song",
"Help": "Help",
"About": "About",
"Browse-source-code": "Browse source code",
"Sponsor": "Sponsor"
"Window": "Window",
"File": "File",
"Close": "Close",
"Quit": "Quit",
"Player": "Player",
"Play-/-pause": "Play / pause",
"Next-song": "Next song",
"Previous-song": "Previous song",
"Help": "Help",
"About": "About",
"Browse-source-code": "Browse source code",
"Sponsor": "Sponsor"
}
4 changes: 2 additions & 2 deletions public/locales/en/now-playing.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"Nothing-is-playing": "Nothing is playing",
"Add-something-to-playlist-to-play": "Add something to playlist to play"
"Nothing-is-playing": "Nothing is playing",
"Add-something-to-playlist-to-play": "Add something to playlist to play"
}
46 changes: 23 additions & 23 deletions public/locales/en/playlist.json
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
{
"Save-to-drive": "Save to drive",
"Remove-from-playlist": "Remove from playlist",
"Retry": "Retry",
"Please-input-name-of-the-new-playlist": "Please input name of the new playlist",
"Playlist-Added": "Playlist Added",
"New-Playlist": "New Playlist",
"This-is-the-last-playlist": "This is the last playlist",
"Are-you-sure-to-remove-the-playlist?": "Are you sure to remove the playlist?",
"Please-input-the-new-name-for-playlist": "Please input the new name for playlist",
"Name-cannot-be-empty": "Name cannot be empty",
"More-playlist-options": "More playlist options",
"Remove-playlist": "Remove playlist",
"Rename-playlist": "Rename playlist",
"Reorder-items": "Reorder items",
"Scroll-to-current-playing": "Scroll to current playing",
"Randomize-items": "Randomize items",
"Shuffle-unplayed-items": "Shuffle unplayed items",
"Shuffle-all-items": "Shuffle all items",
"Are-you-sure-to-clear-the-playlist": "Are you sure to clear the playlist",
"Clear-playlist": "Clear playlist",
"Remove-Items": "Remove Items",
"Clear-Error-items": "Clear Error items",
"Clear-played-items": "Clear played items"
"Save-to-drive": "Save to drive",
"Remove-from-playlist": "Remove from playlist",
"Retry": "Retry",
"Please-input-name-of-the-new-playlist": "Please input name of the new playlist",
"Playlist-Added": "Playlist Added",
"New-Playlist": "New Playlist",
"This-is-the-last-playlist": "This is the last playlist",
"Are-you-sure-to-remove-the-playlist?": "Are you sure to remove the playlist?",
"Please-input-the-new-name-for-playlist": "Please input the new name for playlist",
"Name-cannot-be-empty": "Name cannot be empty",
"More-playlist-options": "More playlist options",
"Remove-playlist": "Remove playlist",
"Rename-playlist": "Rename playlist",
"Reorder-items": "Reorder items",
"Scroll-to-current-playing": "Scroll to current playing",
"Randomize-items": "Randomize items",
"Shuffle-unplayed-items": "Shuffle unplayed items",
"Shuffle-all-items": "Shuffle all items",
"Are-you-sure-to-clear-the-playlist": "Are you sure to clear the playlist",
"Clear-playlist": "Clear playlist",
"Remove-Items": "Remove Items",
"Clear-Error-items": "Clear Error items",
"Clear-played-items": "Clear played items"
}
26 changes: 13 additions & 13 deletions public/locales/en/search-result.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
{
"Details": "Details",
"Replace-Playlist-Prompt": "This will clear the current playlist. Are you sure to proceed?",
"Replace-current-playlist": "Replace current playlist",
"Browse-playlist": "Browse playlist",
"Add-all-to-playlist": "Add all to playlist",
"Already-on-playlist": "Already on playlist",
"Add-to-playlist": "Add to playlist",
"Add-to-next-song": "Add to next song",
"Copy-Link": "Copy Link",
"Open-link": "Open link",
"No-search-results": "No search results",
"Search-something-on-the-search-bar": "Search something on the search bar",
"Search-Results": "Search Results"
"Details": "Details",
"Replace-Playlist-Prompt": "This will clear the current playlist. Are you sure to proceed?",
"Replace-current-playlist": "Replace current playlist",
"Browse-playlist": "Browse playlist",
"Add-all-to-playlist": "Add all to playlist",
"Already-on-playlist": "Already on playlist",
"Add-to-playlist": "Add to playlist",
"Add-to-next-song": "Add to next song",
"Copy-Link": "Copy Link",
"Open-link": "Open link",
"No-search-results": "No search results",
"Search-something-on-the-search-bar": "Search something on the search bar",
"Search-Results": "Search Results"
}
52 changes: 27 additions & 25 deletions public/locales/en/setting.json
Original file line number Diff line number Diff line change
@@ -1,27 +1,29 @@
{
"Primary-color": "Primary color",
"Choose-color": "Choose color",
"Color-hex": "Color hex",
"Source": "Source",
"Youtube-Language": "Youtube Language",
"Youtube-Region": "Youtube Region",
"View-Invidious-Instances": "View Invidious Instances",
"View-Piped-Instances": "View Piped Instances",
"Reset-to-default": "Reset to default",
"Storage-size-must-be-a-positive-number": "Storage size must be a positive number",
"Store-audio-files-on-disk": "Store audio files on disk",
"Maximum-audio-files-storage": "Maximum audio files storage",
"Show-stored-files": "Show stored files",
"Manage-stored-files": "Manage stored files",
"Language": "Language",
"Theme": "Theme",
"Light": "Light",
"Dark": "Dark",
"Minimize-to-tray-when-closed": "Minimize to tray when closed",
"Seek-Time": "Seek Time",
"Choose-Layout": "Choose Layout",
"Show-Timeline-in-wavesurfer": "Show Timeline in wavesurfer",
"Instance-Configuration": "Instance Configuration",
"UI-Preference": "UI Preference",
"Storage-Setting": "Storage Setting"
"Primary-color": "Primary color",
"Choose-color": "Choose color",
"Color-hex": "Color hex",
"Source": "Source",
"Youtube-Language": "Youtube Language",
"Youtube-Region": "Youtube Region",
"View-Invidious-Instances": "View Invidious Instances",
"View-Piped-Instances": "View Piped Instances",
"Reset-to-default": "Reset to default",
"Storage-size-must-be-a-positive-number": "Storage size must be a positive number",
"Store-audio-files-on-disk": "Store audio files on disk",
"Maximum-audio-files-storage": "Maximum audio files storage",
"Show-stored-files": "Show stored files",
"Manage-stored-files": "Manage stored files",
"Language": "Language",
"Theme": "Theme",
"Light": "Light",
"Dark": "Dark",
"Minimize-to-tray-when-closed": "Minimize to tray when closed",
"Seek-Time": "Seek Time",
"Choose-Layout": "Choose Layout",
"Classic": "Classic",
"Large-Background": "Large Background",
"Show-Timeline-in-wavesurfer": "Show Timeline in wavesurfer",
"Instance-Configuration": "Instance Configuration",
"UI-Preference": "UI Preference",
"Storage-Setting": "Storage Setting"
}
40 changes: 20 additions & 20 deletions public/locales/en/storage.json
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
{
"This-will-remove-all-files-in-the-download-folder-Are-you-sure-to-proceed?": "This will remove all files in the download folder Are you sure to proceed?",
"Removed-files-without-entries": "Removed files without entries",
"Removed-entries-without-files": "Removed entries without files",
"Removed-selected-files": "Removed selected files",
"Added-{{count}}-items-to-playlist_one": "Added {{count}} items to playlist",
"Added-{{count}}-items-to-playlist_other": "Added {{count}} items to playlist",
"Unknown": "Unknown",
"Storage-management": "Storage management",
"items-selected": "items selected",
"Add-entries-to-current-playlist": "Add entries to current playlist",
"Remove-selected-entries": "Remove selected entries",
"Audio-files": "Audio files",
"Remove-non-existent-entries": "Remove non existent entries",
"Remove-unhandled-entries": "Remove unhandled entries",
"Remove-all-files": "Remove all files",
"Title": "Title",
"Video-Id": "Video Id",
"Created-on": "Created on",
"Last-access": "Last access",
"File-exist": "File exist"
"This-will-remove-all-files-in-the-download-folder-Are-you-sure-to-proceed?": "This will remove all files in the download folder Are you sure to proceed?",
"Removed-files-without-entries": "Removed files without entries",
"Removed-entries-without-files": "Removed entries without files",
"Removed-selected-files": "Removed selected files",
"Added-{{count}}-items-to-playlist_one": "Added {{count}} items to playlist",
"Added-{{count}}-items-to-playlist_other": "Added {{count}} items to playlist",
"Unknown": "Unknown",
"Storage-management": "Storage management",
"items-selected": "items selected",
"Add-entries-to-current-playlist": "Add entries to current playlist",
"Remove-selected-entries": "Remove selected entries",
"Audio-files": "Audio files",
"Remove-non-existent-entries": "Remove non existent entries",
"Remove-unhandled-entries": "Remove unhandled entries",
"Remove-all-files": "Remove all files",
"Title": "Title",
"Video-Id": "Video Id",
"Created-on": "Created on",
"Last-access": "Last access",
"File-exist": "File exist"
}
2 changes: 1 addition & 1 deletion public/locales/en/tray.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"Default-tooltip": "Kiku - A Youtube music player"
"Default-tooltip": "Kiku - A Youtube music player"
}
14 changes: 7 additions & 7 deletions public/locales/en/video-detail.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"Copied-Link": "Copied Link",
"Duration": "Duration",
"Published-at": "Published at",
"Views": "Views",
"Likes": "Likes",
"Description": "Description",
"Relevant-Videos": "Relevant Videos"
"Copied-Link": "Copied Link",
"Duration": "Duration",
"Published-at": "Published at",
"Views": "Views",
"Likes": "Likes",
"Description": "Description",
"Relevant-Videos": "Relevant Videos"
}
30 changes: 15 additions & 15 deletions public/locales/zh-TW/common.json
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
{
"Search-here": "在此搜尋",
"Search": "搜尋",
"Now-Playing": "現正播放",
"Search-Result": "搜尋結果",
"Setting": "設定",
"Videos": "影片",
"views": "觀看次數",
"Channel": "頻道",
"Playlists": "播放清單",
"Load-More": "載入更多",
"Playlist": "播放清單",
"Search-Results": "搜尋結果",
"URL": "鏈結:",
"Global-UI": "介面",
"setting": "設定"
"Search-here": "在此搜尋",
"Search": "搜尋",
"Now-Playing": "現正播放",
"Search-Result": "搜尋結果",
"Setting": "設定",
"Videos": "影片",
"views": "觀看次數",
"Channel": "頻道",
"Playlists": "播放清單",
"Load-More": "載入更多",
"Playlist": "播放清單",
"Search-Results": "搜尋結果",
"URL": "鏈結:",
"Global-UI": "介面",
"setting": "設定"
}
23 changes: 12 additions & 11 deletions public/locales/zh-TW/menu.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
{
"File": "檔案",
"Close": "關閉視窗",
"Quit": "退出應用程式",
"Player": "播放器",
"Play-/-pause": "播放 / 暫停",
"Next-song": "下一首曲目",
"Previous-song": "上一首曲目",
"Help": "說明",
"About": "關於 Kiku",
"Browse-source-code": "顯示原始碼",
"Sponsor": "贊助"
"Window": "視窗",
"File": "檔案",
"Close": "關閉視窗",
"Quit": "退出應用程式",
"Player": "播放器",
"Play-/-pause": "播放 / 暫停",
"Next-song": "下一首曲目",
"Previous-song": "上一首曲目",
"Help": "說明",
"About": "關於 Kiku",
"Browse-source-code": "顯示原始碼",
"Sponsor": "贊助"
}
4 changes: 2 additions & 2 deletions public/locales/zh-TW/now-playing.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"Nothing-is-playing": "尚未有播放項目",
"Add-something-to-playlist-to-play": "請在搜尋中添加播放項目"
"Nothing-is-playing": "尚未有播放項目",
"Add-something-to-playlist-to-play": "請在搜尋中添加播放項目"
}
Loading

0 comments on commit 6dee598

Please sign in to comment.