PageSourceSearch

https://app.wecantrack.com/wct-app/assets/Index-DGkfU-zk.js

js wecantrack.com collected 2026-09-24 17:47:20 UTC 7,594 bytes, 1 lines download raw bytes

1import{d as j,c as _,w as d,a as e,f as p,t as a,b as l,u as m,i as y,P as g,o,e as i,g as c,F,r as B,n as L,q as b,N as h,p as D,Q as P}from"./wct-app-D8i_eqtu.js";import{F as T}from"./FullLayout-zb4x4YVn.js";import{_ as u}from"./Can.vue_vue_type_script_setup_true_lang-BV1bEJTR.js";import{_ as $}from"./DataSharingCard.vue_vue_type_script_setup_true_lang-BxVHtMdV.js";import"./auth.store-8biDnKfi.js";import"./common.store-CRrASObo.js";import"./auth.service-DpLjbZ4k.js";import"./Header-lejb0B66.js";import"./_plugin-vue_export-helper-DlAUqK2U.js";import"./DynamicHeroIcon-BaqZpeOn.js";import"./ShieldCheckIcon-BWqFCb0i.js";import"./ExclamationCircleIcon-BLQuYzNz.js";import"./FunnelIcon-BWVrIAa3.js";import"./CheckCircleIcon-uL_wsBoq.js";import"./ChevronDownIcon-Bb7IICNj.js";import"./ChevronRightIcon-CnlDLyZY.js";import"./LinkIcon-Cava_wGR.js";import"./CogIcon-BClzZz8O.js";import"./DocumentTextIcon-CjLt4iuy.js";import"./ExclamationTriangleIcon-DFNXGgop.js";import"./InformationCircleIcon-vwXENsff.js";import"./MagnifyingGlassIcon-WZwazEdc.js";import"./PlusIcon-DYNe7iZ-.js";import"./WrenchScrewdriverIcon-Dijmq-uH.js";import"./TableCellsIcon-DrJnwU_K.js";import"./UserGroupIcon-4B8il2UH.js";import"./XMarkIcon-DFOn66fd.js";import"./format-Grfp2_uY.js";import"./Loading-DcSCH15J.js";import"./ModalBlank-DqUEbJt2.js";const A={class:"min-h-screen bg-gray-50 dark:bg-gray-900"},I={class:"bg-white dark:bg-gray-800 shadow-sm"},V={class:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-6"},E={class:"flex flex-col sm:flex-row sm:items-center sm:justify-between gap-4"},M={class:"mt-1 text-sm text-gray-600 dark:text-gray-400"},q={class:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-8"},z={key:0,class:"bg-green-50 dark:bg-green-900/20 border border-green-200 dark:border-green-800 rounded-lg p-4 mb-6"},H={class:"text-sm font-medium text-green-800 dark:text-green-200"},O={key:1,class:"bg-red-50 dark:bg-red-900/20 border border-red-200 dark:border-red-800 rounded-lg p-4 mb-6"},Q={class:"text-sm font-medium text-red-800 dark:text-red-200"},Y={key:2,class:"text-center py-16 bg-white dark:bg-gray-800 rounded-lg border border-gray-200 dark:border-gray-700"},G={key:4,class:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4"},J={class:"flex items-start justify-between"},K={class:"flex items-center gap-3 min-w-0"},R=["src"],U={class:"min-w-0"},W={class:"text-sm font-semibold text-gray-900 dark:text-white truncate"},X={class:"text-xs text-gray-500 dark:text-gray-400"},Z={class:"mt-4 text-xs text-gray-500 dark:text-gray-400 space-y-1"},ee={class:"flex justify-between"},te={class:"text-gray-700 dark:text-gray-200"},se={class:"flex justify-between"},re={class:"text-gray-700 dark:text-gray-200"},ae={key:0,class:"mt-3 text-xs text-red-600 dark:text-red-400"},oe={class:"mt-4 flex items-center gap-2"},de=["onClick"],ne=["onClick"],Ee=j({__name:"Index",props:{accounts:{},supportedPlatforms:{},dataSharing:{}},setup(n){const k=n,v=P(),x=b(()=>v.props.flash),f=r=>({facebook_page:"Facebook Page",instagram_business:"Instagram",tiktok_business:"TikTok",youtube_channel:"YouTube Channel"})[r]||r,w=b(()=>k.accounts.map(r=>({id:r.id,name:r.user_defined_name,sublabel:f(r.account_type)}))),C=r=>{h.post(g("user.data-source.social-platforms.sync",r.public_id),{},{preserveScroll:!0})},S=async r=>{confirm(`Disconnect ${r.user_defined_name}? Its imported insights will be removed.`)&&(await D.delete(g("user.data-source.social-platforms.destroy",r.public_id)),h.reload({only:["accounts"]}))};return(r,t)=>(o(),_(T,{title:"Social Media › Connected Channels"},{default:d(()=>[e("div",A,[e("div",I,[e("div",V,[e("div",E,[e("div",null,[t[0]||(t[0]=e("h1",{class:"text-2xl font-semibold text-gray-900 dark:text-white flex items-center gap-2"},[p(" Social Media "),e("span",{class:"text-xs font-semibold px-2 py-0.5 rounded-full bg-yellow-100 text-yellow-700 dark:bg-yellow-500/20 dark:text-yellow-300"},"BETA")],-1)),e("p",M,a(n.accounts?.length||0)+" "+a((n.accounts?.length||0)===1?"channel":"channels")+" connected ",1)]),l(u,{do:"social_platforms.create"},{default:d(()=>[l(m(y),{href:m(g)("user.data-source.social-platforms.create"),class:"inline-flex items-center justify-center px-4 py-2 text-sm font-medium text-slate-900 bg-yellow-400 hover:bg-yellow-500 rounded-lg transition-colors duration-200 whitespace-nowrap"},{default:d(()=>[...t[1]||(t[1]=[e("svg",{class:"w-5 h-5 mr-2 -ml-1",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M12 4v16m8-8H4"})],-1),p(" Connect Channel ",-1)])]),_:1},8,["href"])]),_:1})])])]),e("div",q,[x.value?.success?(o(),i("div",z,[e("p",H,a(x.value.success),1)])):c("",!0),x.value?.error?(o(),i("div",O,[e("p",Q,a(x.value.error),1)])):c("",!0),n.accounts?.length?c("",!0):(o(),i("div",Y,[t[3]||(t[3]=e("h3",{class:"text-lg font-medium text-gray-900 dark:text-white"},"No channels connected yet",-1)),t[4]||(t[4]=e("p",{class:"mt-2 text-sm text-gray-600 dark:text-gray-400"},"Connect a Facebook Page or Instagram account to start tracking organic performance.",-1)),l(u,{do:"social_platforms.create"},{default:d(()=>[l(m(y),{href:m(g)("user.data-source.social-platforms.create"),class:"mt-6 inline-flex items-center px-4 py-2 text-sm font-medium text-slate-900 bg-yellow-400 hover:bg-yellow-500 rounded-lg"},{default:d(()=>[...t[2]||(t[2]=[p(" Connect your first channel ",-1)])]),_:1},8,["href"])]),_:1})])),n.accounts?.length?(o(),_(u,{key:3,do:"data_sharing.manage"},{default:d(()=>[l($,{"data-sharing":n.dataSharing,accounts:w.value,class:"mb-6"},null,8,["data-sharing","accounts"])]),_:1})):c("",!0),n.accounts?.length?(o(),i("div",G,[(o(!0),i(F,null,B(n.accounts,s=>(o(),i("div",{key:s.id,class:"bg-white dark:bg-gray-800 rounded-lg border border-gray-200 dark:border-gray-700 p-5"},[e("div",J,[e("div",K,[s.metadata?.avatar_url?(o(),i("img",{key:0,src:s.metadata.avatar_url,alt:"",class:"w-10 h-10 rounded-full object-cover flex-shrink-0"},null,8,R)):c("",!0),e("div",U,[e("p",W,a(s.user_defined_name),1),e("p",X,a(f(s.account_type)),1)])]),e("span",{class:L(["text-xs font-medium px-2 py-0.5 rounded-full",s.is_enabled?"bg-green-100 text-green-700 dark:bg-green-500/20 dark:text-green-300":"bg-gray-100 text-gray-600 dark:bg-gray-700 dark:text-gray-300"])},a(s.is_enabled?"Active":"Paused"),3)]),e("dl",Z,[e("div",ee,[t[5]||(t[5]=e("dt",null,"Followers",-1)),e("dd",te,a(s.metadata?.followers_count?.toLocaleStr
1ing()??"—"),1)]),e("div",se,[t[6]||(t[6]=e("dt",null,"Last synced",-1)),e("dd",re,a(s.last_successful_sync_at?new Date(s.last_successful_sync_at).toLocaleDateString():"Never"),1)])]),s.last_sync_error?(o(),i("p",ae,a(s.last_sync_error),1)):c("",!0),e("div",oe,[e("button",{type:"button",class:"text-xs font-medium px-3 py-1.5 rounded-md bg-gray-100 hover:bg-gray-200 text-gray-700 dark:bg-gray-700 dark:hover:bg-gray-600 dark:text-gray-200",onClick:N=>C(s)}," Sync now ",8,de),l(u,{do:"social_platforms.edit"},{default:d(()=>[l(m(y),{href:m(g)("user.data-source.social-platforms.edit",s.public_id),class:"text-xs font-medium px-3 py-1.5 rounded-md bg-gray-100 hover:bg-gray-200 text-gray-700 dark:bg-gray-700 dark:hover:bg-gray-600 dark:text-gray-200"},{default:d(()=>[...t[7]||(t[7]=[p(" Edit ",-1)])]),_:1},8,["href"])]),_:2},1024),l(u,{do:"social_platforms.delete"},{default:d(()=>[e("button",{type:"button",class:"text-xs font-medium px-3 py-1.5 rounded-md text-red-600 hover:bg-red-50 dark:text-red-400 dark:hover:bg-red-900/20 ml-auto",onClick:N=>S(s)}," Disconnect ",8,ne)]),_:2},1024)])]))),128))])):c("",!0)])])]),_:1}))}});export{Ee as default};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.