PluginProbe ʕ •ᴥ•ʔ
Presto Player / trunk
Presto Player vtrunk
4.3.0 4.2.4 4.2.3 4.2.2 4.2.0 4.2.1 trunk 1.10.0 1.10.1 1.10.2 1.11.0 1.12.0 1.13.0 1.14.0 1.14.1 1.5.10 1.5.11 1.5.12 1.5.13 1.5.14 1.5.15 1.5.5 1.5.6 1.5.7 1.5.8 1.5.9 1.6.0 1.6.1 1.6.10 1.6.11 1.6.12 1.6.13 1.6.2 1.6.3 1.6.4 1.6.5 1.6.6 1.6.7 1.6.8 1.6.9 1.7.0 1.7.1 1.7.2 1.8.0 1.8.1 1.8.2 1.8.3 1.8.4 1.8.5 1.8.6 1.9.0 1.9.1 1.9.10 1.9.11 1.9.12 1.9.13 1.9.14 1.9.2 1.9.3 1.9.4 1.9.5 1.9.6 1.9.7 1.9.8 1.9.9 2.0.0 2.0.1 2.0.10 2.0.11 2.0.12 2.0.13 2.0.14 2.0.15 2.0.16 2.0.2 2.0.3 2.0.4 2.0.5 2.0.6 2.0.7 2.0.8 2.0.9 2.1.0 2.2.0 2.2.1 2.2.2 2.2.3 2.2.3-beta1 2.3.0 2.3.1 2.3.2 2.3.3 3.0.0 3.0.0-beta1 3.0.1 3.0.2 3.0.3 3.0.4 3.0.5 3.0.6 3.0.7 3.0.8 3.1.0 3.1.1 3.1.2 3.1.3 4.0.0 4.0.1 4.0.2 4.0.3 4.0.4 4.0.5 4.0.6 4.0.7 4.0.8 4.1.0 4.1.1 4.1.2 4.1.3 4.1.4
presto-player / src / admin / dashboard / components / WelcomeBanner.js
presto-player / src / admin / dashboard / components Last commit date
Emails 1 month ago EngagementChart 1 month ago MediaHub 1 month ago Onboarding 1 month ago Popup 1 month ago Skeletons 1 week ago WhatsNew 1 month ago charts 1 month ago test 1 month ago AdminMenuSync.js 1 month ago ChartEmptyState.js 1 month ago ChooseDate.js 1 month ago ColorPicker.js 1 month ago ExtendPlugins.js 1 month ago Filters.js 1 month ago Link.js 1 month ago Navbar.js 1 week ago NoFound.js 1 month ago PageHeader.js 1 month ago PluginRecommendations.js 1 month ago PostScheduleField.js 1 month ago PrestoPlayerIcon.js 1 month ago ProGateOverlay.js 1 month ago QuickAccess.js 1 month ago RankedTable.js 1 month ago StatCard.js 1 month ago TopMedia.js 1 month ago TopPerformingMedia.js 1 month ago TopUsers.js 1 month ago TruncatedTitle.js 1 month ago UpgradeNotice.js 1 month ago UpgradeToPro.js 1 month ago VideoModal.js 1 month ago WelcomeBanner.js 1 month ago
WelcomeBanner.js
116 lines
1 import React from "react";
2 const { __ } = wp.i18n;
3 import { Button, Container, Text, Title } from "@bsf/force-ui";
4 import { Plus, ExternalLink } from "lucide-react";
5
6 const VIDEO_ID = "7ibtk_KTgCw";
7 const THUMBNAIL_URL = `https://img.youtube.com/vi/${VIDEO_ID}/hqdefault.jpg`;
8
9 const WelcomeBanner = ({ onVideoOpen, videoTriggerRef }) => {
10 return (
11 <Container
12 className="p-4 border border-solid border-border-subtle bg-background-primary rounded-xl shadow-soft-shadow overflow-clip"
13 direction={{ sm: "column", md: "row" }}
14 gap="lg"
15 align="center"
16 >
17
18 {/* Content */}
19 <Container.Item className="md:w-[60%] lg:w-[70%]">
20 <Container direction="column" gap="lg" className="px-2 py-2">
21 <Container.Item>
22 <Title
23 size="lg"
24 tag="h3"
25 title={__("Welcome to Presto Player!", "presto-player")}
26 />
27 <Text className="text-text-secondary mt-1 font-normal text-sm">
28 {__(
29 "We're excited to help you create amazing video experience for your WordPress site. Presto Player makes it simple to add powerful, customizable video players that engage your audience.",
30 "presto-player"
31 )}
32 </Text>
33 </Container.Item>
34 <Container.Item>
35 <Container className="gap-3">
36 <Button
37 icon={<Plus className="w-5 h-5" />}
38 iconPosition="left"
39 size="md"
40 tag="button"
41 type="button"
42 variant="primary"
43 onClick={() => {
44 window.location.href =
45 window.prestoPlayer?.createMediaUrl ||
46 "post-new.php?post_type=pp_video_block";
47 }}
48 >
49 {__("Create Media", "presto-player")}
50 </Button>
51 <Button
52 icon={<ExternalLink className="w-5 h-5" />}
53 iconPosition="right"
54 size="md"
55 tag="button"
56 type="button"
57 variant="ghost"
58 onClick={() => {
59 window.open(
60 "https://www.youtube.com/playlist?list=PLiEQfBIWdTTLiE6ch4DsqlsfRIrJ1emLV",
61 "_blank"
62 );
63 }}
64 >
65 {__("Learn More", "presto-player")}
66 <span className="sr-only">
67 {__("(opens in a new tab)", "presto-player")}
68 </span>
69 </Button>
70 </Container>
71 </Container.Item>
72 </Container>
73 </Container.Item>
74
75 {/* Video thumbnail */}
76 <Container.Item className="shrink-0 w-full md:w-[360px] p-2">
77 <div
78 ref={videoTriggerRef}
79 className="relative cursor-pointer w-full overflow-hidden rounded-lg focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:ring-blue-500 focus-visible:outline-none"
80 onClick={() => onVideoOpen(true)}
81 role="button"
82 aria-label={__("Play introduction video", "presto-player")}
83 tabIndex={0}
84 onKeyDown={(e) => {
85 if (e.key === "Enter" || e.key === " ") {
86 e.preventDefault();
87 onVideoOpen(true);
88 }
89 }}
90 >
91 <img
92 src={THUMBNAIL_URL}
93 alt=""
94 role="presentation"
95 className="w-full h-full object-cover rounded-lg aspect-video cursor-pointer"
96 loading="lazy"
97 />
98 <div className="absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 w-10 h-10 flex items-center justify-center bg-black bg-opacity-50 rounded-full">
99 <svg
100 className="w-6 h-6 text-white"
101 viewBox="0 0 24 24"
102 xmlns="http://www.w3.org/2000/svg"
103 fill="currentColor"
104 aria-hidden="true"
105 >
106 <path d="M8 5v14l11-7L8 5z"></path>
107 </svg>
108 </div>
109 </div>
110 </Container.Item>
111 </Container>
112 );
113 };
114
115 export default WelcomeBanner;
116