Files
sm-bm-plugin/public/assets/LoginView-DajqbbYi.js
Jakub Zych ebd9117f8c feat: lecturer on class sessions and in the session course ref
The schedule showed a lecturer only where the session notes named one
(Globalizacja), so the student plan had nobody under the other courses.
The session JSON now carries the course lecturer in its course ref and an
optional per-session lecturer (new nullable column, admin field, seed key)
for courses shared between two people. The student app shows the
session's own lecturer or, failing that, the course's.
2026-10-17 11:20:11 +02:00

2 lines
2.3 KiB
JavaScript

import{d as j,u as V,c as o,a as s,b as C,e as d,t as m,w as v,v as b,f as N,g as q,h as w,i as k,j as B,r as l,k as M,l as U,o as r,m as _}from"./index-C9sCss04.js";import{s as Z,f as z}from"./forms-BPOK5alr.js";const R={class:"auth"},S={key:0,class:"notice",role:"status"},A={key:0,class:"notice error",role:"alert",style:{"margin-bottom":"14px"}},D={class:"field"},E={key:0,class:"error-text"},I={class:"field"},L={key:0,class:"error-text"},T={class:"check",style:{"margin-bottom":"16px"}},H=["disabled"],P={class:"auth-links"},J=j({__name:"LoginView",setup(W){const g=V(),c=B(),x=U(),i=l(""),u=l(""),p=l(!0),n=l(!1),t=l(null);async function h(){n.value=!0,t.value=null;try{await g.login(i.value.trim(),u.value,p.value),await x.replace(Z(c.query.redirect))}catch(f){t.value=z(f)}finally{n.value=!1}}return(f,e)=>{const y=M("router-link");return r(),o("div",R,[e[8]||(e[8]=s("header",{class:"page-head"},[s("span",{class:"eyebrow"},"BM II° · UWr"),s("h1",null,"Zaloguj się")],-1)),C(c).query.expired?(r(),o("p",S,"Sesja wygasła. Zaloguj się ponownie.")):d("",!0),s("form",{onSubmit:q(h,["prevent"]),novalidate:""},[t.value?.message?(r(),o("div",A,m(t.value.message),1)):d("",!0),s("div",D,[e[3]||(e[3]=s("label",{for:"email"},"Adres e-mail",-1)),v(s("input",{id:"email","onUpdate:modelValue":e[0]||(e[0]=a=>i.value=a),type:"email",autocomplete:"username",inputmode:"email",required:"",autofocus:""},null,512),[[b,i.value]]),t.value?.fields.email?(r(),o("p",E,m(t.value.fields.email),1)):d("",!0)]),s("div",I,[e[4]||(e[4]=s("label",{for:"password"},"Hasło",-1)),v(s("input",{id:"password","onUpdate:modelValue":e[1]||(e[1]=a=>u.value=a),type:"password",autocomplete:"current-password",required:""},null,512),[[b,u.value]]),t.value?.fields.password?(r(),o("p",L,m(t.value.fields.password),1)):d("",!0)]),s("label",T,[v(s("input",{"onUpdate:modelValue":e[2]||(e[2]=a=>p.value=a),type:"checkbox"},null,512),[[N,p.value]]),e[5]||(e[5]=s("span",null,"Pamiętaj mnie na tym urządzeniu",-1))]),s("button",{class:"btn primary block",type:"submit",disabled:n.value||!i.value||!u.value},m(n.value?"Logowanie…":"Zaloguj się"),9,H)],32),s("div",P,[w(y,{to:"/przypomnij-haslo"},{default:k(()=>[...e[6]||(e[6]=[_("Nie pamiętam hasła",-1)])]),_:1}),w(y,{to:"/rejestracja"},{default:k(()=>[...e[7]||(e[7]=[_("Załóż konto",-1)])]),_:1})])])}}});export{J as default};