@tomorrowos/sdk 0.2.5 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -9,14 +9,22 @@
9
9
  <body>
10
10
  <header class="app-header">
11
11
  <h1>TomorrowOS Control Panel</h1>
12
- <p>Pair multiple screens, build a playlist, then publish per device.</p>
12
+ <p>Create playlists, save with confirm, then publish selected playlists per device.</p>
13
13
  </header>
14
14
 
15
15
  <div class="layout">
16
+ <aside class="panel-playlist-nav">
17
+ <div class="playlist-nav-header">
18
+ <h2>Playlists</h2>
19
+ <button type="button" class="primary" id="newPlaylistBtn" title="New playlist">+</button>
20
+ </div>
21
+ <ul id="playlistCatalog" class="playlist-catalog"></ul>
22
+ </aside>
23
+
16
24
  <main class="panel-main">
17
25
  <section class="card">
18
26
  <h2>Pair device</h2>
19
- <p class="hint">Enter the 6-character code on the screen (A–Z or 0–9). Each device keeps the same code after unpair.</p>
27
+ <p class="hint">Enter the 6-character code on the screen (A–Z or 0–9).</p>
20
28
  <div class="row">
21
29
  <input id="code" maxlength="6" placeholder="e.g. A3K9Z1" autocapitalize="characters" />
22
30
  <button type="button" onclick="verify()">Verify</button>
@@ -26,17 +34,14 @@
26
34
  <section class="card" id="pairedDevicesSection">
27
35
  <h2>Paired devices</h2>
28
36
  <div id="devicesGrid" class="devices-grid">
29
- <p class="devices-empty" id="devicesEmpty">No paired devices yet. Enter a code above.</p>
37
+ <p class="devices-empty" id="devicesEmpty">No paired devices yet.</p>
30
38
  </div>
31
39
  </section>
32
40
 
33
41
  <section class="card" id="cmsUrlSection">
34
42
  <h2>CMS URL for screens</h2>
35
43
  <p class="hint">
36
- <strong>Local development only.</strong> Fill this in when you run the CMS on your PC and
37
- TVs are on the same LAN (e.g. <code>http://192.168.1.105:3000</code> — same machine as your
38
- <code>ws://</code> address, not <code>localhost</code>). On hosted CMS (Replit, etc.) you
39
- normally do <strong>not</strong> need to change this.
44
+ <strong>Local development only.</strong> LAN URL for TVs (not localhost).
40
45
  </p>
41
46
  <div class="row">
42
47
  <input
@@ -49,11 +54,16 @@
49
54
  </div>
50
55
  </section>
51
56
 
52
- <section class="card">
53
- <h2>When this playlist plays</h2>
54
- <p class="hint">
55
- Leave blank for always on (device local time). All set fields must match.
56
- </p>
57
+ <section class="card" id="playlistEditorSection">
58
+ <h2 id="editorTitle">Playlist editor</h2>
59
+ <p class="hint">Save confirms changes. Names must be unique. Schedule applies to this playlist only.</p>
60
+ <label class="field-label">
61
+ Name
62
+ <input type="text" id="playlistName" placeholder="e.g. Weekday promo" />
63
+ </label>
64
+
65
+ <h3 class="subheading">When this playlist plays</h3>
66
+ <p class="hint">Leave blank for always on (device local time).</p>
57
67
  <div class="schedule-grid">
58
68
  <label>
59
69
  Start date
@@ -82,6 +92,11 @@
82
92
  <label><input type="checkbox" class="day-checkbox" value="6" /> Sat</label>
83
93
  </div>
84
94
  </div>
95
+
96
+ <div class="editor-actions">
97
+ <button type="button" class="primary" id="savePlaylistBtn">Save playlist</button>
98
+ <button type="button" class="danger" id="deletePlaylistBtn">Delete playlist</button>
99
+ </div>
85
100
  </section>
86
101
 
87
102
  <pre id="result" aria-live="polite"></pre>
@@ -89,7 +104,7 @@
89
104
 
90
105
  <aside class="panel-playlist">
91
106
  <div class="playlist-header">
92
- <h2>Playlist</h2>
107
+ <h2>Assets</h2>
93
108
  <button type="button" class="primary" id="addAssetBtn" title="Add image or video">+</button>
94
109
  </div>
95
110
  <input
@@ -99,11 +114,24 @@
99
114
  accept="image/*,video/*,.wgt,.zip"
100
115
  />
101
116
  <ul id="playlistList" class="playlist-list">
102
- <li class="playlist-empty" id="playlistEmpty">No assets yet. Tap + to upload.</li>
117
+ <li class="playlist-empty" id="playlistEmpty">Select or create a playlist, then add assets.</li>
103
118
  </ul>
104
119
  </aside>
105
120
  </div>
106
121
 
122
+ <div id="publishModal" class="modal hidden" role="dialog" aria-modal="true">
123
+ <div class="modal-backdrop" data-close-modal="1"></div>
124
+ <div class="modal-card">
125
+ <h2>Publish to device</h2>
126
+ <p class="hint" id="publishModalHint">Select playlists to deploy. Updates apply on publish; reboot pulls latest saved versions.</p>
127
+ <div id="publishChecklist" class="publish-checklist"></div>
128
+ <div class="modal-actions">
129
+ <button type="button" id="publishConfirmBtn" class="primary">Publish selected</button>
130
+ <button type="button" data-close-modal="1">Cancel</button>
131
+ </div>
132
+ </div>
133
+ </div>
134
+
107
135
  <script src="./methods.js" defer></script>
108
136
  </body>
109
137
  </html>