230 lines
6.2 KiB
HTML
230 lines
6.2 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="zh-CN">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>网易云音乐同步到 Navidrome</title>
|
|
<style>
|
|
* {
|
|
margin: 0;
|
|
padding: 0;
|
|
box-sizing: border-box;
|
|
}
|
|
body {
|
|
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
|
|
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
|
|
min-height: 100vh;
|
|
padding: 20px;
|
|
}
|
|
.container {
|
|
max-width: 1200px;
|
|
margin: 0 auto;
|
|
}
|
|
h1 {
|
|
color: white;
|
|
text-align: center;
|
|
margin-bottom: 30px;
|
|
font-size: 2.5em;
|
|
text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
|
|
}
|
|
.card {
|
|
background: white;
|
|
border-radius: 12px;
|
|
box-shadow: 0 10px 30px rgba(0,0,0,0.2);
|
|
padding: 25px;
|
|
margin-bottom: 20px;
|
|
}
|
|
.add-playlist {
|
|
display: flex;
|
|
gap: 10px;
|
|
margin-bottom: 20px;
|
|
}
|
|
.add-playlist input {
|
|
flex: 1;
|
|
padding: 12px 15px;
|
|
border: 2px solid #e0e0e0;
|
|
border-radius: 8px;
|
|
font-size: 14px;
|
|
transition: border-color 0.3s;
|
|
}
|
|
.add-playlist input:focus {
|
|
outline: none;
|
|
border-color: #667eea;
|
|
}
|
|
.add-playlist button {
|
|
padding: 12px 25px;
|
|
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
|
|
color: white;
|
|
border: none;
|
|
border-radius: 8px;
|
|
cursor: pointer;
|
|
font-size: 14px;
|
|
font-weight: 600;
|
|
transition: transform 0.2s, box-shadow 0.2s;
|
|
}
|
|
.add-playlist button:hover {
|
|
transform: translateY(-2px);
|
|
box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
|
|
}
|
|
.add-playlist button:active {
|
|
transform: translateY(0);
|
|
}
|
|
.playlist-list {
|
|
display: grid;
|
|
gap: 15px;
|
|
}
|
|
.playlist-item {
|
|
background: #f8f9fa;
|
|
border-radius: 8px;
|
|
padding: 20px;
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
transition: all 0.3s;
|
|
}
|
|
.playlist-item:hover {
|
|
background: #e9ecef;
|
|
transform: translateX(5px);
|
|
}
|
|
.playlist-info {
|
|
flex: 1;
|
|
}
|
|
.playlist-name {
|
|
font-size: 18px;
|
|
font-weight: 600;
|
|
color: #333;
|
|
margin-bottom: 8px;
|
|
}
|
|
.playlist-meta {
|
|
display: flex;
|
|
gap: 20px;
|
|
font-size: 13px;
|
|
color: #666;
|
|
}
|
|
.playlist-meta span {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 5px;
|
|
}
|
|
.status-badge {
|
|
padding: 4px 12px;
|
|
border-radius: 20px;
|
|
font-size: 12px;
|
|
font-weight: 600;
|
|
text-transform: uppercase;
|
|
}
|
|
.status-idle {
|
|
background: #e0e0e0;
|
|
color: #666;
|
|
}
|
|
.status-syncing {
|
|
background: #fff3cd;
|
|
color: #856404;
|
|
}
|
|
.status-success {
|
|
background: #d4edda;
|
|
color: #155724;
|
|
}
|
|
.status-error {
|
|
background: #f8d7da;
|
|
color: #721c24;
|
|
}
|
|
.playlist-actions {
|
|
display: flex;
|
|
gap: 10px;
|
|
}
|
|
.playlist-actions button {
|
|
padding: 8px 16px;
|
|
border: none;
|
|
border-radius: 6px;
|
|
cursor: pointer;
|
|
font-size: 13px;
|
|
font-weight: 600;
|
|
transition: all 0.2s;
|
|
}
|
|
.btn-sync {
|
|
background: #667eea;
|
|
color: white;
|
|
}
|
|
.btn-sync:hover {
|
|
background: #5568d3;
|
|
}
|
|
.btn-sync:disabled {
|
|
background: #ccc;
|
|
cursor: not-allowed;
|
|
}
|
|
.btn-delete {
|
|
background: #dc3545;
|
|
color: white;
|
|
}
|
|
.btn-delete:hover {
|
|
background: #c82333;
|
|
}
|
|
.empty-state {
|
|
text-align: center;
|
|
padding: 60px 20px;
|
|
color: #999;
|
|
}
|
|
.empty-state svg {
|
|
width: 80px;
|
|
height: 80px;
|
|
margin-bottom: 20px;
|
|
opacity: 0.5;
|
|
}
|
|
.loading {
|
|
text-align: center;
|
|
padding: 40px;
|
|
color: #666;
|
|
}
|
|
.error-message {
|
|
background: #f8d7da;
|
|
color: #721c24;
|
|
padding: 15px;
|
|
border-radius: 8px;
|
|
margin-bottom: 20px;
|
|
display: none;
|
|
}
|
|
.success-message {
|
|
background: #d4edda;
|
|
color: #155724;
|
|
padding: 15px;
|
|
border-radius: 8px;
|
|
margin-bottom: 20px;
|
|
display: none;
|
|
}
|
|
@keyframes spin {
|
|
to { transform: rotate(360deg); }
|
|
}
|
|
.spinner {
|
|
display: inline-block;
|
|
width: 20px;
|
|
height: 20px;
|
|
border: 3px solid rgba(255,255,255,0.3);
|
|
border-radius: 50%;
|
|
border-top-color: white;
|
|
animation: spin 0.8s linear infinite;
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<div class="container">
|
|
<h1>🎵 网易云音乐同步到 Navidrome</h1>
|
|
|
|
<div class="error-message" id="errorMessage"></div>
|
|
<div class="success-message" id="successMessage"></div>
|
|
|
|
<div class="card">
|
|
<div class="add-playlist">
|
|
<input type="text" id="playlistInput" placeholder="输入网易云音乐歌单ID或分享链接...">
|
|
<button onclick="addPlaylist()">添加歌单</button>
|
|
</div>
|
|
|
|
<div id="playlistList" class="playlist-list">
|
|
<div class="loading">加载中...</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<script src="app.js"></script>
|
|
</body>
|
|
</html> |