Skip to content

Commit

Permalink
feat: recently play&lang
Browse files Browse the repository at this point in the history
  • Loading branch information
maotoumao committed Jun 16, 2024
1 parent 0f7bbb9 commit 96bcba9
Show file tree
Hide file tree
Showing 37 changed files with 479 additions and 236 deletions.
8 changes: 6 additions & 2 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
{
"editor.formatOnSave": true
}
"editor.formatOnSave": true,
"files.associations": {
"*.html": "html",
"map": "cpp"
}
}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "musicfree-desktop",
"productName": "MusicFree",
"version": "0.0.3",
"version": "0.0.4",
"description": "一个插件化的音乐播放器",
"main": ".webpack/main",
"scripts": {
Expand Down
54 changes: 36 additions & 18 deletions res/lang/en-US.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@
"add": "Add",
"save": "Save",
"clear": "Clear",
"open": "Open"
"open": "Open",
"status": "Status"
},

"media": {
Expand Down Expand Up @@ -156,7 +157,10 @@
"create_local_sheet": "Create Playlist",
"starred_sheets": "Favorites",

"delete_sheet": "Delete Playlist"
"delete_sheet": "Delete",
"rename_sheet": "Rename",
"unstar_sheet": "Unstar",
"recently_play": "Recently Play"
},
"app_header": {
"nav_back": "Back",
Expand All @@ -165,7 +169,9 @@
"search_history": "Search History",
"settings": "Settings",
"minimize": "Minimize",
"exit": "Exit"
"minimode": "Minimode",
"exit": "Exit",
"theme": "Theme"
},
"music_bar": {
"open_music_detail_page": "Open Song Details",
Expand Down Expand Up @@ -193,7 +199,10 @@
"link_media_lyric": "Link Lyric",
"media_lyric_linked": "Lyric Linked: ",
"unlink_media_lyric": "Unlink Lyric",
"toast_media_lyric_unlinked": "Lyric Unlinked"
"toast_media_lyric_unlinked": "Lyric Unlinked",
"translation": "Translation",
"show_translation": "Show Translation",
"hide_translation": "Hide Translation"
},
"bottom_loading_state": {
"reached_end": "~~~ End ~~~",
Expand Down Expand Up @@ -232,7 +241,8 @@
},
"music_sheet_like_view": {
"play_all": "Play All",
"add_to_sheet": "Add to Playlist"
"add_to_sheet": "Add to Playlist",
"star": "Star"
},
"settings": {
"choose_path": "Choose Path",
Expand Down Expand Up @@ -277,7 +287,9 @@
"double_click_music_list": "When double-clicking the music list",
"add_music_to_playlist": "Add the selected song to the playback queue",
"replace_playlist_with_musiclist": "Replace playback queue with current music list",
"audio_output_device": "Audio output device"
"audio_output_device": "Audio output device",
"when_device_removed": "When device is removed",
"continue_playing": "Continue playing"
},
"download": {
"download_folder": "Download Directory",
Expand All @@ -300,18 +312,6 @@
"auto_update_plugin": "Automatically update plugins on startup",
"not_check_plugin_version": "Do not check plugin version when installing"
},
"theme": {
"example_theme_hint": "Here are some example themes:",
"example_theme_subscription_hint": "You can also follow the WeChat public account: <highlight>A Cat-headed Cat</highlight>, and reply with <highlight>MusicFree Theme Pack</highlight> to get the download link (updated periodically)",
"install_theme": "Install Theme Pack",
"uninstall_theme": "Uninstall Theme Pack",
"musicfree_theme": "MusicFree Theme",
"all_files": "All Files",
"install_theme_success": "Installed theme {{name}} successfully~",
"install_theme_fail": "Failed to install theme: {{reason}}",
"uninstall_theme_success": "Uninstalled theme {{name}} successfully~",
"uninstall_theme_fail": "Failed to uninstall theme: {{reason}}"
},
"short_cut": {
"enable_local": "Enable in-app shortcuts",
"enable_global": "Enable global shortcuts",
Expand Down Expand Up @@ -373,5 +373,23 @@
"unlock_desktop_lyric": "Unlock Desktop Lyrics",
"lock_desktop_lyric": "Lock Desktop Lyrics",
"no_playing_music": "No Music Playing"
},
"theme": {
"tab_local": "Local Theme",
"tab_remote": "Theme Marketplace",
"download_and_use": "Download and Use",
"use_theme": "Use Theme",
"install_theme": "Install Theme",
"update_theme": "Update Theme",
"uninstall_theme": "Uninstall Theme",
"musicfree_theme": "MusicFree Theme",
"all_files": "All Files",
"install_theme_success": "Successfully installed theme {{name}}~",
"install_theme_fail": "Failed to install theme: {{reason}}",
"uninstall_theme_success": "Successfully uninstalled theme {{name}}~",
"uninstall_theme_fail": "Failed to uninstall theme: {{reason}}",
"how_to_submit_new_theme": "💡How to submit a new theme: The themes in the theme marketplace are synchronized with the <Github>MusicFreeThemePacks</Github> repository. If you need to submit a new theme, please make a pull request directly.",
"load_remote_theme_error": "An error occurred...",
"invalid_theme": "Invalid theme: {{reason}}"
}
}
54 changes: 36 additions & 18 deletions res/lang/es-ES.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@
"add": "Añadir",
"save": "Guardar",
"clear": "Limpiar",
"open": "Abrir"
"open": "Abrir",
"status": "Estado"
},

