-
Notifications
You must be signed in to change notification settings - Fork 152
match tickets and common dashboard dropdown to talk dropdown #1376
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: enext
Are you sure you want to change the base?
Conversation
Reviewer's GuideAligns the Tickets and Common dashboard dropdown styling and structure with the Talk dropdown by introducing shared popover styling, normalizing spacing/typography/icon sizes, and standardizing separators and submenu behavior in both pretixcontrol and pretixpresale stylesheets. Flow diagram for shared dropdown popover styling across dashboardsflowchart TD
User["User clicks profile avatar"]
TalkNavbar["Talk navbar dropdown trigger"]
TicketsNavbar["Tickets navbar dropdown trigger"]
CommonNavbar["Common dashboard navbar dropdown trigger"]
SharedPopover["Shared popover base styles (.popover)"]
SharedContent["Shared popover content styles (.popover-content)"]
SharedProfileMenu["Shared profile-menu styles"]
SharedSubmenu["Shared submenu and submenu-item styles"]
User --> TalkNavbar
User --> TicketsNavbar
User --> CommonNavbar
TalkNavbar --> SharedPopover
TicketsNavbar --> SharedPopover
CommonNavbar --> SharedPopover
SharedPopover --> SharedContent
SharedContent --> SharedProfileMenu
SharedContent --> SharedSubmenu
SharedProfileMenu --> HoverState["Consistent hover background and text color"]
SharedProfileMenu --> Separators["Standardized separators and borders"]
SharedProfileMenu --> Typography["Normalized font size, padding, line height"]
SharedSubmenu --> SubmenuAppearance["Unified submenu spacing, icons, and hover"]
File-Level Changes
Assessment against linked issues
Possibly linked issues
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey there - I've reviewed your changes - here's some feedback:
- The new
.popoverstyling is duplicated acrosspretixcontrolandpretixpresaleSCSS; consider extracting a shared mixin or partial to keep the dropdown look consistent and easier to maintain. - Using hard-coded
:nth-child(6)/:nth-child(4)selectors for adding borders to specific.profile-menuentries is brittle; tying these styles to semantic classes (e.g.,.primary-actions,.logout) would be more robust against DOM changes. - There are many
!importantoverrides added for padding, borders, and backgrounds in the dropdown; it may be worth revisiting selector specificity or restructuring the CSS so these can be reduced to avoid future override conflicts.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- The new `.popover` styling is duplicated across `pretixcontrol` and `pretixpresale` SCSS; consider extracting a shared mixin or partial to keep the dropdown look consistent and easier to maintain.
- Using hard-coded `:nth-child(6)` / `:nth-child(4)` selectors for adding borders to specific `.profile-menu` entries is brittle; tying these styles to semantic classes (e.g., `.primary-actions`, `.logout`) would be more robust against DOM changes.
- There are many `!important` overrides added for padding, borders, and backgrounds in the dropdown; it may be worth revisiting selector specificity or restructuring the CSS so these can be reduced to avoid future override conflicts.
## Individual Comments
### Comment 1
<location> `app/eventyay/static/pretixcontrol/scss/main.scss:744-753` </location>
<code_context>
- min-width: 200px;
+ padding: 0;
+ min-width: 192px;
#submenu {
position: absolute;
top: 0;
- right: 101%;
+ right: 100%;
font-size: 16px;
font-weight: normal;
cursor: pointer;
display: none;
- min-width: 200px;
- padding: 5px 0;
- border-radius: 4px;
+ min-width: 224px;
+ padding: 0;
+ margin: 0;
+ border-radius: 0;
z-index: 9999;
background-clip: padding-box;
- border: 1px solid rgba(0, 0, 0, 0.2);
- box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
+ border: none;
+ box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -4px rgba(0,0,0,0.1);
}
.profile-menu {
</code_context>
<issue_to_address>
**suggestion:** The submenu box-shadow and popover box-shadow are duplicated; consider centralizing this into a variable or mixin.
Since `.popover` and `#submenu` (and the presale stylesheet) now share this multi-layer shadow, extracting it into a shared variable or mixin (e.g. `$dropdown-shadow`) would keep elevation tweaks consistent and reduce duplication.
Suggested implementation:
```
display: none !important;
}
}
$dropdown-shadow: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -4px rgba(0,0,0,0.1);
.popover-content {
```
```
background-clip: padding-box;
border: none;
box-shadow: $dropdown-shadow;
}
```
1. Search in this file for `.popover` or other dropdown/popover elements that currently use `box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -4px rgba(0,0,0,0.1);` and replace those with `box-shadow: $dropdown-shadow;` to fully deduplicate.
2. In the presale stylesheet (likely another SCSS file under `app/eventyay/static/`), replace the same multi-layer box-shadow with `$dropdown-shadow` as well. If that file is in a different build bundle, ensure it imports the file where `$dropdown-shadow` is defined or define the variable in a common imported partial.
</issue_to_address>Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
| #submenu { | ||
| position: absolute; | ||
| top: 0; | ||
| right: 101%; | ||
| right: 100%; | ||
| font-size: 16px; | ||
| font-weight: normal; | ||
| cursor: pointer; | ||
| display: none; | ||
| min-width: 200px; | ||
| padding: 5px 0; | ||
| border-radius: 4px; | ||
| min-width: 224px; | ||
| padding: 0; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
suggestion: The submenu box-shadow and popover box-shadow are duplicated; consider centralizing this into a variable or mixin.
Since .popover and #submenu (and the presale stylesheet) now share this multi-layer shadow, extracting it into a shared variable or mixin (e.g. $dropdown-shadow) would keep elevation tweaks consistent and reduce duplication.
Suggested implementation:
display: none !important;
}
}
$dropdown-shadow: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -4px rgba(0,0,0,0.1);
.popover-content {
background-clip: padding-box;
border: none;
box-shadow: $dropdown-shadow;
}
- Search in this file for
.popoveror other dropdown/popover elements that currently usebox-shadow: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -4px rgba(0,0,0,0.1);and replace those withbox-shadow: $dropdown-shadow;to fully deduplicate. - In the presale stylesheet (likely another SCSS file under
app/eventyay/static/), replace the same multi-layer box-shadow with$dropdown-shadowas well. If that file is in a different build bundle, ensure it imports the file where$dropdown-shadowis defined or define the variable in a common imported partial.
|
hi @mariobehling! could you please review my pr when you get a moment. i've done most of the matching manually not sure if thats the ideal approach so i'd appreciate your thoughts on it. |
mariobehling
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, please start by addressing AI reviews.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR standardizes dropdown menu styling across the Common Dashboard, Tickets Dashboard, and Talk interfaces to create a consistent user experience. The changes update popover containers, menu items, and separator styling.
Key Changes:
- Unified popover container appearance with consistent borders, shadows, padding, and removed arrows
- Standardized typography (14px font, 1.5 line-height), spacing (7-8px/16px padding), and icon sizing (12px) across menu items
- Replaced separator elements with border-top styling on specific menu items
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 8 comments.
| File | Description |
|---|---|
| app/eventyay/static/pretixpresale/scss/main.scss | Updated presale dropdown styling with new popover container styles, refined profile-menu spacing and typography, and replaced separators with border-top dividers |
| app/eventyay/static/pretixcontrol/scss/main.scss | Updated control interface dropdown styling with matching popover container styles, standardized profile-menu and dashboard-item spacing/typography, and refined submenu styling with consistent padding and icon sizes |
Comments suppressed due to low confidence (1)
app/eventyay/static/pretixcontrol/scss/main.scss:988
- Duplicated submenu-item styles. The
.submenu-itemblock at lines 923-952 and the one at lines 958-988 contain almost identical styling rules (a, i, and hover styles). This code duplication violates DRY principles and makes maintenance harder. Consider consolidating these into a single ruleset or using a mixin.
.submenu-item {
background-color: #fff;
padding: 7px 16px;
font-size: 12px;
line-height: 1.5;
a {
color: darken($btn-primary-bg, 10%) !important;
padding: 0 !important;
border: none !important;
background: none !important;
display: inline !important;
line-height: 1.5;
}
i {
margin-right: 7px;
width: 12px;
font-size: 12px;
vertical-align: middle;
}
&:hover {
background-color: darken($btn-primary-bg, 10%) !important;
a {
color: #fff !important;
}
}
}
}
&:hover {
#submenu {
display: block;
.submenu-item {
background-color: #fff;
padding: 8px 16px;
font-size: 12px;
line-height: 1.5;
a {
color: darken($btn-primary-bg, 10%) !important;
padding: 0 !important;
border: none !important;
background: none !important;
display: inline !important;
line-height: 1.5;
}
i {
margin-right: 8px;
width: 12px;
font-size: 12px;
display: inline-block;
vertical-align: middle;
}
&:hover {
background-color: darken($btn-primary-bg, 10%) !important;
a {
color: #fff !important;
}
}
}
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Saksham-Sirohi
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Icons in the commons area navbar seem to be white for some reason, and no separators. Please fix that
dbd1c35 to
6bdaecd
Compare
thanks for review @Saksham-Sirohi! i noticed this icons and text issue after merging enext. i still have conflicts which i'll properly resolve soon. |
6bdaecd to
c198ad1
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
New security issues found
| * (c) 2018-present Yuxi (Evan) You and Vue contributors | ||
| * @license MIT | ||
| **/let Ss;const dn=typeof window<"u"&&window.trustedTypes;if(dn)try{Ss=dn.createPolicy("vue",{createHTML:e=>e})}catch{}const Cr=Ss?e=>Ss.createHTML(e):e=>e,Mo="http://www.w3.org/2000/svg",Fo="http://www.w3.org/1998/Math/MathML",Oe=typeof document<"u"?document:null,hn=Oe&&Oe.createElement("template"),Do={insert:(e,t,s)=>{t.insertBefore(e,s||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,s,n)=>{const r=t==="svg"?Oe.createElementNS(Mo,e):t==="mathml"?Oe.createElementNS(Fo,e):s?Oe.createElement(e,{is:s}):Oe.createElement(e);return e==="select"&&n&&n.multiple!=null&&r.setAttribute("multiple",n.multiple),r},createText:e=>Oe.createTextNode(e),createComment:e=>Oe.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>Oe.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,s,n,r,i){const o=s?s.previousSibling:t.lastChild;if(r&&(r===i||r.nextSibling))for(;t.insertBefore(r.cloneNode(!0),s),!(r===i||!(r=r.nextSibling)););else{hn.innerHTML=Cr(n==="svg"?`<svg>${e}</svg>`:n==="mathml"?`<math>${e}</math>`:e);const f=hn.content;if(n==="svg"||n==="mathml"){const a=f.firstChild;for(;a.firstChild;)f.appendChild(a.firstChild);f.removeChild(a)}t.insertBefore(f,s)}return[o?o.nextSibling:t.firstChild,s?s.previousSibling:t.lastChild]}},Lo=Symbol("_vtc");function Ho(e,t,s){const n=e[Lo];n&&(t=(t?[t,...n]:[...n]).join(" ")),t==null?e.removeAttribute("class"):s?e.setAttribute("class",t):e.className=t}const pn=Symbol("_vod"),No=Symbol("_vsh"),jo=Symbol(""),$o=/(^|;)\s*display\s*:/;function Uo(e,t,s){const n=e.style,r=Y(s);let i=!1;if(s&&!r){if(t)if(Y(t))for(const o of t.split(";")){const f=o.slice(0,o.indexOf(":")).trim();s[f]==null&&Nt(n,f,"")}else for(const o in t)s[o]==null&&Nt(n,o,"");for(const o in s)o==="display"&&(i=!0),Nt(n,o,s[o])}else if(r){if(t!==s){const o=n[jo];o&&(s+=";"+o),n.cssText=s,i=$o.test(s)}}else t&&e.removeAttribute("style");pn in e&&(e[pn]=i?n.display:"",e[No]&&(n.display="none"))}const gn=/\s*!important$/;function Nt(e,t,s){if(I(s))s.forEach(n=>Nt(e,t,n));else if(s==null&&(s=""),t.startsWith("--"))e.setProperty(t,s);else{const n=Bo(e,t);gn.test(s)?e.setProperty(Xe(n),s.replace(gn,""),"important"):e[n]=s}}const mn=["Webkit","Moz","ms"],us={};function Bo(e,t){const s=us[t];if(s)return s;let n=je(t);if(n!=="filter"&&n in e)return us[t]=n;n=Cn(n);for(let r=0;r<mn.length;r++){const i=mn[r]+n;if(i in e)return us[t]=i}return t}const _n="http://www.w3.org/1999/xlink";function bn(e,t,s,n,r,i=Kr(t)){n&&t.startsWith("xlink:")?s==null?e.removeAttributeNS(_n,t.slice(6,t.length)):e.setAttributeNS(_n,t,s):s==null||i&&!On(s)?e.removeAttribute(t):e.setAttribute(t,i?"":nt(s)?String(s):s)}function vn(e,t,s,n,r){if(t==="innerHTML"||t==="textContent"){s!=null&&(e[t]=t==="innerHTML"?Cr(s):s);return}const i=e.tagName;if(t==="value"&&i!=="PROGRESS"&&!i.includes("-")){const f=i==="OPTION"?e.getAttribute("value")||"":e.value,a=s==null?e.type==="checkbox"?"on":"":String(s);(f!==a||!("_value"in e))&&(e.value=a),s==null&&e.removeAttribute(t),e._value=s;return}let o=!1;if(s===""||s==null){const f=typeof e[t];f==="boolean"?s=On(s):s==null&&f==="string"?(s="",o=!0):f==="number"&&(s=0,o=!0)}try{e[t]=s}catch{}o&&e.removeAttribute(r||t)}function Ko(e,t,s,n){e.addEventListener(t,s,n)}function Vo(e,t,s,n){e.removeEventListener(t,s,n)}const xn=Symbol("_vei");function Wo(e,t,s,n,r=null){const i=e[xn]||(e[xn]={}),o=i[t];if(n&&o)o.value=n;else{const[f,a]=qo(t);if(n){const h=i[t]=Yo(n,r);Ko(e,f,h,a)}else o&&(Vo(e,f,o,a),i[t]=void 0)}}const yn=/(?:Once|Passive|Capture)$/;function qo(e){let t;if(yn.test(e)){t={};let n;for(;n=e.match(yn);)e=e.slice(0,e.length-n[0].length),t[n[0].toLowerCase()]=!0}return[e[2]===":"?e.slice(3):Xe(e.slice(2)),t]}let as=0;const Go=Promise.resolve(),Jo=()=>as||(Go.then(()=>as=0),as=Date.now());function Yo(e,t){const s=n=>{if(!n._vts)n._vts=Date.now();else if(n._vts<=s.attached)return;Ce(zo(n,s.value),t,5,[n])};return s.value=e,s.attached=Jo(),s}function zo(e,t){if(I(t)){const s=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{s.call(e),e._stopped=!0},t.map(n=>r=>!r._stopped&&n&&n(r))}else return t}const wn=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,Xo=(e,t,s,n,r,i)=>{const o=r==="svg";t==="class"?Ho(e,n,o):t==="style"?Uo(e,s,n):Wt(t)?Cs(t)||Wo(e,t,s,n,i):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):Zo(e,t,n,o))?(vn(e,t,n),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&bn(e,t,n,o,i,t!=="value")):e._isVueCE&&(/[A-Z]/.test(t)||!Y(n))?vn(e,je(t),n,i,t):(t==="true-value"?e._trueValue=n:t==="false-value"&&(e._falseValue=n),bn(e,t,n,o))};function Zo(e,t,s,n){if(n)return!!(t==="innerHTML"||t==="textContent"||t in e&&wn(t)&&R(s));if(t==="spellcheck"||t==="draggable"||t==="translate"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA")return!1;if(t==="width"||t==="height"){const r=e.tagName;if(r==="IMG"||r==="VIDEO"||r==="CANVAS"||r==="SOURCE")return!1}return wn(t)&&Y(s)?!1:t in e}const ko=Q({patchProp:Xo},Do);let Sn;function Qo(){return Sn||(Sn=eo(ko))}const el=(...e)=>{const t=Qo().createApp(...e),{mount:s}=t;return t.mount=n=>{const r=sl(n);if(!r)return;const i=t._component;!R(i)&&!i.render&&!i.template&&(i.template=r.innerHTML),r.nodeType===1&&(r.textContent="");const o=s(r,!1,tl(r));return r instanceof Element&&(r.removeAttribute("v-cloak"),r.setAttribute("data-v-app","")),o},t};function tl(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function sl(e){return Y(e)?document.querySelector(e):e}const nl={key:0,ref:"main-menu",class:"absolute z-1 end-1 grid grid-cols-1 shadow shadow-lg min-w-48 bg-white"},rl={key:0,class:"absolute z-2 top-0 -translate-x-full list-none m-0 p-s-0 bg-white shadow-lg min-w-56"},ae="text-[#1a69a4] hover:text-white hover:bg-[#1a69a4] px-4 py-2 block no-underline",ye="flex flex-row items-center space-x-2",ds="border-t border-s-0 border-e-0 border-b-0 border-solid border-gray-300",il=Ei({__name:"App",setup(e){const t=Zs(!1),s=Zs(!1),n=Oi("container");function r(){t.value=!0}function i(){t.value=!1}function o(h){const u=h.target;n.value&&!n.value.contains(u)&&i()}function f(h){h.key==="Escape"&&i()}function a(h){h.preventDefault();const u=document.createElement("form");u.method="POST",u.action="/common/logout/";const p=document.querySelector('input[name="csrfmiddlewaretoken"]');if(p){const w=document.createElement("input");w.type="hidden",w.name="csrfmiddlewaretoken",w.value=p.value,u.appendChild(w)}document.body.appendChild(u),u.submit()}return Qn(()=>{document.addEventListener("click",o),document.addEventListener("keydown",f)}),er(()=>{document.removeEventListener("click",o),document.removeEventListener("keydown",f)}),(h,u)=>(Lt(),cs("div",{class:"relative font-sans text-sm",ref_key:"container",ref:n},[P("button",{class:"text-xl cursor-pointer",onClick:r},u[2]||(u[2]=[P("div",{class:"i-fa-caret-down h-4 w-4"},null,-1)])),t.value?(Lt(),cs("div",nl,[P("div",{class:"relative cursor-pointer",onMouseover:u[0]||(u[0]=p=>s.value=!0),onMouseleave:u[1]||(u[1]=p=>s.value=!1)},[P("div",{class:ie(["flex flex-row items-center space-x-2",ae])},u[3]||(u[3]=[P("div",{class:"i-fa-tachometer h-3 w-3"},null,-1),P("div",{class:""},"Dashboard",-1)])),s.value?(Lt(),cs("ul",rl,[P("li",null,[P("a",{href:"/common/",class:ie([[ae,ye],"block"])},u[4]||(u[4]=[P("div",{class:"i-fa-tachometer h-3 w-3"},null,-1),P("div",null,"Main dashboard",-1)]),2)]),P("li",null,[P("a",{href:"/control/",class:ie([[ae,ye],"block"])},u[5]||(u[5]=[P("div",{class:"i-fa-ticket h-3 w-3"},null,-1),P("div",null,"Tickets",-1)]),2)]),P("li",null,[P("a",{href:"/orga/event/",class:ie([[ae,ye],"block"])},u[6]||(u[6]=[P("div",{class:"i-fa-microphone h-3 w-3"},null,-1),P("div",null,"Talks",-1)]),2)])])):cn("",!0)],32),P("a",{class:ie([ae,ye]),href:"/common/orders/"},u[7]||(u[7]=[P("div",{class:"i-fa-shopping-cart h-3 w-3"},null,-1),P("div",null,"My orders",-1)]),2),P("a",{class:ie([ae,ye]),href:"/common/sessions/"},u[8]||(u[8]=[P("div",{class:"i-fa-sticky-note-o h-3 w-3"},null,-1),P("div",null,"My sessions",-1)]),2),P("a",{class:ie([ae,ye]),href:"/common/events/"},u[9]||(u[9]=[P("div",{class:"i-fa-calendar h-3 w-3"},null,-1),P("div",null,"My events",-1)]),2),P("a",{class:ie([ae,ye]),href:"/common/organizers/"},u[10]||(u[10]=[P("div",{class:"i-fa-users h-3 w-3"},null,-1),P("div",null,"Organizers",-1)]),2),P("a",{class:ie([ae,ye,ds]),href:"/common/account/"},u[11]||(u[11]=[P("div",{class:"i-fa-user h-3 w-3"},null,-1),P("div",null,"Accounts",-1)]),2),P("a",{class:ie([ae,ye,ds]),href:"/control/admin/"},u[12]||(u[12]=[P("div",{class:"i-fa-cog h-3 w-3"},null,-1),P("div",null,"Admin",-1)]),2),P("a",{class:ie([ae,ye,ds,"w-full text-left"]),onClick:a,href:"#"},u[13]||(u[13]=[P("div",{class:"i-fa-sign-out h-3 w-3"},null,-1),P("div",null,"Logout",-1)]),2)],512)):cn("",!0)],512))}}),ol=(e,t)=>{const s=e.__vccOpts||e;for(const[n,r]of t)s[n]=r;return s},ll=ol(il,[["__scopeId","data-v-5701f6ec"]]);el(ll).mount("#global-nav-menu"); | ||
| **/let Ss;const dn=typeof window<"u"&&window.trustedTypes;if(dn)try{Ss=dn.createPolicy("vue",{createHTML:e=>e})}catch{}const Cr=Ss?e=>Ss.createHTML(e):e=>e,Mo="http://www.w3.org/2000/svg",Fo="http://www.w3.org/1998/Math/MathML",Oe=typeof document<"u"?document:null,hn=Oe&&Oe.createElement("template"),Do={insert:(e,t,s)=>{t.insertBefore(e,s||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,s,n)=>{const r=t==="svg"?Oe.createElementNS(Mo,e):t==="mathml"?Oe.createElementNS(Fo,e):s?Oe.createElement(e,{is:s}):Oe.createElement(e);return e==="select"&&n&&n.multiple!=null&&r.setAttribute("multiple",n.multiple),r},createText:e=>Oe.createTextNode(e),createComment:e=>Oe.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>Oe.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,s,n,r,i){const o=s?s.previousSibling:t.lastChild;if(r&&(r===i||r.nextSibling))for(;t.insertBefore(r.cloneNode(!0),s),!(r===i||!(r=r.nextSibling)););else{hn.innerHTML=Cr(n==="svg"?`<svg>${e}</svg>`:n==="mathml"?`<math>${e}</math>`:e);const f=hn.content;if(n==="svg"||n==="mathml"){const a=f.firstChild;for(;a.firstChild;)f.appendChild(a.firstChild);f.removeChild(a)}t.insertBefore(f,s)}return[o?o.nextSibling:t.firstChild,s?s.previousSibling:t.lastChild]}},Lo=Symbol("_vtc");function Ho(e,t,s){const n=e[Lo];n&&(t=(t?[t,...n]:[...n]).join(" ")),t==null?e.removeAttribute("class"):s?e.setAttribute("class",t):e.className=t}const pn=Symbol("_vod"),No=Symbol("_vsh"),jo=Symbol(""),$o=/(^|;)\s*display\s*:/;function Uo(e,t,s){const n=e.style,r=Y(s);let i=!1;if(s&&!r){if(t)if(Y(t))for(const o of t.split(";")){const f=o.slice(0,o.indexOf(":")).trim();s[f]==null&&Nt(n,f,"")}else for(const o in t)s[o]==null&&Nt(n,o,"");for(const o in s)o==="display"&&(i=!0),Nt(n,o,s[o])}else if(r){if(t!==s){const o=n[jo];o&&(s+=";"+o),n.cssText=s,i=$o.test(s)}}else t&&e.removeAttribute("style");pn in e&&(e[pn]=i?n.display:"",e[No]&&(n.display="none"))}const gn=/\s*!important$/;function Nt(e,t,s){if(I(s))s.forEach(n=>Nt(e,t,n));else if(s==null&&(s=""),t.startsWith("--"))e.setProperty(t,s);else{const n=Bo(e,t);gn.test(s)?e.setProperty(Xe(n),s.replace(gn,""),"important"):e[n]=s}}const mn=["Webkit","Moz","ms"],us={};function Bo(e,t){const s=us[t];if(s)return s;let n=je(t);if(n!=="filter"&&n in e)return us[t]=n;n=Cn(n);for(let r=0;r<mn.length;r++){const i=mn[r]+n;if(i in e)return us[t]=i}return t}const _n="http://www.w3.org/1999/xlink";function bn(e,t,s,n,r,i=Kr(t)){n&&t.startsWith("xlink:")?s==null?e.removeAttributeNS(_n,t.slice(6,t.length)):e.setAttributeNS(_n,t,s):s==null||i&&!On(s)?e.removeAttribute(t):e.setAttribute(t,i?"":nt(s)?String(s):s)}function vn(e,t,s,n,r){if(t==="innerHTML"||t==="textContent"){s!=null&&(e[t]=t==="innerHTML"?Cr(s):s);return}const i=e.tagName;if(t==="value"&&i!=="PROGRESS"&&!i.includes("-")){const f=i==="OPTION"?e.getAttribute("value")||"":e.value,a=s==null?e.type==="checkbox"?"on":"":String(s);(f!==a||!("_value"in e))&&(e.value=a),s==null&&e.removeAttribute(t),e._value=s;return}let o=!1;if(s===""||s==null){const f=typeof e[t];f==="boolean"?s=On(s):s==null&&f==="string"?(s="",o=!0):f==="number"&&(s=0,o=!0)}try{e[t]=s}catch{}o&&e.removeAttribute(r||t)}function Ko(e,t,s,n){e.addEventListener(t,s,n)}function Vo(e,t,s,n){e.removeEventListener(t,s,n)}const xn=Symbol("_vei");function Wo(e,t,s,n,r=null){const i=e[xn]||(e[xn]={}),o=i[t];if(n&&o)o.value=n;else{const[f,a]=qo(t);if(n){const h=i[t]=Yo(n,r);Ko(e,f,h,a)}else o&&(Vo(e,f,o,a),i[t]=void 0)}}const yn=/(?:Once|Passive|Capture)$/;function qo(e){let t;if(yn.test(e)){t={};let n;for(;n=e.match(yn);)e=e.slice(0,e.length-n[0].length),t[n[0].toLowerCase()]=!0}return[e[2]===":"?e.slice(3):Xe(e.slice(2)),t]}let as=0;const Go=Promise.resolve(),Jo=()=>as||(Go.then(()=>as=0),as=Date.now());function Yo(e,t){const s=n=>{if(!n._vts)n._vts=Date.now();else if(n._vts<=s.attached)return;Ce(zo(n,s.value),t,5,[n])};return s.value=e,s.attached=Jo(),s}function zo(e,t){if(I(t)){const s=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{s.call(e),e._stopped=!0},t.map(n=>r=>!r._stopped&&n&&n(r))}else return t}const wn=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,Xo=(e,t,s,n,r,i)=>{const o=r==="svg";t==="class"?Ho(e,n,o):t==="style"?Uo(e,s,n):Wt(t)?Cs(t)||Wo(e,t,s,n,i):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):Zo(e,t,n,o))?(vn(e,t,n),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&bn(e,t,n,o,i,t!=="value")):e._isVueCE&&(/[A-Z]/.test(t)||!Y(n))?vn(e,je(t),n,i,t):(t==="true-value"?e._trueValue=n:t==="false-value"&&(e._falseValue=n),bn(e,t,n,o))};function Zo(e,t,s,n){if(n)return!!(t==="innerHTML"||t==="textContent"||t in e&&wn(t)&&R(s));if(t==="spellcheck"||t==="draggable"||t==="translate"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA")return!1;if(t==="width"||t==="height"){const r=e.tagName;if(r==="IMG"||r==="VIDEO"||r==="CANVAS"||r==="SOURCE")return!1}return wn(t)&&Y(s)?!1:t in e}const ko=Q({patchProp:Xo},Do);let Sn;function Qo(){return Sn||(Sn=eo(ko))}const el=(...e)=>{const t=Qo().createApp(...e),{mount:s}=t;return t.mount=n=>{const r=sl(n);if(!r)return;const i=t._component;!R(i)&&!i.render&&!i.template&&(i.template=r.innerHTML),r.nodeType===1&&(r.textContent="");const o=s(r,!1,tl(r));return r instanceof Element&&(r.removeAttribute("v-cloak"),r.setAttribute("data-v-app","")),o},t};function tl(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function sl(e){return Y(e)?document.querySelector(e):e}const nl={key:0,ref:"main-menu",class:"absolute z-1 end-1 grid grid-cols-1 shadow shadow-lg min-w-48 bg-white"},rl={key:0,class:"absolute z-2 top-0 -translate-x-full list-none m-0 p-s-0 bg-white shadow-lg min-w-56"},ae="text-[#1a69a4] hover:text-white hover:bg-[#1a69a4] px-4 py-2 block no-underline",ye="flex flex-row items-center space-x-2",ds="border-t border-s-0 border-e-0 border-b-0 border-solid border-gray-300",il=Ei({__name:"App",setup(e){const t=Zs(!1),s=Zs(!1),n=Oi("container");function r(){t.value=!0}function i(){t.value=!1}function o(h){const u=h.target;n.value&&!n.value.contains(u)&&i()}function f(h){h.key==="Escape"&&i()}function a(h){h.preventDefault();const u=document.createElement("form");u.method="POST",u.action="/common/logout/";const p=document.querySelector('input[name="csrfmiddlewaretoken"]');if(p){const w=document.createElement("input");w.type="hidden",w.name="csrfmiddlewaretoken",w.value=p.value,u.appendChild(w)}document.body.appendChild(u),u.submit()}return Qn(()=>{document.addEventListener("click",o),document.addEventListener("keydown",f)}),er(()=>{document.removeEventListener("click",o),document.removeEventListener("keydown",f)}),(h,u)=>(Lt(),cs("div",{class:"relative font-sans text-sm",ref_key:"container",ref:n},[P("button",{class:"text-xl cursor-pointer",onClick:r},u[2]||(u[2]=[P("div",{class:"i-fa-caret-down h-4 w-4"},null,-1)])),t.value?(Lt(),cs("div",nl,[P("div",{class:"relative cursor-pointer",onMouseover:u[0]||(u[0]=p=>s.value=!0),onMouseleave:u[1]||(u[1]=p=>s.value=!1)},[P("div",{class:ie(["flex flex-row items-center space-x-2",ae])},u[3]||(u[3]=[P("div",{class:"i-fa-tachometer h-3 w-3"},null,-1),P("div",{class:""},"Dashboard",-1)])),s.value?(Lt(),cs("ul",rl,[P("li",null,[P("a",{href:"/common/",class:ie([[ae,ye],"block"])},u[4]||(u[4]=[P("div",{class:"i-fa-tachometer h-3 w-3"},null,-1),P("div",null,"Main dashboard",-1)]),2)]),P("li",null,[P("a",{href:"/control/",class:ie([[ae,ye],"block"])},u[5]||(u[5]=[P("div",{class:"i-fa-ticket h-3 w-3"},null,-1),P("div",null,"Tickets",-1)]),2)]),P("li",null,[P("a",{href:"/orga/event/",class:ie([[ae,ye],"block"])},u[6]||(u[6]=[P("div",{class:"i-fa-microphone h-3 w-3"},null,-1),P("div",null,"Talks",-1)]),2)])])):cn("",!0)],32),P("a",{class:ie([ae,ye]),href:"/common/orders/"},u[7]||(u[7]=[P("div",{class:"i-fa-shopping-cart h-3 w-3"},null,-1),P("div",null,"My orders",-1)]),2),P("a",{class:ie([ae,ye]),href:"/common/sessions/"},u[8]||(u[8]=[P("div",{class:"i-fa-sticky-note-o h-3 w-3"},null,-1),P("div",null,"My sessions",-1)]),2),P("a",{class:ie([ae,ye]),href:"/common/events/"},u[9]||(u[9]=[P("div",{class:"i-fa-calendar h-3 w-3"},null,-1),P("div",null,"My events",-1)]),2),P("a",{class:ie([ae,ye]),href:"/common/organizers/"},u[10]||(u[10]=[P("div",{class:"i-fa-users h-3 w-3"},null,-1),P("div",null,"Organizers",-1)]),2),P("a",{class:ie([ae,ye,ds]),href:"/common/account/"},u[11]||(u[11]=[P("div",{class:"i-fa-user h-3 w-3"},null,-1),P("div",null,"Accounts",-1)]),2),P("a",{class:ie([ae,ye,ds]),href:"/admin/"},u[12]||(u[12]=[P("div",{class:"i-fa-cog h-3 w-3"},null,-1),P("div",null,"Admin",-1)]),2),P("a",{class:ie([ae,ye,ds,"w-full text-left"]),onClick:a,href:"#"},u[13]||(u[13]=[P("div",{class:"i-fa-sign-out h-3 w-3"},null,-1),P("div",null,"Logout",-1)]),2)],512)):cn("",!0)],512))}}),ol=(e,t)=>{const s=e.__vccOpts||e;for(const[n,r]of t)s[n]=r;return s},ll=ol(il,[["__scopeId","data-v-b0e05ee5"]]);el(ll).mount("#global-nav-menu"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
security (javascript.browser.security.insecure-document-method): User controlled data in methods like innerHTML, outerHTML or document.write is an anti-pattern that can lead to XSS vulnerabilities
Source: opengrep
| * (c) 2018-present Yuxi (Evan) You and Vue contributors | ||
| * @license MIT | ||
| **/let Ss;const dn=typeof window<"u"&&window.trustedTypes;if(dn)try{Ss=dn.createPolicy("vue",{createHTML:e=>e})}catch{}const Cr=Ss?e=>Ss.createHTML(e):e=>e,Mo="http://www.w3.org/2000/svg",Fo="http://www.w3.org/1998/Math/MathML",Oe=typeof document<"u"?document:null,hn=Oe&&Oe.createElement("template"),Do={insert:(e,t,s)=>{t.insertBefore(e,s||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,s,n)=>{const r=t==="svg"?Oe.createElementNS(Mo,e):t==="mathml"?Oe.createElementNS(Fo,e):s?Oe.createElement(e,{is:s}):Oe.createElement(e);return e==="select"&&n&&n.multiple!=null&&r.setAttribute("multiple",n.multiple),r},createText:e=>Oe.createTextNode(e),createComment:e=>Oe.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>Oe.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,s,n,r,i){const o=s?s.previousSibling:t.lastChild;if(r&&(r===i||r.nextSibling))for(;t.insertBefore(r.cloneNode(!0),s),!(r===i||!(r=r.nextSibling)););else{hn.innerHTML=Cr(n==="svg"?`<svg>${e}</svg>`:n==="mathml"?`<math>${e}</math>`:e);const f=hn.content;if(n==="svg"||n==="mathml"){const a=f.firstChild;for(;a.firstChild;)f.appendChild(a.firstChild);f.removeChild(a)}t.insertBefore(f,s)}return[o?o.nextSibling:t.firstChild,s?s.previousSibling:t.lastChild]}},Lo=Symbol("_vtc");function Ho(e,t,s){const n=e[Lo];n&&(t=(t?[t,...n]:[...n]).join(" ")),t==null?e.removeAttribute("class"):s?e.setAttribute("class",t):e.className=t}const pn=Symbol("_vod"),No=Symbol("_vsh"),jo=Symbol(""),$o=/(^|;)\s*display\s*:/;function Uo(e,t,s){const n=e.style,r=Y(s);let i=!1;if(s&&!r){if(t)if(Y(t))for(const o of t.split(";")){const f=o.slice(0,o.indexOf(":")).trim();s[f]==null&&Nt(n,f,"")}else for(const o in t)s[o]==null&&Nt(n,o,"");for(const o in s)o==="display"&&(i=!0),Nt(n,o,s[o])}else if(r){if(t!==s){const o=n[jo];o&&(s+=";"+o),n.cssText=s,i=$o.test(s)}}else t&&e.removeAttribute("style");pn in e&&(e[pn]=i?n.display:"",e[No]&&(n.display="none"))}const gn=/\s*!important$/;function Nt(e,t,s){if(I(s))s.forEach(n=>Nt(e,t,n));else if(s==null&&(s=""),t.startsWith("--"))e.setProperty(t,s);else{const n=Bo(e,t);gn.test(s)?e.setProperty(Xe(n),s.replace(gn,""),"important"):e[n]=s}}const mn=["Webkit","Moz","ms"],us={};function Bo(e,t){const s=us[t];if(s)return s;let n=je(t);if(n!=="filter"&&n in e)return us[t]=n;n=Cn(n);for(let r=0;r<mn.length;r++){const i=mn[r]+n;if(i in e)return us[t]=i}return t}const _n="http://www.w3.org/1999/xlink";function bn(e,t,s,n,r,i=Kr(t)){n&&t.startsWith("xlink:")?s==null?e.removeAttributeNS(_n,t.slice(6,t.length)):e.setAttributeNS(_n,t,s):s==null||i&&!On(s)?e.removeAttribute(t):e.setAttribute(t,i?"":nt(s)?String(s):s)}function vn(e,t,s,n,r){if(t==="innerHTML"||t==="textContent"){s!=null&&(e[t]=t==="innerHTML"?Cr(s):s);return}const i=e.tagName;if(t==="value"&&i!=="PROGRESS"&&!i.includes("-")){const f=i==="OPTION"?e.getAttribute("value")||"":e.value,a=s==null?e.type==="checkbox"?"on":"":String(s);(f!==a||!("_value"in e))&&(e.value=a),s==null&&e.removeAttribute(t),e._value=s;return}let o=!1;if(s===""||s==null){const f=typeof e[t];f==="boolean"?s=On(s):s==null&&f==="string"?(s="",o=!0):f==="number"&&(s=0,o=!0)}try{e[t]=s}catch{}o&&e.removeAttribute(r||t)}function Ko(e,t,s,n){e.addEventListener(t,s,n)}function Vo(e,t,s,n){e.removeEventListener(t,s,n)}const xn=Symbol("_vei");function Wo(e,t,s,n,r=null){const i=e[xn]||(e[xn]={}),o=i[t];if(n&&o)o.value=n;else{const[f,a]=qo(t);if(n){const h=i[t]=Yo(n,r);Ko(e,f,h,a)}else o&&(Vo(e,f,o,a),i[t]=void 0)}}const yn=/(?:Once|Passive|Capture)$/;function qo(e){let t;if(yn.test(e)){t={};let n;for(;n=e.match(yn);)e=e.slice(0,e.length-n[0].length),t[n[0].toLowerCase()]=!0}return[e[2]===":"?e.slice(3):Xe(e.slice(2)),t]}let as=0;const Go=Promise.resolve(),Jo=()=>as||(Go.then(()=>as=0),as=Date.now());function Yo(e,t){const s=n=>{if(!n._vts)n._vts=Date.now();else if(n._vts<=s.attached)return;Ce(zo(n,s.value),t,5,[n])};return s.value=e,s.attached=Jo(),s}function zo(e,t){if(I(t)){const s=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{s.call(e),e._stopped=!0},t.map(n=>r=>!r._stopped&&n&&n(r))}else return t}const wn=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,Xo=(e,t,s,n,r,i)=>{const o=r==="svg";t==="class"?Ho(e,n,o):t==="style"?Uo(e,s,n):Wt(t)?Cs(t)||Wo(e,t,s,n,i):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):Zo(e,t,n,o))?(vn(e,t,n),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&bn(e,t,n,o,i,t!=="value")):e._isVueCE&&(/[A-Z]/.test(t)||!Y(n))?vn(e,je(t),n,i,t):(t==="true-value"?e._trueValue=n:t==="false-value"&&(e._falseValue=n),bn(e,t,n,o))};function Zo(e,t,s,n){if(n)return!!(t==="innerHTML"||t==="textContent"||t in e&&wn(t)&&R(s));if(t==="spellcheck"||t==="draggable"||t==="translate"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA")return!1;if(t==="width"||t==="height"){const r=e.tagName;if(r==="IMG"||r==="VIDEO"||r==="CANVAS"||r==="SOURCE")return!1}return wn(t)&&Y(s)?!1:t in e}const ko=Q({patchProp:Xo},Do);let Sn;function Qo(){return Sn||(Sn=eo(ko))}const el=(...e)=>{const t=Qo().createApp(...e),{mount:s}=t;return t.mount=n=>{const r=sl(n);if(!r)return;const i=t._component;!R(i)&&!i.render&&!i.template&&(i.template=r.innerHTML),r.nodeType===1&&(r.textContent="");const o=s(r,!1,tl(r));return r instanceof Element&&(r.removeAttribute("v-cloak"),r.setAttribute("data-v-app","")),o},t};function tl(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function sl(e){return Y(e)?document.querySelector(e):e}const nl={key:0,ref:"main-menu",class:"absolute z-1 end-1 grid grid-cols-1 shadow shadow-lg min-w-48 bg-white"},rl={key:0,class:"absolute z-2 top-0 -translate-x-full list-none m-0 p-s-0 bg-white shadow-lg min-w-56"},ae="text-[#1a69a4] hover:text-white hover:bg-[#1a69a4] px-4 py-2 block no-underline",ye="flex flex-row items-center space-x-2",ds="border-t border-s-0 border-e-0 border-b-0 border-solid border-gray-300",il=Ei({__name:"App",setup(e){const t=Zs(!1),s=Zs(!1),n=Oi("container");function r(){t.value=!0}function i(){t.value=!1}function o(h){const u=h.target;n.value&&!n.value.contains(u)&&i()}function f(h){h.key==="Escape"&&i()}function a(h){h.preventDefault();const u=document.createElement("form");u.method="POST",u.action="/common/logout/";const p=document.querySelector('input[name="csrfmiddlewaretoken"]');if(p){const w=document.createElement("input");w.type="hidden",w.name="csrfmiddlewaretoken",w.value=p.value,u.appendChild(w)}document.body.appendChild(u),u.submit()}return Qn(()=>{document.addEventListener("click",o),document.addEventListener("keydown",f)}),er(()=>{document.removeEventListener("click",o),document.removeEventListener("keydown",f)}),(h,u)=>(Lt(),cs("div",{class:"relative font-sans text-sm",ref_key:"container",ref:n},[P("button",{class:"text-xl cursor-pointer",onClick:r},u[2]||(u[2]=[P("div",{class:"i-fa-caret-down h-4 w-4"},null,-1)])),t.value?(Lt(),cs("div",nl,[P("div",{class:"relative cursor-pointer",onMouseover:u[0]||(u[0]=p=>s.value=!0),onMouseleave:u[1]||(u[1]=p=>s.value=!1)},[P("div",{class:ie(["flex flex-row items-center space-x-2",ae])},u[3]||(u[3]=[P("div",{class:"i-fa-tachometer h-3 w-3"},null,-1),P("div",{class:""},"Dashboard",-1)])),s.value?(Lt(),cs("ul",rl,[P("li",null,[P("a",{href:"/common/",class:ie([[ae,ye],"block"])},u[4]||(u[4]=[P("div",{class:"i-fa-tachometer h-3 w-3"},null,-1),P("div",null,"Main dashboard",-1)]),2)]),P("li",null,[P("a",{href:"/control/",class:ie([[ae,ye],"block"])},u[5]||(u[5]=[P("div",{class:"i-fa-ticket h-3 w-3"},null,-1),P("div",null,"Tickets",-1)]),2)]),P("li",null,[P("a",{href:"/orga/event/",class:ie([[ae,ye],"block"])},u[6]||(u[6]=[P("div",{class:"i-fa-microphone h-3 w-3"},null,-1),P("div",null,"Talks",-1)]),2)])])):cn("",!0)],32),P("a",{class:ie([ae,ye]),href:"/common/orders/"},u[7]||(u[7]=[P("div",{class:"i-fa-shopping-cart h-3 w-3"},null,-1),P("div",null,"My orders",-1)]),2),P("a",{class:ie([ae,ye]),href:"/common/sessions/"},u[8]||(u[8]=[P("div",{class:"i-fa-sticky-note-o h-3 w-3"},null,-1),P("div",null,"My sessions",-1)]),2),P("a",{class:ie([ae,ye]),href:"/common/events/"},u[9]||(u[9]=[P("div",{class:"i-fa-calendar h-3 w-3"},null,-1),P("div",null,"My events",-1)]),2),P("a",{class:ie([ae,ye]),href:"/common/organizers/"},u[10]||(u[10]=[P("div",{class:"i-fa-users h-3 w-3"},null,-1),P("div",null,"Organizers",-1)]),2),P("a",{class:ie([ae,ye,ds]),href:"/common/account/"},u[11]||(u[11]=[P("div",{class:"i-fa-user h-3 w-3"},null,-1),P("div",null,"Accounts",-1)]),2),P("a",{class:ie([ae,ye,ds]),href:"/control/admin/"},u[12]||(u[12]=[P("div",{class:"i-fa-cog h-3 w-3"},null,-1),P("div",null,"Admin",-1)]),2),P("a",{class:ie([ae,ye,ds,"w-full text-left"]),onClick:a,href:"#"},u[13]||(u[13]=[P("div",{class:"i-fa-sign-out h-3 w-3"},null,-1),P("div",null,"Logout",-1)]),2)],512)):cn("",!0)],512))}}),ol=(e,t)=>{const s=e.__vccOpts||e;for(const[n,r]of t)s[n]=r;return s},ll=ol(il,[["__scopeId","data-v-5701f6ec"]]);el(ll).mount("#global-nav-menu"); | ||
| **/let Ss;const dn=typeof window<"u"&&window.trustedTypes;if(dn)try{Ss=dn.createPolicy("vue",{createHTML:e=>e})}catch{}const Cr=Ss?e=>Ss.createHTML(e):e=>e,Mo="http://www.w3.org/2000/svg",Fo="http://www.w3.org/1998/Math/MathML",Oe=typeof document<"u"?document:null,hn=Oe&&Oe.createElement("template"),Do={insert:(e,t,s)=>{t.insertBefore(e,s||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,s,n)=>{const r=t==="svg"?Oe.createElementNS(Mo,e):t==="mathml"?Oe.createElementNS(Fo,e):s?Oe.createElement(e,{is:s}):Oe.createElement(e);return e==="select"&&n&&n.multiple!=null&&r.setAttribute("multiple",n.multiple),r},createText:e=>Oe.createTextNode(e),createComment:e=>Oe.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>Oe.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,s,n,r,i){const o=s?s.previousSibling:t.lastChild;if(r&&(r===i||r.nextSibling))for(;t.insertBefore(r.cloneNode(!0),s),!(r===i||!(r=r.nextSibling)););else{hn.innerHTML=Cr(n==="svg"?`<svg>${e}</svg>`:n==="mathml"?`<math>${e}</math>`:e);const f=hn.content;if(n==="svg"||n==="mathml"){const a=f.firstChild;for(;a.firstChild;)f.appendChild(a.firstChild);f.removeChild(a)}t.insertBefore(f,s)}return[o?o.nextSibling:t.firstChild,s?s.previousSibling:t.lastChild]}},Lo=Symbol("_vtc");function Ho(e,t,s){const n=e[Lo];n&&(t=(t?[t,...n]:[...n]).join(" ")),t==null?e.removeAttribute("class"):s?e.setAttribute("class",t):e.className=t}const pn=Symbol("_vod"),No=Symbol("_vsh"),jo=Symbol(""),$o=/(^|;)\s*display\s*:/;function Uo(e,t,s){const n=e.style,r=Y(s);let i=!1;if(s&&!r){if(t)if(Y(t))for(const o of t.split(";")){const f=o.slice(0,o.indexOf(":")).trim();s[f]==null&&Nt(n,f,"")}else for(const o in t)s[o]==null&&Nt(n,o,"");for(const o in s)o==="display"&&(i=!0),Nt(n,o,s[o])}else if(r){if(t!==s){const o=n[jo];o&&(s+=";"+o),n.cssText=s,i=$o.test(s)}}else t&&e.removeAttribute("style");pn in e&&(e[pn]=i?n.display:"",e[No]&&(n.display="none"))}const gn=/\s*!important$/;function Nt(e,t,s){if(I(s))s.forEach(n=>Nt(e,t,n));else if(s==null&&(s=""),t.startsWith("--"))e.setProperty(t,s);else{const n=Bo(e,t);gn.test(s)?e.setProperty(Xe(n),s.replace(gn,""),"important"):e[n]=s}}const mn=["Webkit","Moz","ms"],us={};function Bo(e,t){const s=us[t];if(s)return s;let n=je(t);if(n!=="filter"&&n in e)return us[t]=n;n=Cn(n);for(let r=0;r<mn.length;r++){const i=mn[r]+n;if(i in e)return us[t]=i}return t}const _n="http://www.w3.org/1999/xlink";function bn(e,t,s,n,r,i=Kr(t)){n&&t.startsWith("xlink:")?s==null?e.removeAttributeNS(_n,t.slice(6,t.length)):e.setAttributeNS(_n,t,s):s==null||i&&!On(s)?e.removeAttribute(t):e.setAttribute(t,i?"":nt(s)?String(s):s)}function vn(e,t,s,n,r){if(t==="innerHTML"||t==="textContent"){s!=null&&(e[t]=t==="innerHTML"?Cr(s):s);return}const i=e.tagName;if(t==="value"&&i!=="PROGRESS"&&!i.includes("-")){const f=i==="OPTION"?e.getAttribute("value")||"":e.value,a=s==null?e.type==="checkbox"?"on":"":String(s);(f!==a||!("_value"in e))&&(e.value=a),s==null&&e.removeAttribute(t),e._value=s;return}let o=!1;if(s===""||s==null){const f=typeof e[t];f==="boolean"?s=On(s):s==null&&f==="string"?(s="",o=!0):f==="number"&&(s=0,o=!0)}try{e[t]=s}catch{}o&&e.removeAttribute(r||t)}function Ko(e,t,s,n){e.addEventListener(t,s,n)}function Vo(e,t,s,n){e.removeEventListener(t,s,n)}const xn=Symbol("_vei");function Wo(e,t,s,n,r=null){const i=e[xn]||(e[xn]={}),o=i[t];if(n&&o)o.value=n;else{const[f,a]=qo(t);if(n){const h=i[t]=Yo(n,r);Ko(e,f,h,a)}else o&&(Vo(e,f,o,a),i[t]=void 0)}}const yn=/(?:Once|Passive|Capture)$/;function qo(e){let t;if(yn.test(e)){t={};let n;for(;n=e.match(yn);)e=e.slice(0,e.length-n[0].length),t[n[0].toLowerCase()]=!0}return[e[2]===":"?e.slice(3):Xe(e.slice(2)),t]}let as=0;const Go=Promise.resolve(),Jo=()=>as||(Go.then(()=>as=0),as=Date.now());function Yo(e,t){const s=n=>{if(!n._vts)n._vts=Date.now();else if(n._vts<=s.attached)return;Ce(zo(n,s.value),t,5,[n])};return s.value=e,s.attached=Jo(),s}function zo(e,t){if(I(t)){const s=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{s.call(e),e._stopped=!0},t.map(n=>r=>!r._stopped&&n&&n(r))}else return t}const wn=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,Xo=(e,t,s,n,r,i)=>{const o=r==="svg";t==="class"?Ho(e,n,o):t==="style"?Uo(e,s,n):Wt(t)?Cs(t)||Wo(e,t,s,n,i):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):Zo(e,t,n,o))?(vn(e,t,n),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&bn(e,t,n,o,i,t!=="value")):e._isVueCE&&(/[A-Z]/.test(t)||!Y(n))?vn(e,je(t),n,i,t):(t==="true-value"?e._trueValue=n:t==="false-value"&&(e._falseValue=n),bn(e,t,n,o))};function Zo(e,t,s,n){if(n)return!!(t==="innerHTML"||t==="textContent"||t in e&&wn(t)&&R(s));if(t==="spellcheck"||t==="draggable"||t==="translate"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA")return!1;if(t==="width"||t==="height"){const r=e.tagName;if(r==="IMG"||r==="VIDEO"||r==="CANVAS"||r==="SOURCE")return!1}return wn(t)&&Y(s)?!1:t in e}const ko=Q({patchProp:Xo},Do);let Sn;function Qo(){return Sn||(Sn=eo(ko))}const el=(...e)=>{const t=Qo().createApp(...e),{mount:s}=t;return t.mount=n=>{const r=sl(n);if(!r)return;const i=t._component;!R(i)&&!i.render&&!i.template&&(i.template=r.innerHTML),r.nodeType===1&&(r.textContent="");const o=s(r,!1,tl(r));return r instanceof Element&&(r.removeAttribute("v-cloak"),r.setAttribute("data-v-app","")),o},t};function tl(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function sl(e){return Y(e)?document.querySelector(e):e}const nl={key:0,ref:"main-menu",class:"absolute z-1 end-1 grid grid-cols-1 shadow shadow-lg min-w-48 bg-white"},rl={key:0,class:"absolute z-2 top-0 -translate-x-full list-none m-0 p-s-0 bg-white shadow-lg min-w-56"},ae="text-[#1a69a4] hover:text-white hover:bg-[#1a69a4] px-4 py-2 block no-underline",ye="flex flex-row items-center space-x-2",ds="border-t border-s-0 border-e-0 border-b-0 border-solid border-gray-300",il=Ei({__name:"App",setup(e){const t=Zs(!1),s=Zs(!1),n=Oi("container");function r(){t.value=!0}function i(){t.value=!1}function o(h){const u=h.target;n.value&&!n.value.contains(u)&&i()}function f(h){h.key==="Escape"&&i()}function a(h){h.preventDefault();const u=document.createElement("form");u.method="POST",u.action="/common/logout/";const p=document.querySelector('input[name="csrfmiddlewaretoken"]');if(p){const w=document.createElement("input");w.type="hidden",w.name="csrfmiddlewaretoken",w.value=p.value,u.appendChild(w)}document.body.appendChild(u),u.submit()}return Qn(()=>{document.addEventListener("click",o),document.addEventListener("keydown",f)}),er(()=>{document.removeEventListener("click",o),document.removeEventListener("keydown",f)}),(h,u)=>(Lt(),cs("div",{class:"relative font-sans text-sm",ref_key:"container",ref:n},[P("button",{class:"text-xl cursor-pointer",onClick:r},u[2]||(u[2]=[P("div",{class:"i-fa-caret-down h-4 w-4"},null,-1)])),t.value?(Lt(),cs("div",nl,[P("div",{class:"relative cursor-pointer",onMouseover:u[0]||(u[0]=p=>s.value=!0),onMouseleave:u[1]||(u[1]=p=>s.value=!1)},[P("div",{class:ie(["flex flex-row items-center space-x-2",ae])},u[3]||(u[3]=[P("div",{class:"i-fa-tachometer h-3 w-3"},null,-1),P("div",{class:""},"Dashboard",-1)])),s.value?(Lt(),cs("ul",rl,[P("li",null,[P("a",{href:"/common/",class:ie([[ae,ye],"block"])},u[4]||(u[4]=[P("div",{class:"i-fa-tachometer h-3 w-3"},null,-1),P("div",null,"Main dashboard",-1)]),2)]),P("li",null,[P("a",{href:"/control/",class:ie([[ae,ye],"block"])},u[5]||(u[5]=[P("div",{class:"i-fa-ticket h-3 w-3"},null,-1),P("div",null,"Tickets",-1)]),2)]),P("li",null,[P("a",{href:"/orga/event/",class:ie([[ae,ye],"block"])},u[6]||(u[6]=[P("div",{class:"i-fa-microphone h-3 w-3"},null,-1),P("div",null,"Talks",-1)]),2)])])):cn("",!0)],32),P("a",{class:ie([ae,ye]),href:"/common/orders/"},u[7]||(u[7]=[P("div",{class:"i-fa-shopping-cart h-3 w-3"},null,-1),P("div",null,"My orders",-1)]),2),P("a",{class:ie([ae,ye]),href:"/common/sessions/"},u[8]||(u[8]=[P("div",{class:"i-fa-sticky-note-o h-3 w-3"},null,-1),P("div",null,"My sessions",-1)]),2),P("a",{class:ie([ae,ye]),href:"/common/events/"},u[9]||(u[9]=[P("div",{class:"i-fa-calendar h-3 w-3"},null,-1),P("div",null,"My events",-1)]),2),P("a",{class:ie([ae,ye]),href:"/common/organizers/"},u[10]||(u[10]=[P("div",{class:"i-fa-users h-3 w-3"},null,-1),P("div",null,"Organizers",-1)]),2),P("a",{class:ie([ae,ye,ds]),href:"/common/account/"},u[11]||(u[11]=[P("div",{class:"i-fa-user h-3 w-3"},null,-1),P("div",null,"Accounts",-1)]),2),P("a",{class:ie([ae,ye,ds]),href:"/admin/"},u[12]||(u[12]=[P("div",{class:"i-fa-cog h-3 w-3"},null,-1),P("div",null,"Admin",-1)]),2),P("a",{class:ie([ae,ye,ds,"w-full text-left"]),onClick:a,href:"#"},u[13]||(u[13]=[P("div",{class:"i-fa-sign-out h-3 w-3"},null,-1),P("div",null,"Logout",-1)]),2)],512)):cn("",!0)],512))}}),ol=(e,t)=>{const s=e.__vccOpts||e;for(const[n,r]of t)s[n]=r;return s},ll=ol(il,[["__scopeId","data-v-b0e05ee5"]]);el(ll).mount("#global-nav-menu"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
security (javascript.browser.security.insecure-innerhtml): User controlled data in a hn.innerHTML is an anti-pattern that can lead to XSS vulnerabilities
Source: opengrep
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.
Comments suppressed due to low confidence (2)
app/eventyay/static/pretixcontrol/js/ui/popover.js:80
- Both JavaScript files still contain elements with the
separatorclass (lines 69 and 80 in pretixcontrol/popover.js, lines 75 and 89 in eventyay-common/popover.js). Since the CSS now hides elements with.separatorclass (viadisplay: none), these elements serve no purpose and should be removed entirely for cleaner code.
<div class="profile-menu separator"></div>
<div class="profile-menu border-top">
<a href="${basePath}${accountPath}" target="_self" class="btn btn-outline-success">
<i class="fa fa-user-circle"></i> ${window.gettext('Account')}
</a>
</div>
<div class="profile-menu admin">
<a href="${basePath}${adminPath}" target="_self" class="btn btn-outline-success">
<i class="fa fa-cog"></i> ${window.gettext('Admin')}
</a>
</div>
<div class="profile-menu separator"></div>
app/eventyay/static/eventyay-common/js/ui/popover.js:89
- Both JavaScript files still contain elements with the
separatorclass (lines 75 and 89). Since the CSS now hides elements with.separatorclass (viadisplay: none), these elements serve no purpose and should be removed entirely for cleaner code.
<div class="profile-menu separator"></div>
<div class="profile-menu border-top">
<a href="${basePath}${accountPath}" target="_self" class="btn btn-outline-success">
<i class="fa fa-user-circle"></i> ${window.gettext('Account')}
</a>
</div>
<div class="profile-menu admin">
<a href="${basePath}${adminPath}" target="_self" class="btn btn-outline-success">
<i class="fa fa-cog"></i> ${window.gettext('Admin')}
</a>
</div>
<div class="profile-menu separator"></div>
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review for a chance to win a $100 gift card. Take the survey.
| .submenu-item { | ||
| background-color: #fff; | ||
| padding: 7px 16px; | ||
| font-size: 12px; | ||
| line-height: 1.5; | ||
|
|
||
| a { | ||
| color: darken($btn-primary-bg, 10%) !important; | ||
| color: darken($btn-primary-bg, 10%); | ||
| padding: 0; | ||
| border: none; | ||
| background: none; | ||
| display: inline; | ||
| line-height: 1.5; | ||
| } | ||
|
|
||
| i { | ||
| margin-right: 8px; | ||
| width: 12px; | ||
| font-size: 12px; | ||
| display: inline-block; | ||
| vertical-align: middle; | ||
| } | ||
|
|
||
| &:hover { | ||
| background-color: darken($btn-primary-bg, 10%) !important; | ||
| background-color: darken($btn-primary-bg, 10%); | ||
|
|
||
| a { | ||
| color: #fff !important; | ||
| } | ||
| i { | ||
| color: #fff !important; | ||
| } | ||
| } | ||
| } |
Copilot
AI
Dec 2, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The submenu items at lines 960-993 duplicate the styling already defined at lines 921-954. This is redundant code - the submenu items don't need to be styled again within the &:hover block since they inherit the same styling from the parent #submenu definition. Consider removing this duplication to improve maintainability.
| * (c) 2018-present Yuxi (Evan) You and Vue contributors | ||
| * @license MIT | ||
| **/let Ss;const dn=typeof window<"u"&&window.trustedTypes;if(dn)try{Ss=dn.createPolicy("vue",{createHTML:e=>e})}catch{}const Cr=Ss?e=>Ss.createHTML(e):e=>e,Mo="http://www.w3.org/2000/svg",Fo="http://www.w3.org/1998/Math/MathML",Oe=typeof document<"u"?document:null,hn=Oe&&Oe.createElement("template"),Do={insert:(e,t,s)=>{t.insertBefore(e,s||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,s,n)=>{const r=t==="svg"?Oe.createElementNS(Mo,e):t==="mathml"?Oe.createElementNS(Fo,e):s?Oe.createElement(e,{is:s}):Oe.createElement(e);return e==="select"&&n&&n.multiple!=null&&r.setAttribute("multiple",n.multiple),r},createText:e=>Oe.createTextNode(e),createComment:e=>Oe.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>Oe.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,s,n,r,i){const o=s?s.previousSibling:t.lastChild;if(r&&(r===i||r.nextSibling))for(;t.insertBefore(r.cloneNode(!0),s),!(r===i||!(r=r.nextSibling)););else{hn.innerHTML=Cr(n==="svg"?`<svg>${e}</svg>`:n==="mathml"?`<math>${e}</math>`:e);const f=hn.content;if(n==="svg"||n==="mathml"){const a=f.firstChild;for(;a.firstChild;)f.appendChild(a.firstChild);f.removeChild(a)}t.insertBefore(f,s)}return[o?o.nextSibling:t.firstChild,s?s.previousSibling:t.lastChild]}},Lo=Symbol("_vtc");function Ho(e,t,s){const n=e[Lo];n&&(t=(t?[t,...n]:[...n]).join(" ")),t==null?e.removeAttribute("class"):s?e.setAttribute("class",t):e.className=t}const pn=Symbol("_vod"),No=Symbol("_vsh"),jo=Symbol(""),$o=/(^|;)\s*display\s*:/;function Uo(e,t,s){const n=e.style,r=Y(s);let i=!1;if(s&&!r){if(t)if(Y(t))for(const o of t.split(";")){const f=o.slice(0,o.indexOf(":")).trim();s[f]==null&&Nt(n,f,"")}else for(const o in t)s[o]==null&&Nt(n,o,"");for(const o in s)o==="display"&&(i=!0),Nt(n,o,s[o])}else if(r){if(t!==s){const o=n[jo];o&&(s+=";"+o),n.cssText=s,i=$o.test(s)}}else t&&e.removeAttribute("style");pn in e&&(e[pn]=i?n.display:"",e[No]&&(n.display="none"))}const gn=/\s*!important$/;function Nt(e,t,s){if(I(s))s.forEach(n=>Nt(e,t,n));else if(s==null&&(s=""),t.startsWith("--"))e.setProperty(t,s);else{const n=Bo(e,t);gn.test(s)?e.setProperty(Xe(n),s.replace(gn,""),"important"):e[n]=s}}const mn=["Webkit","Moz","ms"],us={};function Bo(e,t){const s=us[t];if(s)return s;let n=je(t);if(n!=="filter"&&n in e)return us[t]=n;n=Cn(n);for(let r=0;r<mn.length;r++){const i=mn[r]+n;if(i in e)return us[t]=i}return t}const _n="http://www.w3.org/1999/xlink";function bn(e,t,s,n,r,i=Kr(t)){n&&t.startsWith("xlink:")?s==null?e.removeAttributeNS(_n,t.slice(6,t.length)):e.setAttributeNS(_n,t,s):s==null||i&&!On(s)?e.removeAttribute(t):e.setAttribute(t,i?"":nt(s)?String(s):s)}function vn(e,t,s,n,r){if(t==="innerHTML"||t==="textContent"){s!=null&&(e[t]=t==="innerHTML"?Cr(s):s);return}const i=e.tagName;if(t==="value"&&i!=="PROGRESS"&&!i.includes("-")){const f=i==="OPTION"?e.getAttribute("value")||"":e.value,a=s==null?e.type==="checkbox"?"on":"":String(s);(f!==a||!("_value"in e))&&(e.value=a),s==null&&e.removeAttribute(t),e._value=s;return}let o=!1;if(s===""||s==null){const f=typeof e[t];f==="boolean"?s=On(s):s==null&&f==="string"?(s="",o=!0):f==="number"&&(s=0,o=!0)}try{e[t]=s}catch{}o&&e.removeAttribute(r||t)}function Ko(e,t,s,n){e.addEventListener(t,s,n)}function Vo(e,t,s,n){e.removeEventListener(t,s,n)}const xn=Symbol("_vei");function Wo(e,t,s,n,r=null){const i=e[xn]||(e[xn]={}),o=i[t];if(n&&o)o.value=n;else{const[f,a]=qo(t);if(n){const h=i[t]=Yo(n,r);Ko(e,f,h,a)}else o&&(Vo(e,f,o,a),i[t]=void 0)}}const yn=/(?:Once|Passive|Capture)$/;function qo(e){let t;if(yn.test(e)){t={};let n;for(;n=e.match(yn);)e=e.slice(0,e.length-n[0].length),t[n[0].toLowerCase()]=!0}return[e[2]===":"?e.slice(3):Xe(e.slice(2)),t]}let as=0;const Go=Promise.resolve(),Jo=()=>as||(Go.then(()=>as=0),as=Date.now());function Yo(e,t){const s=n=>{if(!n._vts)n._vts=Date.now();else if(n._vts<=s.attached)return;Ce(zo(n,s.value),t,5,[n])};return s.value=e,s.attached=Jo(),s}function zo(e,t){if(I(t)){const s=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{s.call(e),e._stopped=!0},t.map(n=>r=>!r._stopped&&n&&n(r))}else return t}const wn=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,Xo=(e,t,s,n,r,i)=>{const o=r==="svg";t==="class"?Ho(e,n,o):t==="style"?Uo(e,s,n):Wt(t)?Cs(t)||Wo(e,t,s,n,i):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):Zo(e,t,n,o))?(vn(e,t,n),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&bn(e,t,n,o,i,t!=="value")):e._isVueCE&&(/[A-Z]/.test(t)||!Y(n))?vn(e,je(t),n,i,t):(t==="true-value"?e._trueValue=n:t==="false-value"&&(e._falseValue=n),bn(e,t,n,o))};function Zo(e,t,s,n){if(n)return!!(t==="innerHTML"||t==="textContent"||t in e&&wn(t)&&R(s));if(t==="spellcheck"||t==="draggable"||t==="translate"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA")return!1;if(t==="width"||t==="height"){const r=e.tagName;if(r==="IMG"||r==="VIDEO"||r==="CANVAS"||r==="SOURCE")return!1}return wn(t)&&Y(s)?!1:t in e}const ko=Q({patchProp:Xo},Do);let Sn;function Qo(){return Sn||(Sn=eo(ko))}const el=(...e)=>{const t=Qo().createApp(...e),{mount:s}=t;return t.mount=n=>{const r=sl(n);if(!r)return;const i=t._component;!R(i)&&!i.render&&!i.template&&(i.template=r.innerHTML),r.nodeType===1&&(r.textContent="");const o=s(r,!1,tl(r));return r instanceof Element&&(r.removeAttribute("v-cloak"),r.setAttribute("data-v-app","")),o},t};function tl(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function sl(e){return Y(e)?document.querySelector(e):e}const nl={key:0,ref:"main-menu",class:"absolute z-1 end-1 grid grid-cols-1 shadow shadow-lg min-w-48 bg-white"},rl={key:0,class:"absolute z-2 top-0 -translate-x-full list-none m-0 p-s-0 bg-white shadow-lg min-w-56"},ae="text-[#1a69a4] hover:text-white hover:bg-[#1a69a4] px-4 py-2 block no-underline",ye="flex flex-row items-center space-x-2",ds="border-t border-s-0 border-e-0 border-b-0 border-solid border-gray-300",il=Ei({__name:"App",setup(e){const t=Zs(!1),s=Zs(!1),n=Oi("container");function r(){t.value=!0}function i(){t.value=!1}function o(h){const u=h.target;n.value&&!n.value.contains(u)&&i()}function f(h){h.key==="Escape"&&i()}function a(h){h.preventDefault();const u=document.createElement("form");u.method="POST",u.action="/common/logout/";const p=document.querySelector('input[name="csrfmiddlewaretoken"]');if(p){const w=document.createElement("input");w.type="hidden",w.name="csrfmiddlewaretoken",w.value=p.value,u.appendChild(w)}document.body.appendChild(u),u.submit()}return Qn(()=>{document.addEventListener("click",o),document.addEventListener("keydown",f)}),er(()=>{document.removeEventListener("click",o),document.removeEventListener("keydown",f)}),(h,u)=>(Lt(),cs("div",{class:"relative font-sans text-sm",ref_key:"container",ref:n},[P("button",{class:"text-xl cursor-pointer",onClick:r},u[2]||(u[2]=[P("div",{class:"i-fa-caret-down h-4 w-4"},null,-1)])),t.value?(Lt(),cs("div",nl,[P("div",{class:"relative cursor-pointer",onMouseover:u[0]||(u[0]=p=>s.value=!0),onMouseleave:u[1]||(u[1]=p=>s.value=!1)},[P("div",{class:ie(["flex flex-row items-center space-x-2",ae])},u[3]||(u[3]=[P("div",{class:"i-fa-tachometer h-3 w-3"},null,-1),P("div",{class:""},"Dashboard",-1)])),s.value?(Lt(),cs("ul",rl,[P("li",null,[P("a",{href:"/common/",class:ie([[ae,ye],"block"])},u[4]||(u[4]=[P("div",{class:"i-fa-tachometer h-3 w-3"},null,-1),P("div",null,"Main dashboard",-1)]),2)]),P("li",null,[P("a",{href:"/control/",class:ie([[ae,ye],"block"])},u[5]||(u[5]=[P("div",{class:"i-fa-ticket h-3 w-3"},null,-1),P("div",null,"Tickets",-1)]),2)]),P("li",null,[P("a",{href:"/orga/event/",class:ie([[ae,ye],"block"])},u[6]||(u[6]=[P("div",{class:"i-fa-microphone h-3 w-3"},null,-1),P("div",null,"Talks",-1)]),2)])])):cn("",!0)],32),P("a",{class:ie([ae,ye]),href:"/common/orders/"},u[7]||(u[7]=[P("div",{class:"i-fa-shopping-cart h-3 w-3"},null,-1),P("div",null,"My orders",-1)]),2),P("a",{class:ie([ae,ye]),href:"/common/sessions/"},u[8]||(u[8]=[P("div",{class:"i-fa-sticky-note-o h-3 w-3"},null,-1),P("div",null,"My sessions",-1)]),2),P("a",{class:ie([ae,ye]),href:"/common/events/"},u[9]||(u[9]=[P("div",{class:"i-fa-calendar h-3 w-3"},null,-1),P("div",null,"My events",-1)]),2),P("a",{class:ie([ae,ye]),href:"/common/organizers/"},u[10]||(u[10]=[P("div",{class:"i-fa-users h-3 w-3"},null,-1),P("div",null,"Organizers",-1)]),2),P("a",{class:ie([ae,ye,ds]),href:"/common/account/"},u[11]||(u[11]=[P("div",{class:"i-fa-user h-3 w-3"},null,-1),P("div",null,"Accounts",-1)]),2),P("a",{class:ie([ae,ye,ds]),href:"/control/admin/"},u[12]||(u[12]=[P("div",{class:"i-fa-cog h-3 w-3"},null,-1),P("div",null,"Admin",-1)]),2),P("a",{class:ie([ae,ye,ds,"w-full text-left"]),onClick:a,href:"#"},u[13]||(u[13]=[P("div",{class:"i-fa-sign-out h-3 w-3"},null,-1),P("div",null,"Logout",-1)]),2)],512)):cn("",!0)],512))}}),ol=(e,t)=>{const s=e.__vccOpts||e;for(const[n,r]of t)s[n]=r;return s},ll=ol(il,[["__scopeId","data-v-5701f6ec"]]);el(ll).mount("#global-nav-menu"); | ||
| **/let Ss;const dn=typeof window<"u"&&window.trustedTypes;if(dn)try{Ss=dn.createPolicy("vue",{createHTML:e=>e})}catch{}const Cr=Ss?e=>Ss.createHTML(e):e=>e,Mo="http://www.w3.org/2000/svg",Fo="http://www.w3.org/1998/Math/MathML",Oe=typeof document<"u"?document:null,hn=Oe&&Oe.createElement("template"),Do={insert:(e,t,s)=>{t.insertBefore(e,s||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,s,n)=>{const r=t==="svg"?Oe.createElementNS(Mo,e):t==="mathml"?Oe.createElementNS(Fo,e):s?Oe.createElement(e,{is:s}):Oe.createElement(e);return e==="select"&&n&&n.multiple!=null&&r.setAttribute("multiple",n.multiple),r},createText:e=>Oe.createTextNode(e),createComment:e=>Oe.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>Oe.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,s,n,r,i){const o=s?s.previousSibling:t.lastChild;if(r&&(r===i||r.nextSibling))for(;t.insertBefore(r.cloneNode(!0),s),!(r===i||!(r=r.nextSibling)););else{hn.innerHTML=Cr(n==="svg"?`<svg>${e}</svg>`:n==="mathml"?`<math>${e}</math>`:e);const f=hn.content;if(n==="svg"||n==="mathml"){const a=f.firstChild;for(;a.firstChild;)f.appendChild(a.firstChild);f.removeChild(a)}t.insertBefore(f,s)}return[o?o.nextSibling:t.firstChild,s?s.previousSibling:t.lastChild]}},Lo=Symbol("_vtc");function Ho(e,t,s){const n=e[Lo];n&&(t=(t?[t,...n]:[...n]).join(" ")),t==null?e.removeAttribute("class"):s?e.setAttribute("class",t):e.className=t}const pn=Symbol("_vod"),No=Symbol("_vsh"),jo=Symbol(""),$o=/(^|;)\s*display\s*:/;function Uo(e,t,s){const n=e.style,r=Y(s);let i=!1;if(s&&!r){if(t)if(Y(t))for(const o of t.split(";")){const f=o.slice(0,o.indexOf(":")).trim();s[f]==null&&Nt(n,f,"")}else for(const o in t)s[o]==null&&Nt(n,o,"");for(const o in s)o==="display"&&(i=!0),Nt(n,o,s[o])}else if(r){if(t!==s){const o=n[jo];o&&(s+=";"+o),n.cssText=s,i=$o.test(s)}}else t&&e.removeAttribute("style");pn in e&&(e[pn]=i?n.display:"",e[No]&&(n.display="none"))}const gn=/\s*!important$/;function Nt(e,t,s){if(I(s))s.forEach(n=>Nt(e,t,n));else if(s==null&&(s=""),t.startsWith("--"))e.setProperty(t,s);else{const n=Bo(e,t);gn.test(s)?e.setProperty(Xe(n),s.replace(gn,""),"important"):e[n]=s}}const mn=["Webkit","Moz","ms"],us={};function Bo(e,t){const s=us[t];if(s)return s;let n=je(t);if(n!=="filter"&&n in e)return us[t]=n;n=Cn(n);for(let r=0;r<mn.length;r++){const i=mn[r]+n;if(i in e)return us[t]=i}return t}const _n="http://www.w3.org/1999/xlink";function bn(e,t,s,n,r,i=Kr(t)){n&&t.startsWith("xlink:")?s==null?e.removeAttributeNS(_n,t.slice(6,t.length)):e.setAttributeNS(_n,t,s):s==null||i&&!On(s)?e.removeAttribute(t):e.setAttribute(t,i?"":nt(s)?String(s):s)}function vn(e,t,s,n,r){if(t==="innerHTML"||t==="textContent"){s!=null&&(e[t]=t==="innerHTML"?Cr(s):s);return}const i=e.tagName;if(t==="value"&&i!=="PROGRESS"&&!i.includes("-")){const f=i==="OPTION"?e.getAttribute("value")||"":e.value,a=s==null?e.type==="checkbox"?"on":"":String(s);(f!==a||!("_value"in e))&&(e.value=a),s==null&&e.removeAttribute(t),e._value=s;return}let o=!1;if(s===""||s==null){const f=typeof e[t];f==="boolean"?s=On(s):s==null&&f==="string"?(s="",o=!0):f==="number"&&(s=0,o=!0)}try{e[t]=s}catch{}o&&e.removeAttribute(r||t)}function Ko(e,t,s,n){e.addEventListener(t,s,n)}function Vo(e,t,s,n){e.removeEventListener(t,s,n)}const xn=Symbol("_vei");function Wo(e,t,s,n,r=null){const i=e[xn]||(e[xn]={}),o=i[t];if(n&&o)o.value=n;else{const[f,a]=qo(t);if(n){const h=i[t]=Yo(n,r);Ko(e,f,h,a)}else o&&(Vo(e,f,o,a),i[t]=void 0)}}const yn=/(?:Once|Passive|Capture)$/;function qo(e){let t;if(yn.test(e)){t={};let n;for(;n=e.match(yn);)e=e.slice(0,e.length-n[0].length),t[n[0].toLowerCase()]=!0}return[e[2]===":"?e.slice(3):Xe(e.slice(2)),t]}let as=0;const Go=Promise.resolve(),Jo=()=>as||(Go.then(()=>as=0),as=Date.now());function Yo(e,t){const s=n=>{if(!n._vts)n._vts=Date.now();else if(n._vts<=s.attached)return;Ce(zo(n,s.value),t,5,[n])};return s.value=e,s.attached=Jo(),s}function zo(e,t){if(I(t)){const s=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{s.call(e),e._stopped=!0},t.map(n=>r=>!r._stopped&&n&&n(r))}else return t}const wn=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,Xo=(e,t,s,n,r,i)=>{const o=r==="svg";t==="class"?Ho(e,n,o):t==="style"?Uo(e,s,n):Wt(t)?Cs(t)||Wo(e,t,s,n,i):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):Zo(e,t,n,o))?(vn(e,t,n),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&bn(e,t,n,o,i,t!=="value")):e._isVueCE&&(/[A-Z]/.test(t)||!Y(n))?vn(e,je(t),n,i,t):(t==="true-value"?e._trueValue=n:t==="false-value"&&(e._falseValue=n),bn(e,t,n,o))};function Zo(e,t,s,n){if(n)return!!(t==="innerHTML"||t==="textContent"||t in e&&wn(t)&&R(s));if(t==="spellcheck"||t==="draggable"||t==="translate"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA")return!1;if(t==="width"||t==="height"){const r=e.tagName;if(r==="IMG"||r==="VIDEO"||r==="CANVAS"||r==="SOURCE")return!1}return wn(t)&&Y(s)?!1:t in e}const ko=Q({patchProp:Xo},Do);let Sn;function Qo(){return Sn||(Sn=eo(ko))}const el=(...e)=>{const t=Qo().createApp(...e),{mount:s}=t;return t.mount=n=>{const r=sl(n);if(!r)return;const i=t._component;!R(i)&&!i.render&&!i.template&&(i.template=r.innerHTML),r.nodeType===1&&(r.textContent="");const o=s(r,!1,tl(r));return r instanceof Element&&(r.removeAttribute("v-cloak"),r.setAttribute("data-v-app","")),o},t};function tl(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function sl(e){return Y(e)?document.querySelector(e):e}const nl={key:0,ref:"main-menu",class:"absolute z-1 end-1 grid grid-cols-1 shadow shadow-lg min-w-48 bg-white"},rl={key:0,class:"absolute z-2 top-0 -translate-x-full list-none m-0 p-s-0 bg-white shadow-lg min-w-56"},ae="text-[#1a69a4] hover:text-white hover:bg-[#1a69a4] px-4 py-2 block no-underline",ye="flex flex-row items-center space-x-2",ds="border-t border-s-0 border-e-0 border-b-0 border-solid border-gray-300",il=Ei({__name:"App",setup(e){const t=Zs(!1),s=Zs(!1),n=Oi("container");function r(){t.value=!0}function i(){t.value=!1}function o(h){const u=h.target;n.value&&!n.value.contains(u)&&i()}function f(h){h.key==="Escape"&&i()}function a(h){h.preventDefault();const u=document.createElement("form");u.method="POST",u.action="/common/logout/";const p=document.querySelector('input[name="csrfmiddlewaretoken"]');if(p){const w=document.createElement("input");w.type="hidden",w.name="csrfmiddlewaretoken",w.value=p.value,u.appendChild(w)}document.body.appendChild(u),u.submit()}return Qn(()=>{document.addEventListener("click",o),document.addEventListener("keydown",f)}),er(()=>{document.removeEventListener("click",o),document.removeEventListener("keydown",f)}),(h,u)=>(Lt(),cs("div",{class:"relative font-sans text-sm",ref_key:"container",ref:n},[P("button",{class:"text-xl cursor-pointer",onClick:r},u[2]||(u[2]=[P("div",{class:"i-fa-caret-down h-4 w-4"},null,-1)])),t.value?(Lt(),cs("div",nl,[P("div",{class:"relative cursor-pointer",onMouseover:u[0]||(u[0]=p=>s.value=!0),onMouseleave:u[1]||(u[1]=p=>s.value=!1)},[P("div",{class:ie(["flex flex-row items-center space-x-2",ae])},u[3]||(u[3]=[P("div",{class:"i-fa-tachometer h-3 w-3"},null,-1),P("div",{class:""},"Dashboard",-1)])),s.value?(Lt(),cs("ul",rl,[P("li",null,[P("a",{href:"/common/",class:ie([[ae,ye],"block"])},u[4]||(u[4]=[P("div",{class:"i-fa-tachometer h-3 w-3"},null,-1),P("div",null,"Main dashboard",-1)]),2)]),P("li",null,[P("a",{href:"/control/",class:ie([[ae,ye],"block"])},u[5]||(u[5]=[P("div",{class:"i-fa-ticket h-3 w-3"},null,-1),P("div",null,"Tickets",-1)]),2)]),P("li",null,[P("a",{href:"/orga/event/",class:ie([[ae,ye],"block"])},u[6]||(u[6]=[P("div",{class:"i-fa-microphone h-3 w-3"},null,-1),P("div",null,"Talks",-1)]),2)])])):cn("",!0)],32),P("a",{class:ie([ae,ye]),href:"/common/orders/"},u[7]||(u[7]=[P("div",{class:"i-fa-shopping-cart h-3 w-3"},null,-1),P("div",null,"My orders",-1)]),2),P("a",{class:ie([ae,ye]),href:"/common/sessions/"},u[8]||(u[8]=[P("div",{class:"i-fa-sticky-note-o h-3 w-3"},null,-1),P("div",null,"My sessions",-1)]),2),P("a",{class:ie([ae,ye]),href:"/common/events/"},u[9]||(u[9]=[P("div",{class:"i-fa-calendar h-3 w-3"},null,-1),P("div",null,"My events",-1)]),2),P("a",{class:ie([ae,ye]),href:"/common/organizers/"},u[10]||(u[10]=[P("div",{class:"i-fa-users h-3 w-3"},null,-1),P("div",null,"Organizers",-1)]),2),P("a",{class:ie([ae,ye,ds]),href:"/common/account/"},u[11]||(u[11]=[P("div",{class:"i-fa-user h-3 w-3"},null,-1),P("div",null,"Accounts",-1)]),2),P("a",{class:ie([ae,ye,ds]),href:"/admin/"},u[12]||(u[12]=[P("div",{class:"i-fa-cog h-3 w-3"},null,-1),P("div",null,"Admin",-1)]),2),P("a",{class:ie([ae,ye,ds,"w-full text-left"]),onClick:a,href:"#"},u[13]||(u[13]=[P("div",{class:"i-fa-sign-out h-3 w-3"},null,-1),P("div",null,"Logout",-1)]),2)],512)):cn("",!0)],512))}}),ol=(e,t)=>{const s=e.__vccOpts||e;for(const[n,r]of t)s[n]=r;return s},ll=ol(il,[["__scopeId","data-v-b0e05ee5"]]);el(ll).mount("#global-nav-menu"); |
Copilot
AI
Dec 2, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Avoid automated semicolon insertion (97% of all statements in the enclosing script have an explicit semicolon).
|
Please rebase this PR. |
cd5d833 to
50e8424
Compare
the dropdown menu in the Common Dashboard and Tickets Dashboard had several inconsistencies. this pr fixes those and matches the dropdown in tickets and common to that of talk.
fixes #1367
Summary by Sourcery
Align dashboard and profile dropdown styling across control and presale interfaces to match the Talk dropdown.
Enhancements: