-
Notifications
You must be signed in to change notification settings - Fork 841
[RNMobile] Disable VideoPress settings for not belonged videos #30759
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
Merged
fluiddot
merged 11 commits into
trunk
from
rnmobile/videopress-disable-details-settings-not-belonged-videos
May 19, 2023
Merged
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
35f408f
Disable details block settings if video does not belong to site
fluiddot ee4f2b0
Add video not owned message to Details panel
fluiddot 8e45418
Add changelog
fluiddot 50acb9a
Merge branch 'trunk' into rnmobile/videopress-disable-details-setting…
fluiddot 399cef3
Update VideoPress package version
fluiddot 510bbcf
Fix styles import in `DetailsPanel` component
fluiddot 1fed655
Render warning component after detail settings
fluiddot bccfe6b
Disable privacy and rating settings if video does not belong to site
fluiddot b46af9b
Add `VideoNotOwnedWarning` component
fluiddot 0aa74ee
Show video not owned warning in Privacy and Rating panel
fluiddot cade9c9
Update changelog
fluiddot 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
4 changes: 4 additions & 0 deletions
4
...ts/packages/videopress/changelog/rnmobile-videopress-disable-settings-not-belonged-videos
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 |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| Significance: patch | ||
| Type: added | ||
|
|
||
| RNMobile: Disable VideoPress settings if video does not belong to the site |
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
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
41 changes: 41 additions & 0 deletions
41
...s/src/client/block-editor/blocks/video/components/video-not-owned-warning/index.native.js
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 |
|---|---|---|
| @@ -0,0 +1,41 @@ | ||
| /** | ||
| * WordPress dependencies | ||
| */ | ||
| import { usePreferredColorSchemeStyle } from '@wordpress/compose'; | ||
| import { __ } from '@wordpress/i18n'; | ||
| import { Icon, warning } from '@wordpress/icons'; | ||
| /** | ||
| * External dependencies | ||
| */ | ||
| import { Text, View } from 'react-native'; | ||
| /** | ||
| * Internal dependencies | ||
| */ | ||
| import styles from './styles.scss'; | ||
|
|
||
| /** | ||
| * React component that renders a warning message about the video not owned by the site. | ||
| * | ||
| * @returns {import('react').ReactElement} - Details panel component. | ||
| */ | ||
| export default function VideoNotOwnedWarning() { | ||
| const msgStyle = usePreferredColorSchemeStyle( | ||
| styles[ 'video-not-owned-notice__message' ], | ||
| styles[ 'video-not-owned-notice__message--dark' ] | ||
| ); | ||
| const iconStyle = usePreferredColorSchemeStyle( | ||
| styles[ 'video-not-owned-notice__icon' ], | ||
| styles[ 'video-not-owned-notice__icon--dark' ] | ||
| ); | ||
| return ( | ||
| <View style={ styles[ 'video-not-owned-notice__container' ] }> | ||
| <Icon style={ iconStyle } icon={ warning } /> | ||
| <Text style={ msgStyle }> | ||
| { __( | ||
| 'This video is not owned by this site. You can still embed it and customize the player, but you won’t be able to edit the video.', | ||
| 'jetpack-videopress-pkg' | ||
| ) } | ||
| </Text> | ||
| </View> | ||
| ); | ||
| } |
26 changes: 26 additions & 0 deletions
26
...rc/client/block-editor/blocks/video/components/video-not-owned-warning/styles.native.scss
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 |
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
| .video-not-owned-notice__container { | ||
| flex-direction: row; | ||
| align-items: center; | ||
| padding: 8px 0; | ||
| justify-content: space-between; | ||
| } | ||
|
|
||
| .video-not-owned-notice__message { | ||
| font-size: 11px; | ||
| font-weight: 500; | ||
| color: $yellow-50; | ||
| flex: 1; | ||
| } | ||
|
|
||
| .video-not-owned-notice__message--dark { | ||
| color: $yellow-30; | ||
| } | ||
|
|
||
| .video-not-owned-notice__icon { | ||
| color: $yellow-50; | ||
| margin-right: 5px; | ||
| } | ||
|
|
||
| .video-not-owned-notice__icon--dark { | ||
| color: $yellow-30; | ||
| } |
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
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.
Uh oh!
There was an error while loading. Please reload this page.