"media": {
Expand Down Expand Up @@ -156,7 +157,10 @@
"create_local_sheet": "Crear lista de canciones",
"starred_sheets": "Mis favoritos",

"delete_sheet": "Eliminar lista de canciones"
"delete_sheet": "Eliminar lista de canciones",
"rename_sheet": "Cambiar nombre",
"unstar_sheet": "Desmarcar",
"recently_play": "Reproducido recientemente"
},
"app_header": {
"nav_back": "Atrás",
Expand All @@ -165,7 +169,9 @@
"search_history": "Historial de búsqueda",
"settings": "Configuración",
"minimize": "Minimizar",
"exit": "Salir"
"minimode": "Modo minimalista",
"exit": "Salir",
"theme": "tema"
},
"music_bar": {
"open_music_detail_page": "Abrir detalles de la canción",
Expand Down Expand Up @@ -193,7 +199,10 @@
"link_media_lyric": "Vincular letra",
"media_lyric_linked": "Letra vinculada: ",
"unlink_media_lyric": "Desvincular letra",
"toast_media_lyric_unlinked": "Letra desvinculada"
"toast_media_lyric_unlinked": "Letra desvinculada",
"translation": "Traducción",
"show_translation": "Mostrar traducción",
"hide_translation": "Ocultar traducción"
},
"bottom_loading_state": {
"reached_end": "~~~ Fin ~~~",
Expand Down Expand Up @@ -232,7 +241,8 @@
},
"music_sheet_like_view": {
"play_all": "Reproducir todo",
"add_to_sheet": "Añadir a la lista de canciones"
"add_to_sheet": "Añadir a la lista de canciones",
"star": "favorito"
},
"settings": {
"choose_path": "Elegir ruta",
Expand Down Expand Up @@ -277,7 +287,9 @@
"double_click_music_list": "Al hacer doble clic en la lista de canciones",
"add_music_to_playlist": "Añadir canción a la lista de reproducción",
"replace_playlist_with_musiclist": "Reemplazar la lista de reproducción con la lista de canciones actual",
"audio_output_device": "Dispositivo de salida de audio"
"audio_output_device": "Dispositivo de salida de audio",
"when_device_removed": "Cuando se elimina el dispositivo de audio",
"continue_playing": "Continuar reproduciendo"
},
"download": {
"download_folder": "Carpeta de descargas",
Expand All @@ -300,18 +312,6 @@
"auto_update_plugin": "Actualizar complementos automáticamente al iniciar la aplicación",
"not_check_plugin_version": "No verificar la versión al instalar complementos"
},
"theme": {
"example_theme_hint": "Aquí hay algunos temas de ejemplo:",
"example_theme_subscription_hint": "También puedes seguir nuestro WeChat: <highlight>Una GatoGato</highlight>, responde con <highlight>Paquete de temas MusicFree</highlight> para obtener el enlace de descarga (actualizado periódicamente)",
"install_theme": "Instalar paquete de temas",
"uninstall_theme": "Desinstalar paquete de temas",
"musicfree_theme": "Tema MusicFree",
"all_files": "Todos los archivos",
"install_theme_success": "Tema {{name}} instalado con éxito~",
"install_theme_fail": "Error al instalar el tema: {{reason}}",
"uninstall_theme_success": "Tema {{name}} desinstalado con éxito~",
"uninstall_theme_fail": "Error al desinstalar el tema: {{reason}}"
},
"short_cut": {
"enable_local": "Habilitar atajos en la aplicación",
"enable_global": "Habilitar atajos globales",
Expand Down Expand Up @@ -373,5 +373,23 @@
"unlock_desktop_lyric": "Desbloquear letra en pantalla",
"lock_desktop_lyric": "Bloquear letra en pantalla",
"no_playing_music": "No hay música reproduciéndose actualmente"
},
"theme": {
"tab_local": "Tema local",
"tab_remote": "Mercado de temas",
"download_and_use": "Descargar y usar",
"use_theme": "Usar tema",
"install_theme": "Instalar tema",
"update_theme": "Actualizar tema",
"uninstall_theme": "Desinstalar tema",
"musicfree_theme": "Tema de MusicFree",
"all_files": "Todos los archivos",
"install_theme_success": "Tema {{name}} instalado con éxito~",
"install_theme_fail": "Error al instalar el tema: {{reason}}",
"uninstall_theme_success": "Tema {{name}} desinstalado con éxito~",
"uninstall_theme_fail": "Error al desinstalar el tema: {{reason}}",
"how_to_submit_new_theme": "💡Cómo enviar un nuevo tema: Los temas en el mercado de temas están sincronizados con el repositorio <Github>MusicFreeThemePacks</Github>. Si necesita enviar un nuevo tema, envíe una solicitud de extracción directamente.",
"load_remote_theme_error": "Ha ocurrido un error...",
"invalid_theme": "Tema inválido: {{reason}}"
}
}
4 changes: 2 additions & 2 deletions res/lang/zh-CN.json
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,8 @@

