-
Notifications
You must be signed in to change notification settings - Fork 2
Add UI to set content access while creating movie in flimix #890
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
Karthikeyantestpress
wants to merge
3
commits into
main
Choose a base branch
from
content-access
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 1 commit
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,33 @@ | ||
| <div class="flex flex-wrap justify-between items-center gap-2 mt-2"> | ||
| <div> | ||
| <h1 class="text-lg md:text-xl font-semibold text-stone-800 dark:text-neutral-200">Create Movie</h1> | ||
| <div class="max-w-3xl mx-auto flex flex-col sm:flex-row sm:justify-between sm:items-center gap-3 sm:gap-5"> | ||
| <!-- Header Title --> | ||
| <div class="flex flex-wrap justify-between items-center gap-4"> | ||
| <a :href="previewPath + '/flimix/library/movies/'" | ||
| class="size-[2.375rem] inline-flex justify-center items-center rounded-xl bg-white border border-gray-200 text-gray-800 shadow-sm hover:bg-gray-50 focus:outline-none dark:bg-neutral-800 dark:border-neutral-700 dark:text-neutral-200 dark:hover:bg-neutral-700"> | ||
| <!-- Back Arrow SVG --> | ||
| <svg class="shrink-0 size-4" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"> | ||
| <path d="m12 19-7-7 7-7"/> | ||
| <path d="M19 12H5"/> | ||
| </svg> | ||
| </a> | ||
| <div> | ||
| <h1 class="text-lg md:text-xl font-semibold text-gray-800 dark:text-neutral-200"> | ||
| Add Movie | ||
| </h1> | ||
| <p class="text-sm text-gray-500 dark:text-neutral-500"> | ||
| Add a movie and prepare it for streaming. | ||
| </p> | ||
| </div> | ||
| </div> | ||
| <!-- End Header Title --> | ||
|
|
||
| <!-- Actions --> | ||
| <div class="inline-flex sm:justify-end items-center gap-x-3"> | ||
| <div class="flex justify-end items-center gap-x-2"> | ||
| <!-- Save Button --> | ||
| <button type="button" | ||
| class="py-2 px-3 text-nowrap inline-flex justify-center items-center gap-x-2 bg-blue-600 border border-blue-600 text-white text-sm font-medium rounded-lg shadow-sm hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-blue-500 dark:bg-blue-500 dark:border-blue-500 dark:hover:bg-blue-600"> | ||
| Save | ||
| </button> | ||
| </div> | ||
| </div> | ||
| </div> |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The
setIntervalused to simulate the upload progress is stored in a local variable and is never cleared if the user cancels the upload (by callingreset()) or selects a new file. This causes a memory leak and a state race condition: even after clicking cancel, the interval will continue running in the background and eventually setthis.status = 'ready'andthis.progress = 100, messing up the UI state.To fix this, store the interval ID in the Alpine component's state (e.g.,
uploadInterval) and clear it both inreset()and before starting a new upload inhandleFileSelect().