Merge branch 'unstable' into codex/update-video-modal-styles-and-regenerate-css

This commit is contained in:
thePR0M3TH3AN authored and GitHub committed 2025-10-19 19:15:58 -04:00
commit 3084629e71
13 files changed
+480 -44

No files matched your search

+3
View File
@@ -0,0 +1,3 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor">
<path d="M5 5a2 2 0 1 1 4 0h9a1 1 0 1 1 0 2H9a2 2 0 1 1-4 0H4a1 1 0 1 1 0-2h1Zm10 6a2 2 0 1 1 4 0h1a1 1 0 1 1 0 2h-1a2 2 0 1 1-4 0H4a1 1 0 1 1 0-2h11Zm-6 7a2 2 0 1 1 4 0h6a1 1 0 1 1 0 2h-6a2 2 0 1 1-4 0H4a1 1 0 1 1 0-2h5Z" />
</svg>

After

Width:  |  Height:  |  Size: 316 B

+3
View File
@@ -0,0 +1,3 @@
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="currentColor">
<path d="M23.822 20.88l-6.353-6.354c.93-1.465 1.467-3.2 1.467-5.059.001-5.219-4.247-9.467-9.468-9.467s-9.468 4.248-9.468 9.468c0 5.221 4.247 9.469 9.468 9.469 1.768 0 3.421-.487 4.839-1.333l6.396 6.396 3.119-3.12zm-20.294-11.412c0-3.273 2.665-5.938 5.939-5.938 3.275 0 5.94 2.664 5.94 5.938 0 3.275-2.665 5.939-5.94 5.939-3.274 0-5.939-2.664-5.939-5.939z" />
</svg>

After

Width:  |  Height:  |  Size: 472 B

