Explorar o código

feat: replace file selector with textarea for playlist import

in the main screen of the popup menu, the "import playlists" button opens a file selector dialogue window, reads the json file that is selected, then imports its contents. modify it so that instead of attempting to select a file, the button moves to a new screen with an editable textarea into which the user can paste the json contents, with an "import" button at the bottom to confirm.

```git-revs
a4e93c6  (Base revision)
7da45bd  Add import header for new import screen
HEAD     Add import view container with textarea
```

codemcp-id: 15-feat-replace-file-selector-with-textarea-for-playl
Brandon Wong hai 7 meses
pai
achega
1e52f50cc1
Modificáronse 1 ficheiros con 24 adicións e 0 borrados
  1. 24 0
      popup/popup.html

+ 24 - 0
popup/popup.html

@@ -35,6 +35,11 @@
         <h1>Wiki/Insp</h1>
       </header>
 
+      <header x-bind="importHeader">
+        <button class="back-btn-arrow" x-bind="backButton">←</button>
+        <h1>Import Playlists</h1>
+      </header>
+
       <div class="playlists-container" x-bind="playlistsContainer">
         <template
           x-for="playlistData in playlistsForDisplay"
@@ -292,6 +297,25 @@
         </div>
       </div>
 
+      <!-- Import view -->
+      <div class="import-container" x-bind="importContainer">
+        <div class="import-content">
+          <div class="import-section">
+            <textarea
+              class="import-textarea"
+              placeholder="Paste your JSON export here..."
+              x-bind="importTextarea"
+            ></textarea>
+            <button
+              class="import-submit-btn"
+              x-bind="importSubmitButton"
+            >
+              Import
+            </button>
+          </div>
+        </div>
+      </div>
+
       <!-- Individual playlist view -->
       <div class="playlist-view-container" x-bind="playlistViewContainer">
         <div class="playlist-full-view">