PageSourceSearch

https://polynion.edu.pl/_nuxt/p_mup2jD.js

js polynion.edu.pl collected 2026-10-04 00:49:49 UTC 7,188 bytes, 1 lines download raw bytes

1import{d as X,u as Y,b as Z,c as ee,a as te,bx as ae,I as oe,o as ne,g as c,h,i as n,t as s,k as e,j as l,w as r,l as ie,_ as se,m as f,p as re,n as y,q as ce,M as le,N as de,s as d,z as me,A as fe,C as ue}from"./BrZplLHz.js";import{_ as ge}from"./Bmji6LrO.js";const _e={class:"mb-6 flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between"},pe={class:"text-2xl sm:text-3xl font-bold"},he={class:"text-sm text-gray-500 mt-1"},ye={class:"flex flex-wrap items-center gap-2"},ke={class:"mb-4"},xe={class:"py-12 flex justify-center"},be={class:"py-12 text-center"},we={class:"text-gray-500"},ve={key:3,class:"space-y-4"},Pe={class:"flex flex-col gap-4 sm:flex-row sm:items-start sm:justify-between"},Ue={class:"min-w-0 flex-1"},Ae={class:"flex flex-wrap items-center gap-2"},Ce={class:"mt-3 text-base font-semibold text-gray-900 dark:text-white break-words"},Re={class:"mt-1 text-sm text-gray-600 dark:text-gray-300 break-words"},Fe={class:"mt-2 text-xs text-gray-500"},Me={class:"flex flex-wrap items-center gap-2 pt-3 sm:pt-0 sm:shrink-0 border-t sm:border-0 border-gray-100 dark:border-gray-800"},Ne={class:"sr-only sm:not-sr-only sm:ml-1"},Te={key:4,class:"mt-4 flex justify-end"},De=X({__name:"notifications",setup($e){const{t}=Y(),{formatDate:M}=Z();ee(()=>({title:t("notificationsPage.seoTitle","Notifications - Polynion"),meta:[{name:"description",content:t("notificationsPage.seoDescription","Inbox for account and market updates on Polynion.")},{name:"robots",content:"noindex, nofollow"}]}));const u=te(),{notifications:b,unreadCount:w,page:N,pageSize:v,total:P,unreadOnly:g,loading:k,actionLoading:_,error:U,fetchNotifications:A,refreshAll:C,markRead:T,markUnread:$,markAllRead:O,deleteOne:z,clickAction:D,setUnreadOnly:B}=ae();function L(a){const o=new Date(a);return Number.isNaN(o.getTime())?t("notificationsPage.unknownTime","Unknown time"):M(o,{year:"numeric",month:"short",day:"numeric",hour:"numeric",minute:"2-digit"})}function j(a){return a==="market_resolved"?t("notificationsPage.type.marketResolved","Market Resolved"):a==="polyflight_result"?t("notificationsPage.type.polyflightResult","TOTO Prediction Result"):t("notificationsPage.type.announcement","Announcement")}function I(a){return a==="market_resolved"?"primary":a==="polyflight_result"?"warning":"neutral"}function S(a){return a>99?"99+":String(a)}async function V(a){try{await T(a)}catch(o){u.add({id:`notification-read-failed-${a}`,title:t("notificationsPage.toast.markReadFailedTitle","Failed to mark read"),description:o?.data?.statusMessage||o?.message||t("errors.generic","An error occurred"),color:"error"})}}async function q(a){try{await $(a)}catch(o){u.add({id:`notification-unread-failed-${a}`,title:t("notificationsPage.toast.markUnreadFailedTitle","Failed to mark unread"),description:o?.data?.statusMessage||o?.message||t("errors.generic","An error occurred"),color:"error"})}}async function E(a){try{await z(a)}catch(o){u.add({id:`notification-delete-failed-${a}`,title:t("notificationsPage.toast.deleteFailedTitle","Failed to delete notification"),description:o?.data?.statusMessage||o?.message||t("errors.generic","An error occurred"),color:"error"})}}async function H(){try{await O()}catch(a){u.add({id:"notification-mark-all-read-failed",title:t("notificationsPage.toast.markAllReadFailedTitle","Failed to mark all read"),description:a?.data?.statusMessage||a?.message||t("errors.generic","An error occurred"),color:"error"})}}async function G(a){try{const o=await D(a);if(o){const p=/^https?:\/\//i.test(o);await ue(o,{external:p})}}catch(o){u.add({id:`notification-click-failed-${a}`,title:t("notificationsPage.toast.openActionFailedTitle","Failed to open notification action"),description:o?.data?.statusMessage||o?.message||t("errors.generic","An error occurred"),color:"error"})}}async function J(a){await A(a)}function K(){B(!g.value)}return oe(g,()=>{A(1)}),ne(async()=>{await C()}),(a,o)=>{const p=ie,m=se,Q=re,R=me,x=ce,W=ge;return c(),h("div",null,[n("div",_e,[n("div",null,[n("h1",pe,s(e(t)("notificationsPage.title","Notifications")),1),n("p",he,s(e(t)("notificationsPage.subtitle","Inbox for account and market updates.")),1)]),n("div",ye,[l(p,{color:"primary",variant:"soft",class:"mr-auto sm:mr-0"},{default:r(()=>
1[d(s(e(t)("notificationsPage.unreadBadge",{count:S(e(w))},"Unread {count}")),1)]),_:1}),l(m,{variant:"ghost",icon:"i-heroicons-arrow-path",loading:e(k),onClick:e(C)},{default:r(()=>[d(s(e(t)("notificationsPage.refresh","Refresh")),1)]),_:1},8,["loading","onClick"]),l(m,{color:"primary",variant:"soft",icon:"i-heroicons-check-circle",disabled:e(w)===0||e(_),loading:e(_),onClick:H},{default:r(()=>[d(s(e(t)("notificationsPage.markAllRead","Mark All Read")),1)]),_:1},8,["disabled","loading"])])]),n("div",ke,[l(m,{variant:e(g)?"solid":"ghost",color:"neutral",icon:"i-heroicons-funnel",onClick:K},{default:r(()=>[d(s(e(g)?e(t)("notificationsPage.showingUnreadOnly","Showing Unread Only"):e(t)("notificationsPage.showUnreadOnly","Show Unread Only")),1)]),_:1},8,["variant"])]),e(U)?(c(),f(Q,{key:0,color:"error",variant:"soft",title:e(t)("notificationsPage.loadFailedTitle","Failed to load notifications"),description:e(U),class:"mb-4"},null,8,["title","description"])):y("",!0),e(k)?(c(),f(x,{key:1},{default:r(()=>[n("div",xe,[l(R,{name:"i-heroicons-arrow-path",class:"w-6 h-6 animate-spin text-primary-500"})])]),_:1})):e(b).length===0?(c(),f(x,{key:2},{default:r(()=>[n("div",be,[l(R,{name:"i-heroicons-bell",class:"w-10 h-10 mx-auto text-gray-400 mb-3"}),n("p",we,s(e(g)?e(t)("notificationsPage.noUnread","No unread notifications."):e(t)("notificationsPage.empty","No notifications yet.")),1)])]),_:1})):(c(),h("div",ve,[(c(!0),h(le,null,de(e(b),i=>(c(),f(x,{key:i.id,class:fe(["transition-colors",i.readAt?"":"ring-1 ring-primary-200 dark:ring-primary-700 bg-primary-50/50 dark:bg-primary-900/10"])},{default:r(()=>[n("div",Pe,[n("div",Ue,[n("div",Ae,[l(p,{color:I(i.type),variant:"soft",size:"sm"},{default:r(()=>[d(s(j(i.type)),1)]),_:2},1032,["color"]),i.readAt?y("",!0):(c(),f(p,{key:0,color:"primary",variant:"subtle",size:"sm"},{default:r(()=>[d(s(e(t)("notificationsPage.unread","Unread")),1)]),_:1}))]),n("h3",Ce,s(i.title),1),n("p",Re,s(i.message),1),n("p",Fe,s(L(i.createdAt)),1)]),n("div",Me,[i.actionUrl?(c(),f(m,{key:0,color:"primary",variant:"solid",size:"sm",disabled:e(_),onClick:F=>G(i.id)},{default:r(()=>[d(s(i.actionLabel||e(t)("notificationsPage.open","Open")),1)]),_:2},1032,["disabled","onClick"])):y("",!0),l(m,{color:"neutral",variant:"ghost",size:"sm",disabled:e(_),onClick:F=>i.readAt?q(i.id):V(i.id)},{default:r(()=>[d(s(i.readAt?e(t)("notificationsPage.markUnread","Mark Unread"):e(t)("notificationsPage.markRead","Mark Read")),1)]),_:2},1032,["disabled","onClick"]),l(m,{color:"error",variant:"ghost",size:"sm",icon:"i-heroicons-trash",disabled:e(_),onClick:F=>E(i.id)},{default:r(()=>[n("span",Ne,s(e(t)("notificationsPage.delete","Delete")),1)]),_:1},8,["disabled","onClick"])])])]),_:2},1032,["class"]))),128))])),!e(k)&&e(P)>e(v)?(c(),h("div",Te,[l(W,{page:e(N),total:e(P),"items-per-page":e(v),"show-edges":"","onUpdate:page":J},null,8,["page","total","items-per-page"])])):y("",!0)])}}});export{De 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.