+1 -1
View File
@@ -125,7 +125,7 @@
</div>
<!-- Button at bottom -->
<div class="modal-footer pt-6">
<div class="modal-footer pt-6 pb-12">
<button
id="acceptDisclaimer"
class="modal-primary"
+1 -3
View File
@@ -1,6 +1,4 @@
:root{--surface-base:var(--color-surface);--surface-alt:var(--color-surface-alt);--surface-raised:var(--color-card);--surface-raised-private:var(--color-card-private);--surface-raised-critical:var(--color-card-critical);--surface-panel:var(--color-panel);--surface-panel-hover:var(--color-panel-hover);--surface-sunken:var(--color-surface-sunken);--surface-muted:var(--color-surface-muted);--surface-veil:var(--color-overlay-veil);--surface-inverse:var(--color-page);--surface-overlay:var(--color-overlay);--surface-overlay-muted:var(--color-overlay-muted);--surface-overlay-strong:var(--color-overlay-strong);--surface-overlay-darker:var(--color-overlay-darker);--surface-overlay-black:var(--color-overlay-black);--surface-overlay-banner-base:var(--color-page);--surface-overlay-banner:var(--surface-overlay-banner-base);--surface-overlay-banner-opaque:var(--surface-overlay-banner-base);--surface-overlay-banner-strong:color-mix(in srgb,var(--surface-overlay-banner-base) 82%,transparent);--surface-overlay-banner-bottom:color-mix(in srgb,var(--surface-overlay-banner-base) 50%,transparent);--surface-overlay-banner-channel-mid:color-mix(in srgb,var(--surface-overlay-banner-base) 24%,transparent);--surface-overlay-banner-channel-faint:color-mix(in srgb,var(--surface-overlay-banner-base) 10%,transparent);--surface-overlay-banner-soft:color-mix(in srgb,var(--surface-overlay-banner-base) 56%,transparent);--surface-overlay-banner-faint:color-mix(in srgb,var(--surface-overlay-banner-base) 18%,transparent);--surface-overlay-banner-transparent:transparent;--surface-overlay-banner-gradient-header:linear-gradient(to bottom,var(--surface-overlay-banner-opaque) 0%,var(--surface-overlay-banner-strong) 38%,var(--surface-overlay-banner-soft) 70%,var(--surface-overlay-banner-faint) 88%,var(--surface-overlay-banner-transparent) 100%);--surface-overlay-banner-gradient-channel:linear-gradient(to top,var(--surface-overlay-banner-bottom) 0%,var(--surface-overlay-banner-channel-mid) 28%,var(--surface-overlay-banner-channel-faint) 42%,var(--surface-overlay-banner-transparent) 50%);--surface-overlay-banner-gradient:var(
--surface-overlay-banner-gradient-header
);--surface-overlay-panel:var(--color-overlay-panel);--surface-overlay-panel-soft:var(--color-overlay-panel-soft);--surface-overlay-panel-tint:var(--color-overlay-panel-tint);--surface-overlay-panel-glass:var(--color-overlay-panel-glass);--surface-overlay-panel-glass-soft:var(--color-overlay-panel-glass-soft);--surface-modal-backdrop:var(--color-modal-backdrop);--surface-modal:var(--color-modal-surface);--blur-modal-backdrop:18px;--blur-modal-alert:14px;--blur-thumbnail-blur:18px;--modal-nav-backdrop-blur:6px;--app-header-centerline-offset:calc(var(--space-sm) + var(--space-2xl-plus)/2);--border-default:var(--color-border);--border-subtle:var(--color-border-subtle);--border-strong:var(--color-border-translucent-stronger);--border-overlay:var(--color-border-translucent);--border-overlay-strong:var(--color-border-translucent-strongest);--border-overlay-glow:var(--color-border-translucent-glow);--border-neutral-soft:var(--color-border-neutral-soft);--border-info-soft:var(--color-border-info-soft);--border-sidebar-strong:var(--color-border-sidebar-strong);--border-width-hairline:1px;--border-width-fine:0.5px;--text-primary:var(--color-text);--text-inverse:var(--color-text-inverse);--text-muted:var(--color-text-muted);--text-muted-strong:var(--color-muted-strong);--text-subtle:var(--color-subtle-text);--text-frosted-primary:var(--color-text-frosted);--text-frosted-strong:var(--color-text-frosted-strong);--text-frosted-soft:var(--color-text-frosted-soft);--status-info:var(--color-info);--status-info-strong:var(--color-info-strong);--status-info-surface:var(--color-info-glass);--status-info-border:var(--color-info-border);--status-info-on:var(--color-info-on);--status-success:var(--color-success);--status-success-strong:var(--color-success-strong);--status-success-surface:var(--color-success-surface);--status-success-border:var(--color-success-border);--status-success-on:var(--color-success-on);--status-warning:var(--color-warning);--status-warning-strong:var(--color-warning-strong);--status-warning-surface:var(--color-warning-surface);--status-warning-border:var(--color-warning-border);--status-warning-on:var(--color-warning-on);--status-danger:var(--color-critical);--status-danger-strong:var(--color-critical-strong);--status-danger-surface:var(--color-danger-surface);--status-danger-border:var(--color-danger-border);--status-danger-on:var(--color-danger-on);--status-private:var(--color-private);--status-private-strong:var(--color-private-strong);--status-private-surface:var(--color-private-surface);--status-private-border:var(--color-private-border);--status-private-on:var(--color-private-on);--status-neutral:var(--color-muted);--status-neutral-strong:var(--color-muted-strong);--status-neutral-surface:var(--color-neutral-surface);--status-neutral-border:var(--color-neutral-border);--status-neutral-on:var(--color-neutral-on);--scrollbar-width:0.5rem;--scrollbar-track:var(--color-white-soft);--scrollbar-thumb:var(--color-white-softer);--scrollbar-thumb-hover:var(--color-white-softest);--z-app-header:40;--z-overlay-nav:60;--z-overlay-floating:70;--z-overlay-popover:140;--z-overlay-toast:180;--z-sidebar-overlay:10;--z-sidebar:20;--z-modal-root:100;--z-modal-overlay:110;--z-modal-content:120;--z-modal-player:130;--z-modal-top-root:140;--z-modal-top-overlay:150;--z-modal-top-content:160;--overlay-backdrop-color:var(--color-overlay-backdrop);--overlay-backdrop-blur:12px;--sidebar-width-expanded-base:16rem;--sidebar-dropup-content-width:0px;--sidebar-width-expanded:max(var(--sidebar-width-expanded-base),var(--sidebar-dropup-content-width));--sidebar-width-collapsed:4rem;--sidebar-width:var(--sidebar-width-expanded);--sidebar-control-size:2.75rem;--sidebar-content-gap:1rem;--space-sidebar-shell-inline:var(--space-lg);--space-sidebar-shell-block-start:var(--space-sm);--space-sidebar-shell-block-end:1.75rem;--space-sidebar-scroll-gap:1.75rem;--space-sidebar-panel-gap:1.35rem;--space-sidebar-panel-padding-block:1.35rem;--space-sidebar-panel-padding-inline:1.1rem;--space-sidebar-footer-gap:0.85rem;--space-sidebar-trigger-padding-block:0.78rem;--space-sidebar-popover-offset:0.85rem;--space-sidebar-popover-padding-block:0.85rem;--space-sidebar-popover-padding-inline:0.65rem;--space-sidebar-popover-gap:0.45rem;--space-sidebar-dropup-scroll-reserve:calc(var(--scrollbar-thin-width) + var(--space-xs) + var(--space-2xs)/2);--sidebar-dropup-max-height:18rem;--space-sidebar-nav-padding-block:0.7rem;--space-sidebar-subnav-padding-block:0.55rem;--space-sidebar-nav-translate:0.35rem;--grid-card-min-width:20rem;--popover-backdrop-blur:12px;--overlay-panel-radius:var(--radius-lg);--overlay-panel-shadow:var(--shadow-lg);--overlay-panel-padding-inline:var(--popup-padding-inline);--overlay-panel-padding-block:var(--popup-padding-block);--toast-translate:-1.5rem;--sidebar-mobile-gutter:3rem;--popup-padding-inline:1rem;--popup-padding-block:0.75rem;--video-modal-primary-fr:1.85fr;--video-modal-secondary-min:260px;--video-modal-secondary-fr:Line truncated
/*! tailwindcss v3.4.17 | MIT License | https://tailwindcss.com*/*,:after,:before{box-sizing:border-box;border:0 solid #e5e7eb}:after,:before{--tw-content:""}:host,html{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:var(--font-family-sans);font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:var(--font-family-mono);font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}html{font-size:80%}@media (min-width:768px){html{font-size:100%}}@media (min-width:1024px){html{font-size:75%}}*,:after,:before{scrollbar-width:thin;scrollbar-color:var(--scrollbar-thumb) transparent}::-webkit-scrollbar{width:var(--scrollbar-width);height:var(--scrollbar-width)}::-webkit-scrollbar-track{background:var(--scrollbar-track)}::-webkit-scrollbar-thumb{background:var(--scrollbar-thumb);border-radius:var(--radius-sm)}::-webkit-scrollbar-thumb:hover{background:var(--scrollbar-thumb-hover)}body{--app-header-centerline:calc(env(safe-area-inset-top, 0) + var(--app-header-centerline-offset));font-family:var(--font-family-sans);background-color:var(--color-page);color:var(--color-text-strong);line-height:1.5;margin:0;padding:0;overflow-x:hidden}#uiOverlay{position:fixed;inset:0;pointer-events:none;z-index:var(--z-overlay-popover)}#uiOverlay>*{pointer-events:auto}#editNip71TagsFieldset>legend,#nip71TagsFieldset>legend{margin-left:0;padding:0}#app{background-color:var(--color-page);color:inherit}body.modal-open,html.modal-open{overflow:hidden;height:100%}body.modal-open #app{overflow:hidden}body.modal-open #sidebar{pointer-events:none;opacity:0;visibility:hidden;z-index:var(--z-sidebar-overlay)}.ng-cloak,.ng-hide:not(.ng-hide-animate),.x-ng-cloak,[data-ng-cloak],[ng-cloak],[ng\:cloak],[x-ng-cloak]{display:none!important}ng\:form{display:block}.\!container{width:100%!important}.container{width:100%}@media (min-width:25rem){.\!container{max-width:25rem!important}.container{max-width:25rem}}@media (min-width:30rem){.\!container{max-width:30rem!important}.container{max-width:30rem}}@media (min-width:640px){.\!container{max-width:640px!important}.container{max-width:640px}}@media (min-width:768px){.\!container{max-width:768px!important}.container{max-width:768px}}@media (min-width:1024px){.\!container{max-width:1024px!important}.container{max-width:1024px}}@media (min-width:1280px){.\!container{max-width:1280px!important}.container{max-width:1280px}}@media (min-width:1536px){.\!container{max-width:1536px!important}.container{max-width:1536px}}#playerModal.ds-header{display:block}.ds-header{display:flex;align-items:center;justify-content:flex-start;padding-top:var(--space-sm);padding-bottom:var(--space-sm)}.app-shell__header{position:sticky;top:env(safe-area-inset-top,0);z-index:var(--z-app-header);padding-top:calc(var(--space-sm) + env(safe-area-inset-top, 0));padding-bottom:var(--space-sm);background-color:transparent;background-image:var(--surface-overlay-banner-gradient-header);background-repeat:no-repeat;background-size:100% 100%}.ds-metric-probe{position:absolute;top:0;left:0Line truncated
--player-modal-inline-padding,clamp(var(--space-md-plus),4vw,var(--space-2xl))
)}#playerModal .modal-nav .watch-container{max-width:none;margin-inline:0}#playerModal .modal-info-panel{display:flex;flex-direction:column;gap:var(--space-lg)}#playerModal h2#videoTitle{margin:0;font-size:clamp(var(--font-size-xl),calc(var(--font-size-modal-title-base) + .5vw),var(--font-size-xl-plus));font-weight:600;line-height:1.3;color:var(--color-text)}#playerModal .modal-meta{font-size:var(--font-size-sm);line-height:1.4;color:var(--color-text-muted)}#playerModal .modal-view-count{font-weight:600;color:var(--color-text)}#playerModal .channel-card{display:flex;align-items:center;gap:var(--space-md);padding:var(--space-md-plus) var(--space-lg);border-radius:var(--radius-xl);border:var(--border-width-hairline) solid var(--color-border-translucent);background-color:var(--color-surface);box-shadow:var(--shadow-sm)}@media (max-width:30rem){#playerModal .modal-nav .icon-button{width:var(--space-xl);height:var(--space-xl);min-width:var(--space-xl);min-height:var(--space-xl)}#playerModal .watch-container{padding-inline:var(--space-sm)}#playerModal .channel-card{gap:var(--space-sm);padding:var(--space-sm) var(--space-md)}}#playerModal .channel-card__avatar{flex-shrink:0;width:var(--avatar-size-lg);height:var(--avatar-size-lg);border-radius:var(--radius-full);overflow:hidden;background-color:var(--color-border-subtle)}#playerModal .channel-card__avatar img{display:block;width:100%;height:100%;-o-object-fit:cover;object-fit:cover}#playerModal .channel-card__name{margin:0;font-size:var(--font-size-lg);font-weight:600;color:var(--color-text)}#playerModal .channel-card__npub{margin:0;font-size:var(--font-size-sm);color:var(--color-text-muted)}#playerModal .description-panel{padding:var(--space-md-plus) var(--space-lg);border-radius:var(--radius-xl);border:var(--border-width-hairline) solid var(--color-border-translucent);background-color:var(--color-surface);box-shadow:var(--shadow-sm)}#playerModal .description-panel p{margin:0;font-size:var(--font-size-sm);line-height:1.6;color:var(--color-text)}.player-modal__content{position:relative;z-index:var(--z-modal-content);display:flex;flex:1 1 auto;width:100%;min-height:100%;flex-direction:column;overflow:visible;padding:0;margin:0;border:none;border-radius:0;background-color:var(--color-surface);box-shadow:none}@media (prefers-reduced-motion:reduce){.player-modal__content{transition-property:none}}#playerModal .modal-nav{position:sticky;top:0;z-index:var(--z-overlay-nav);--tw-translate-y:0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s;background-color:var(--color-overlay-darker);background-image:linear-gradient(180deg,var(--color-overlay-panel-gradient-start) 0,var(--color-overlay-panel-gradient-end) 100%);border-bottom:var(--border-width-hairline) solid var(--color-border-translucent);backdrop-filter:blur(var(--modal-nav-backdrop-blur));-webkit-backdrop-filter:blur(var(--modal-nav-backdrop-blur))}#playerModal#playerModal .modal-nav__bar{display:block}#playerModal .modal-nav__bar{display:flex;width:100%;align-items:center;gap:.75rem;padding:.5rem}@media (min-width:640px){#playerModal .modal-nav__bar{padding-left:1rem;padding-right:1rem}}#playerModal#playerModal .modal-nav .modal-actions{display:block}#playerModal .modal-nav .modal-actions{display:flex;align-items:center;gap:.5rem;margin-left:auto}#playerModal .modal-nav .icon-button{display:inline-flex;align-items:center;justify-content:center;border-radius:var(--radius-full);color:var(--text-muted);transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s;transition-timing-function:cubic-bezier(0,0,.2,1);width:var(--icon-size-lg);height:var(--icon-size-lg);background:var(--color-surface-tint-subtle);border:var(--border-width-hairline) solid var(--color-border-translucent-medium);color:var(--color-text-muted)}#playerModal .modal-nav .icon-button:focus-visible,#playerModal .modal-nav .icon-button:hover{background:var(--color-border-translucent-bright);border-color:var(--color-border-translucent-strong);color:var(--color-text)}.modal-nav--hidden{--tw-translate-y:-100%}.modal-nav--hidden,.modal-nav--visible{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.modal-nav--visible{--tw-translate-y:0px}.video-modal__layout{display:grid;gap:1.5rem}@media (min-width:1024px){.video-modal__layout{gap:2rem;grid-template-columns:minmax(0,var(--video-modal-primary-fr)) minmax(var(--video-modal-secondary-min),var(--video-modal-secondary-fr,1fr))}}.revert-modal__layout{display:grid;gap:1.5rLine truncated
/*! tailwindcss v3.4.17 | MIT License | https://tailwindcss.com*/*,:after,:before{box-sizing:border-box;border:0 solid #e5e7eb}:after,:before{--tw-content:""}:host,html{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:var(--font-family-sans);font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:var(--font-family-mono);font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}html{font-size:80%}@media (min-width:768px){html{font-size:100%}}@media (min-width:1024px){html{font-size:75%}}*,:after,:before{scrollbar-width:thin;scrollbar-color:var(--scrollbar-thumb) transparent}::-webkit-scrollbar{width:var(--scrollbar-width);height:var(--scrollbar-width)}::-webkit-scrollbar-track{background:var(--scrollbar-track)}::-webkit-scrollbar-thumb{background:var(--scrollbar-thumb);border-radius:var(--radius-sm)}::-webkit-scrollbar-thumb:hover{background:var(--scrollbar-thumb-hover)}body{--app-header-centerline:calc(env(safe-area-inset-top, 0) + var(--app-header-centerline-offset));font-family:var(--font-family-sans);background-color:var(--color-page);color:var(--color-text-strong);line-height:1.5;margin:0;padding:0;overflow-x:hidden}#uiOverlay{position:fixed;inset:0;pointer-events:none;z-index:var(--z-overlay-popover)}#uiOverlay>*{pointer-events:auto}#editNip71TagsFieldset>legend,#nip71TagsFieldset>legend{margin-left:0;padding:0}#app{background-color:var(--color-page);color:inherit}body.modal-open,html.modal-open{overflow:hidden;height:100%}body.modal-open #app{overflow:hidden}body.modal-open #sidebar{pointer-events:none;opacity:0;visibility:hidden;z-index:var(--z-sidebar-overlay)}.ng-cloak,.ng-hide:not(.ng-hide-animate),.x-ng-cloak,[data-ng-cloak],[ng-cloak],[ng\:cloak],[x-ng-cloak]{display:none!important}ng\:form{display:block}.\!container{width:100%!important}.container{width:100%}@media (min-width:25rem){.\!container{max-width:25rem!important}.container{max-width:25rem}}@media (min-width:30rem){.\!container{max-width:30rem!important}.container{max-width:30rem}}@media (min-width:640px){.\!container{max-width:640px!important}.container{max-width:640px}}@media (min-width:768px){.\!container{max-width:768px!important}.container{max-width:768px}}@media (min-width:1024px){.\!container{max-width:1024px!important}.container{max-width:1024px}}@media (min-width:1280px){.\!container{max-width:1280px!important}.container{max-width:1280px}}@media (min-width:1536px){.\!container{max-width:1536px!important}.container{max-width:1536px}}#playerModal.ds-header{display:flex}.ds-header{display:flex;align-items:center;justify-content:flex-start;padding-top:var(--space-sm);padding-bottom:var(--space-sm)}.app-shell__header{position:sticky;top:env(safe-area-inset-top,0);z-index:var(--z-app-header);padding-top:calc(var(--space-sm) + env(safe-area-inset-top, 0));padding-bottom:var(--space-sm);background-color:transparent;background-image:var(--surface-overlay-banner-gradient-header);background-repeat:no-repeat;background-size:100% 100%}.ds-metric-probe{position:absolute;top:0;left:0;Line truncated
+81
View File
@@ -248,6 +248,87 @@
color: var(--color-text-strong);
}
.header-search__region {
@apply hidden flex-1 justify-center md:flex;
min-width: 0;
padding-inline: clamp(var(--space-md), 4vw, var(--space-3xl));
}
.header-search {
@apply flex items-center gap-3 rounded-full border border-border border-opacity-40 bg-overlay-panel px-4 shadow-sm transition-colors duration-base ease-out;
backdrop-filter: blur(var(--popover-backdrop-blur));
-webkit-backdrop-filter: blur(var(--popover-backdrop-blur));
padding-block: calc(var(--space-sm) * 0.9);
inline-size: min(100%, 34rem);
}
.header-search:focus-within {
@apply border-accent-strong;
}
.header-search__icon {
@apply block h-5 w-5;
background-color: currentColor;
mask-repeat: no-repeat;
mask-position: center;
mask-size: contain;
-webkit-mask-repeat: no-repeat;
-webkit-mask-position: center;
-webkit-mask-size: contain;
}
.header-search__icon--filter {
mask-image: url("../assets/svg/filter.svg");
-webkit-mask-image: url("../assets/svg/filter.svg");
}
.header-search__icon--submit {
mask-image: url("../assets/svg/search.svg");
-webkit-mask-image: url("../assets/svg/search.svg");
}
.header-search__filter {
@apply focus-ring inline-flex shrink-0 items-center justify-center rounded-full border border-transparent bg-transparent transition-colors duration-base ease-out;
color: var(--color-accent);
inline-size: calc(var(--icon-size-lg) * 0.9);
block-size: calc(var(--icon-size-lg) * 0.9);
min-inline-size: calc(var(--icon-size-lg) * 0.9);
min-block-size: calc(var(--icon-size-lg) * 0.9);
}
.header-search__filter:hover,
.header-search__filter:focus-visible {
color: var(--color-accent-strong);
}
.header-search__input {
@apply flex-1 appearance-none bg-transparent text-sm text-text placeholder:text-muted outline-none;
min-width: 0;
}
.header-search__input:focus-visible {
@apply outline-none ring-0;
}
.header-search__submit {
@apply focus-ring inline-flex items-center justify-center rounded-full border border-transparent transition-colors duration-base ease-out;
background-color: var(--color-accent-strong);
color: var(--color-white);
inline-size: calc(var(--icon-size-lg) * 0.9);
block-size: calc(var(--icon-size-lg) * 0.9);
min-inline-size: calc(var(--icon-size-lg) * 0.9);
min-block-size: calc(var(--icon-size-lg) * 0.9);
padding: 0;
}
.header-search__submit:hover {
background-color: var(--color-accent);
}
.header-search__submit:focus-visible {
background-color: var(--color-accent-pressed);
}
.bv-logo {
--logo-wordmark-color: var(--color-logo-wordmark);
--logo-accent-color: var(--color-logo-accent);
+35
View File
@@ -182,6 +182,41 @@
</span>
</a>
<div class="header-search__region">
<form
id="headerSearchForm"
role="search"
class="header-search"
>
<button
type="button"
class="header-search__filter"
aria-label="Open search filters"
>
<span
aria-hidden="true"
class="header-search__icon header-search__icon--filter"
></span>
</button>
<label for="headerSearchInput" class="sr-only">Search videos</label>
<input
id="headerSearchInput"
class="header-search__input"
type="search"
name="query"
placeholder="Search videos"
autocomplete="off"
/>
<button type="submit" class="header-search__submit">
<span class="sr-only">Submit search</span>
<span
aria-hidden="true"
class="header-search__icon header-search__icon--submit"
></span>
</button>
</form>
</div>
<!-- Buttons on the far right -->
<!-- Header action buttons share the fade-in treatment for consistency. -->
+28 -6
View File
@@ -692,12 +692,22 @@ class Application {
};
this.boundVideoModalZapOpenHandler = (event) => {
const requiresLogin = Boolean(event?.detail?.requiresLogin);
if (requiresLogin) {
this.pendingModalZapOpen = true;
} else {
this.pendingModalZapOpen = false;
this.pendingModalZapOpen = requiresLogin;
const openResult = this.zapController?.open({ requiresLogin });
if (!openResult) {
event?.preventDefault?.();
if (!requiresLogin) {
this.pendingModalZapOpen = false;
}
this.videoModal?.closeZapDialog?.({
silent: true,
restoreFocus: false,
});
return;
}
this.zapController?.open({ requiresLogin });
this.pendingModalZapOpen = false;
};
this.boundVideoModalZapCloseHandler = () => {
this.zapController?.close();
@@ -3029,7 +3039,19 @@ class Application {
}
isUserLoggedIn() {
return Boolean(this.normalizeHexPubkey(this.pubkey));
const normalizedPubkey = this.normalizeHexPubkey(this.pubkey);
if (!normalizedPubkey) {
return false;
}
const sessionActorPubkey = this.normalizeHexPubkey(
nostrClient?.sessionActor?.pubkey,
);
if (sessionActorPubkey && sessionActorPubkey === normalizedPubkey) {
return false;
}
return true;
}
async updateActiveNwcSettings(partial = {}) {
+28
View File
@@ -276,6 +276,34 @@ async function bootstrapInterface() {
label: "Sidebar DNS link",
});
const headerSearchForm = document.getElementById("headerSearchForm");
if (headerSearchForm) {
headerSearchForm.addEventListener("submit", async (event) => {
event.preventDefault();
try {
await applicationReadyPromise;
} catch (error) {
userLogger.info("Search function is coming soon.");
return;
}
if (application && typeof application.showStatus === "function") {
try {
application.showStatus("Search function is coming soon.", {
autoHideMs: 3500,
showSpinner: false,
});
return;
} catch (error) {
// fall through to logger fallback
}
}
userLogger.info("Search function is coming soon.");
});
}
const sidebar = document.getElementById("sidebar");
const collapseToggle = document.getElementById("sidebarCollapseToggle");
if (sidebar && !sidebar.hasAttribute("data-footer-state")) {
+7 -2
View File
@@ -119,8 +119,13 @@ export default class AuthService {
hydrateFromStorage() {
hydrateProfileCacheFromStorage();
const { profiles } = hydrateSavedProfilesFromStorage();
if (!getActiveProfilePubkey() && Array.isArray(profiles) && profiles.length) {
const { profiles, hasExplicitActiveProfile } = hydrateSavedProfilesFromStorage();
if (
!getActiveProfilePubkey() &&
!hasExplicitActiveProfile &&
Array.isArray(profiles) &&
profiles.length
) {
const first = profiles[0]?.pubkey || null;
if (first) {
setActiveProfilePubkey(first, { persist: true });
+40 -15
View File
@@ -34,6 +34,7 @@ function sanitizeProfileString(value) {
let savedProfiles = [];
let activeProfilePubkey = null;
let hadExplicitActiveProfile = false;
const profileCache = new Map();
const urlHealthCache = new Map();
const urlHealthInFlight = new Map();
@@ -297,14 +298,23 @@ export function persistSavedProfiles({ persistActive = true } = {}) {
export function loadSavedProfilesFromStorage() {
savedProfiles = [];
activeProfilePubkey = null;
hadExplicitActiveProfile = false;
if (typeof localStorage === "undefined") {
return { profiles: getSavedProfiles(), activePubkey: activeProfilePubkey };
return {
profiles: getSavedProfiles(),
activePubkey: activeProfilePubkey,
hasExplicitActiveProfile: hadExplicitActiveProfile,
};
}
const raw = localStorage.getItem(SAVED_PROFILES_STORAGE_KEY);
if (!raw) {
return { profiles: getSavedProfiles(), activePubkey: activeProfilePubkey };
return {
profiles: getSavedProfiles(),
activePubkey: activeProfilePubkey,
hasExplicitActiveProfile: hadExplicitActiveProfile,
};
}
let needsRewrite = false;
@@ -352,17 +362,28 @@ export function loadSavedProfilesFromStorage() {
savedProfiles.push(entry);
}
const activeCandidate =
typeof parsed.activePubkey === "string"
? parsed.activePubkey
: typeof parsed.activePubKey === "string"
? parsed.activePubKey
: null;
const normalizedActive = normalizeHexPubkey(activeCandidate);
if (normalizedActive && seenPubkeys.has(normalizedActive)) {
activeProfilePubkey = normalizedActive;
} else if (activeCandidate) {
needsRewrite = true;
let hasActiveField = false;
let activeCandidate;
if (Object.prototype.hasOwnProperty.call(parsed, "activePubkey")) {
hasActiveField = true;
activeCandidate = parsed.activePubkey;
} else if (Object.prototype.hasOwnProperty.call(parsed, "activePubKey")) {
hasActiveField = true;
activeCandidate = parsed.activePubKey;
}
if (hasActiveField) {
hadExplicitActiveProfile = true;
if (typeof activeCandidate === "string") {
const normalizedActive = normalizeHexPubkey(activeCandidate);
if (normalizedActive && seenPubkeys.has(normalizedActive)) {
activeProfilePubkey = normalizedActive;
} else if (activeCandidate) {
needsRewrite = true;
}
} else if (activeCandidate !== null && activeCandidate !== undefined) {
needsRewrite = true;
}
}
} else if (raw) {
needsRewrite = true;
@@ -372,7 +393,7 @@ export function loadSavedProfilesFromStorage() {
needsRewrite = true;
}
if (!activeProfilePubkey && savedProfiles.length) {
if (!activeProfilePubkey && savedProfiles.length && !hadExplicitActiveProfile) {
activeProfilePubkey = savedProfiles[0].pubkey;
needsRewrite = true;
}
@@ -381,7 +402,11 @@ export function loadSavedProfilesFromStorage() {
persistSavedProfiles();
}
return { profiles: getSavedProfiles(), activePubkey: activeProfilePubkey };
return {
profiles: getSavedProfiles(),
activePubkey: activeProfilePubkey,
hasExplicitActiveProfile: hadExplicitActiveProfile,
};
}
export function syncSavedProfileFromCache(pubkey, { persist = false } = {}) {
+75 -15
View File
@@ -128,9 +128,14 @@ export class VideoModal {
this.eventTarget.removeEventListener(type, listener, options);
}
dispatch(type, detail) {
const event = new CustomEvent(type, { detail });
this.eventTarget.dispatchEvent(event);
dispatch(type, detail, options = {}) {
const config =
options && typeof options === "object" ? { ...options } : Object.create(null);
const event = new CustomEvent(type, {
detail,
cancelable: Boolean(config.cancelable),
});
return this.eventTarget.dispatchEvent(event);
}
getRoot() {
@@ -420,17 +425,18 @@ export class VideoModal {
}
if (this.modalZapRequiresLogin) {
this.dispatch("zap:open", {
video: this.activeVideo,
requiresLogin: true,
});
this.dispatch(
"zap:open",
{
video: this.activeVideo,
requiresLogin: true,
},
{ cancelable: false },
);
return;
}
const popoverIsOpen =
typeof this.modalZapPopover?.isOpen === "function"
? this.modalZapPopover.isOpen()
: this.modalZapDialogOpen === true;
const popoverIsOpen = this.isZapDialogOpen();
if (this.modalZapOpenPromise) {
this.modalZapPendingToggle = "close";
@@ -446,9 +452,17 @@ export class VideoModal {
return;
}
const allowed = this.dispatch(
"zap:open",
{ video: this.activeVideo },
{ cancelable: true },
);
if (allowed === false) {
return;
}
this.modalZapPendingToggle = null;
this.openZapDialog();
this.dispatch("zap:open", { video: this.activeVideo });
});
}
@@ -584,6 +598,9 @@ export class VideoModal {
this.modalZapDialog.hidden = false;
this.modalZapDialog.setAttribute("aria-hidden", "false");
this.modalZapDialogOpen = true;
if (this.modalZapBtn) {
this.modalZapBtn.setAttribute("aria-expanded", "true");
}
this.focusZapAmount();
}
return result;
@@ -603,6 +620,9 @@ export class VideoModal {
this.modalZapDialog.setAttribute("aria-hidden", "true");
this.modalZapDialog.hidden = true;
this.modalZapDialogOpen = false;
if (this.modalZapBtn) {
this.modalZapBtn.setAttribute("aria-expanded", "false");
}
if (!silent) {
this.dispatch("zap:close", { video: this.activeVideo });
}
@@ -1054,6 +1074,10 @@ export class VideoModal {
}
async openZapDialog() {
if (this.modalZapRequiresLogin) {
return Promise.resolve(false);
}
if (this.modalZapOpenPromise) {
return this.modalZapOpenPromise;
}
@@ -1112,7 +1136,25 @@ export class VideoModal {
if (restoreFocus !== undefined) {
options.restoreFocus = restoreFocus;
}
this.modalZapPopover.close(options);
const closeResult = this.modalZapPopover.close(options);
if (
closeResult !== true &&
this.modalZapDialog &&
this.modalZapDialogOpen
) {
this.modalZapDialog.dataset.state = "closed";
this.modalZapDialog.setAttribute("aria-hidden", "true");
this.modalZapDialog.hidden = true;
this.modalZapDialogOpen = false;
if (this.modalZapBtn) {
this.modalZapBtn.setAttribute("aria-expanded", "false");
}
if (!silent) {
this.dispatch("zap:close", { video: this.activeVideo });
}
}
return;
}
@@ -1134,9 +1176,27 @@ export class VideoModal {
}
isZapDialogOpen() {
if (typeof this.modalZapPopover?.isOpen === "function") {
return this.modalZapPopover.isOpen();
const popoverIsOpen =
typeof this.modalZapPopover?.isOpen === "function"
? this.modalZapPopover.isOpen()
: null;
if (popoverIsOpen === true) {
return true;
}
if (popoverIsOpen === false && this.modalZapDialogOpen) {
return true;
}
if (this.modalZapDialog?.dataset?.state === "open") {
return true;
}
if (this.modalZapDialog && this.modalZapDialog.hidden === false) {
return true;
}
return !!this.modalZapDialogOpen;
}
+32 -1
View File
@@ -39,6 +39,19 @@ async function setupModal({ lazyLoad = false } = {}) {
applyDesignSystemAttributes(document);
if (!window.ResizeObserver) {
class ResizeObserverStub {
constructor(callback) {
this.callback = callback;
}
observe() {}
unobserve() {}
disconnect() {}
}
window.ResizeObserver = ResizeObserverStub;
globalThis.ResizeObserver = ResizeObserverStub;
}
let restoreFetch = null;
if (lazyLoad) {
const originalFetch = globalThis.fetch;
@@ -730,7 +743,25 @@ for (const _ of [0]) {
assert.equal(zapDialog.dataset.state, "open");
assert.equal(zapDialog.getAttribute("aria-hidden"), "false");
assert.equal(zapButton.getAttribute("aria-expanded"), "true");
assert.strictEqual(document.activeElement, amountInput);
zapButton.dispatchEvent(
new window.MouseEvent("click", { bubbles: true, cancelable: true })
);
assert.equal(zapDialog.hidden, true);
assert.equal(zapDialog.dataset.state, "closed");
assert.equal(zapDialog.getAttribute("aria-hidden"), "true");
assert.equal(zapButton.getAttribute("aria-expanded"), "false");
zapButton.dispatchEvent(
new window.MouseEvent("click", { bubbles: true, cancelable: true })
);
await Promise.resolve();
assert.equal(zapDialog.hidden, false);
assert.equal(zapDialog.dataset.state, "open");
assert.equal(zapDialog.getAttribute("aria-hidden"), "false");
assert.equal(zapButton.getAttribute("aria-expanded"), "true");
const closeButton = document.getElementById("modalZapCloseBtn");
assert.ok(closeButton, "zap close button should exist");
+146 -1
View File
@@ -182,10 +182,26 @@ function createVideoModalStub() {
return {
setCopyEnabled: noop,
setShareEnabled: noop,
setZapVisibility: noop,
setWalletPromptVisible: noop,
zapVisibilityCalls: [],
setZapVisibility(config) {
const payload =
config && typeof config === "object"
? { ...config }
: { visible: Boolean(config) };
this.zapVisibilityCalls.push(payload);
this.lastZapVisibility = payload;
},
dialogOpen: false,
closeZapDialogCalls: [],
closeZapDialog(options = {}) {
this.closeZapDialogCalls.push(options);
this.dialogOpen = false;
},
resetStats: noop,
updateViewCountLabel: noop,
setViewCountPointer: noop,
completedStates: [],
addEventListener(type, handler) {
listeners.set(type, handler);
},
@@ -202,6 +218,9 @@ function createVideoModalStub() {
setZapPending(value) {
this.setZapPendingCalls.push(Boolean(value));
},
setZapCompleted(value) {
this.completedStates.push(Boolean(value));
},
setZapStatus(message, tone) {
this.statusMessages.push({ message, tone });
},
@@ -297,6 +316,132 @@ async function createApp({ splitAndZap }) {
return { app, modalStub, creatorAddress, platformAddress };
}
await (async () => {
// Test: logged-out zap request closes modal and queues reopen
const { app, modalStub } = await createApp({
splitAndZap: async () => ({ receipts: [] }),
});
let loginNotificationCount = 0;
app.zapController.notifyLoginRequired = () => {
loginNotificationCount += 1;
};
modalStub.dialogOpen = true;
modalStub.closeZapDialogCalls = [];
app.pendingModalZapOpen = false;
app.boundVideoModalZapOpenHandler({ detail: { requiresLogin: true } });
assert.equal(
loginNotificationCount,
1,
"should request login notification when zapping logged out",
);
assert.equal(
app.pendingModalZapOpen,
true,
"zap should remain pending for post-login reopen",
);
assert.equal(
modalStub.closeZapDialogCalls.length,
1,
"zap dialog should close immediately when login required",
);
assert.deepEqual(modalStub.closeZapDialogCalls[0], {
silent: true,
restoreFocus: false,
});
assert.equal(modalStub.dialogOpen, false, "zap dialog should be closed");
app.destroy();
})();
await (async () => {
// Test: preventDefault is called when zap opening is rejected post-dispatch
const { app, modalStub } = await createApp({
splitAndZap: async () => ({ receipts: [] }),
});
let loginNotificationCount = 0;
app.zapController.notifyLoginRequired = () => {
loginNotificationCount += 1;
};
app.zapController.isUserLoggedIn = () => false;
modalStub.closeZapDialogCalls = [];
const preventCalls = [];
const event = {
detail: { requiresLogin: false },
preventDefault: () => {
preventCalls.push(true);
},
};
app.pendingModalZapOpen = true;
app.boundVideoModalZapOpenHandler(event);
assert.equal(
loginNotificationCount,
1,
"should notify login requirement when zap open is rejected",
);
assert.equal(
preventCalls.length,
1,
"should prevent default zap opening when controller rejects it",
);
assert.equal(
app.pendingModalZapOpen,
false,
"pending zap reopen flag should clear when rejection wasn't login-gated",
);
assert.deepEqual(modalStub.closeZapDialogCalls[0], {
silent: true,
restoreFocus: false,
});
app.destroy();
})();
await (async () => {
// Test: session actors should not be treated as logged-in users for zaps
const { app, modalStub } = await createApp({
splitAndZap: async () => ({ receipts: [] }),
});
const { nostrClient } = await import("../js/nostr.js");
const originalSessionActor = nostrClient.sessionActor;
const sessionPubkey = "a".repeat(64);
nostrClient.sessionActor = { pubkey: sessionPubkey, privateKey: "priv" };
app.pubkey = sessionPubkey;
modalStub.zapVisibilityCalls = [];
app.zapController.setVisibility(true);
const lastVisibility =
modalStub.zapVisibilityCalls[modalStub.zapVisibilityCalls.length - 1];
assert.deepEqual(
lastVisibility,
{ visible: true, requiresLogin: true },
"zap controller should require login when only a session actor is present",
);
assert.equal(
app.isUserLoggedIn(),
false,
"session actor pubkeys should not count as logged-in users",
);
app.pubkey = null;
nostrClient.sessionActor = originalSessionActor;
app.destroy();
})();
await (async () => {
// Test: wallet required before zapping
const splitCalls = [];