"delete_sheet": "删除歌单",
"rename_sheet": "重命名歌单",
"unstar_sheet": "取消收藏"
"unstar_sheet": "取消收藏",
"recently_play": "最近播放"
},
"app_header": {
"nav_back": "后退",
Expand Down Expand Up @@ -311,7 +312,6 @@
"auto_update_plugin": "打开软件时自动更新插件",
"not_check_plugin_version": "安装插件时不校验版本"
},

"short_cut": {
"enable_local": "启用软件内快捷键",
"enable_global": "启用全局快捷键",
Expand Down
54 changes: 36 additions & 18 deletions res/lang/zh-TW.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@
"add": "新增",
"save": "保存",
"clear": "清除",
"open": "打開"
"open": "打開",
"status": "狀態"
},

"media": {
Expand Down Expand Up @@ -156,7 +157,10 @@
"create_local_sheet": "創建歌單",
"starred_sheets": "我的收藏",

"delete_sheet": "刪除歌單"
"delete_sheet": "刪除歌單",
"rename_sheet": "重歌單",
"unstar_sheet": "取消收藏",
"recently_play": "最近播放"
},
"app_header": {
"nav_back": "返回",
Expand All @@ -165,7 +169,9 @@
"search_history": "搜尋歷史",
"settings": "設置",
"minimize": "最小化",
"exit": "退出"
"minimode": "迷你模式",
"exit": "退出",
"theme": "主題"
},
"music_bar": {
"open_music_detail_page": "打開歌曲詳情",
Expand Down Expand Up @@ -193,7 +199,10 @@
"link_media_lyric": "鏈接歌詞",
"media_lyric_linked": "已鏈接歌詞:",
"unlink_media_lyric": "取消鏈接歌詞",
"toast_media_lyric_unlinked": "已取消鏈接歌詞"
"toast_media_lyric_unlinked": "已取消鏈接歌詞",
"translation": "翻譯",
"show_translation": "顯示翻譯",
"hide_translation": "隱藏翻譯"
},
"bottom_loading_state": {
"reached_end": "~~~ 沒有更多了 ~~~",
Expand Down Expand Up @@ -232,7 +241,8 @@
},
"music_sheet_like_view": {
"play_all": "播放全部",
"add_to_sheet": "添加到歌單"
"add_to_sheet": "添加到歌單",
"star": "收藏"
},
"settings": {
"choose_path": "選擇路徑",
Expand Down Expand Up @@ -277,7 +287,9 @@
"double_click_music_list": "雙擊歌曲列表時",
"add_music_to_playlist": "添加歌曲到播放清單",
"replace_playlist_with_musiclist": "用當前歌單替換播放清單",
"audio_output_device": "音頻輸出設備"
"audio_output_device": "音頻輸出設備",
"when_device_removed": "當音頻裝置被移除時",
"continue_playing": "繼續播放"
},
"download": {
"download_folder": "下載文件夾",
Expand All @@ -300,18 +312,6 @@
"auto_update_plugin": "啟動應用時自動更新插件",
"not_check_plugin_version": "安裝插件時不檢查版本"
},
"theme": {
"example_theme_hint": "這裡有一些示例主題:",
"example_theme_subscription_hint": "你也可以關注我們的微信:<highlight>一隻貓貓</highlight>,回復 <highlight>MusicFree 主題包</highlight> 獲取下載連結(定期更新)",
"install_theme": "安裝主題包",
"uninstall_theme": "卸載主題包",
"musicfree_theme": "MusicFree 主題",
"all_files": "所有文件",
"install_theme_success": "主題 {{name}} 安裝成功~",
"install_theme_fail": "安裝主題失敗:{{reason}}",
"uninstall_theme_success": "主題 {{name}} 卸載成功~",
"uninstall_theme_fail": "卸載主題失敗:{{reason}}"
},
"short_cut": {
"enable_local": "啟用應用內快捷鍵",
"enable_global": "啟用全局快捷鍵",
Expand Down Expand Up @@ -373,5 +373,23 @@
"unlock_desktop_lyric": "解鎖桌面歌詞",
"lock_desktop_lyric": "鎖定桌面歌詞",
"no_playing_music": "目前無正在播放的音樂"
},
"theme": {
"tab_local": "本地主題",
"tab_remote": "主題市場",
"download_and_use": "下載並使用",
"use_theme": "使用主題",
"install_theme": "安裝主題",
"update_theme": "更新主題",
"uninstall_theme": "卸載主題",
"musicfree_theme": "MusicFree 主題",
"all_files": "全部檔案",
"install_theme_success": "安裝主題{{name}}成功~",
"install_theme_fail": "安裝主題失敗: {{reason}}",
"uninstall_theme_success": "卸載主題{{name}}成功~",
"uninstall_theme_fail": "卸載主題失敗: {{reason}}",
"how_to_submit_new_theme": "💡如何提交新主題: 主題市場中的主題與 <Github>MusicFreeThemePacks</Github> 倉庫同步,如果需要提交新主題請直接提PR。",
"load_remote_theme_error": "出錯啦...",
"invalid_theme": "主題無效: {{reason}}"
}
}
3 changes: 3 additions & 0 deletions src/assets/icons/clock.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions src/renderer/components/MusicList/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,8 @@ interface IMusicListProps {
enableDrag?: boolean;
/** 拖拽结束 */
onDragEnd?: (newMusicList: IMusic.IMusicItem[]) => void;
/** context */
contextMenu?: IContextMenuItem[];
}

const columnHelper = createColumnHelper<IMusic.IMusicItem>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,6 @@
padding-left: 0.8em;
padding-right: 0.8em;

&:not([data-type="primaryButton"]) {
background-color: color-mix(in srgb, currentColor 15%, transparent);
}

& svg {
width: 1.3em;
height: 1.3em;
Expand Down
Loading

0 comments on commit 96bcba9

Please sign in to comment.