diff --git a/assets/app.js b/assets/app.js index f06402a6d2903af17e4c0e1110be7b832c2de715..6c6897523e3b9c01bfb96519dcc0e0c11bcffb17 100644 --- a/assets/app.js +++ b/assets/app.js @@ -28,6 +28,6 @@ $(function() { $("document").ready(function(){ setTimeout(function(){ - $(".flash-message").remove(); + $(".flash-message:not(.alert-danger):not(.alert-warning)").remove(); }, 5000 ); // 5 secs -}); \ No newline at end of file +}); diff --git a/capsule-prototype/css/common.css b/capsule-prototype/css/common.css index 959c244a4f1af4d3ae72caeb22aa8b668f71d958..8f20eae30b23fb9495125cabf68115ae933573a5 100644 --- a/capsule-prototype/css/common.css +++ b/capsule-prototype/css/common.css @@ -9,7 +9,7 @@ .playback_form label { background-color: rgba(0, 0, 0, .5); - padding: 4px; + padding: 2px; box-shadow: 2px 2px 2px 1px rgba(0, 0, 0, 0.2); } diff --git a/capsule-prototype/css/left_menu.css b/capsule-prototype/css/left_menu.css index e0532dad820ab7a9238ae3d268eb552afb461d78..8e7fb8e56f18e5e752377d773621b82c80fe04d3 100644 --- a/capsule-prototype/css/left_menu.css +++ b/capsule-prototype/css/left_menu.css @@ -47,5 +47,9 @@ #btn_add_paste::before { content: ' '; background: url('images/icn-image.png') no-repeat center/45%; height: 40px; } #left_menu_item_preview::before { content: url('images/icn-menu-preview.png'); } -#left_menu_item_settings::before { content: url('images/icn-menu-settings.png'); } +#left_menu_item_settings::before { content: url('images/icn-menu-settings.png');} + +#left_menu_item_settings { + margin-bottom: 5px; +} diff --git a/capsule-prototype/css/popup.css b/capsule-prototype/css/popup.css index baea1c74f1b9dcb4b9e696a84661e0bbda25e4b7..9c5a4fa2e6e6afdf7883bdb955f4c20fe1a28c2d 100644 --- a/capsule-prototype/css/popup.css +++ b/capsule-prototype/css/popup.css @@ -11,7 +11,8 @@ } #popupSpeedInput label { - margin: 2px; + margin: 1px; + font-size: 15px; } #popupSpeedInput label:first-child { @@ -28,6 +29,7 @@ max-height: 300px; align-content: first baseline; overflow: auto; + font-size: 15px; } #popupLabelsInput label { @@ -52,6 +54,7 @@ margin: 0; margin-bottom: 2px; font-size: 100%; + font-size: 15px; } #popupSpace, #popupAlertSpace, #popupAddLinkSpace, #popupSettingsSpace { diff --git a/capsule-prototype/index.html b/capsule-prototype/index.html index 7ad8498a28c865808909621e4d94c9849c581c55..7465951c29cf37fd2d882aff48fe71f7e1bc95e7 100644 --- a/capsule-prototype/index.html +++ b/capsule-prototype/index.html @@ -174,7 +174,7 @@ </ul> <div class='flex-col'> <input type='checkbox' id='inp_playback_rate_dropdown' class='dropdown_control' /> - <label for ='inp_playback_rate_dropdown' class='left_menu_item' title='change playback rate'><i class='fas fa-play'></i></label> + <label for ='inp_playback_rate_dropdown' class='left_menu_item' title='change playback rate'><i class='fas fa-forward'></i></label> <form id='playback_speed_form' class='dropdown_content flex-col playback_form'> <input type='radio' id='playback_speed_025' value='0.25' name='playback_rate' /> <label class='left_menu_item' for='playback_speed_025'>0.25</label> diff --git a/capsule-prototype/js/MosaicPanelWidget.js b/capsule-prototype/js/MosaicPanelWidget.js index e117fe72cf393bc844233027b50f6d2eae972002..7655b8b9d7e71ddb2fb48d5557f25ffdead43e0a 100644 --- a/capsule-prototype/js/MosaicPanelWidget.js +++ b/capsule-prototype/js/MosaicPanelWidget.js @@ -160,15 +160,17 @@ } const fillPanel = function () { + let resetfilterdiv = $('<div/>').addClass('mosaic_filter'); let typefilterdiv = $('<div/>').addClass('mosaic_filter'); let labelsfilterdiv = $('<div/>').addClass('mosaic_filter'); - typefilterdiv.append(getFilterElement( + resetfilterdiv.append(getFilterElement( 'Reset filters', 'rgb(100,100,100)', localOptions._resetFilters, 'mosaic_filter_item_all', false )); + localOptions.htmlElement().append(resetfilterdiv); localOptions.htmlElement().append(typefilterdiv); localOptions.htmlElement().append(labelsfilterdiv); // eslint-disable-next-line no-undef diff --git a/capsule-prototype/js/PopupPanelWidget.js b/capsule-prototype/js/PopupPanelWidget.js index 680065eac293cac7677673b25ef19c5f8ef604dc..cd588f079bb370b3de49eaad42fb34e53efe8006 100644 --- a/capsule-prototype/js/PopupPanelWidget.js +++ b/capsule-prototype/js/PopupPanelWidget.js @@ -625,6 +625,8 @@ AnnotationSpeedPanelEdition.prototype.appendInputEditorDiv = function (parentDiv that.closeEdition.call(that); }) + var title = $('<div>').addClass('popupNewTitles').html('+ Playback rate'); + parentDiv.append(title); parentDiv.append(this.readonlyDiv); } AnnotationSpeedPanelEdition.prototype.closeEdition = function () { diff --git a/capsule-prototype/js/online-script.js b/capsule-prototype/js/online-script.js index 4cd35c149311ef296b2ac609a2c38fd8866949ee..f4ca93bd1fa15bc198040251644326d73df213bc 100644 --- a/capsule-prototype/js/online-script.js +++ b/capsule-prototype/js/online-script.js @@ -1004,8 +1004,16 @@ $(window).resize(function(e) { }); $(window).trigger("resize"); -function openPasteModal() { $('#paste_modal').css('display', 'flex'); $('#paste_modal_content').first().focus() } -function closePasteModal() { $('#paste_modal').hide(); $('#paste_modal_content').empty(); } +function openPasteModal() { + $('#paste_modal').css('display', 'flex'); + $('#paste_modal_content').first().focus(); + rekall.timeline.pause(); +} + +function closePasteModal() { + $('#paste_modal').hide(); + $('#paste_modal_content').empty(); +} function openImageEdition(message, tag) { $('#edit_pic_modal').show(); diff --git a/src/Entity/Capsule.php b/src/Entity/Capsule.php index b397ec3d67a07df3cefc208ae525ab493d564b30..faaf02e4c5236a6df7c4dd6da3d20b3a3140e00f 100755 --- a/src/Entity/Capsule.php +++ b/src/Entity/Capsule.php @@ -200,23 +200,27 @@ class Capsule return null; } - $project_retriever = new ProjectRetriever($this); - $video_url = $project_retriever->getVideoUrl(); - $video_id = $project_retriever->getVideoId($video_url); + try { + $project_retriever = new ProjectRetriever($this); + $video_url = $project_retriever->getVideoUrl(); + $video_id = $project_retriever->getVideoId($video_url); - if (str_contains($video_url, 'yout')) { + if (str_contains($video_url, 'yout')) { $url = 'https://img.youtube.com/vi/%s/%s.jpg'; $high_resolution = sprintf($url, $video_id, 'maxresdefault'); $medium_resolution = sprintf($url, $video_id, 'mqdefault'); try { - $http_client->request('GET', $high_resolution); - return $high_resolution; + $http_client->request('GET', $high_resolution); + return $high_resolution; } catch (\Exception $e) { - return $medium_resolution; + return $medium_resolution; } - } + } - return 'https://vumbnail.com/' . $video_id . '.jpg'; + return 'https://vumbnail.com/' . $video_id . '.jpg'; + } catch (\Exception $e) { + return null; + } } /**