PluginProbe ʕ •ᴥ•ʔ
Presto Player / 4.5.0
Presto Player v4.5.0
4.5.0 4.4.1 4.4.0 4.3.3 4.3.2 4.3.1 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 / QuickAccess.js
presto-player / src / admin / dashboard / components Last commit date
Emails 3 months ago EngagementChart 3 months ago MediaHub 3 months ago Onboarding 3 months ago Popup 3 months ago Skeletons 2 months ago WhatsNew 3 months ago charts 3 months ago test 3 months ago AdminMenuSync.js 3 months ago ChartEmptyState.js 3 months ago ChooseDate.js 3 months ago ColorPicker.js 3 months ago DashboardPromos.js 2 days ago ExtendPlugins.js 3 months ago Filters.js 3 months ago Link.js 3 months ago McpPromoBanner.js 2 days ago Navbar.js 2 months ago NoFound.js 3 months ago PageHeader.js 3 months ago PluginRecommendations.js 3 months ago PostScheduleField.js 3 months ago PrestoPlayerIcon.js 3 months ago ProGateOverlay.js 3 months ago PromoBanner.js 2 days ago QuickAccess.js 2 weeks ago RankedTable.js 3 months ago SkinPromoBanner.js 2 days ago StatCard.js 3 months ago TopMedia.js 3 months ago TopPerformingMedia.js 3 months ago TopUsers.js 3 months ago TruncatedTitle.js 3 months ago UpgradeNotice.js 3 months ago UpgradeToPro.js 2 weeks ago VideoModal.js 3 months ago WelcomeBanner.js 3 months ago
QuickAccess.js
128 lines
1 import React from 'react';
2 const { __ } = wp.i18n;
3 import { Container, Label, Text } from '@bsf/force-ui';
4 import {
5 HelpCircle,
6 Star,
7 Headphones,
8 Crown,
9 Sparkles,
10 Bot,
11 } from 'lucide-react';
12 import useUpgradeCTA from '../hooks/useUpgradeCTA';
13 import { useHistory } from '../router/router';
14
15 const QuickAccess = () => {
16 // Plugin status data from WordPress
17 const prestoPlayerData = window.prestoPlayer || {};
18 const history = useHistory();
19 const upgrade = useUpgradeCTA( history );
20
21 const quickAccessItems = [
22 {
23 id: 'ai',
24 icon: <Bot className="w-4 h-4" />,
25 label: __( 'Explore AI Abilities', 'presto-player' ),
26 badge: __( 'New', 'presto-player' ),
27 link: `${
28 prestoPlayerData?.dashboardUrl || '#'
29 }&tab=Settings&section=mcp`,
30 internal: true,
31 // The MCP section reads /wp/v2/settings, so only show the shortcut to
32 // users who can actually load it.
33 condition:
34 prestoPlayerData?.abilitiesSupported !== false &&
35 prestoPlayerData?.canManageOptions !== false,
36 },
37 {
38 id: '1',
39 icon: <Sparkles className="w-4 h-4" />,
40 label: __( 'Guided Onboarding', 'presto-player' ),
41 link: prestoPlayerData?.onboardingUrl || '#',
42 internal: true,
43 },
44 {
45 id: '2',
46 icon: <HelpCircle className="w-4 h-4" />,
47 label: __( 'Help Center', 'presto-player' ),
48 link: 'https://prestoplayer.com/docs/',
49 },
50 {
51 id: '3',
52 icon: <Headphones className="w-4 h-4" />,
53 label: __( 'Open Support Ticket', 'presto-player' ),
54 link: 'https://prestoplayer.com/contact/',
55 },
56 {
57 id: '4',
58 icon: <Star className="w-4 h-4" />,
59 label: __( 'Leave Us a Review', 'presto-player' ),
60 link: 'https://wordpress.org/support/plugin/presto-player/reviews/#new-post',
61 },
62 {
63 id: '5',
64 icon: <Crown className="w-4 h-4" />,
65 label: upgrade.label,
66 link: upgrade.href,
67 internal: upgrade.isProUnlicensed,
68 onClick: upgrade.onClick,
69 condition: ! upgrade.isPremium,
70 },
71 ];
72
73 return (
74 <Container
75 containerType="flex"
76 direction="column"
77 className="p-3 border-0.5 border-solid rounded-xl shadow-sm bg-background-primary border-border-subtle"
78 gap="xs"
79 >
80 <Container.Item className="p-1 md:w-full lg:w-full">
81 <Label className="font-semibold">
82 { __( 'Quick Access', 'presto-player' ) }
83 </Label>
84 </Container.Item>
85 <Container.Item className="flex flex-col gap-1 p-1 rounded-lg md:w-full lg:w-full bg-field-primary-background">
86 { quickAccessItems.map(
87 ( button ) =>
88 button?.condition !== false && (
89 <Text
90 key={ button.id }
91 as="a"
92 href={ button.link }
93 target={ button.internal ? '_self' : '_blank' }
94 rel={ button.internal ? undefined : 'noreferrer' }
95 onClick={ button.onClick }
96 aria-label={ button.label }
97 className="flex items-center gap-1 p-2 rounded-md bg-background-primary shadow-soft-shadow-inner no-underline hover:no-underline cursor-pointer"
98 >
99 <Container
100 containerType="flex"
101 direction="row"
102 className="items-center gap-1 p-1"
103 align="center"
104 >
105 <Container.Item className="flex items-center justify-center text-text-primary">
106 { button.icon }
107 </Container.Item>
108 <Container.Item className="flex items-start gap-1.5">
109 <Text className="px-1 py-0 text-sm font-medium text-text-primary">
110 { button.label }
111 </Text>
112 { button.badge && (
113 <span className="mt-0.5 shrink-0 rounded-full bg-brand-primary-600 px-1 text-[9px] font-semibold uppercase tracking-wide text-white">
114 { button.badge }
115 </span>
116 ) }
117 </Container.Item>
118 </Container>
119 </Text>
120 )
121 ) }
122 </Container.Item>
123 </Container>
124 );
125 };
126
127 export default QuickAccess;
128