PageSourceSearch

https://convolyze.io/assets/DashboardSettings-BrxiUU_c.js

js convolyze.io collected 2026-10-02 01:57:14 UTC 9,034 bytes, 6 lines download raw bytes

1import{c as H,m as $,p as Q,r as s,s as t,j as e,N as V,S as W,G as X,w as Y,x as Z}from"./index-Bbgev6vg.js";import{D as ee}from"./DashboardSidebar-pKgZnlmu.js";import{F as ae}from"./FeedbackModal-tJXbcwQ6.js";import{M as se}from"./plus-OvzM0vUk.js";import"./trash-2-DHW8L3F6.js";import"./settings-CghziuBU.js";/**
2 * @license lucide-react v0.462.0 - ISC
3 *
4 * This source code is licensed under the ISC license.
5 * See the LICENSE file in the root directory of this source tree.
6 */const te=H("Languages",[["path",{d:"m5 8 6 6",key:"1wu5hv"}],["path",{d:"m4 14 6-6 2-3",key:"1k1g8d"}],["path",{d:"M2 5h12",key:"or177f"}],["path",{d:"M7 2h1",key:"1t2jsx"}],["path",{d:"m22 22-5-10-5 10",key:"don7ne"}],["path",{d:"M14 18h6",key:"1m8k6r"}]]),ne=[{code:"en-US",name:"🇺🇸 English (default)"},{code:"auto",name:"🌐 Auto-detect (multilingual)",note:"Detects spoken language automatically. Use for mixed-language meetings."},{code:"es-ES",name:"🇪🇸 Spanish"},{code:"fr-FR",name:"🇫🇷 French"},{code:"de-DE",name:"🇩🇪 German"},{code:"it-IT",name:"🇮🇹 Italian"},{code:"pt-BR",name:"🇧🇷 Portuguese"},{code:"nl-NL",name:"🇳🇱 Dutch"},{code:"hi-IN",name:"🇮🇳 Hindi"},{code:"ja-JP",name:"🇯🇵 Japanese"}],re=[{code:"match",name:"🔄 Match meeting language"},{code:"en-US",name:"🇺🇸 English"},{code:"es-ES",name:"🇪🇸 Spanish"},{code:"fr-FR",name:"🇫🇷 French"},{code:"de-DE",name:"🇩🇪 German"},{code:"it-IT",name:"🇮🇹 Italian"},{code:"pt-BR",name:"🇧🇷 Portuguese"},{code:"ja-JP",name:"🇯🇵 Japanese"},{code:"ko-KR",name:"🇰🇷 Korean"},{code:"zh-CN",name:"🇨🇳 Chinese"}],ue=()=>{const{user:r,loading:L,subscription:C,startCheckout:R}=$(),E=Q(),[P,l]=s.useState([]),[F,c]=s.useState(!1),[o,m]=s.useState("en-US"),[I,u]=s.useState("en-US"),[d,g]=s.useState("match"),[M,x]=s.useState("match"),[p,U]=s.useState(!0),[f,h]=s.useState(!1),[_,b]=s.useState(!1),[j,y]=s.useState(!1),[A,N]=s.useState(!1),[v,S]=s.useState(!1),k=C.tier||"free",i=k==="plus"||k==="premium";s.useEffect(()=>{r&&((async()=>{const{data:a}=await t.from("campaigns").select("*").order("created_at",{ascending:!1});l(a??[])})(),(async()=>{try{const{data:a,error:n}=await t.functions.invoke("user-preferences",{method:"GET"});!n&&(a!=null&&a.language)&&(m(a.language),u(a.language)),!n&&(a!=null&&a.responseLanguage)&&(g(a.responseLanguage),x(a.responseLanguage))}catch(a){console.warn("Failed to load preferences:",a)}finally{U(!1)}})())},[r]);const G=async()=>{if(i){h(!0);try{const{error:a}=await t.functions.invoke("user-preferences",{method:"POST",body:{language:o}});if(a)throw a;u(o),b(!0),setTimeout(()=>b(!1),2500)}catch(a){console.error("Save failed:",a),alert("Failed to save. Please try again.")}finally{h(!1)}}},T=async()=>{y(!0);try{const{error:a}=await t.functions.invoke("user-preferences",{method:"POST",body:{responseLanguage:d}});if(a)throw a;x(d),N(!0),setTimeout(()=>N(!1),2500)}catch(a){console.error("Save failed:",a),alert("Failed to save. Please try again.")}finally{y(!1)}},w=async()=>{S(!0);const a=await R();a&&window.open(a,"_blank"),S(!1)},D=a=>{E("/dashboard")},O=async(a,n,B)=>{if(!r)return;await t.from("campaigns").insert({user_id:r.id,name:a,description:n||null,job_description:B||null});const{data:K}=await t.from("campaigns").select("*").order("created_at",{ascending:!1});l(K??[])},z=async a=>{await t.from("meetings").update({campaign_id:null}).eq("campaign_id",a),await t.from("campaigns").delete().eq("id",a);const{data:n}=await t.from("campaigns").select("*").order("created_at",{ascending:!1});l(n??[])};if(L)return e.jsx("div",{className:"flex items-center justify-center min-h-screen bg-background",children:e.jsx("p",{className:"text-muted-foreground",children:"Loading…"})});if(!r)return e.jsx(V,{to:"/auth",replace:!0});const J=o!==I,q=d!==M;return e.jsxs("div",{className:"h-screen bg-background flex overflow-hidden",children:[e.jsx(W,{title:"Settings — Convolyze",description:"Manage your Convolyze preferences.",path:"/dashboard/settings",noindex:!0}),e.jsx(ee,{campaigns:P,selectedCampaignId:null,onSelect:D,onCreate:O,onDelete:z,isPaid:i,onUpgrade:w,checkoutLoading:v,isMobileOpen:
6F,onMobileClose:()=>c(!1)}),e.jsx("main",{className:"flex-1 px-4 md:px-8 py-6 md:py-8 min-w-0 overflow-y-auto h-screen",children:e.jsxs("div",{className:"max-w-3xl mx-auto",children:[e.jsxs("div",{className:"flex items-center gap-3 mb-6",children:[e.jsx("button",{onClick:()=>c(!0),className:"p-2 -ml-2 rounded-lg text-muted-foreground hover:bg-muted hover:text-foreground transition-colors md:hidden",children:e.jsx(se,{className:"w-5 h-5"})}),e.jsxs("div",{children:[e.jsx("h2",{className:"text-xl md:text-2xl font-bold text-foreground",style:{fontFamily:"'Space Grotesk', sans-serif"},children:"Settings"}),e.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:"Manage your transcription and AI preferences."})]})]}),e.jsxs("div",{className:"rounded-xl border border-border bg-card p-5 md:p-6",children:[e.jsxs("div",{className:"flex items-start gap-3 mb-4",children:[e.jsx("div",{className:"w-9 h-9 rounded-lg gradient-bg flex items-center justify-center flex-shrink-0",children:e.jsx(X,{className:"w-4 h-4 text-primary-foreground"})}),e.jsxs("div",{className:"flex-1",children:[e.jsx("h3",{className:"text-base font-semibold text-foreground",children:"Transcription language"}),e.jsx("p",{className:"text-sm text-muted-foreground mt-0.5",children:"Choose the language Convolyze will transcribe in your meetings."})]}),!i&&e.jsxs("span",{className:"px-2 py-1 rounded-full text-[10px] font-bold uppercase tracking-wider bg-amber-100 text-amber-700 border border-amber-200 flex items-center gap-1",children:[e.jsx(Y,{className:"w-3 h-3"})," Plus"]})]}),p?e.jsx("p",{className:"text-sm text-muted-foreground",children:"Loading…"}):i?e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"grid gap-2 mt-2",children:ne.map(a=>e.jsxs("label",{className:`flex items-start gap-3 p-3 rounded-lg border cursor-pointer transition-colors ${o===a.code?"border-primary bg-primary/5":"border-border hover:bg-muted/50"}`,children:[e.jsx("input",{type:"radio",name:"transcription-language",value:a.code,checked:o===a.code,onChange:()=>m(a.code),className:"mt-0.5 accent-primary"}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("p",{className:"text-sm font-medium text-foreground",children:a.name}),a.note&&e.jsx("p",{className:"text-xs text-muted-foreground mt-0.5",children:a.note})]})]},a.code))}),e.jsxs("div",{className:"flex items-center gap-3 mt-5",children:[e.jsx("button",{onClick:G,disabled:!J||f,className:"px-5 py-2 text-sm font-semibold rounded-lg gradient-bg text-primary-foreground disabled:opacity-40 disabled:cursor-not-allowed",children:f?"Saving…":"Save changes"}),_&&e.jsx("span",{className:"text-xs text-emerald-600 font-medium",children:"✓ Saved"}),e.jsx("p",{className:"text-xs text-muted-foreground ml-auto",children:"Applies on your next meeting start."})]})]}):e.jsxs("div",{className:"mt-4 rounded-lg border border-border bg-muted/40 p-4",children:[e.jsx("p",{className:"text-sm text-foreground font-medium mb-1",children:"English transcription on the Free plan"}),e.jsx("p",{className:"text-xs text-muted-foreground mb-3",children:"Upgrade to Plus to pick a specific language or enable auto-detect for multilingual meetings."}),e.jsxs("button",{onClick:w,disabled:v,className:"inline-flex items-center gap-1.5 px-4 py-2 text-xs font-semibold rounded-full gradient-bg text-primary-foreground disabled:opacity-50",children:[e.jsx(Z,{className:"w-3.5 h-3.5"})," Upgrade to Plus"]})]})]}),e.jsxs("div",{className:"rounded-xl border border-border bg-card p-5 md:p-6 mt-6",children:[e.jsxs("div",{className:"flex items-start gap-3 mb-4",children:[e.jsx("div",{className:"w-9 h-9 rounded-lg gradient-bg flex items-center justify-center flex-shrink-0",children:e.jsx(te,{className:"w-4 h-4 text-primary-foreground"})}),e.jsxs("div",{className:"flex-1",children:[e.jsx("h3",{className:"text-base font-semibold text-foreground",children:"AI response language"}),e.jsx("p",{className:"text-sm text-muted-foreground mt-0.5",children:"Language used for insights, fact-checks, lookups, and summaries."})]})]}),p?e.jsx("p",{className:"text-sm text-muted-foreground",children:"Loading…"}):e.jsxs(e.Fragment,{children:[e.jsx("select",{value:d,onChange:a=>g(a.target.value),className:"w-full px-3 py-2 rounded-lg border border-border bg-background text-sm text-foreground focus:outline-none focus:ring-2 focus:ring-primary/40",children:re.map(a=>e.jsx("option",{value:a.code,children:a.name},a.code))}),e.jsxs("div",{className:"flex items-center gap-3 mt-5",children:[e.jsx("button",{onClick:T,disabled:!q||j,className:"px-5 py-2 text-sm font-semibold rounded-lg gradient-bg text-primary-foreground disabled:opacity-40 disabled:cursor-not-allowed",children:j?"Saving…":"Save changes"}),A&&e.jsx("span",{className:"text-xs text-emerald-600 font-medium",children:"✓ Saved"})]})]})]})]})}),e.jsx(ae,{})]})};export{ue 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.