diff --git a/.distignore b/.distignore index 5ad62da..8eb17bc 100644 --- a/.distignore +++ b/.distignore @@ -2,7 +2,6 @@ /.github /.wordpress-org bin -build node_modules tests .distignore @@ -18,3 +17,4 @@ package-lock.json phpunit.xml.dist README.md build-aws3.sh +webpack.config.js \ No newline at end of file diff --git a/.github/workflows/assets.yml b/.github/workflows/assets.yml index f8c9103..959b362 100644 --- a/.github/workflows/assets.yml +++ b/.github/workflows/assets.yml @@ -2,15 +2,17 @@ name: Plugin asset/readme update on: push: branches: - - master + - master jobs: trunk: - name: Push to master + name: Push to main runs-on: ubuntu-latest steps: - - uses: actions/checkout@master - - name: WordPress.org plugin asset/readme update - uses: 10up/action-wordpress-plugin-asset-update@stable - env: - SVN_PASSWORD: ${{ secrets.SVN_PASSWORD }} - SVN_USERNAME: ${{ secrets.SVN_USERNAME }} + - name: Checkout code + uses: actions/checkout@master + + - name: WordPress.org plugin asset/readme update + uses: 10up/action-wordpress-plugin-asset-update@stable + env: + SVN_PASSWORD: ${{ secrets.SVN_PASSWORD }} + SVN_USERNAME: ${{ secrets.SVN_USERNAME }} diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 75c097d..4c489e9 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -1,32 +1,36 @@ -# This is a basic workflow to help you get started with Actions - name: Deploy to WordPress.org on: - push: - tags: - - '*' + release: + types: [ published ] jobs: - build: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - name: Checkout code + uses: actions/checkout@v2 + + - name: Build the plugin + run: | + npm install + npm run build - - name: WordPress Plugin Deploy - id: deploy - uses: 10up/action-wordpress-plugin-deploy@stable - with: - generate-zip: true - env: - SVN_USERNAME: ${{ secrets.SVN_USERNAME }} - SVN_PASSWORD: ${{ secrets.SVN_PASSWORD }} + - name: WordPress Plugin Deploy + id: deploy + uses: 10up/action-wordpress-plugin-deploy@stable + with: + generate-zip: true + env: + SVN_USERNAME: ${{ secrets.SVN_USERNAME }} + SVN_PASSWORD: ${{ secrets.SVN_PASSWORD }} - - name: Create Github release - uses: ncipollo/release-action@v1 - with: - artifacts: ${{github.workspace}}/${{ github.event.repository.name }}.zip - body: ${{ github.event.head_commit.message }} - token: ${{ secrets.GITHUB_TOKEN }} - artifactContentType: application/zip + - name: Upload release asset + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ github.event.release.upload_url }} + asset_path: ${{ steps.deploy.outputs.zip-path }} + asset_name: ${{ github.event.repository.name }}.zip + asset_content_type: application/zip diff --git a/.gitignore b/.gitignore index eded9a9..fe88999 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,6 @@ /bin/ /node_modules/ /build/ +/inc/video/block/build/ .idea .DS_Store diff --git a/.wordpress-org/screenshot-2.png b/.wordpress-org/screenshot-2.png index bf0492d..707e3d5 100644 Binary files a/.wordpress-org/screenshot-2.png and b/.wordpress-org/screenshot-2.png differ diff --git a/.wordpress-org/screenshot-4.jpg b/.wordpress-org/screenshot-4.jpg new file mode 100644 index 0000000..c201001 Binary files /dev/null and b/.wordpress-org/screenshot-4.jpg differ diff --git a/.wordpress-org/screenshot-4.png b/.wordpress-org/screenshot-4.png deleted file mode 100644 index 945650b..0000000 Binary files a/.wordpress-org/screenshot-4.png and /dev/null differ diff --git a/.wordpress-org/screenshot-5.jpg b/.wordpress-org/screenshot-5.jpg new file mode 100644 index 0000000..a07f7de Binary files /dev/null and b/.wordpress-org/screenshot-5.jpg differ diff --git a/.wordpress-org/screenshot-6.gif b/.wordpress-org/screenshot-6.gif new file mode 100644 index 0000000..4295aa1 Binary files /dev/null and b/.wordpress-org/screenshot-6.gif differ diff --git a/.wordpress-org/screenshot-7.gif b/.wordpress-org/screenshot-7.gif new file mode 100644 index 0000000..1c9cdaa Binary files /dev/null and b/.wordpress-org/screenshot-7.gif differ diff --git a/.wordpress-org/screenshot-5.png b/.wordpress-org/screenshot-8.png similarity index 100% rename from .wordpress-org/screenshot-5.png rename to .wordpress-org/screenshot-8.png diff --git a/inc/assets/css/admin.css b/inc/assets/css/admin.css index 2320940..78106d2 100644 --- a/inc/assets/css/admin.css +++ b/inc/assets/css/admin.css @@ -13,14 +13,15 @@ body.mobile.modal-open #wpwrap { } .card { - margin-top: inherit; - padding: inherit; - min-width: inherit; - max-width: inherit; - box-shadow: inherit; - background: inherit; - box-sizing: inherit; - background-color: #ffffff; + margin-top: inherit; + padding: 0; + min-width: inherit; + max-width: 100%; + box-shadow: inherit; + background: inherit; + box-sizing: inherit; + background-color: #ffffff; + width: 100%; } .card-header { @@ -67,40 +68,46 @@ body.mobile.modal-open #wpwrap { } .btn-info { - background-color: #EE7C1E; - border-radius: 24px; - border-width: 0; + background-color: #EE7C1E; + border-radius: 24px; + border-width: 0; + color: #ffffff; } .btn-info:hover, .btn-info:active, .btn-info:focus { background-color: rgba(238, 124, 30, 0.7) !important; border: none !important; - box-shadow: none !important; + box-shadow: none !important; } .btn-info:active { - background-color: rgba(238, 124, 30, 0.9) !important; + background-color: rgba(238, 124, 30, 0.9) !important; } .btn .dashicons { - font-size: 1.8rem; - line-height: 1; - margin-right: 1rem; + font-size: 1.5rem; + line-height: 1; + margin-right: 0.5rem; } -.progress { - height: 30px; - border-radius: 15px; - padding: 5px; +.btn-lg .dashicons { + font-size: 1.8rem; + margin-right: 1rem; } -.progress .progress-bar { - background-color: rgba(38, 169, 224, 1); - border-radius: 10px; +#iup-settings-page .progress { + height: 30px; + border-radius: 15px; + padding: 5px; +} + +#iup-settings-page .progress .progress-bar { + background-color: rgba(38, 169, 224, 1); + border-radius: 10px; } -.progress.download .progress-bar { - background-color: #EE7C1E; +#iup-settings-page .progress.download .progress-bar { + background-color: #EE7C1E; } .tooltip { @@ -139,12 +146,8 @@ body.mobile.modal-open #wpwrap { font-size: 25px; } -.iup-enabled-status .dashicons-cloud-saved { - color: rgba(38, 169, 224, 1); -} - -.iup-enabled-status .dashicons-cloud-upload { - color: #EE7C1E; +.iup-enabled-status .dashicons-cloud-saved, .iup-enabled-status .dashicons-video-alt3 { + color: rgba(38, 169, 224, 1); } p.lead { @@ -195,6 +198,56 @@ p.lead { } #iup-collapse-errors .list-group-item { - padding: 0.25rem 1.25rem; - margin: 0; + padding: 0.25rem 1.25rem; + margin: 0; +} + +/* --------- Stream Settings--------- */ +#stream-nav-tab { + margin-bottom: -0.8rem; +} + +li.nav-item { + margin-bottom: 0; +} + +.form-check .form-check-input { + margin-top: .25em; } + +.iup-video-thumb { + background-size: cover; + background-position: 50% 50%; + background-repeat: no-repeat; + background-color: #000000; +} + +.uppy-StatusBar { + margin-top: 2em; +} + +.uppy-StatusBar-progress { + height: 1em; + background-color: #26a9e0; +} + +.uppy-StatusBar::before { + height: 1em; +} + +.uppy-StatusBar-content { + margin-top: 1em; +} + +.uppy-StatusBar-actions { + margin-top: 1em; +} + +.uppy-DragDrop-inner { + padding: 40px 20px; +} + +.uppy-DragDrop-arrow { + width: 40px; + height: 40px; +} \ No newline at end of file diff --git a/inc/assets/img/iu-logo-blue-sm.svg b/inc/assets/img/iu-logo-blue-sm.svg new file mode 100644 index 0000000..4f7fda6 --- /dev/null +++ b/inc/assets/img/iu-logo-blue-sm.svg @@ -0,0 +1,10 @@ + + diff --git a/inc/assets/img/video-player.jpg b/inc/assets/img/video-player.jpg new file mode 100644 index 0000000..4a5b488 Binary files /dev/null and b/inc/assets/img/video-player.jpg differ diff --git a/inc/assets/js/infinite-uploads.js b/inc/assets/js/infinite-uploads.js index 716bfb2..4809ed5 100644 --- a/inc/assets/js/infinite-uploads.js +++ b/inc/assets/js/infinite-uploads.js @@ -1,511 +1,653 @@ jQuery(document).ready(function ($) { - $('[data-toggle="tooltip"]').tooltip(); - - var iupStopLoop = false; - var iupProcessingLoop = false; - var iupLoopErrors = 0; - var iupAjaxCall = false; - - //show a confirmation warning if leaving page during a bulk action - $(window).bind('beforeunload', function () { - if (iupProcessingLoop) { - return iup_data.strings.leave_confirmation; - } - }); - - //show an error at top of main settings page - var showError = function (error_message) { - $('#iup-error').text(error_message.substr(0, 200)).show(); - $("html, body").animate({scrollTop: 0}, 1000); - } - - var buildFilelist = function (remaining_dirs, nonce = '') { - if (iupStopLoop) { - iupStopLoop = false; - iupProcessingLoop = false; - return false; - } - iupProcessingLoop = true; - - var data = {"remaining_dirs": remaining_dirs}; - if (nonce) { - data.nonce = nonce; - } else { - data.nonce = iup_data.nonce.scan; - } - $.post(ajaxurl + '?action=infinite-uploads-filelist', data, function (json) { - if (json.success) { - $('#iup-scan-storage').text(json.data.local_size); - $('#iup-scan-files').text(json.data.local_files); - $('#iup-scan-progress').show(); - if (!json.data.is_done) { - buildFilelist(json.data.remaining_dirs, json.data.nonce); - } else { - iupProcessingLoop = false; - location.reload(); - return true; - } - - } else { - showError(json.data); - $('.modal').modal('hide'); - } - }, 'json').fail(function () { - showError(iup_data.strings.ajax_error); - $('.modal').modal('hide'); - }); - }; - - var fetchRemoteFilelist = function (next_token, nonce = '') { - if (iupStopLoop) { - iupStopLoop = false; - iupProcessingLoop = false; - return false; - } - iupProcessingLoop = true; - - var data = {"next_token": next_token}; - if (nonce) { - data.nonce = nonce; - } else { - data.nonce = iup_data.nonce.scan; - } - $.post(ajaxurl + '?action=infinite-uploads-remote-filelist', data, function (json) { - if (json.success) { - $('#iup-scan-remote-storage').text(json.data.cloud_size); - $('#iup-scan-remote-files').text(json.data.cloud_files); - $('#iup-scan-remote-progress').show(); - if (!json.data.is_done) { - fetchRemoteFilelist(json.data.next_token, json.data.nonce); - } else { - if ('upload' === window.iupNextStep) { - //update values in next modal - $('#iup-progress-size').text(json.data.remaining_size); - $('#iup-progress-files').text(json.data.remaining_files); - if ('0' == json.data.remaining_files) { - $('#iup-upload-progress').hide(); - } else { - $('#iup-upload-progress').show(); - } - $('#iup-sync-progress-bar').css('width', json.data.pcnt_complete + "%").attr('aria-valuenow', json.data.pcnt_complete).text(json.data.pcnt_complete + "%"); - - $('#iup-sync-button').attr('data-target', '#upload-modal'); - $('.modal').modal('hide'); - $('#upload-modal').modal('show'); - } else if ('download' === window.iupNextStep) { - $('.modal').modal('hide'); - $('#download-modal').modal('show'); - } else { - location.reload(); - } - } - - } else { - showError(json.data); - $('.modal').modal('hide'); - } - }, 'json') - .fail(function () { - showError(iup_data.strings.ajax_error); - $('.modal').modal('hide'); - }); - }; - - var syncFilelist = function (nonce = '') { - if (iupStopLoop) { - iupStopLoop = false; - iupProcessingLoop = false; - return false; - } - iupProcessingLoop = true; - - var data = {}; - if (nonce) { - data.nonce = nonce; - } else { - data.nonce = iup_data.nonce.sync; - } - iupAjaxCall = $.post(ajaxurl + '?action=infinite-uploads-sync', data, function (json) { - iupLoopErrors = 0; - if (json.success) { - //$('.iup-progress-pcnt').text(json.data.pcnt_complete); - $('#iup-progress-size').text(json.data.remaining_size); - $('#iup-progress-files').text(json.data.remaining_files); - $('#iup-upload-progress').show(); - $('#iup-sync-progress-bar').css('width', json.data.pcnt_complete + "%").attr('aria-valuenow', json.data.pcnt_complete).text(json.data.pcnt_complete + "%"); - if (!json.data.is_done) { - data.nonce = json.data.nonce; //save for future errors - syncFilelist(json.data.nonce); - } else { - iupStopLoop = true; - $('#iup-upload-progress').hide(); - //update values in next modal - $('#iup-enable-errors span').text(json.data.permanent_errors); - if (json.data.permanent_errors) { - $('.iup-enable-errors').show(); - } - $('#iup-sync-button').attr('data-target', '#enable-modal'); - $('.modal').modal('hide'); - $('#enable-modal').modal('show'); - } - if (Array.isArray(json.data.errors) && json.data.errors.length) { - $.each(json.data.errors, function (i, value) { - $('#iup-sync-errors ul').append('
diff --git a/inc/templates/connect.php b/inc/templates/connect.php index 49bf640..6deedc9 100644 --- a/inc/templates/connect.php +++ b/inc/templates/connect.php @@ -34,7 +34,7 @@
size_format_zero( ( $api_data->plan->storage_limit * GB_IN_BYTES ) - $api_data->stats->cloud->storage, 2 ) ); ?>
- +{__("Video Count", 'infinite-uploads')}
+ {IUP_VIDEO.settings.VideoCount} + +{__("Library Storage", 'infinite-uploads')}
+ {sizeOf(IUP_VIDEO.settings.StorageUsage)} + +{__("Video Bandwidth", 'infinite-uploads')}
+ {sizeOf(IUP_VIDEO.settings.TrafficUsage)} + ++ {__('No videos found.', 'infinite-uploads')} +
+{__('Select the primary color that will be displayed for the controls in the video player.', 'infinite-uploads')}
+ +{__('Select the default language that will be displayed in the video player.', 'infinite-uploads')}
+ +{__('Select the UI controls that will be displayed on the player.', 'infinite-uploads')}
+ +{__('Select the enabled resolutions that will be encoded on upload. More resolutions provide a more efficient streaming service to users, but require more storage space. Resolutions larger than the original video will be skipped.', 'infinite-uploads')}
+ ++ {__( + 'Choose a new thumbnail to be displayed in the video player:', + 'infinite-uploads' + )} +
++ {__( + 'Copy and paste this code into your post, page, or widget to embed the video. If using Gutenberg editor use our block.', + 'infinite-uploads' + )} +
+ ++ {__( + 'View the statistics for this video.', + 'infinite-uploads' + )} +
+ ++ {__( + 'Select a video from your library to insert into the editor.', + 'infinite-uploads' + )} +
+ +