| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798 |
- <!doctype html>
- <html lang="en">
- <head>
- <meta charset="UTF-8" />
- <meta name="viewport" content="width=device-width, initial-scale=1.0" />
- <title>My Playlists</title>
- <link rel="stylesheet" href="popup.css" />
- <script src="alpine.min.js" defer></script>
- <script src="popup.js"></script>
- </head>
- <body>
- <div id="app" x-data="playlistManager">
- <header>
- <h1>My Playlists</h1>
- </header>
- <div class="playlists-container">
- <template
- x-for="(videos, playlistName) in playlists"
- :key="playlistName"
- >
- <div class="playlist">
- <h2 x-text="playlistName"></h2>
- <div class="video-list">
- <template x-for="(video, index) in videos" :key="index">
- <div class="video-item" :title="video.title">
- <span
- class="video-title"
- x-text="video.title"
- x-bind="videotitle"
- ></span>
- <div class="video-actions">
- <a
- :href="video.url"
- class="play-btn"
- x-bind="videoPlayLink"
- >
- ⏵
- </a>
- <button
- :data-playlist-name="playlistName"
- :data-playlist-index="index"
- x-bind="moveUpButton"
- class="move-up-btn"
- title="Move up"
- >
- ↑
- </button>
- <button
- :data-playlist-name="playlistName"
- :data-playlist-index="index"
- x-bind="moveDownButton"
- class="move-down-btn"
- title="Move down"
- >
- ↓
- </button>
- <button
- :data-playlist-name="playlistName"
- :data-playlist-index="index"
- x-bind="removeVideoButton"
- class="remove-btn"
- >
- X
- </button>
- </div>
- </div>
- </template>
- <!--
- <div x-show="videos.length === 0" class="empty-playlist">
- No videos in this playlist
- </div>
- -->
- </div>
- </div>
- </template>
- </div>
- <!-- Export/Import buttons -->
- <div class="export-container">
- <button class="export-btn" x-bind="exportButton">
- Export Playlists
- </button>
- <button class="import-btn" x-bind="importButton">
- Import Playlists
- </button>
- <input
- type="file"
- id="import-file-input"
- accept=".json"
- style="display: none"
- @change="importFile($event)"
- />
- </div>
- </div>
- </body>
- </html>
|