diff options
| author | Pinapelz <yukais@pinapelz.com> | 2026-03-20 23:16:01 -0700 |
|---|---|---|
| committer | Pinapelz <yukais@pinapelz.com> | 2026-03-20 23:16:01 -0700 |
| commit | 3508776583c21785dffc2f0bc9e7dd81c3f08480 (patch) | |
| tree | 681272e3ec7dfaa8c2f5b1b89247aa2e7bd6acc2 /res | |
| parent | 276e12db29ab31aa002f55b1a3cc69f170c1a2c2 (diff) | |
init custom changes
Diffstat (limited to 'res')
| -rw-r--r-- | res/css/setup.css | 48 | ||||
| -rw-r--r-- | res/img/welcome.webp | bin | 0 -> 53258 bytes | |||
| -rw-r--r-- | res/index.html | 2 | ||||
| -rw-r--r-- | res/langs/en.json | 228 | ||||
| -rw-r--r-- | res/setup.html | 31 |
5 files changed, 166 insertions, 143 deletions
diff --git a/res/css/setup.css b/res/css/setup.css index 9755ad3..b42f8a8 100644 --- a/res/css/setup.css +++ b/res/css/setup.css @@ -3,23 +3,42 @@ body { height: 100vh; align-items: center; justify-content: center; + background-color: var(--background-video); + margin: 0; } .setup { margin: auto; - padding: 2rem; - width: 320px; + padding: 2.5rem 2rem; + width: 360px; display: flex; flex-direction: column; align-items: center; - - /* debug */ background-color: #1a1a1f; + color: var(--foreground); + border: 1px solid var(--border); + border-radius: 0.5rem; + gap: 1rem; +} + +.welcome-image { + max-width: 200px; + width: 100%; border-radius: 0.375rem; + margin-bottom: 0.5rem; +} - & h1 { - font-size: 1.75rem; - } +.setup-title { + font-size: 1.75rem; + margin: 0; + text-align: center; +} + +.setup p { + margin: 0; + text-align: center; + opacity: 0.7; + font-size: 0.95rem; } .setup-form { @@ -27,13 +46,23 @@ body { flex-direction: column; gap: 1rem; width: 100%; + margin-top: 0.5rem; + + & input { + width: 100%; + box-sizing: border-box; + } & button { margin: 0; - padding: .75rem .5rem; + padding: 0.75rem 0.5rem; justify-content: center; background-color: var(--accent); color: #fff; + border: none; + border-radius: 0.375rem; + cursor: pointer; + font-size: 0.95rem; &:hover { filter: brightness(1.15); @@ -46,4 +75,5 @@ body { flex-direction: column; gap: 0.5rem; color: var(--error); -} + font-size: 0.9rem; +}
\ No newline at end of file diff --git a/res/img/welcome.webp b/res/img/welcome.webp Binary files differnew file mode 100644 index 0000000..b53f48e --- /dev/null +++ b/res/img/welcome.webp diff --git a/res/index.html b/res/index.html index 2f620c6..dbdde80 100644 --- a/res/index.html +++ b/res/index.html @@ -145,7 +145,7 @@ </section> <!-- Footer --> <footer id="footer"> - <p>Powered by <a href="https://github.com/RblSb/SyncTube" target="_blank" rel="noreferrer noopener">SyncTube</a> + <p>Dohee Cinema is powered by <a href="https://github.com/RblSb/SyncTube" target="_blank" rel="noreferrer noopener">SyncTube</a> </p> </footer> </main> diff --git a/res/langs/en.json b/res/langs/en.json index a7ce267..91d7135 100644 --- a/res/langs/en.json +++ b/res/langs/en.json @@ -1,119 +1,119 @@ { - "connection": "Connection", - "msgConnected": "Connected", - "msgDisconnected": "Disconnected", - "joined": "joined", - "online": "online", - "nothingPlaying": "Nothing Playing", - "hintListStart": "Welcome to SyncTube! Here you can:", - "hintListAddVideo": "$addVideos to watch together", - "hintListRequestLeader": "$requestLeader to pause and rewind videos for everyone", - "hintListRequestLeaderMouse": "(also use right mouse button for quick pause)", - "hintListRequestLeaderTouch": "(also use long tap for quick pause)", - "hintListOpenInApp": "$openInApp this server for better Android experience", - "hintListHide": "$hideThisMessage and send <code>/help</code> in chat to see it again", - "addVideos": "Add Videos", - "requestLeader": "Request Leader", - "openInApp": "Open in App", - "hideThisMessage": "Hide this message", - "usernameError": "Username length must be from 1 to $MAX characters and don't repeat another's. Characters &^<>'\" are not allowed.", - "passwordError": "Password length must be from $MIN to $MAX characters.", - "passwordsMismatchError": "Passwords do not match.", - "passwordMatchError": "Wrong password.", - "accessError": "Access error", - "noPermission": "No '$PERMISSION' permission.", - "totalVideoLimitError": "Playlist video limit has been reached.", - "userVideoLimitError": "Playlist video limit per user has been reached.", - "videoAlreadyExistsError": "The video already exists in playlist.", - "addVideoError": "Failed to add video.", - "adminsCannotBeBannedError": "Admins cannot be banned. Remove them first.", - "caching": "Caching", - "downloading": "Downloading", - "uploading": "Uploading", - "rawVideo": "Raw video", - "videos": "videos", - "addedBy": "Added by", - "play": "Play", - "setNext": "Next", - "makePermanent": "Make Permanent", - "makeTemporary": "Make Temporary", - "delete": "Delete", - "account": "Account", - "exportSettings": "Export Settings", - "importSettings": "Import Settings", - "login": "Login", - "exit": "Exit", - "settings": "Settings", - "synchThreshold": "Synch Threshold", - "general": "General", - "hotkeys": "Hotkeys", - "video": "Video", - "channel": "Channel", - "layout": "Layout", - "swapLayout": "Swap Layout", - "chatOnly": "Chat Only", - "setVideoUrl": "Set Video URL", - "setVideoUrlPrompt": "New video URL:\n(Does not affect other users)", - "selectLocalVideo": "Select Local Video", - "removePlayer": "Remove Player", - "restorePlayer": "Restore Player", - "toggleUserList": "Show/Hide Userlist", - "leaderDesc": "Request video control permissions", - "mobileViewBtn": "Mobile View", - "leader": "Leader", - "enterAsGuest": "Enter As Guest:", - "yourName": "Your Name", - "enterUserPassword": "Enter User Password", - "yourPassword": "Your Password", - "emotes": "Emotes", - "chat": "Chat", - "kicked": "Kicked", - "clearChat": "Clear Chat", - "chatlinePlaceholder": "Send a message...", - "leaderDisconnectedServerOnPause": "Leader was disconnected, server on pause.", - "unpause": "Unpause", - "addVideoFromUrl": "Add video from URL", - "embedCustomFrame": "Embed a custom frame", - "clearPlaylist": "Clear playlist", - "shufflePlaylist": "Shuffle playlist", - "playlist": "Playlist", - "playlistOpen": "Playlist open", - "playlistLocked": "Playlist locked", - "expandPlayer": "Expand player", - "toggleVideoSync": "Toggle video synchronization", - "toggleSynchConfirm": "Are you sure you want to turn off video sync?", - "refreshPlayer": "Refresh player", - "fullscreenPlayer": "Fullscreen player", - "retrievePlaylistLinks": "Retrieve playlist links", - "voteForSkip": "Vote for skip", - "addAsTemporary": "Add as temporary", - "cacheOnServer": "Cache on server", - "mediaUrl": "Media URL", - "optionalTitle": "Title (optional)", - "subtitlesUrlOptional": "Subtitles URL (optional)", - "voiceOverAudioTrackUrlOptional": "Voice-over audio URL (optional)", - "addTemplateUrl": "Add template URL", - "queueNext": "Queue next", - "queueLast": "Queue last", - "and": "and", - "or": "or", - "to": "to", - "pasteEmbedCodeAndClick": "Paste the embed code here", - "acceptableEmbedCodesAre": "Acceptable embed codes are", - "customEmbedsCannotBeSynchronized": "CUSTOM EMBEDS CANNOT BE SYNCHRONIZED", - "save": "Save", - "skipItemConfirm": "Are you sure you want to skip current video?", - "clearPlaylistConfirm": "Are you sure you want to clear the playlist?", - "shufflePlaylistConfirm": "Are you sure you want to shuffle the playlist?", - "lockPlaylistConfirm": "Are you sure you want to lock the playlist?", + "connection": "Connection", + "msgConnected": "Connected", + "msgDisconnected": "Disconnected", + "joined": "joined", + "online": "online", + "nothingPlaying": "Nothing Playing", + "hintListStart": "Welcome to Dohee Cinema! Here you can:", + "hintListAddVideo": "$addVideos to watch together (press the + button)", + "hintListRequestLeader": "$requestLeader to pause and rewind videos for everyone", + "hintListRequestLeaderMouse": "(also use right mouse button for quick pause)", + "hintListRequestLeaderTouch": "(also use long tap for quick pause)", + "hintListOpenInApp": "$openInApp this server for better Android experience", + "hintListHide": "$hideThisMessage and send <code>/help</code> in chat to see it again", + "addVideos": "Add Videos", + "requestLeader": "Request Leader", + "openInApp": "Open in App", + "hideThisMessage": "Hide this message", + "usernameError": "Username length must be from 1 to $MAX characters and don't repeat another's. Characters &^<>'\" are not allowed.", + "passwordError": "Password length must be from $MIN to $MAX characters.", + "passwordsMismatchError": "Passwords do not match.", + "passwordMatchError": "Wrong password.", + "accessError": "Access error", + "noPermission": "No '$PERMISSION' permission.", + "totalVideoLimitError": "Playlist video limit has been reached.", + "userVideoLimitError": "Playlist video limit per user has been reached.", + "videoAlreadyExistsError": "The video already exists in playlist.", + "addVideoError": "Failed to add video.", + "adminsCannotBeBannedError": "Admins cannot be banned. Remove them first.", + "caching": "Caching", + "downloading": "Downloading", + "uploading": "Uploading", + "rawVideo": "Raw video", + "videos": "videos", + "addedBy": "Added by", + "play": "Play", + "setNext": "Next", + "makePermanent": "Make Permanent", + "makeTemporary": "Make Temporary", + "delete": "Delete", + "account": "Account", + "exportSettings": "Export Settings", + "importSettings": "Import Settings", + "login": "Login", + "exit": "Exit", + "settings": "Settings", + "synchThreshold": "Synch Threshold", + "general": "General", + "hotkeys": "Hotkeys", + "video": "Video", + "channel": "Channel", + "layout": "Layout", + "swapLayout": "Swap Layout", + "chatOnly": "Chat Only", + "setVideoUrl": "Set Video URL", + "setVideoUrlPrompt": "New video URL:\n(Does not affect other users)", + "selectLocalVideo": "Select Local Video", + "removePlayer": "Remove Player", + "restorePlayer": "Restore Player", + "toggleUserList": "Show/Hide Userlist", + "leaderDesc": "Request video control permissions", + "mobileViewBtn": "Mobile View", + "leader": "Leader", + "enterAsGuest": "Enter As Guest:", + "yourName": "Your Name", + "enterUserPassword": "Enter User Password", + "yourPassword": "Your Password", + "emotes": "Emotes", + "chat": "Chat", + "kicked": "Kicked", + "clearChat": "Clear Chat", + "chatlinePlaceholder": "Send a message...", + "leaderDisconnectedServerOnPause": "Leader was disconnected, server on pause.", + "unpause": "Unpause", + "addVideoFromUrl": "Add video from URL", + "embedCustomFrame": "Embed a custom frame", + "clearPlaylist": "Clear playlist", + "shufflePlaylist": "Shuffle playlist", + "playlist": "Playlist", + "playlistOpen": "Playlist open", + "playlistLocked": "Playlist locked", + "expandPlayer": "Expand player", + "toggleVideoSync": "Toggle video synchronization", + "toggleSynchConfirm": "Are you sure you want to turn off video sync?", + "refreshPlayer": "Refresh player", + "fullscreenPlayer": "Fullscreen player", + "retrievePlaylistLinks": "Retrieve playlist links", + "voteForSkip": "Vote for skip", + "addAsTemporary": "Add as temporary", + "cacheOnServer": "Cache on server", + "mediaUrl": "Media URL", + "optionalTitle": "Title (optional)", + "subtitlesUrlOptional": "Subtitles URL (optional)", + "voiceOverAudioTrackUrlOptional": "Voice-over audio URL (optional)", + "addTemplateUrl": "Add template URL", + "queueNext": "Queue next", + "queueLast": "Queue last", + "and": "and", + "or": "or", + "to": "to", + "pasteEmbedCodeAndClick": "Paste the embed code here", + "acceptableEmbedCodesAre": "Acceptable embed codes are", + "customEmbedsCannotBeSynchronized": "CUSTOM EMBEDS CANNOT BE SYNCHRONIZED", + "save": "Save", + "skipItemConfirm": "Are you sure you want to skip current video?", + "clearPlaylistConfirm": "Are you sure you want to clear the playlist?", + "shufflePlaylistConfirm": "Are you sure you want to shuffle the playlist?", + "lockPlaylistConfirm": "Are you sure you want to lock the playlist?", - "yes": "Yes", - "no": "No", - "on": "On", - "off": "Off", + "yes": "Yes", + "no": "No", + "on": "On", + "off": "Off", - "areYouSure": "Are you sure?", - "dataWillBeLost": "The data will be lost.", + "areYouSure": "Are you sure?", + "dataWillBeLost": "The data will be lost.", - "setupTitle": "Welcome to SyncTube!" + "setupTitle": "Welcome to Dohee Cinema!" } diff --git a/res/setup.html b/res/setup.html index 8068a9d..546ee1b 100644 --- a/res/setup.html +++ b/res/setup.html @@ -19,17 +19,16 @@ <body> <main class="setup"> - <h1 class="setup-title">SyncTube</h1> - <p>Create your admin account</p> + <img class="welcome-image" src="img/welcome.webp" alt="Welcome to Dohee Cinema"> + <h1 class="setup-title">Welcome to the Dohee Cinema</h1> + <p>put in the password for entry</p> - <form id="setup-form" class="setup-form" action="/setup" method="POST"> - <input type="text" name="name" placeholder="Name"> + <form id="setup-form" class="setup-form"> <input type="password" name="password" placeholder="Password"> - <input type="password" name="confirmation" placeholder="Repeat password"> <div id="form-errors" class="form-errors"></div> - <button type="submit">Create</button> + <button type="submit">Enter</button> </form> </main> @@ -40,30 +39,24 @@ formElement.addEventListener("submit", function (e) { e.preventDefault(); - const { name, password, confirmation } = formElement.elements; + const { password } = formElement.elements; const payload = { - name: name.value, password: password.value, - passwordConfirmation: confirmation.value, - } + }; - fetch("/setup", { method: "POST", body: JSON.stringify(payload) }) + fetch("/gate", { method: "POST", headers: { "Content-Type": "application/json" }, body: JSON.stringify(payload) }) .then(res => res.json()) .then(response => handleResponse(response)) .catch(() => handleResponse(null)); }, true); - function handleResponse(response) { - if (response.success) { - return window.location.reload(); + if (response && response.success === true) { + window.location.href = "/"; + return; } - const errors = !response - ? ["Unknown error"] - : (response.errors ?? []).map(item => item.error); - - showErrors(errorsElement, errors); + showErrors(errorsElement, ["Incorrect password. Not cool man"]); } function showErrors(container, errors) { |
