admin
2 weeks ago
components
3 days ago
icon-assets
2 years ago
502.js
2 weeks ago
beaver-builder-rtl.css
1 month ago
beaver-builder.asset.php
1 month ago
beaver-builder.css
1 month ago
beaver-builder.js
1 month ago
blocks-rtl.css
2 weeks ago
blocks.asset.php
2 weeks ago
blocks.css
2 weeks ago
blocks.js
2 weeks ago
dashboard-rtl.css
1 month ago
dashboard.asset.php
2 weeks ago
dashboard.css
1 month ago
dashboard.js
2 weeks ago
divi-d5.asset.php
3 days ago
divi-d5.js
3 days ago
divi-rtl.css
10 months ago
divi.asset.php
2 weeks ago
divi.css
3 years ago
divi.js
2 weeks ago
elementor.asset.php
1 month ago
elementor.js
1 month ago
learndash.asset.php
1 month ago
learndash.js
1 month ago
media-page-rtl.css
1 month ago
media-page.asset.php
1 month ago
media-page.css
1 month ago
media-page.js
2 years ago
player-loader.asset.php
1 month ago
player-loader.js
1 month ago
presto-player-popup.asset.php
1 month ago
presto-player-popup.js
1 month ago
tailwind-rtl.css
1 month ago
tailwind.asset.php
1 month ago
tailwind.css
1 month ago
tailwind.js
1 month ago
toolbar-rtl.css
2 weeks ago
toolbar.asset.php
2 weeks ago
toolbar.css
2 weeks ago
toolbar.js
2 weeks ago
toolbar.js
1 lines
| 1 | (()=>{"use strict";const e=window.React,t=window.wp.components,o=window.wp.data,r=window.wp.element,a=window.wp.i18n,n=()=>{const n="presto_player_instant_video_pages_enabled",{editPost:l}=(0,o.useDispatch)("core/editor"),s=(0,o.useSelect)(e=>e("core/editor").getEditedPostAttribute("meta"));let i=!(!s||!s[n])&&s[n];const[c,d]=(0,r.useState)(!1),p=(0,r.useRef)(null),u=()=>{d(e=>!e)};return(0,e.createElement)("div",null,(0,e.createElement)(t.Button,{variant:"tertiary",onClick:u,className:"presto-toolbar__button"},(0,e.createElement)("div",{className:"presto-toolbar__badge "+(i?"is-active":"")}),(0,a.__)("Instant Video Page","presto-player"),(0,e.createElement)("div",{className:"presto-toolbar__icon"},(0,e.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",className:"w-6 h-6"},(0,e.createElement)("path",{fillRule:"evenodd",d:"M12.53 16.28a.75.75 0 0 1-1.06 0l-7.5-7.5a.75.75 0 0 1 1.06-1.06L12 14.69l6.97-6.97a.75.75 0 1 1 1.06 1.06l-7.5 7.5Z",clipRule:"evenodd"})))),c&&(0,e.createElement)(t.Popover,{placement:"bottom-end",shift:!0,anchor:p.current,resize:!1,onFocusOutside:u,className:"pp-instant-video-dropdown"},(0,e.createElement)("div",{className:"presto-toolbar__popover-content"},(0,e.createElement)(t.RadioControl,{label:(0,a.__)("Visibility","presto-player"),selected:i?"public":"private",options:[{label:(0,a.__)("Published","presto-player"),value:"public"},{label:(0,a.__)("Unpublished","presto-player"),value:"private"}],onChange:e=>{l({meta:{...s,[n]:"public"===e}})},className:"presto-toolbar__radio"}),(0,e.createElement)("p",{className:"presto-toolbar__description"},(0,a.__)("An instant video page gives you an instant shareable page for your media.","presto-player")))))};!function(t,o){const a=document.createElement("div");a.classList.add("presto-player-edit-root");const l=document.getElementById("editor");if(!l)return;const s=o.data.subscribe(function(){setTimeout(function(){if((0,r.render)((0,e.createElement)(n,null),a),!document.querySelector(".presto-player-edit-root")){const e=l.querySelector(".edit-post-header__settings")||l.querySelector(".editor-header__settings");e instanceof HTMLElement&&e.prepend(a)}},1)});document.querySelector(".presto-player-edit-root")&&s()}(window,wp)})(); |