mirror of
https://github.com/tdurieux/anonymous_github.git
synced 2026-11-02 19:34:08 +01:00
Merge pull request #820 from tdurieux/codex/github-dashboard-actions
style: clarify GitHub sign-in and connection management
This commit is contained in:
12 files changed
+271
-85
No files matched your search
@@ -1,8 +1,8 @@
|
||||
{
|
||||
"core.min.js": "core.c5bd53363a.min.js",
|
||||
"vendor.min.js": "vendor.cbc8c2964d.min.js",
|
||||
"vendor.min.js": "vendor.0155114e4b.min.js",
|
||||
"mermaid.min.js": "mermaid.f848a72d16.min.js",
|
||||
"all.min.css": "all.7ac8730b9a.min.css",
|
||||
"all.min.css": "all.6a5e0ae79b.min.css",
|
||||
"markdown.min.js": "markdown.ad7b1d71c3.min.js",
|
||||
"pdf.min.js": "pdf.eaa7573247.min.js",
|
||||
"notebook.min.js": "notebook.8844e2735f.min.js",
|
||||
|
||||
Vendored
+1
-1
@@ -6,4 +6,4 @@
|
||||
*/:root{--blue:#007bff;--indigo:#6610f2;--purple:#6f42c1;--pink:#e83e8c;--red:#dc3545;--orange:#fd7e14;--yellow:#ffc107;--green:#28a745;--teal:#20c997;--cyan:#17a2b8;--white:#fff;--gray:#6c757d;--gray-dark:#343a40;--primary:#007bff;--secondary:#6c757d;--success:#28a745;--info:#17a2b8;--warning:#ffc107;--danger:#dc3545;--light:#f8f9fa;--dark:#343a40;--breakpoint-xs:0;--breakpoint-sm:576px;--breakpoint-md:768px;--breakpoint-lg:992px;--breakpoint-xl:1200px;--font-family-sans-serif:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--font-family-monospace:SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace}*,::after,::before{box-sizing:border-box}html{font-family:sans-serif;line-height:1.15;-webkit-text-size-adjust:100%;-webkit-tap-highlight-color:transparent}article,aside,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}body{margin:0;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";font-size:1rem;font-weight:400;line-height:1.5;color:#212529;text-align:left;background-color:#fff}[tabindex="-1"]:focus:not(:focus-visible){outline:0!important}hr{box-sizing:content-box;height:0;overflow:visible}h1,h2,h3,h4,h5,h6{margin-top:0;margin-bottom:.5rem}p{margin-top:0;margin-bottom:1rem}abbr[data-original-title],abbr[title]{text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted;cursor:help;border-bottom:0;-webkit-text-decoration-skip-ink:none;text-decoration-skip-ink:none}address{margin-bottom:1rem;font-style:normal;line-height:inherit}dl,ol,ul{margin-top:0;margin-bottom:1rem}ol ol,ol ul,ul ol,ul ul{margin-bottom:0}dt{font-weight:700}dd{margin-bottom:.5rem;margin-left:0}blockquote{margin:0 0 1rem}b,strong{font-weight:bolder}small{font-size:80%}sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}a{color:#007bff;text-decoration:none;background-color:transparent}a:hover{color:#0056b3;text-decoration:underline}a:not([href]){color:inherit;text-decoration:none}a:not([href]):hover{color:inherit;text-decoration:none}code,kbd,pre,samp{font-family:SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;font-size:1em}pre{margin-top:0;margin-bottom:1rem;overflow:auto}figure{margin:0 0 1rem}img{vertical-align:middle;border-style:none}svg{overflow:hidden;vertical-align:middle}table{border-collapse:collapse}caption{padding-top:.75rem;padding-bottom:.75rem;color:#6c757d;text-align:left;caption-side:bottom}th{text-align:inherit}label{display:inline-block;margin-bottom:.5rem}button{border-radius:0}button:focus{outline:1px dotted;outline:5px auto -webkit-focus-ring-color}button,input,optgroup,select,textarea{margin:0;font-family:inherit;font-size:inherit;line-height:inherit}button,input{overflow:visible}button,select{text-transform:none}select{word-wrap:normal}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button}[type=button]:not(:disabled),[type=reset]:not(:disabled),[type=submit]:not(:disabled),button:not(:disabled){cursor:pointer}[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner,button::-moz-focus-inner{padding:0;border-style:none}input[type=checkbox],input[type=radio]{box-sizing:border-box;padding:0}input[type=date],input[type=datetime-local],input[type=month],input[type=time]{-webkit-appearance:listbox}textarea{overflow:auto;resize:vertical}fieldset{min-width:0;padding:0;margin:0;border:0}legend{display:block;width:100%;max-width:100%;padding:0;margin-bottom:.5rem;font-size:1.5rem;line-height:inherit;color:inherit;white-space:normal}progress{vertical-align:baseline}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{outline-offset:-2px;-webkit-appearance:none}[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{font:inherit;-webkit-appearance:button}output{display:inline-block}summary{display:list-item;cursor:pointer}template{display:none}[hidden]{display:none!important}.h1,.h2,.h3,.h4,.h5,.h6,h1,h2,h3,h4,h5,h6{margin-bottom:.5rem;font-weight:500;line-height:1.2}.h1,h1{font-size:2.5rem}.h2,h2{font-size:2rem}.h3,h3{font-size:1.75rem}.h4,h4{font-size:1.5rem}.h5,h5{font-size:1.25rem}.h6,h6{font-size:1rem}.lead{font-size:1.25rem;font-weight:300}.display-1{font-size:6rem;font-weight:300;line-height:1.2}.display-2{font-size:5.5rem;font-weight:300;line-height:1.2}.display-3{font-size:4.5rem;font-weight:300;line-height:1.2}.display-4{font-size:3.5rem;font-weight:300;line-height:1.2}hr{margin-top:1rem;margin-bottom:1rem;border:0;border-top:1px solid rgba(0,0,0,.1)}.small,small{font-size:80%;font-weight:400}.mark,mark{padding:.2em;background-color:#fcf8e3}.list-unsLine truncated
|
||||
* Font Awesome Free 5.15.4 by @fontawesome - https://fontawesome.com
|
||||
* License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License)
|
||||
*/.fa,.fab,.fad,.fal,.far,.fas{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;display:inline-block;font-style:normal;font-variant:normal;text-rendering:auto;line-height:1}.fa-lg{font-size:1.33333em;line-height:.75em;vertical-align:-.0667em}.fa-xs{font-size:.75em}.fa-sm{font-size:.875em}.fa-1x{font-size:1em}.fa-2x{font-size:2em}.fa-3x{font-size:3em}.fa-4x{font-size:4em}.fa-5x{font-size:5em}.fa-6x{font-size:6em}.fa-7x{font-size:7em}.fa-8x{font-size:8em}.fa-9x{font-size:9em}.fa-10x{font-size:10em}.fa-fw{text-align:center;width:1.25em}.fa-ul{list-style-type:none;margin-left:2.5em;padding-left:0}.fa-ul>li{position:relative}.fa-li{left:-2em;position:absolute;text-align:center;width:2em;line-height:inherit}.fa-border{border:solid .08em #eee;border-radius:.1em;padding:.2em .25em .15em}.fa-pull-left{float:left}.fa-pull-right{float:right}.fa.fa-pull-left,.fab.fa-pull-left,.fal.fa-pull-left,.far.fa-pull-left,.fas.fa-pull-left{margin-right:.3em}.fa.fa-pull-right,.fab.fa-pull-right,.fal.fa-pull-right,.far.fa-pull-right,.fas.fa-pull-right{margin-left:.3em}.fa-spin{-webkit-animation:fa-spin 2s infinite linear;animation:fa-spin 2s infinite linear}.fa-pulse{-webkit-animation:fa-spin 1s infinite steps(8);animation:fa-spin 1s infinite steps(8)}@-webkit-keyframes fa-spin{0%{-webkit-transform:rotate(0);transform:rotate(0)}100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes fa-spin{0%{-webkit-transform:rotate(0);transform:rotate(0)}100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}.fa-rotate-90{-webkit-transform:rotate(90deg);transform:rotate(90deg)}.fa-rotate-180{-webkit-transform:rotate(180deg);transform:rotate(180deg)}.fa-rotate-270{-webkit-transform:rotate(270deg);transform:rotate(270deg)}.fa-flip-horizontal{-webkit-transform:scale(-1,1);transform:scale(-1,1)}.fa-flip-vertical{-webkit-transform:scale(1,-1);transform:scale(1,-1)}.fa-flip-both,.fa-flip-horizontal.fa-flip-vertical{-webkit-transform:scale(-1,-1);transform:scale(-1,-1)}:root .fa-flip-both,:root .fa-flip-horizontal,:root .fa-flip-vertical,:root .fa-rotate-180,:root .fa-rotate-270,:root .fa-rotate-90{-webkit-filter:none;filter:none}.fa-stack{display:inline-block;height:2em;line-height:2em;position:relative;vertical-align:middle;width:2.5em}.fa-stack-1x,.fa-stack-2x{left:0;position:absolute;text-align:center;width:100%}.fa-stack-1x{line-height:inherit}.fa-stack-2x{font-size:2em}.fa-inverse{color:#fff}.fa-500px:before{content:"\f26e"}.fa-accessible-icon:before{content:"\f368"}.fa-accusoft:before{content:"\f369"}.fa-acquisitions-incorporated:before{content:"\f6af"}.fa-ad:before{content:"\f641"}.fa-address-book:before{content:"\f2b9"}.fa-address-card:before{content:"\f2bb"}.fa-adjust:before{content:"\f042"}.fa-adn:before{content:"\f170"}.fa-adversal:before{content:"\f36a"}.fa-affiliatetheme:before{content:"\f36b"}.fa-air-freshener:before{content:"\f5d0"}.fa-airbnb:before{content:"\f834"}.fa-algolia:before{content:"\f36c"}.fa-align-center:before{content:"\f037"}.fa-align-justify:before{content:"\f039"}.fa-align-left:before{content:"\f036"}.fa-align-right:before{content:"\f038"}.fa-alipay:before{content:"\f642"}.fa-allergies:before{content:"\f461"}.fa-amazon:before{content:"\f270"}.fa-amazon-pay:before{content:"\f42c"}.fa-ambulance:before{content:"\f0f9"}.fa-american-sign-language-interpreting:before{content:"\f2a3"}.fa-amilia:before{content:"\f36d"}.fa-anchor:before{content:"\f13d"}.fa-android:before{content:"\f17b"}.fa-angellist:before{content:"\f209"}.fa-angle-double-down:before{content:"\f103"}.fa-angle-double-left:before{content:"\f100"}.fa-angle-double-right:before{content:"\f101"}.fa-angle-double-up:before{content:"\f102"}.fa-angle-down:before{content:"\f107"}.fa-angle-left:before{content:"\f104"}.fa-angle-right:before{content:"\f105"}.fa-angle-up:before{content:"\f106"}.fa-angry:before{content:"\f556"}.fa-angrycreative:before{content:"\f36e"}.fa-angular:before{content:"\f420"}.fa-ankh:before{content:"\f644"}.fa-app-store:before{content:"\f36f"}.fa-app-store-ios:before{content:"\f370"}.fa-apper:before{content:"\f371"}.fa-apple:before{content:"\f179"}.fa-apple-alt:before{content:"\f5d1"}.fa-apple-pay:before{content:"\f415"}.fa-archive:before{content:"\f187"}.fa-archway:before{content:"\f557"}.fa-arrow-alt-circle-down:before{content:"\f358"}.fa-arrow-alt-circle-left:before{content:"\f359"}.fa-arrow-alt-circle-right:before{content:"\f35a"}.fa-arrow-alt-circle-up:before{content:"\f35b"}.fa-arrow-circle-down:before{content:"\f0ab"}.fa-arrow-circle-left:before{content:"\f0a8"}.fa-arrow-circle-right:before{content:"\f0a9"}.fa-arrow-circle-up:before{content:"\f0aa"}.fa-arrow-down:before{content:"\f063"}.fa-arrow-left:before{content:"\f060"}.fa-arrow-right:before{content:"\f061"}.fa-arrow-up:before{content:"\f062"}.fa-arrows-alt:before{content:"\f0b2"}.fa-arrows-alt-h:before{content:"\f337"}.fa-arrows-alt-v:before{content:"\f338"}.fa-artstation:before{content:"\f77a"}.fa-assistive-listening-systems:before{contentLine truncated
|
||||
*/.fa,.fab,.fad,.fal,.far,.fas{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;display:inline-block;font-style:normal;font-variant:normal;text-rendering:auto;line-height:1}.fa-lg{font-size:1.33333em;line-height:.75em;vertical-align:-.0667em}.fa-xs{font-size:.75em}.fa-sm{font-size:.875em}.fa-1x{font-size:1em}.fa-2x{font-size:2em}.fa-3x{font-size:3em}.fa-4x{font-size:4em}.fa-5x{font-size:5em}.fa-6x{font-size:6em}.fa-7x{font-size:7em}.fa-8x{font-size:8em}.fa-9x{font-size:9em}.fa-10x{font-size:10em}.fa-fw{text-align:center;width:1.25em}.fa-ul{list-style-type:none;margin-left:2.5em;padding-left:0}.fa-ul>li{position:relative}.fa-li{left:-2em;position:absolute;text-align:center;width:2em;line-height:inherit}.fa-border{border:solid .08em #eee;border-radius:.1em;padding:.2em .25em .15em}.fa-pull-left{float:left}.fa-pull-right{float:right}.fa.fa-pull-left,.fab.fa-pull-left,.fal.fa-pull-left,.far.fa-pull-left,.fas.fa-pull-left{margin-right:.3em}.fa.fa-pull-right,.fab.fa-pull-right,.fal.fa-pull-right,.far.fa-pull-right,.fas.fa-pull-right{margin-left:.3em}.fa-spin{-webkit-animation:fa-spin 2s infinite linear;animation:fa-spin 2s infinite linear}.fa-pulse{-webkit-animation:fa-spin 1s infinite steps(8);animation:fa-spin 1s infinite steps(8)}@-webkit-keyframes fa-spin{0%{-webkit-transform:rotate(0);transform:rotate(0)}100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes fa-spin{0%{-webkit-transform:rotate(0);transform:rotate(0)}100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}.fa-rotate-90{-webkit-transform:rotate(90deg);transform:rotate(90deg)}.fa-rotate-180{-webkit-transform:rotate(180deg);transform:rotate(180deg)}.fa-rotate-270{-webkit-transform:rotate(270deg);transform:rotate(270deg)}.fa-flip-horizontal{-webkit-transform:scale(-1,1);transform:scale(-1,1)}.fa-flip-vertical{-webkit-transform:scale(1,-1);transform:scale(1,-1)}.fa-flip-both,.fa-flip-horizontal.fa-flip-vertical{-webkit-transform:scale(-1,-1);transform:scale(-1,-1)}:root .fa-flip-both,:root .fa-flip-horizontal,:root .fa-flip-vertical,:root .fa-rotate-180,:root .fa-rotate-270,:root .fa-rotate-90{-webkit-filter:none;filter:none}.fa-stack{display:inline-block;height:2em;line-height:2em;position:relative;vertical-align:middle;width:2.5em}.fa-stack-1x,.fa-stack-2x{left:0;position:absolute;text-align:center;width:100%}.fa-stack-1x{line-height:inherit}.fa-stack-2x{font-size:2em}.fa-inverse{color:#fff}.fa-500px:before{content:"\f26e"}.fa-accessible-icon:before{content:"\f368"}.fa-accusoft:before{content:"\f369"}.fa-acquisitions-incorporated:before{content:"\f6af"}.fa-ad:before{content:"\f641"}.fa-address-book:before{content:"\f2b9"}.fa-address-card:before{content:"\f2bb"}.fa-adjust:before{content:"\f042"}.fa-adn:before{content:"\f170"}.fa-adversal:before{content:"\f36a"}.fa-affiliatetheme:before{content:"\f36b"}.fa-air-freshener:before{content:"\f5d0"}.fa-airbnb:before{content:"\f834"}.fa-algolia:before{content:"\f36c"}.fa-align-center:before{content:"\f037"}.fa-align-justify:before{content:"\f039"}.fa-align-left:before{content:"\f036"}.fa-align-right:before{content:"\f038"}.fa-alipay:before{content:"\f642"}.fa-allergies:before{content:"\f461"}.fa-amazon:before{content:"\f270"}.fa-amazon-pay:before{content:"\f42c"}.fa-ambulance:before{content:"\f0f9"}.fa-american-sign-language-interpreting:before{content:"\f2a3"}.fa-amilia:before{content:"\f36d"}.fa-anchor:before{content:"\f13d"}.fa-android:before{content:"\f17b"}.fa-angellist:before{content:"\f209"}.fa-angle-double-down:before{content:"\f103"}.fa-angle-double-left:before{content:"\f100"}.fa-angle-double-right:before{content:"\f101"}.fa-angle-double-up:before{content:"\f102"}.fa-angle-down:before{content:"\f107"}.fa-angle-left:before{content:"\f104"}.fa-angle-right:before{content:"\f105"}.fa-angle-up:before{content:"\f106"}.fa-angry:before{content:"\f556"}.fa-angrycreative:before{content:"\f36e"}.fa-angular:before{content:"\f420"}.fa-ankh:before{content:"\f644"}.fa-app-store:before{content:"\f36f"}.fa-app-store-ios:before{content:"\f370"}.fa-apper:before{content:"\f371"}.fa-apple:before{content:"\f179"}.fa-apple-alt:before{content:"\f5d1"}.fa-apple-pay:before{content:"\f415"}.fa-archive:before{content:"\f187"}.fa-archway:before{content:"\f557"}.fa-arrow-alt-circle-down:before{content:"\f358"}.fa-arrow-alt-circle-left:before{content:"\f359"}.fa-arrow-alt-circle-right:before{content:"\f35a"}.fa-arrow-alt-circle-up:before{content:"\f35b"}.fa-arrow-circle-down:before{content:"\f0ab"}.fa-arrow-circle-left:before{content:"\f0a8"}.fa-arrow-circle-right:before{content:"\f0a9"}.fa-arrow-circle-up:before{content:"\f0aa"}.fa-arrow-down:before{content:"\f063"}.fa-arrow-left:before{content:"\f060"}.fa-arrow-right:before{content:"\f061"}.fa-arrow-up:before{content:"\f062"}.fa-arrows-alt:before{content:"\f0b2"}.fa-arrows-alt-h:before{content:"\f337"}.fa-arrows-alt-v:before{content:"\f338"}.fa-artstation:before{content:"\f77a"}.fa-assistive-listening-systems:before{contentLine truncated
|
||||
+127
-2
@@ -5049,7 +5049,7 @@ textarea::selection {
|
||||
text-align: center;
|
||||
border-top: 1px solid var(--border-soft, var(--border-color));
|
||||
}
|
||||
.paper-table .paper-table-empty i { font-size: 1.6rem; color: var(--ink-faint); }
|
||||
.paper-table .paper-table-empty > i { font-size: 1.6rem; color: var(--ink-faint); }
|
||||
.paper-table .paper-table-empty-actions { display: flex; gap: 8px; margin-top: 8px; }
|
||||
|
||||
.bulk-bar {
|
||||
@@ -5268,7 +5268,7 @@ textarea::selection {
|
||||
gap: 8px;
|
||||
border-top: 1px solid var(--border-soft, var(--border-color));
|
||||
}
|
||||
.paper-table-empty i { font-size: 1.6rem; }
|
||||
.paper-table-empty > i { font-size: 1.6rem; }
|
||||
|
||||
/* ===== Queue dashboard (redesigned) ===== */
|
||||
.q-header {
|
||||
@@ -7030,3 +7030,128 @@ body {
|
||||
.overview-page .ov-kpi-row { grid-template-columns: 1fr 1fr; }
|
||||
.overview-page .ov-services-grid { grid-template-columns: 1fr 1fr; }
|
||||
}
|
||||
|
||||
/* Keep account access secondary to creating an anonymization. */
|
||||
.dashboard-heading-actions { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; padding-bottom: 12px; }
|
||||
.dashboard-heading-actions .btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
|
||||
.dashboard-connections-link { display: inline-flex; align-items: center; gap: 7px; min-height: 32px; color: var(--ink-muted); font-size: 12px; line-height: 1.5; }
|
||||
.dashboard-connections-link:hover { color: var(--accent); text-decoration: none; }
|
||||
.dashboard-connections-link:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 2px; }
|
||||
@media (max-width: 767px) {
|
||||
.dashboard-heading-actions { align-items: flex-start; padding-bottom: 0; gap: 4px; }
|
||||
.dashboard-connections-link { min-height: 44px; }
|
||||
}
|
||||
|
||||
.paper-settings-connection-link { display: flex; align-items: center; gap: 12px; padding: 18px 0; color: var(--color); font-size: 14px; }
|
||||
.paper-settings-connection-link > i { color: var(--ink-muted); font-size: 18px; }
|
||||
.paper-settings-connection-link > span:first-of-type { flex: 1; }
|
||||
.paper-settings-connection-link small { display: block; margin-top: 4px; color: var(--ink-muted); font-size: 12px; }
|
||||
.paper-settings-connection-link:hover { color: var(--accent); text-decoration: none; }
|
||||
.paper-settings-connection-link:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
|
||||
|
||||
/* GitHub connections use the same open sections as account settings. */
|
||||
.connections-heading { margin-bottom: 36px; }
|
||||
.connections-heading .paper-page-title { font-size: clamp(38px, 4.5vw, 56px); margin-bottom: 12px; }
|
||||
.connections-heading .paper-page-lede { font-size: 15px; }
|
||||
.connections-grid { display: grid; grid-template-columns: 1.15fr 1fr; gap: 56px; align-items: start; border-top: 1px solid var(--border-color); padding-top: 28px; }
|
||||
.connections-grid > section { min-width: 0; }
|
||||
.connection-top, .connection-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
|
||||
.connection-top { margin-bottom: 24px; min-height: 28px; }
|
||||
.connection-top > i { color: var(--ink-muted); font-size: 24px; }
|
||||
.connection-top > .fa-key { font-size: 18px; }
|
||||
.connection-title { margin-bottom: 10px; }
|
||||
.connections-page h2 { font-family: inherit; font-size: 21px; font-weight: 600; letter-spacing: -.5px; margin: 0; }
|
||||
.connections-page p { font-size: 14px; line-height: 1.65; color: var(--ink-muted); }
|
||||
.connection-badge { background: var(--accent-soft); color: var(--accent); font-size: 11px; font-weight: 600; border-radius: 5px; padding: 4px 8px; white-space: nowrap; }
|
||||
.connection-badge-muted { background: var(--paper-bg-alt); color: var(--ink-muted); }
|
||||
.connection-status { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; color: var(--ink-muted); }
|
||||
.connection-status::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
|
||||
.connection-status.is-connected { color: var(--status-ready); }
|
||||
.connection-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; margin: 22px 0 16px; }
|
||||
.connections-page .btn { font-size: 13px; padding: 9px 13px; white-space: normal; }
|
||||
.connections-page .connection-help, .connection-revoke p { font-size: 12px; }
|
||||
.connection-link { display: inline-flex; align-items: center; gap: 8px; border: 0; padding: 0; background: transparent; color: var(--accent); font-size: 13px; line-height: 1.6; font-weight: 500; text-align: left; cursor: pointer; }
|
||||
.connection-link:hover { color: var(--link-hover-color); text-decoration: underline; }
|
||||
.connection-link:disabled { color: var(--ink-muted); opacity: .65; cursor: not-allowed; text-decoration: none; }
|
||||
.connection-link:focus-visible { outline: 2px solid var(--accent); outline-offset: 5px; }
|
||||
.connection-installations { list-style: none; padding: 0; margin: 18px 0; border-top: 1px solid var(--border-soft); }
|
||||
.connection-installations li { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 14px 0; font-size: 12px; border-bottom: 1px solid var(--border-soft); }
|
||||
.connection-revoke { border-top: 1px solid var(--border-soft); padding-top: 18px; margin-top: 24px; }
|
||||
.connection-danger { color: var(--status-error); }
|
||||
.connection-resources { margin-top: 36px; padding-top: 28px; border-top: 1px solid var(--border-color); }
|
||||
.connection-count { color: var(--ink-muted); font-size: 12px; }
|
||||
.connection-empty { display: flex; align-items: center; gap: 18px; padding: 20px 0; margin: 22px 0; }
|
||||
.connection-empty > i { font-size: 22px; color: var(--ink-muted); }
|
||||
.connection-empty h3 { font-size: 14px; font-weight: 600; margin: 0 0 5px; }
|
||||
.connection-empty p { font-size: 12px; margin: 0; }
|
||||
.connection-empty > a { margin-left: auto; flex-shrink: 0; }
|
||||
.connection-resource { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; padding: 20px 0; border-bottom: 1px solid var(--border-color); }
|
||||
.connection-resource-name { flex: 1; min-width: 180px; overflow-wrap: anywhere; font-size: 14px; }
|
||||
.connection-resource-name small { display: block; color: var(--ink-muted); font-size: 11px; margin-top: 5px; }
|
||||
.connection-resource-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
|
||||
.connection-resource-actions .connection-help { flex-basis: 100%; }
|
||||
.connections-page .connection-footnote { display: flex; align-items: baseline; gap: 10px; margin-top: 22px; font-size: 12px; }
|
||||
@media (max-width: 767px) {
|
||||
.connections-grid { grid-template-columns: 1fr; gap: 28px; }
|
||||
.connections-grid > section + section { border-top: 1px solid var(--border-color); padding-top: 28px; }
|
||||
.connection-empty { flex-wrap: wrap; }
|
||||
.connection-empty > div { flex: 1; min-width: 180px; }
|
||||
.connection-empty > a { margin-left: 40px; }
|
||||
.connection-resource-actions { flex-basis: 100%; }
|
||||
}
|
||||
|
||||
.paper-table-empty-actions .btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
|
||||
.paper-table-empty-actions .btn > i { font-size: 1em; line-height: 1; color: inherit; margin-right: 0 !important; }
|
||||
.auth-back { display: inline-flex; align-items: center; gap: 10px; font-size: 13px; color: var(--ink-muted); margin-bottom: 48px; }
|
||||
.auth-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: start; }
|
||||
.auth-intro, .auth-options { padding-top: 28px; }
|
||||
.auth-title-mobile { display: none; }
|
||||
.auth-intro .paper-page-title { font-size: clamp(48px, 5vw, 76px); line-height: 1.06; margin: 18px 0 24px; }
|
||||
.auth-intro .paper-page-lede { max-width: 330px; }
|
||||
.auth-options { display: grid; gap: 28px; }
|
||||
.auth-options h2 { font-family: inherit; font-size: 21px; font-weight: 600; margin: 0 0 10px; }
|
||||
.auth-options p { font-size: 14px; line-height: 1.65; color: var(--ink-muted); }
|
||||
.auth-options .auth-existing { font-size: 12px; border-left: 2px solid var(--accent); padding-left: 14px; margin: 0; }
|
||||
.auth-permissions { padding: 6px 0 12px; list-style: none; font-size: 13px; line-height: 1.6; }
|
||||
.auth-permissions li { display: flex; gap: 10px; margin: 12px 0; }
|
||||
.auth-permissions i { color: var(--status-ready); margin-top: 4px; }
|
||||
.auth-continue { display: flex !important; align-items: center; justify-content: space-between; min-height: 48px; padding: 12px 16px !important; }
|
||||
.auth-options small { display: block; font-size: 12px; text-align: center; color: var(--ink-muted); margin-top: 12px; }
|
||||
.auth-legacy { border-top: 1px solid var(--border-color); padding-top: 24px; }
|
||||
.auth-legacy h2 { font-size: 16px; margin: 0; }
|
||||
.auth-legacy p { font-size: 13px; }
|
||||
.repo-access { max-width: 1036px; margin: 24px auto 0; border-bottom: 1px solid var(--border-color); flex-shrink: 0; }
|
||||
.repo-access-main { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 12px 0; flex-wrap: wrap; }
|
||||
.repo-access-heading { display: flex; align-items: center; gap: 12px; }
|
||||
.repo-access-heading > i { font-size: 22px; color: var(--ink-muted); }
|
||||
.repo-access-heading h2 { font-family: inherit; font-size: 13px; font-weight: 600; margin: 0 0 4px; }
|
||||
.repo-access-heading p { font-size: 12px; color: var(--ink-muted); margin: 0; }
|
||||
.repo-access-controls { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
|
||||
.repo-access-switch { display: inline-flex; gap: 3px; padding: 3px; border: 1px solid var(--border-color); border-radius: 7px; flex-wrap: wrap; }
|
||||
.repo-access-switch button { border: 0; border-radius: 4px; background: transparent; color: var(--ink-muted); padding: 7px 10px; font: inherit; font-size: 12px; cursor: pointer; }
|
||||
.repo-access-switch button[aria-pressed="true"] { background: var(--accent-soft); color: var(--accent); opacity: 1; cursor: default; font-weight: 600; }
|
||||
.repo-access-switch button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
|
||||
.repo-access .btn { font-size: 12px; padding: 8px 12px; }
|
||||
.repo-access-note { display: flex; gap: 6px 16px; flex-wrap: wrap; padding: 0 0 14px; color: var(--ink-muted); font-size: 11px; line-height: 1.6; }
|
||||
@media (max-width: 1100px) { .repo-access { margin-left: 24px; margin-right: 24px; } }
|
||||
@media (max-width: 767px) {
|
||||
.auth-page { max-width: 480px; }
|
||||
.auth-back, .auth-intro .paper-eyebrow, .auth-title-desktop { display: none; }
|
||||
.auth-title-mobile { display: inline; }
|
||||
.auth-layout { grid-template-columns: 1fr; gap: 24px; }
|
||||
.auth-intro, .auth-options { padding-top: 0; }
|
||||
.auth-intro .paper-page-title { font-size: 40px; line-height: 1.15; margin: 6px 0 12px; }
|
||||
.auth-intro .paper-page-lede { max-width: none; font-size: 14px; margin: 0; }
|
||||
.auth-options { gap: 24px; }
|
||||
.auth-options .connection-top { margin-bottom: 16px; }
|
||||
.auth-options h2 { font-size: 18px; }
|
||||
.auth-options p { font-size: 13px; margin-bottom: 12px; }
|
||||
.auth-permissions { padding: 0; margin: 14px 0 20px; font-size: 12px; }
|
||||
.auth-permissions li { margin: 8px 0; }
|
||||
.auth-continue { font-size: 14px; }
|
||||
.auth-legacy { padding-top: 20px; }
|
||||
.auth-legacy h2 { font-size: 15px; }
|
||||
.auth-legacy .connection-link { min-height: 44px; }
|
||||
.repo-access { margin: 16px 18px 0; }
|
||||
.repo-access-controls { width: 100%; gap: 12px; }
|
||||
}
|
||||
@@ -1,13 +1,19 @@
|
||||
<div class="anonymize-page h-100">
|
||||
<div class="container py-3" v-if="githubConnections?.appEnabled">
|
||||
<span v-if="isUpdate">Connection: {{ githubConnection === 'github-app' ? 'GitHub App (read-only)' : 'Legacy OAuth' }}. <a href="/connections">Change connection</a></span>
|
||||
<span v-if="!isUpdate">Repository access:
|
||||
<button class="btn" :disabled="githubConnection === 'github-app'" @click="chooseGitHubConnection('github-app')">Read-only GitHub App</button>
|
||||
<button v-if="githubConnections?.oauthConnected" class="btn" :disabled="githubConnection === 'oauth'" @click="chooseGitHubConnection('oauth')">Use existing OAuth access</button>
|
||||
</span>
|
||||
<button class="btn btn-ink" @click="grantGitHubAccess()">{{ githubConnections?.appConnected ? 'Allow repository access on GitHub' : 'Connect read-only GitHub access' }}</button>
|
||||
<p class="mb-0"><small>Return here after confirming access on GitHub. Anonymization publishes the configured content, including content from private repositories. Gists currently use OAuth.</small></p>
|
||||
</div>
|
||||
<aside class="repo-access" aria-label="GitHub access" v-if="githubConnections?.appEnabled && githubConnections.appConnected && githubConnections.oauthConnected">
|
||||
<div class="repo-access-main">
|
||||
<div class="repo-access-heading"><i class="fab fa-github" aria-hidden="true"></i><div><h2>{{ detectedType === 'gist' ? 'Gist access' : 'Repository access' }}</h2><p>{{ detectedType === 'gist' ? 'Gists use your OAuth connection.' : 'Choose how we read your source code.' }}</p></div></div>
|
||||
<div class="repo-access-controls">
|
||||
<div class="repo-access-switch" role="group" aria-label="Repository connection" v-if="!isUpdate && detectedType !== 'gist'">
|
||||
<button type="button" :aria-pressed="githubConnection === 'github-app'" :disabled="githubConnection === 'github-app'" @click="chooseGitHubConnection('github-app')"><i class="fas fa-shield-alt" aria-hidden="true"></i> Read-only GitHub App</button>
|
||||
<button type="button" :aria-pressed="githubConnection === 'oauth'" :disabled="githubConnection === 'oauth'" @click="chooseGitHubConnection('oauth')">Legacy OAuth</button>
|
||||
</div>
|
||||
<span class="connection-badge" v-if="isUpdate || detectedType === 'gist'">{{ detectedType !== 'gist' && githubConnection === 'github-app' ? 'Read-only GitHub App' : 'Legacy OAuth' }}</span>
|
||||
<button type="button" class="btn btn-outline-ink" v-if="detectedType !== 'gist' && githubConnection !== 'oauth'" @click="grantGitHubAccess()">Manage access <i class="fas fa-external-link-alt" aria-hidden="true"></i></button>
|
||||
<a class="connection-link" href="/connections" v-if="isUpdate || detectedType === 'gist' || githubConnection === 'oauth'">{{ isUpdate ? 'Change connection' : 'Manage connections' }} →</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="repo-access-note"><span v-if="detectedType !== 'gist' && githubConnection !== 'oauth'">Select repositories on GitHub, then return here.</span><span><i class="fas fa-info-circle" aria-hidden="true"></i> Selected content will be published, including content from private repositories.</span></div>
|
||||
</aside>
|
||||
<!-- ===== STATE 1: No URL — centered input ===== -->
|
||||
<div class="anonymize-landing" v-show="!(sourceUrl)">
|
||||
<div class="anonymize-landing-inner">
|
||||
|
||||
@@ -1,44 +1,57 @@
|
||||
<div class="container page paper-page">
|
||||
<div class="paper-crumbs"><a href="/dashboard">My work</a> / GitHub connections</div>
|
||||
<h1 class="paper-page-title">GitHub <em>connections</em></h1>
|
||||
<p>Connect the GitHub account you use here. Your anonymizations and URLs stay the same.</p>
|
||||
<p class="alert alert-danger" role="alert" v-if="connectionError">{{ connectionError }}</p>
|
||||
<div class="container paper-page connections-page">
|
||||
<div class="paper-crumbs"><a href="/dashboard">My work</a> / <span class="here">GitHub connections</span></div>
|
||||
<header class="connections-heading">
|
||||
<h1 class="paper-page-title">GitHub <em>connections</em></h1>
|
||||
<p class="paper-page-lede">Manage how GitHub shares your code. Your anonymizations and URLs stay the same.</p>
|
||||
</header>
|
||||
<p class="paper-inline-alert paper-inline-alert-error" role="alert" v-if="connectionError">{{ connectionError }}</p>
|
||||
<p role="status" v-if="!connections && !connectionError">Loading your connections…</p>
|
||||
<button class="btn btn-outline-ink" v-if="!connections && connectionError" :disabled="busy" @click="loadConnections()">Try again</button>
|
||||
<div v-if="connections">
|
||||
<section class="paper-settings-section" v-if="connections.appEnabled">
|
||||
<h2>Read-only GitHub App</h2>
|
||||
<p v-if="connections.appError" role="alert">{{ connections.appError }}. Reconnect to restore access.</p>
|
||||
<a class="btn btn-ink" target="_self" href="/github/app/login">{{ connections.appConnected ? 'Reconnect GitHub account' : 'Connect GitHub account' }}</a>
|
||||
<a class="btn" v-if="connections.appConnected" target="_self" href="/github/app/install">Allow repositories on GitHub</a>
|
||||
<p class="mt-2">GitHub opens directly to the access screen. Select repositories and confirm. Organization access may require an administrator's approval.</p>
|
||||
<ul>
|
||||
<li v-for="installation in connections.installations" :key="installation.id">
|
||||
{{ installation.account }} {{ installation.suspended ? '(suspended)' : '' }} —
|
||||
<a target="_self" :href="'/github/app/install?installationId=' + installation.id">Add or remove repository access</a>
|
||||
</li>
|
||||
</ul>
|
||||
<button class="btn" :disabled="busy" @click="loadConnections()">Refresh access after approval</button>
|
||||
</section>
|
||||
<section class="paper-settings-section">
|
||||
<h2>Legacy OAuth</h2>
|
||||
<p>{{ connections.oauthConnected ? 'Connected' : 'Not connected' }}. Existing OAuth anonymizations continue to use this connection.</p>
|
||||
<a v-if="connections.oauthEnabled" target="_self" href="/github/login" class="btn">Connect legacy OAuth</a>
|
||||
<p v-if="connections.gistCount">{{ connections.gistCount }} gist(s) still require OAuth.</p>
|
||||
<button v-if="connections.oauthConnected && connections.appConnected" class="btn" :disabled="busy || connections.gistCount || connections.resources.some(r => r.connection === 'oauth')" @click="disconnectOAuth()">Revoke OAuth access</button>
|
||||
<p>Migrate all dependent resources before revoking OAuth. Revocation removes GitHub's broad OAuth repository grant.</p>
|
||||
</section>
|
||||
<section class="paper-settings-section">
|
||||
<h2>Repository connections</h2>
|
||||
<p>Check read-only access, then switch each resource. Connecting the App alone does not change existing resources.</p>
|
||||
<p>Removing GitHub access stops fetching new source content. Already published anonymized content follows its existing expiration and removal settings.</p>
|
||||
<div v-for="resource in connections.resources" :key="resource.type + resource.id" class="mb-3">
|
||||
<strong>{{ resource.id }}</strong> — {{ resource.name }} ({{ resource.type }})<br>
|
||||
Connection: {{ resource.connection === 'github-app' ? 'GitHub App (read-only)' : 'Legacy OAuth' }}
|
||||
<div v-if="resource.connection === 'oauth' && connections.appEnabled && connections.appConnected">
|
||||
<button class="btn" :disabled="busy" @click="changeConnection(resource, 'github-app', true)">Check read-only access</button>
|
||||
<button v-if="resource.eligible" class="btn btn-ink" :disabled="busy" @click="changeConnection(resource, 'github-app', false)">Switch to read-only access</button>
|
||||
<div class="connections-grid">
|
||||
<section v-if="connections.appEnabled">
|
||||
<div class="connection-top"><i class="fab fa-github" aria-hidden="true"></i><span class="connection-badge">Recommended</span></div>
|
||||
<div class="connection-title"><h2>GitHub App</h2><span class="connection-status" :class="{'is-connected': connections.appConnected && !connections.appError}">{{ connections.appError ? 'Needs attention' : connections.appConnected ? 'Connected' : 'Not connected' }}</span></div>
|
||||
<p>Read-only access to the repositories you choose.</p>
|
||||
<p class="paper-inline-alert paper-inline-alert-error" v-if="connections.appError" role="alert">{{ connections.appError }}. Reconnect to restore access.</p>
|
||||
<div class="connection-actions">
|
||||
<a class="btn btn-ink" v-if="connections.appConnected && !connections.appError" target="_self" href="/github/app/install">Manage repository access <i class="fas fa-external-link-alt" aria-hidden="true"></i></a>
|
||||
<a :class="connections.appConnected && !connections.appError ? 'connection-link' : 'btn btn-ink'" target="_self" href="/github/app/login">{{ connections.appConnected ? 'Reconnect account' : 'Connect GitHub account' }}</a>
|
||||
</div>
|
||||
<button v-if="resource.connection === 'github-app' && connections.oauthConnected" class="btn" :disabled="busy" @click="changeConnection(resource, 'oauth', false)">Switch to existing OAuth access</button>
|
||||
<p class="connection-help">Choose repositories on GitHub. Organization access may need an administrator's approval.</p>
|
||||
<ul class="connection-installations" v-if="connections.installations?.length">
|
||||
<li v-for="installation in connections.installations" :key="installation.id"><div><strong>{{ installation.account }}</strong><span v-if="installation.suspended"> · Suspended</span></div><a target="_self" :href="'/github/app/install?installationId=' + installation.id">Manage access <span class="sr-only">for {{ installation.account }}</span> →</a></li>
|
||||
</ul>
|
||||
<button class="connection-link" :disabled="busy" @click="loadConnections()"><i class="fas fa-sync-alt" aria-hidden="true"></i> Refresh access</button>
|
||||
</section>
|
||||
<section>
|
||||
<div class="connection-top"><i class="fas fa-key" aria-hidden="true"></i><span class="connection-badge connection-badge-muted">Legacy</span></div>
|
||||
<div class="connection-title"><h2>GitHub OAuth</h2><span class="connection-status" :class="{'is-connected': connections.oauthConnected}">{{ connections.oauthConnected ? 'Connected' : 'Not connected' }}</span></div>
|
||||
<p>For existing OAuth anonymizations and gists.</p>
|
||||
<p class="connection-help">This connection uses GitHub's broader repository permissions. Existing work keeps using it until you switch below.</p>
|
||||
<a v-if="connections.oauthEnabled" target="_self" href="/github/login" class="btn btn-outline-ink">{{ connections.oauthConnected ? 'Reconnect OAuth' : 'Connect legacy OAuth' }}</a>
|
||||
<div class="connection-revoke" v-if="connections.oauthConnected">
|
||||
<p v-if="connections.gistCount">{{ connections.gistCount }} gist(s) still require OAuth.</p>
|
||||
<p>Switch all dependent repositories before revoking access. Gists still require OAuth.</p>
|
||||
<button v-if="connections.appConnected" class="connection-link connection-danger" :disabled="busy || connections.gistCount || connections.resources.some(r => r.connection === 'oauth')" @click="disconnectOAuth()">Revoke OAuth access</button>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
<section class="connection-resources">
|
||||
<div class="connection-title"><h2>Repository connections</h2><span class="connection-count">{{ connections.resources?.length || 0 }} resources</span></div>
|
||||
<p>Check access, then switch each resource to the GitHub App.</p>
|
||||
<div class="connection-empty" v-if="!connections.resources?.length"><i class="fas fa-code-branch" aria-hidden="true"></i><div><h3>No repository connections yet</h3><p>Your repositories and pull requests will appear here once you anonymize them.</p></div><a class="connection-link" href="/anonymize">New anonymization →</a></div>
|
||||
<div class="connection-resource" v-for="resource in connections.resources" :key="resource.type + resource.id">
|
||||
<div class="connection-resource-name"><strong>{{ resource.name || resource.id }}</strong><small>{{ resource.type }} · {{ resource.id }}</small></div>
|
||||
<span class="connection-badge" :class="{'connection-badge-muted': resource.connection === 'oauth'}">{{ resource.connection === 'github-app' ? 'Read-only App' : 'Legacy OAuth' }}</span>
|
||||
<div class="connection-resource-actions" v-if="resource.connection === 'oauth' && connections.appEnabled && connections.appConnected">
|
||||
<button class="btn btn-outline-ink" :disabled="busy" @click="changeConnection(resource, 'github-app', true)">Check read-only access</button>
|
||||
<button v-if="resource.eligible" class="btn btn-ink" :disabled="busy" @click="changeConnection(resource, 'github-app', false)">Switch to read-only access</button>
|
||||
<span class="connection-help" role="status" v-if="resource.eligible === false">Access unavailable. Allow this repository on GitHub, then check again.</span>
|
||||
</div>
|
||||
<button v-if="resource.connection === 'github-app' && connections.oauthConnected" class="connection-link" :disabled="busy" @click="changeConnection(resource, 'oauth', false)">Use OAuth</button>
|
||||
</div>
|
||||
<p class="connection-footnote"><i class="fas fa-info-circle" aria-hidden="true"></i> Removing access stops new fetches from GitHub. Published content keeps its current expiration and removal settings.</p>
|
||||
</section>
|
||||
</div>
|
||||
</div>
|
||||
@@ -7,13 +7,16 @@
|
||||
<h1 class="paper-page-title">Your <em>anonymizations</em></h1>
|
||||
<p class="paper-page-lede">Every repository, pull request, and gist you’ve mirrored, with live status and stats.</p>
|
||||
</div>
|
||||
<a href="/anonymize" class="btn btn-ink">
|
||||
<i class="fa fa-plus-circle mr-1" aria-hidden="true"></i> New anonymization
|
||||
</a>
|
||||
<div class="dashboard-heading-actions">
|
||||
<a href="/anonymize" class="btn btn-ink">
|
||||
<i class="fa fa-plus-circle" aria-hidden="true"></i> New anonymization
|
||||
</a>
|
||||
<a href="/connections" class="dashboard-connections-link">
|
||||
<i class="fab fa-github" aria-hidden="true"></i> GitHub connections <span aria-hidden="true">→</span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<p class="mt-3"><a href="/connections">Manage GitHub connections and read-only access</a></p>
|
||||
|
||||
<!-- Quota -->
|
||||
<div class="quota-row" v-if="quota">
|
||||
<div class="quota-item" v-for="(q, index) in [
|
||||
|
||||
@@ -75,11 +75,14 @@
|
||||
</a>
|
||||
<div class="dropdown-menu dropdown-menu-right user-menu" aria-labelledby="navbarDropdownMenuLink">
|
||||
<h6 class="dropdown-header">Signed in as @{{ user?.username }}</h6>
|
||||
<a class="dropdown-item" href="/connections">GitHub connections</a>
|
||||
<a class="dropdown-item" href="/profile">
|
||||
<i class="fas fa-sliders-h" aria-hidden="true"></i>
|
||||
<span>Settings<small>Defaults, quotas, account</small></span>
|
||||
</a>
|
||||
<a class="dropdown-item" href="/connections">
|
||||
<i class="fab fa-github" aria-hidden="true"></i>
|
||||
<span>GitHub connections<small>Repository access and OAuth</small></span>
|
||||
</a>
|
||||
<a class="dropdown-item" href="/claim">
|
||||
<i class="fas fa-link" aria-hidden="true"></i>
|
||||
<span>Claim an anonymization<small>Attach an existing mirror to your account</small></span>
|
||||
|
||||
@@ -165,6 +165,12 @@ jane.smith@example.org" v-field="{ state: viewState, set: value => { terms =
|
||||
<a class="btn btn-outline-ink" href="/api/user/logout" target="_self">Sign out</a>
|
||||
</div>
|
||||
|
||||
<a class="paper-settings-connection-link" href="/connections">
|
||||
<i class="fab fa-github" aria-hidden="true"></i>
|
||||
<span>GitHub connections<small>Manage repository access and legacy OAuth.</small></span>
|
||||
<span aria-hidden="true">→</span>
|
||||
</a>
|
||||
|
||||
<div class="paper-danger-zone">
|
||||
<div class="paper-danger-head">Delete account</div>
|
||||
<p class="paper-danger-copy">
|
||||
|
||||
+29
-12
@@ -1,13 +1,30 @@
|
||||
<div class="container page paper-page">
|
||||
<h1 class="paper-page-title">Connect to <em>GitHub</em></h1>
|
||||
<p>Sign in to manage your anonymizations. Both connections use the same Anonymous GitHub account.</p>
|
||||
<p class="alert alert-warning" role="note" v-if="site_options?.GITHUB_APP_ENABLED && site_options?.GITHUB_OAUTH_ENABLED">
|
||||
If you already have an Anonymous GitHub account, sign in with
|
||||
<a class="alert-link" target="_self" href="/github/login">legacy GitHub OAuth</a>
|
||||
to keep access to your existing anonymizations. You can connect the read-only GitHub App from GitHub connections after signing in.
|
||||
</p>
|
||||
<p v-if="site_options?.GITHUB_APP_ENABLED"><a class="btn btn-ink" target="_self" href="/github/app/login">Continue with read-only GitHub App</a></p>
|
||||
<p v-if="site_options?.GITHUB_APP_ENABLED">Choose which repositories to allow after signing in. Private repositories are accessed with read-only permissions.</p>
|
||||
<p v-if="site_options?.GITHUB_OAUTH_ENABLED"><a class="btn" target="_self" href="/github/login">Continue with legacy GitHub OAuth</a></p>
|
||||
<p v-if="site_options?.GITHUB_OAUTH_ENABLED">OAuth supports existing connections and gists. GitHub's private repository OAuth scope includes write access.</p>
|
||||
<div class="container paper-page auth-page">
|
||||
<a class="auth-back" href="/"><i class="fas fa-arrow-left" aria-hidden="true"></i> Anonymous GitHub</a>
|
||||
<div class="auth-layout">
|
||||
<header class="auth-intro">
|
||||
<div class="paper-eyebrow">Your research, ready for review</div>
|
||||
<h1 class="paper-page-title"><span class="auth-title-desktop">Your code.<br>Your identity,<br><em>protected.</em></span><span class="auth-title-mobile">Sign in to <em>GitHub</em></span></h1>
|
||||
<p class="paper-page-lede">Sign in to create and manage your anonymizations.</p>
|
||||
</header>
|
||||
<div class="auth-options">
|
||||
<p class="auth-existing" role="note" v-if="site_options?.GITHUB_APP_ENABLED && site_options?.GITHUB_OAUTH_ENABLED">Already have an account? Sign in with <a target="_self" href="/github/login">legacy GitHub OAuth</a> to keep access to your anonymizations. You can connect the read-only App from GitHub connections after signing in.</p>
|
||||
<section v-if="site_options?.GITHUB_APP_ENABLED">
|
||||
<div class="connection-top"><i class="fab fa-github" aria-hidden="true"></i><span class="connection-badge">Read-only access</span></div>
|
||||
<h2>Continue with GitHub</h2>
|
||||
<p>Connect through the GitHub App with read-only repository access.</p>
|
||||
<ul class="auth-permissions">
|
||||
<li><i class="fas fa-check" aria-hidden="true"></i> You choose which repositories to share</li>
|
||||
<li><i class="fas fa-check" aria-hidden="true"></i> No permission to write to your code</li>
|
||||
</ul>
|
||||
<a class="btn btn-ink auth-continue" target="_self" href="/github/app/login">Sign in with GitHub <i class="fas fa-arrow-right" aria-hidden="true"></i></a>
|
||||
<small>Select your repositories after signing in.</small>
|
||||
</section>
|
||||
<section class="auth-legacy" v-if="site_options?.GITHUB_OAUTH_ENABLED">
|
||||
<div class="connection-title"><h2>Legacy OAuth</h2><span class="connection-badge connection-badge-muted">For gists & existing accounts</span></div>
|
||||
<p>Use this connection for gists or your existing OAuth setup. GitHub's private repository scope includes write access.</p>
|
||||
<a class="connection-link" target="_self" href="/github/login">Continue with OAuth <i class="fas fa-arrow-right" aria-hidden="true"></i></a>
|
||||
</section>
|
||||
<p role="status" v-if="site_options && !site_options.GITHUB_APP_ENABLED && !site_options.GITHUB_OAUTH_ENABLED">GitHub sign-in is currently unavailable. Please try again later.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
Vendored
+13
-13
@@ -1,29 +1,29 @@
|
||||
"use strict";(()=>{var Ul=Object.defineProperty;var zl=(e,t)=>{for(var o in t)Ul(e,o,{get:t[o],enumerable:!0})};var ye={notebook:"/script/notebook.8844e2735f.min.js",editor:"/script/editor.e243722d87.min.js",pdf:"/script/pdf.eaa7573247.min.js",markdown:"/script/markdown.ad7b1d71c3.min.js",org:"/script/org.f4e2a3f59f.min.js"};var rn=new Map,Bl=ye;function Wt(e){if(!rn.has(e)){let t=document.createElement("script");t.src=Bl[e];let o=new Promise((r,n)=>{t.onload=r,t.onerror=()=>{rn.delete(e),t.remove(),n(new Error(`Unable to load ${e}. Please retry.`))}});rn.set(e,o),document.head.appendChild(t)}return rn.get(e)}async function tr(){await Wt("editor"),ace.config.set("basePath","/script/external/ace/")}function ds(e){let t=Object.create(null);for(let o of e.split(","))t[o]=1;return o=>o in t}var Me={},Kt=[],rt=()=>{},xn=()=>!1,us=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),cs=e=>e.startsWith("onUpdate:"),Ge=Object.assign,Ss=(e,t)=>{let o=e.indexOf(t);o>-1&&e.splice(o,1)},Gl=Object.prototype.hasOwnProperty,Te=(e,t)=>Gl.call(e,t),_e=Array.isArray,Pt=e=>Ds(e)==="[object Map]",ls=e=>Ds(e)==="[object Set]",sr=e=>Ds(e)==="[object Date]";var ke=e=>typeof e=="function",Ue=e=>typeof e=="string",ct=e=>typeof e=="symbol",Ae=e=>e!==null&&typeof e=="object",Xn=e=>(Ae(e)||ke(e))&&ke(e.then)&&ke(e.catch),rr=Object.prototype.toString,Ds=e=>rr.call(e),Zn=e=>Ds(e).slice(8,-1),an=e=>Ds(e)==="[object Object]",ln=e=>Ue(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,ps=ds(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted");var dn=e=>{let t=Object.create(null);return(o=>t[o]||(t[o]=e(o)))},jl=/-\w/g,Ke=dn(e=>e.replace(jl,t=>t.slice(1).toUpperCase())),Wl=/\B([A-Z])/g,qt=dn(e=>e.replace(Wl,"-$1").toLowerCase()),Yt=dn(e=>e.charAt(0).toUpperCase()+e.slice(1)),Rs=dn(e=>e?`on${Yt(e)}`:""),ht=(e,t)=>!Object.is(e,t),Ts=(e,...t)=>{for(let o=0;o<e.length;o++)e[o](...t)},un=(e,t,o,r=!1)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:r,value:o})},eo=e=>{let t=parseFloat(e);return isNaN(t)?e:t};var nr,Os=()=>nr||(nr=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function Ve(e){if(_e(e)){let t={};for(let o=0;o<e.length;o++){let r=e[o],n=Ue(r)?Ql(r):Ve(r);if(n)for(let i in n)t[i]=n[i]}return t}else if(Ue(e)||Ae(e))return e}var Kl=/;(?![^(]*\))/g,Yl=/:([^]+)/,Jl=/\/\*[^]*?\*\//g;function Ql(e){let t={};return e.replace(Jl,"").split(Kl).forEach(o=>{if(o){let r=o.split(Yl);r.length>1&&(t[r[0].trim()]=r[1].trim())}}),t}function O(e){let t="";if(Ue(e))t=e;else if(_e(e))for(let o=0;o<e.length;o++){let r=O(e[o]);r&&(t+=r+" ")}else if(Ae(e))for(let o in e)e[o]&&(t+=o+" ");return t.trim()}var ir="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",ar=ds(ir),xl=ds(ir+",async,autofocus,autoplay,controls,default,defer,disabled,inert,loop,open,required,reversed,scoped,seamless,checked,muted,multiple,selected");function cn(e){return!!e||e===""}function Xl(e,t){if(e.length!==t.length)return!1;let o=!0;for(let r=0;o&&r<e.length;r++)o=fs(e[r],t[r]);return o}function or(e,t){if(e.size!==t.size)return!1;let o=Array.from(t),r=new Uint8Array(o.length);for(let n of e){let i=-1;for(let a=0;a<o.length;a++)if(!r[a]&&fs(n,o[a])){i=a;break}if(i<0)return!1;r[i]=1}return!0}function fs(e,t){if(e===t)return!0;let o=sr(e),r=sr(t);if(o||r)return o&&r?e.getTime()===t.getTime():!1;if(o=ct(e),r=ct(t),o||r)return e===t;if(o=_e(e),r=_e(t),o||r)return o&&r?Xl(e,t):!1;if(o=Ae(e),r=Ae(t),o||r){if(!o||!r)return!1;if(o=Pt(e),r=Pt(t),o||r||(o=ls(e),r=ls(t),o||r))return o&&r?or(e,t):!1;let n=Object.keys(e).length,i=Object.keys(t).length;if(n!==i)return!1;for(let a in e){let u=e.hasOwnProperty(a),p=t.hasOwnProperty(a);if(u&&!p||!u&&p||!fs(e[a],t[a]))return!1}}return String(e)===String(t)}var lr=e=>!!(e&&e.__v_isRef===!0),c=e=>Ue(e)?e:e==null?"":_e(e)||Ae(e)&&(e.toString===rr||!ke(e.toString))?lr(e)?c(e.value):JSON.stringify(e,dr,2):String(e),dr=(e,t)=>lr(t)?dr(e,t.value):Pt(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((o,[r,n],i)=>(o[Qn(r,i)+" =>"]=n,o),{})}:ls(t)?{[`Set(${t.size})`]:[...t.values()].map(o=>Qn(o))}:ct(t)?Qn(t):Ae(t)&&!_e(t)&&!an(t)?String(t):t,Qn=(e,t="")=>{var o;return ct(e)?`Symbol(${(o=e.description)!=null?o:t})`:e};function Zl(e,...t){console.warn(`[Vue warn] ${e}`,...t)}var Ye,Ps=class{constructor(t=!1){this.detached=t,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this._warnOnRun=!0,this.__v_skip=!0,!t&&Ye&&(Ye.active?(this.parent=Ye,this.index=(Ye.scopes||(Ye.scopes=[])).push(this)-1):(this._active=!1,this._warnOnRun=!1))}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let t,o;if(this.scopes){let r=this.scopes.slice();for(t=0,o=r.length;t<o;t++)r[t].pause()}for(t=0,o=this.effects.length;t<o;t++)this.effects[t].pause()}}resume(){if(this._active&&this._isPaused){this._isPaused=!Line truncated
|
||||
"use strict";(()=>{var Ul=Object.defineProperty;var zl=(e,t)=>{for(var o in t)Ul(e,o,{get:t[o],enumerable:!0})};var ye={org:"/script/org.f4e2a3f59f.min.js",editor:"/script/editor.e243722d87.min.js",pdf:"/script/pdf.eaa7573247.min.js",notebook:"/script/notebook.8844e2735f.min.js",markdown:"/script/markdown.ad7b1d71c3.min.js"};var rn=new Map,Bl=ye;function Wt(e){if(!rn.has(e)){let t=document.createElement("script");t.src=Bl[e];let o=new Promise((r,n)=>{t.onload=r,t.onerror=()=>{rn.delete(e),t.remove(),n(new Error(`Unable to load ${e}. Please retry.`))}});rn.set(e,o),document.head.appendChild(t)}return rn.get(e)}async function tr(){await Wt("editor"),ace.config.set("basePath","/script/external/ace/")}function ds(e){let t=Object.create(null);for(let o of e.split(","))t[o]=1;return o=>o in t}var Me={},Kt=[],rt=()=>{},Xn=()=>!1,us=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),cs=e=>e.startsWith("onUpdate:"),Ge=Object.assign,Ss=(e,t)=>{let o=e.indexOf(t);o>-1&&e.splice(o,1)},Gl=Object.prototype.hasOwnProperty,Te=(e,t)=>Gl.call(e,t),Ee=Array.isArray,Pt=e=>Ds(e)==="[object Map]",ls=e=>Ds(e)==="[object Set]",sr=e=>Ds(e)==="[object Date]";var _e=e=>typeof e=="function",Ue=e=>typeof e=="string",ct=e=>typeof e=="symbol",Ae=e=>e!==null&&typeof e=="object",xn=e=>(Ae(e)||_e(e))&&_e(e.then)&&_e(e.catch),rr=Object.prototype.toString,Ds=e=>rr.call(e),Zn=e=>Ds(e).slice(8,-1),an=e=>Ds(e)==="[object Object]",ln=e=>Ue(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,ps=ds(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted");var dn=e=>{let t=Object.create(null);return(o=>t[o]||(t[o]=e(o)))},jl=/-\w/g,Ke=dn(e=>e.replace(jl,t=>t.slice(1).toUpperCase())),Wl=/\B([A-Z])/g,qt=dn(e=>e.replace(Wl,"-$1").toLowerCase()),Yt=dn(e=>e.charAt(0).toUpperCase()+e.slice(1)),Rs=dn(e=>e?`on${Yt(e)}`:""),ht=(e,t)=>!Object.is(e,t),Ts=(e,...t)=>{for(let o=0;o<e.length;o++)e[o](...t)},un=(e,t,o,r=!1)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:r,value:o})},eo=e=>{let t=parseFloat(e);return isNaN(t)?e:t};var nr,Os=()=>nr||(nr=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function Ve(e){if(Ee(e)){let t={};for(let o=0;o<e.length;o++){let r=e[o],n=Ue(r)?Ql(r):Ve(r);if(n)for(let i in n)t[i]=n[i]}return t}else if(Ue(e)||Ae(e))return e}var Kl=/;(?![^(]*\))/g,Yl=/:([^]+)/,Jl=/\/\*[^]*?\*\//g;function Ql(e){let t={};return e.replace(Jl,"").split(Kl).forEach(o=>{if(o){let r=o.split(Yl);r.length>1&&(t[r[0].trim()]=r[1].trim())}}),t}function O(e){let t="";if(Ue(e))t=e;else if(Ee(e))for(let o=0;o<e.length;o++){let r=O(e[o]);r&&(t+=r+" ")}else if(Ae(e))for(let o in e)e[o]&&(t+=o+" ");return t.trim()}var ir="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",ar=ds(ir),Xl=ds(ir+",async,autofocus,autoplay,controls,default,defer,disabled,inert,loop,open,required,reversed,scoped,seamless,checked,muted,multiple,selected");function cn(e){return!!e||e===""}function xl(e,t){if(e.length!==t.length)return!1;let o=!0;for(let r=0;o&&r<e.length;r++)o=fs(e[r],t[r]);return o}function or(e,t){if(e.size!==t.size)return!1;let o=Array.from(t),r=new Uint8Array(o.length);for(let n of e){let i=-1;for(let a=0;a<o.length;a++)if(!r[a]&&fs(n,o[a])){i=a;break}if(i<0)return!1;r[i]=1}return!0}function fs(e,t){if(e===t)return!0;let o=sr(e),r=sr(t);if(o||r)return o&&r?e.getTime()===t.getTime():!1;if(o=ct(e),r=ct(t),o||r)return e===t;if(o=Ee(e),r=Ee(t),o||r)return o&&r?xl(e,t):!1;if(o=Ae(e),r=Ae(t),o||r){if(!o||!r)return!1;if(o=Pt(e),r=Pt(t),o||r||(o=ls(e),r=ls(t),o||r))return o&&r?or(e,t):!1;let n=Object.keys(e).length,i=Object.keys(t).length;if(n!==i)return!1;for(let a in e){let u=e.hasOwnProperty(a),p=t.hasOwnProperty(a);if(u&&!p||!u&&p||!fs(e[a],t[a]))return!1}}return String(e)===String(t)}var lr=e=>!!(e&&e.__v_isRef===!0),c=e=>Ue(e)?e:e==null?"":Ee(e)||Ae(e)&&(e.toString===rr||!_e(e.toString))?lr(e)?c(e.value):JSON.stringify(e,dr,2):String(e),dr=(e,t)=>lr(t)?dr(e,t.value):Pt(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((o,[r,n],i)=>(o[Qn(r,i)+" =>"]=n,o),{})}:ls(t)?{[`Set(${t.size})`]:[...t.values()].map(o=>Qn(o))}:ct(t)?Qn(t):Ae(t)&&!Ee(t)&&!an(t)?String(t):t,Qn=(e,t="")=>{var o;return ct(e)?`Symbol(${(o=e.description)!=null?o:t})`:e};function Zl(e,...t){console.warn(`[Vue warn] ${e}`,...t)}var Ye,Ps=class{constructor(t=!1){this.detached=t,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this._warnOnRun=!0,this.__v_skip=!0,!t&&Ye&&(Ye.active?(this.parent=Ye,this.index=(Ye.scopes||(Ye.scopes=[])).push(this)-1):(this._active=!1,this._warnOnRun=!1))}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let t,o;if(this.scopes){let r=this.scopes.slice();for(t=0,o=r.length;t<o;t++)r[t].pause()}for(t=0,o=this.effects.length;t<o;t++)this.effects[t].pause()}}resume(){if(this._active&&this._isPaused){this._isPaused=!Line truncated
|
||||
${JSON.stringify(e)}${t?`
|
||||
while being at
|
||||
`+JSON.stringify(t):""}`},[Be.NAVIGATION_GUARD_REDIRECT]({from:e,to:t}){return`Redirected from "${e.fullPath}" to "${hc(t)}" via a navigation guard.`},[Be.NAVIGATION_ABORTED]({from:e,to:t}){return`Navigation aborted from "${e.fullPath}" to "${t.fullPath}" via a navigation guard.`},[Be.NAVIGATION_CANCELLED]({from:e,to:t}){return`Navigation cancelled from "${e.fullPath}" to "${t.fullPath}" with a new navigation.`},[Be.NAVIGATION_DUPLICATED]({from:e,to:t}){return`Avoided redundant navigation to current location: "${e.fullPath}".`}};function os(e,t){return Pe(new Error,{type:e,[na]:!0},t)}function Vt(e,t){return e instanceof Error&&na in e&&(t==null||!!(e.type&t))}var mc=["params","query","hash"];function hc(e){if(typeof e=="string")return e;if(e.path!=null)return e.path;let t={};for(let o of mc)o in e&&(t[o]=e[o]);return JSON.stringify(t,null,2)}function oa(e){let t={};if(e===""||e==="?")return t;let o=(e[0]==="?"?e.slice(1):e).split("&");for(let r=0;r<o.length;++r){let n=o[r].replace(Gi," "),i=n.indexOf("="),a=_s(i<0?n:n.slice(0,i)),u=i<0?null:_s(n.slice(i+1));if(a in t){let p=t[a];gt(p)||(p=t[a]=[p]),p.push(u)}else t[a]=u}return t}function Go(e){let t="";for(let o in e){let r=e[o];if(o=rc(o),r==null){r!==void 0&&(t+=(t.length?"&":"")+o);continue}(gt(r)?r.map(n=>n&&Mo(n)):[r&&Mo(r)]).forEach(n=>{n!==void 0&&(t+=(t.length?"&":"")+o,n!=null&&(t+="="+n))})}return t}function ra(e){let t={};for(let o in e){let r=e[o];r!==void 0&&(t[o]=gt(r)?r.map(n=>n==null?null:""+n):r==null?r:""+r)}return t}var ia=Symbol(""),jo=Symbol(""),Gn=Symbol(""),jn=Symbol(""),Wn=Symbol("");function Cs(){let e=[];function t(r){return e.push(r),()=>{let n=e.indexOf(r);n>-1&&e.splice(n,1)}}function o(){e=[]}return{add:t,list:()=>e.slice(),reset:o}}function Bt(e,t,o,r,n,i=a=>a()){let a=r&&(r.enterCallbacks[n]=r.enterCallbacks[n]||[]);return()=>new Promise((u,p)=>{let h=f=>{f===!1?p(os(Be.NAVIGATION_ABORTED,{from:o,to:t})):f instanceof Error?p(f):fc(f)?p(os(Be.NAVIGATION_GUARD_REDIRECT,{from:t,to:f})):(a&&r.enterCallbacks[n]===a&&typeof f=="function"&&a.push(f),u())},v=i(()=>e.call(r&&r.instances[n],t,o,h)),g=Promise.resolve(v);e.length<3&&(g=g.then(h)),g.catch(f=>p(f))})}function Kn(e,t,o,r,n=i=>i()){let i=[];for(let a of e)for(let u in a.components){let p=a.components[u];if(!(t!=="beforeRouteEnter"&&!a.instances[u]))if(Hi(p)){let h=(p.__vccOpts||p)[t];h&&i.push(Bt(h,o,r,a,u,n))}else{let h=p();i.push(()=>h.then(v=>{if(!v)throw new Error(`Couldn't resolve component "${u}" at "${a.path}"`);let g=Ju(v)?v.default:v;a.mods[u]=v,a.components[u]=g;let f=(g.__vccOpts||g)[t];return f&&Bt(f,o,r,a,u,n)()}))}}return i}function aa(e,t){let o=[],r=[],n=[],i=Math.max(t.matched.length,e.matched.length);for(let a=0;a<i;a++){let u=t.matched[a];u&&(e.matched.find(h=>ns(h,u))?r.push(u):o.push(u));let p=e.matched[a];p&&(t.matched.find(h=>ns(h,p))||n.push(p))}return[o,r,n]}var vc=()=>location.protocol+"//"+location.host;function ga(e,t){let{pathname:o,search:r,hash:n}=t,i=e.indexOf("#");if(i>-1){let a=n.includes(e.slice(i))?e.slice(i).length:1,u=n.slice(a);return u[0]!=="/"&&(u="/"+u),Uo(u,"")}return Uo(o,e)+r+n}function yc(e,t,o,r){let n=[],i=[],a=null,u=({state:f})=>{let w=ga(e,location),k=o.value,b=t.value,T=0;if(f){if(o.value=w,t.value=f,a&&a===k){a=null;return}T=b?f.position-b.position:0}else r(w);n.forEach(N=>{N(o.value,k,{delta:T,type:Hn.pop,direction:T?T>0?Bn.forward:Bn.back:Bn.unknown})})};function p(){a=o.value}function h(f){n.push(f);let w=()=>{let k=n.indexOf(f);k>-1&&n.splice(k,1)};return i.push(w),w}function v(){if(document.visibilityState==="hidden"){let{history:f}=window;if(!f.state)return;f.replaceState(Pe({},f.state,{scroll:on()}),"")}}function g(){for(let f of i)f();i=[],window.removeEventListener("popstate",u),window.removeEventListener("pagehide",v),document.removeEventListener("visibilitychange",v)}return window.addEventListener("popstate",u),window.addEventListener("pagehide",v),document.addEventListener("visibilitychange",v),{pauseListeners:p,listen:h,destroy:g}}function la(e,t,o,r=!1,n=!1){return{back:e,current:t,forward:o,replaced:r,position:window.history.length,scroll:n?on():null}}function gc(e){let{history:t,location:o}=window,r={value:ga(e,o)},n={value:t.state};n.value||i(r.value,{back:null,current:r.value,forward:null,position:t.length-1,replaced:!0,scroll:null},!0);function i(p,h,v){let g=e.indexOf("#"),f=g>-1?(o.host&&document.querySelector("base")?e:e.slice(g))+p:vc()+e+p;try{t[v?"replaceState":"pushState"](h,"",f),n.value=h}catch(w){console.error(w),o[v?"replace":"assign"](f)}}function a(p,h){i(p,Pe({},t.state,la(n.value.back,p,n.value.forward,!0),h,{position:n.value.position}),!0),r.value=p}function u(p,h){let v=Pe({},n.value,t.state,{forward:p,scroll:on()});i(v.current,v,!0),i(p,Pe({},la(r.value,p,null),{position:v.position+1},h),!1),r.value=p}return{location:r,state:n,push:u,replace:a}}function ba(e){e=Xi(e);let t=gc(e),o=yc(e,t.state,t.location,t.replace);function r(i,a=!0){a||o.pauseListeners(),history.go(i)}let n=Pe({locatLine truncated
|
||||
`+JSON.stringify(t):""}`},[Be.NAVIGATION_GUARD_REDIRECT]({from:e,to:t}){return`Redirected from "${e.fullPath}" to "${hc(t)}" via a navigation guard.`},[Be.NAVIGATION_ABORTED]({from:e,to:t}){return`Navigation aborted from "${e.fullPath}" to "${t.fullPath}" via a navigation guard.`},[Be.NAVIGATION_CANCELLED]({from:e,to:t}){return`Navigation cancelled from "${e.fullPath}" to "${t.fullPath}" with a new navigation.`},[Be.NAVIGATION_DUPLICATED]({from:e,to:t}){return`Avoided redundant navigation to current location: "${e.fullPath}".`}};function os(e,t){return Pe(new Error,{type:e,[na]:!0},t)}function Vt(e,t){return e instanceof Error&&na in e&&(t==null||!!(e.type&t))}var mc=["params","query","hash"];function hc(e){if(typeof e=="string")return e;if(e.path!=null)return e.path;let t={};for(let o of mc)o in e&&(t[o]=e[o]);return JSON.stringify(t,null,2)}function oa(e){let t={};if(e===""||e==="?")return t;let o=(e[0]==="?"?e.slice(1):e).split("&");for(let r=0;r<o.length;++r){let n=o[r].replace(Gi," "),i=n.indexOf("="),a=_s(i<0?n:n.slice(0,i)),u=i<0?null:_s(n.slice(i+1));if(a in t){let p=t[a];gt(p)||(p=t[a]=[p]),p.push(u)}else t[a]=u}return t}function Go(e){let t="";for(let o in e){let r=e[o];if(o=rc(o),r==null){r!==void 0&&(t+=(t.length?"&":"")+o);continue}(gt(r)?r.map(n=>n&&Mo(n)):[r&&Mo(r)]).forEach(n=>{n!==void 0&&(t+=(t.length?"&":"")+o,n!=null&&(t+="="+n))})}return t}function ra(e){let t={};for(let o in e){let r=e[o];r!==void 0&&(t[o]=gt(r)?r.map(n=>n==null?null:""+n):r==null?r:""+r)}return t}var ia=Symbol(""),jo=Symbol(""),Gn=Symbol(""),jn=Symbol(""),Wn=Symbol("");function Cs(){let e=[];function t(r){return e.push(r),()=>{let n=e.indexOf(r);n>-1&&e.splice(n,1)}}function o(){e=[]}return{add:t,list:()=>e.slice(),reset:o}}function Bt(e,t,o,r,n,i=a=>a()){let a=r&&(r.enterCallbacks[n]=r.enterCallbacks[n]||[]);return()=>new Promise((u,p)=>{let h=f=>{f===!1?p(os(Be.NAVIGATION_ABORTED,{from:o,to:t})):f instanceof Error?p(f):fc(f)?p(os(Be.NAVIGATION_GUARD_REDIRECT,{from:t,to:f})):(a&&r.enterCallbacks[n]===a&&typeof f=="function"&&a.push(f),u())},v=i(()=>e.call(r&&r.instances[n],t,o,h)),g=Promise.resolve(v);e.length<3&&(g=g.then(h)),g.catch(f=>p(f))})}function Kn(e,t,o,r,n=i=>i()){let i=[];for(let a of e)for(let u in a.components){let p=a.components[u];if(!(t!=="beforeRouteEnter"&&!a.instances[u]))if(Hi(p)){let h=(p.__vccOpts||p)[t];h&&i.push(Bt(h,o,r,a,u,n))}else{let h=p();i.push(()=>h.then(v=>{if(!v)throw new Error(`Couldn't resolve component "${u}" at "${a.path}"`);let g=Ju(v)?v.default:v;a.mods[u]=v,a.components[u]=g;let f=(g.__vccOpts||g)[t];return f&&Bt(f,o,r,a,u,n)()}))}}return i}function aa(e,t){let o=[],r=[],n=[],i=Math.max(t.matched.length,e.matched.length);for(let a=0;a<i;a++){let u=t.matched[a];u&&(e.matched.find(h=>ns(h,u))?r.push(u):o.push(u));let p=e.matched[a];p&&(t.matched.find(h=>ns(h,p))||n.push(p))}return[o,r,n]}var vc=()=>location.protocol+"//"+location.host;function ga(e,t){let{pathname:o,search:r,hash:n}=t,i=e.indexOf("#");if(i>-1){let a=n.includes(e.slice(i))?e.slice(i).length:1,u=n.slice(a);return u[0]!=="/"&&(u="/"+u),Uo(u,"")}return Uo(o,e)+r+n}function yc(e,t,o,r){let n=[],i=[],a=null,u=({state:f})=>{let w=ga(e,location),k=o.value,b=t.value,T=0;if(f){if(o.value=w,t.value=f,a&&a===k){a=null;return}T=b?f.position-b.position:0}else r(w);n.forEach(N=>{N(o.value,k,{delta:T,type:Hn.pop,direction:T?T>0?Bn.forward:Bn.back:Bn.unknown})})};function p(){a=o.value}function h(f){n.push(f);let w=()=>{let k=n.indexOf(f);k>-1&&n.splice(k,1)};return i.push(w),w}function v(){if(document.visibilityState==="hidden"){let{history:f}=window;if(!f.state)return;f.replaceState(Pe({},f.state,{scroll:on()}),"")}}function g(){for(let f of i)f();i=[],window.removeEventListener("popstate",u),window.removeEventListener("pagehide",v),document.removeEventListener("visibilitychange",v)}return window.addEventListener("popstate",u),window.addEventListener("pagehide",v),document.addEventListener("visibilitychange",v),{pauseListeners:p,listen:h,destroy:g}}function la(e,t,o,r=!1,n=!1){return{back:e,current:t,forward:o,replaced:r,position:window.history.length,scroll:n?on():null}}function gc(e){let{history:t,location:o}=window,r={value:ga(e,o)},n={value:t.state};n.value||i(r.value,{back:null,current:r.value,forward:null,position:t.length-1,replaced:!0,scroll:null},!0);function i(p,h,v){let g=e.indexOf("#"),f=g>-1?(o.host&&document.querySelector("base")?e:e.slice(g))+p:vc()+e+p;try{t[v?"replaceState":"pushState"](h,"",f),n.value=h}catch(w){console.error(w),o[v?"replace":"assign"](f)}}function a(p,h){i(p,Pe({},t.state,la(n.value.back,p,n.value.forward,!0),h,{position:n.value.position}),!0),r.value=p}function u(p,h){let v=Pe({},n.value,t.state,{forward:p,scroll:on()});i(v.current,v,!0),i(p,Pe({},la(r.value,p,null),{position:v.position+1},h),!1),r.value=p}return{location:r,state:n,push:u,replace:a}}function ba(e){e=xi(e);let t=gc(e),o=yc(e,t.state,t.location,t.replace);function r(i,a=!0){a||o.pauseListeners(),history.go(i)}let n=Pe({locatLine truncated
|
||||
`)),e.options=Object.assign({},e.options,p.options)})}i();let a=null;e.saveDefault=u=>{u&&u.preventDefault&&u.preventDefault();let p={terms:e.terms.split(`
|
||||
`).map(h=>h.trim()).filter(h=>h.length>0),options:e.options};e.saving=!0,e.error=null,t.post("/api/user/default",p).then(()=>{i(),e.saving=!1,e.message="Saved",a&&r.cancel(a),a=r(()=>{e.message=null},2500)},h=>{e.saving=!1;let v=h&&h.data&&h.data.error;o("ERRORS."+v).then(g=>{e.error=g},()=>{e.error="Unable to save your defaults. Please try again."})})},e.deleteAccount=()=>{confirm("Delete your account? All your anonymized repositories, gists, and pull requests will be removed, and your personal data will be erased. This cannot be undone.")&&(e.deletingAccount=!0,t.delete("/api/user").then(()=>{window.location.href="/"},()=>{e.deletingAccount=!1,e.deleteError="Unable to delete the account. Please try again."}))}},Ra=function(e,t,o){e.repoId=null,e.repoUrl=null,e.claim=()=>{t.post("/api/repo/claim",{repoId:e.repoId,repoUrl:e.repoUrl}).then(r=>{o.url("/dashboard")},r=>{e.error=r.data,e.claimForm.repoUrl.setValidity("not_found",!1),e.claimForm.repoId.setValidity("not_found",!1)})}},Ta=function(e,t,o,r,n){e.user&&!e.user.status&&o.url("/dashboard"),e.watch("user.status",()=>{e.user&&!e.user.status&&o.url("/dashboard")}),e.features=[{key:"anonymize",num:"01",eyebrow:"Anonymize",title:"Double-anonymous,",accent:"your rules.",text:"Choose what reviewers may see: links, images, PDFs, notebooks, GitHub Pages. Add your own terms, with regex if you need it, and pick the expiration date.",cta:"Start an anonymization",href:"/anonymize",url:"anonymous.4open.science/anonymize",img:"/imgs/anonymize.png",alt:"The anonymize form: source repository, terms to redact, options and a live README preview"},{key:"review",num:"02",eyebrow:"Review",title:"Reviewers browse",accent:"the real thing.",text:"Highlighted source code, rendered PDFs, images, and notebooks, in a familiar file explorer. GitHub Pages is also supported.",cta:"Open the example",href:"https://anonymous.4open.science/r/840c8c57-3c32-451e-bf12-0e20be300389/",target:"_self",url:"anonymous.4open.science/r/840c8c57-\u2026",img:"/imgs/explorer.png",alt:"The repository explorer with a file tree and a rendered README"},{key:"manage",num:"03",eyebrow:"Manage",title:"One dashboard,",accent:"until the decision.",text:"Monitor views, edit configuration, remove or update your repository. Program chairs can group submissions under a conference with one shared expiry.",cta:"Open the dashboard",href:"/dashboard",needsUser:!0,url:"anonymous.4open.science/dashboard",img:"/imgs/dashboard.png",alt:"The dashboard listing anonymized repositories with status, views and expiry"}],e.feature=e.features[0].key,e.selectFeature=function(u){e.feature=u},e.featureHref=function(u){return u.needsUser&&!e.user?"/github/login":u.href},e.featureTarget=function(u){return u.needsUser&&!e.user?"_self":u.target||void 0},e.featureKeydown=function(u,p){let h={ArrowDown:1,ArrowRight:1,ArrowUp:-1,ArrowLeft:-1,Home:"first",End:"last"}[u.key];if(h===void 0)return;u.preventDefault();let v=e.features.length,g=h==="first"?0:h==="last"?v-1:(p+h+v)%v;e.feature=e.features[g].key,n(()=>{let f=r.document.getElementById("feature-tab-"+e.feature);f&&f.focus()})},e.cards=[{key:"repositories",total:0,label:"repositories anonymized"},{key:"users",total:0,label:"researchers"},{key:"pageViews",total:0,label:"page views"},{key:"pullRequests",total:0,label:"pull requests"}];function i(){t.get("/api/stat/").then(u=>{e.stat=u.data,e.cards[0].total=u.data.nbRepositories,e.cards[1].total=u.data.nbUsers,e.cards[2].total=u.data.nbPageViews,e.cards[3].total=u.data.nbPullRequests})}i();function a(u){let p={series:u,bars:[],viewW:100,deltaToday:0,pctChange:0,pctAbs:0,isUp:!0};if(!u||u.length<2)return p;let h=new Array(u.length-1);for(let b=1;b<u.length;b++)h[b-1]=u[b]-u[b-1];let v=h.length,g=Math.max.apply(null,h),f=Math.min.apply(null,h),w=Math.min(0,f),k=g-w||1;p.viewW=v*2,p.bars=new Array(v);for(let b=0;b<v;b++){let T=(h[b]-w)/k,N=Math.max(1.5,T*34);p.bars[b]={x:(b*2+.25).toFixed(2),y:(36-N).toFixed(2),w:"1.5",h:N.toFixed(2)}}if(p.deltaToday=h[v-1],v>=2){let b=h[v-2];b&&(p.pctChange=(p.deltaToday-b)/b*100)}return p.pctAbs=Math.round(Math.abs(p.pctChange)),p.isUp=p.pctChange>=0,p}e.history={repositories:a([]),users:a([]),pageViews:a([]),pullRequests:a([])},t.get("/api/stat/history?days=60").then(u=>{let p=u.data||[];e.history={repositories:a(p.map(h=>h.nbRepositories||0)),users:a(p.map(h=>h.nbUsers||0)),pageViews:a(p.map(h=>h.nbPageViews||0)),pullRequests:a(p.map(h=>h.nbPullRequests||0))}})},Oa=function(e,t,o,r,n,i){let a=mt();e.on("routeLeave",function(){$('[data-toggle="tooltip"]').tooltip("dispose")}),e.watch("user.status",()=>{e.user==null&&o.url("/")}),e.user==null&&o.url("/"),a.timeout(()=>{$('[data-toggle="tooltip"]').tooltip()},250),e.items=[],e.search="",e.loading=!0,e.statusKeyLabels={ready:"Ready",progress:"In progress",error:"Error",expired:"Expired",removed:"Removed"};let u=["queue","download","downloaded","preparing","anonymizing"];function p(C){return C==="ready"||C==="error"?C:C==="expired"||C==="expiring"?"expired"
Line truncated
|
||||
`).map(h=>h.trim()).filter(h=>h.length>0),options:e.options};e.saving=!0,e.error=null,t.post("/api/user/default",p).then(()=>{i(),e.saving=!1,e.message="Saved",a&&r.cancel(a),a=r(()=>{e.message=null},2500)},h=>{e.saving=!1;let v=h&&h.data&&h.data.error;o("ERRORS."+v).then(g=>{e.error=g},()=>{e.error="Unable to save your defaults. Please try again."})})},e.deleteAccount=()=>{confirm("Delete your account? All your anonymized repositories, gists, and pull requests will be removed, and your personal data will be erased. This cannot be undone.")&&(e.deletingAccount=!0,t.delete("/api/user").then(()=>{window.location.href="/"},()=>{e.deletingAccount=!1,e.deleteError="Unable to delete the account. Please try again."}))}},Ra=function(e,t,o){e.repoId=null,e.repoUrl=null,e.claim=()=>{t.post("/api/repo/claim",{repoId:e.repoId,repoUrl:e.repoUrl}).then(r=>{o.url("/dashboard")},r=>{e.error=r.data,e.claimForm.repoUrl.setValidity("not_found",!1),e.claimForm.repoId.setValidity("not_found",!1)})}},Ta=function(e,t,o,r,n){e.user&&!e.user.status&&o.url("/dashboard"),e.watch("user.status",()=>{e.user&&!e.user.status&&o.url("/dashboard")}),e.features=[{key:"anonymize",num:"01",eyebrow:"Anonymize",title:"Double-anonymous,",accent:"your rules.",text:"Choose what reviewers may see: links, images, PDFs, notebooks, GitHub Pages. Add your own terms, with regex if you need it, and pick the expiration date.",cta:"Start an anonymization",href:"/anonymize",url:"anonymous.4open.science/anonymize",img:"/imgs/anonymize.png",alt:"The anonymize form: source repository, terms to redact, options and a live README preview"},{key:"review",num:"02",eyebrow:"Review",title:"Reviewers browse",accent:"the real thing.",text:"Highlighted source code, rendered PDFs, images, and notebooks, in a familiar file explorer. GitHub Pages is also supported.",cta:"Open the example",href:"https://anonymous.4open.science/r/840c8c57-3c32-451e-bf12-0e20be300389/",target:"_self",url:"anonymous.4open.science/r/840c8c57-\u2026",img:"/imgs/explorer.png",alt:"The repository explorer with a file tree and a rendered README"},{key:"manage",num:"03",eyebrow:"Manage",title:"One dashboard,",accent:"until the decision.",text:"Monitor views, edit configuration, remove or update your repository. Program chairs can group submissions under a conference with one shared expiry.",cta:"Open the dashboard",href:"/dashboard",needsUser:!0,url:"anonymous.4open.science/dashboard",img:"/imgs/dashboard.png",alt:"The dashboard listing anonymized repositories with status, views and expiry"}],e.feature=e.features[0].key,e.selectFeature=function(u){e.feature=u},e.featureHref=function(u){return u.needsUser&&!e.user?"/github/login":u.href},e.featureTarget=function(u){return u.needsUser&&!e.user?"_self":u.target||void 0},e.featureKeydown=function(u,p){let h={ArrowDown:1,ArrowRight:1,ArrowUp:-1,ArrowLeft:-1,Home:"first",End:"last"}[u.key];if(h===void 0)return;u.preventDefault();let v=e.features.length,g=h==="first"?0:h==="last"?v-1:(p+h+v)%v;e.feature=e.features[g].key,n(()=>{let f=r.document.getElementById("feature-tab-"+e.feature);f&&f.focus()})},e.cards=[{key:"repositories",total:0,label:"repositories anonymized"},{key:"users",total:0,label:"researchers"},{key:"pageViews",total:0,label:"page views"},{key:"pullRequests",total:0,label:"pull requests"}];function i(){t.get("/api/stat/").then(u=>{e.stat=u.data,e.cards[0].total=u.data.nbRepositories,e.cards[1].total=u.data.nbUsers,e.cards[2].total=u.data.nbPageViews,e.cards[3].total=u.data.nbPullRequests})}i();function a(u){let p={series:u,bars:[],viewW:100,deltaToday:0,pctChange:0,pctAbs:0,isUp:!0};if(!u||u.length<2)return p;let h=new Array(u.length-1);for(let b=1;b<u.length;b++)h[b-1]=u[b]-u[b-1];let v=h.length,g=Math.max.apply(null,h),f=Math.min.apply(null,h),w=Math.min(0,f),k=g-w||1;p.viewW=v*2,p.bars=new Array(v);for(let b=0;b<v;b++){let T=(h[b]-w)/k,N=Math.max(1.5,T*34);p.bars[b]={x:(b*2+.25).toFixed(2),y:(36-N).toFixed(2),w:"1.5",h:N.toFixed(2)}}if(p.deltaToday=h[v-1],v>=2){let b=h[v-2];b&&(p.pctChange=(p.deltaToday-b)/b*100)}return p.pctAbs=Math.round(Math.abs(p.pctChange)),p.isUp=p.pctChange>=0,p}e.history={repositories:a([]),users:a([]),pageViews:a([]),pullRequests:a([])},t.get("/api/stat/history?days=60").then(u=>{let p=u.data||[];e.history={repositories:a(p.map(h=>h.nbRepositories||0)),users:a(p.map(h=>h.nbUsers||0)),pageViews:a(p.map(h=>h.nbPageViews||0)),pullRequests:a(p.map(h=>h.nbPullRequests||0))}})},Oa=function(e,t,o,r,n,i){let a=mt();e.on("routeLeave",function(){$('[data-toggle="tooltip"]').tooltip("dispose")}),e.watch("user.status",()=>{e.user==null&&o.url("/")}),e.user==null&&o.url("/"),a.timeout(()=>{$('[data-toggle="tooltip"]').tooltip()},250),e.items=[],e.search="",e.loading=!0,e.statusKeyLabels={ready:"Ready",progress:"In progress",error:"Error",expired:"Expired",removed:"Removed"};let u=["queue","download","downloaded","preparing","anonymizing"];function p(C){return C==="ready"||C==="error"?C:C==="expired"||C==="expiring"?"expired"
Line truncated
|
||||
`)),e.options=Object.assign({},e.options,H.options),e.options.expirationDate=H.options&&H.options.expirationDate?new Date(H.options.expirationDate):u(),R&&R()})}function g(R,V,H){e.anonymize&&e.anonymize[R]&&e.anonymize[R].setValidity(V,H)}function f(R){try{let V=parseGithubUrl(R);if(V&&V.owner&&V.repo)return V.owner+"/"+V.repo}catch{}return null}function w(){return!e.isUpdate||!e._originalRepositoryID?void 0:f(e.sourceUrl)===e._originalFullName?e._originalRepositoryID:void 0}async function k(){e._preservingDraft=!0;try{await e.urlSelected(!0)}finally{e._preservingDraft=!1}}async function b(){let R;try{R=JSON.parse(sessionStorage.getItem("github-access-draft")||"null")}catch{return!1}if(!R||R.path!==n.path()||Date.now()-R.savedAt>=30*6e4)return!1;for(let V of["sourceUrl","terms","repoId","pullRequestId","gistId","source","options","conference","githubConnection"])Object.prototype.hasOwnProperty.call(R.draft,V)&&(e[V]=R.draft[V]);return e.options.expirationDate&&(e.options.expirationDate=new Date(e.options.expirationDate)),await k(),sessionStorage.removeItem("github-access-draft"),!0}v(()=>{!r.repoId&&!r.pullRequestId&&!r.gistId&&a(b,0),r.repoId&&r.repoId!=""&&(e.isUpdate=!0,e.detectedType="repo",e.repoId=r.repoId,t.get("/api/repo/"+e.repoId).then(async R=>{e.githubConnection=R.data.connection||"oauth",e.sourceUrl="https://github.com/"+R.data.source.fullName,e._originalFullName=R.data.source.fullName,e.terms=R.data.options.terms.filter(V=>V).join(`
|
||||
`),e.source=R.data.source,e.role=R.data.role||"owner",e.coauthors=R.data.coauthors||[],e._originalBranch=R.data.source.branch,e.options=Object.assign({},e.options,R.data.options),e.conference=R.data.conference,e._originalConference=R.data.conference,e.repositoryID=R.data.source.repositoryID,e._originalRepositoryID=R.data.source.repositoryID,R.data.options.expirationDate&&(e.options.expirationDate=new Date(R.data.options.expirationDate)),!await b()&&(await Promise.all([T(),N()]),A())},()=>{n.url("/404")})),r.pullRequestId&&r.pullRequestId!=""&&(e.isUpdate=!0,e.detectedType="pr",e.pullRequestId=r.pullRequestId,t.get("/api/pr/"+e.pullRequestId).then(async R=>{if(e.githubConnection=R.data.connection||"oauth",e.sourceUrl="https://github.com/"+R.data.source.repositoryFullName+"/pull/"+R.data.source.pullRequestId,e.terms=R.data.options.terms.filter(V=>V).join(`
|
||||
`),e.source=R.data.source,e.options=Object.assign({},e.options,R.data.options),e.conference=R.data.conference,e._originalConference=R.data.conference,R.data.options.expirationDate&&(e.options.expirationDate=new Date(R.data.options.expirationDate)),!await b())try{e.details=(await t.get(`/api/pr/${R.data.source.repositoryFullName}/${R.data.source.pullRequestId}`,{params:{connection:e.githubConnection}})).data}catch(V){let H=V&&V.data&&V.data.error;H&&(i("ERRORS."+H).then(se=>{e.addToast({title:"Error",date:new Date,body:se}),e.error=se},console.error),Se(H))}},()=>{n.url("/404")})),r.gistId&&r.gistId!=""&&(e.isUpdate=!0,e.detectedType="gist",e.gistId=r.gistId,t.get("/api/gist/"+e.gistId).then(async R=>{e.sourceUrl="https://gist.github.com/"+R.data.source.gistId,e.terms=R.data.options.terms.filter(V=>V).join(`
|
||||
`),e.source=R.data.source,e.options=Object.assign({},e.options,R.data.options),e.conference=R.data.conference,e._originalConference=R.data.conference,R.data.options.expirationDate&&(e.options.expirationDate=new Date(R.data.options.expirationDate)),!await b()&&(e.details=(await t.get(`/api/gist/source/${R.data.source.gistId}`)).data)},()=>{n.url("/404")}))}),t.get("/github/connections").then(R=>{e.githubConnections=R.data}).catch(()=>{}),e.urlSelected=async(R=!1)=>{R||(e.terms=e.defaultTerms),!R&&!e.isUpdate&&(e.repoId="",e.pullRequestId="",e.gistId=""),e.details=null,e.branches=[],R||(e.source={type:"GitHubStream",branch:"",commit:""}),e.anonymize_readme="",e.readme="",e.html_readme="",e.detectedType=null;let V;try{V=parseGithubUrl(e.sourceUrl)}catch{g("sourceUrl","github",!1);return}g("sourceUrl","github",!0);try{V.gistId&&!V.repo?(e.detectedType="gist",e.source={gistId:V.gistId},await ue()):V.pullRequestId?(e.detectedType="pr",e.source={repositoryFullName:V.owner+"/"+V.repo,pullRequestId:V.pullRequestId},await q()):(e.detectedType="repo",await Promise.all([T(),N()]),A())}catch{return}$('[data-toggle="tooltip"]').tooltip()},$('[data-toggle="tooltip"]').tooltip(),e.watch("source.branch",async()=>{if(e.detectedType!=="repo")return;let R=e.branches.filter(H=>H.name==e.source.branch)[0];if(!R)return;!(e.isUpdate&&e._originalBranch===e.source.branch&&!!e.source.commit)&&!(e._preservingDraft&&e.source.commit)&&(e.source.commit=R.commit),e.readme=R.readme,await N(),A()}),e.getBranches=async R=>{let V=parseGithubUrl(e.sourceUrl);try{let H=await t.get(`/api/repo/${V.owner}/${V.repo}/branches`,{params:{anonymizedRepoId:e.isUpdate&&r.repoId&&f(e.sourceUrl)===e._originalFullName?r.repoId:void 0,connection:e.githubConnection,force:R===!0?"1":"0",repositoryID:w()}});e.branches=H.data,e.sourceUnreachable=!1,e.source.branch||(e.source.branch=e.details.defaultBranch);let se=e.branches.filter(ie=>ie.name==e.source.branch);se.length>0&&(!(!R&&e.isUpdate&&!e.options.update&&e._originalBranch===e.source.branch&&e.source.commit)&&!(e._preservingDraft&&e.source.commit)&&(e.source.commit=se[0].commit),e.readme=se[0].readme,await N(R))}catch(H){e.branches=[],e.sourceUnreachable=H&&(H.status===404||H.data&&H.data.error==="repo_not_found");let se=H&&H.data&&H.data.error||(H&&H.status===404?"repo_not_found":"unknown_error");i("ERRORS."+se).then(ie=>{e.toasts=e.toasts||[],e.addToast({title:"Error",date:new Date,body:ie}),e.error=ie},console.error),typeof g=="function"&&g("sourceUrl","missing",!1)}};async function T(){let R=parseGithubUrl(e.sourceUrl);try{le();let V=await t.get(`/api/repo/${R.owner}/${R.repo}/`,{params:{anonymizedRepoId:e.isUpdate&&r.repoId&&f(e.sourceUrl)===e._originalFullName?r.repoId:void 0,connection:e.githubConnection,repositoryID:w(),force:"1"}});e.details=V.data,e.details&&e.details.id&&(e.repositoryID=e.details.id),e.repoId||(e.repoId=e.details.repo+"-"+generateRandomId(4)),await e.getBranches()}catch(V){throw V.data&&(i("ERRORS."+V.data.error).then(H=>{e.addToast({title:"Error",date:new Date,body:H}),e.error=H},console.error),Se(V.data.error)),g("sourceUrl","missing",!1),V}}async function N(R){if(e.readme&&!R)return e.readme;let V=parseGithubUrl(e.sourceUrl);try{let H=await t.get(`/api/repo/${V.owner}/${V.repo}/readme`,{params:{anonymizedRepoId:e.isUpdate&&r.repoId&&f(e.sourceUrl)===e._originalFullName?r.repoId:void 0,connection:e.githubConnection,force:R===!0?"1":"0",branch:e.source.branch,repositoryID:w()}});e.readme=H.data}catch{e.readme=""}}function D(){let R={terms:e.terms?e.terms.split(`
|
||||
`):[],image:!!e.options.image,link:!!e.options.link,repoId:e.repoId};e.source&&e.source.branch&&(R.branchName=e.source.branch);try{let V=parseGithubUrl(e.sourceUrl);R.repoName=`${V.owner}/${V.repo}`}catch{}return R}function I(R,V){let H=null,se=0;return function(){H&&a.cancel(H),H=a(()=>{H=null;let qe=++se,L=R();L&&t.post("/api/anonymize-preview",L).then(ne=>{qe===se&&V(ne.data)},()=>{})},200)}}let C=I(()=>e.readme?{content:e.readme,options:D()}:null,R=>{e.anonymize_readme=R.content||"";let V="";try{let se=parseGithubUrl(e.sourceUrl),ie=e.source.branch||e.details&&e.details.defaultBranch||"main";V=`https://github.com/${se.owner}/${se.repo}/raw/${ie}/`}catch{}let H=renderMD(e.anonymize_readme,V);e.html_readme=H,a(Prism.highlightAll,150)});function A(){!e.anonymize||!e.anonymize.terms||(e.termsRegexWarning=!!e.terms&&!!e.terms.match(/[-[\]{}()*+?.,\\^$|#]/g),C())}async function q(){let R=parseGithubUrl(e.sourceUrl);try{le();let V=await t.get(`/api/pr/${R.owner}/${R.repo}/${R.pullRequestId}`,{params:{connection:e.githubConnection}});e.details=V.data,e.pullRequestId||(e.pullRequestId=R.repo+"-PR"+R.pullRequestId+"-"+generateRandomId(4))}catch(V){throw V.data&&(i("ERRORS."+V.data.error).then(H=>{e.addToast({title:"Error",date:new Date,body:H}),e.error=H},console.error),Se(V.data.error)),g("sourceUrl","missing",!1),V}}let Z=ze(new Map),x=new Set;function K(){let R=new Set,V=e.details&&e.details.pullRequest;if(!V)return R;typeof V.title=="string"&&R.add(V.title),typeof V.body=="string"&&R.add(V.body),typeof V.diff=="string"&&R.add(V.diff);let H=V.comments||[];for(let se of H)typeof se.author=="string"&&R.add(se.author),typeof se.body=="string"&&R.add(se.body);return R}let U=I(()=>{let R=K();x=R;let V=Array.from(R);return V.length===0?null:{contents:V,options:D()}},R=>{if(!R||!Array.isArray(R.contents))return;let V=Array.from(x),H=new Map;for(let se=0;se<V.length&&se<R.contents.length;se++)H.set(V[se],R.contents[se]);Z.clear(),H.forEach((se,ie)=>Z.set(ie,se))});e.anonymizePrContent=function(R){return R&&(Z.has(R)?Z.get(R):(x.has(R)||U(),R))};async function ue(){let R=parseGithubUrl(e.sourceUrl);try{le();let V=await t.get(`/api/gist/source/${R.gistId}`);e.details=V.data,e.gistId||(e.gistId="gist-"+R.gistId.substring(0,6)+"-"+generateRandomId(4))}catch(V){throw V.data&&(i("ERRORS."+V.data.error).then(H=>{e.addToast({title:"Error",date:new Date,body:H}),e.error=H},console.error),Se(V.data.error)),g("sourceUrl","missing",!1),V}}let te=ze(new Map),re=new Set;function pe(){let R=new Set,V=e.details&&e.details.gist;if(!V)return R;typeof V.description=="string"&&R.add(V.description),typeof V.ownerLogin=="string"&&R.add(V.ownerLogin);let H=V.files||[];for(let ie of H)typeof ie.filename=="string"&&R.add(ie.filename),typeof ie.content=="string"&&R.add(ie.content);let se=V.comments||[];for(let ie of se)typeof ie.author=="string"&&R.add(ie.author),typeof ie.body=="string"&&R.add(ie.body);return R}let me=I(()=>{let R=pe();re=R;let V=Array.from(R);return V.length===0?null:{contents:V,options:D()}},R=>{if(!R||!Array.isArray(R.contents))return;let V=Array.from(re),H=new Map;for(let se=0;se<V.length&&se<R.contents.length;se++)H.set(V[se],R.contents[se]);te.clear(),H.forEach((se,ie)=>te.set(ie,se)),ge()});e.anonymizeGistContent=function(R){return R&&(te.has(R)?te.get(R):(re.has(R)||me(),R))},e.previewGistFiles=[];function ge(){let R=e.details&&e.details.gist&&e.details.gist.files||[];e.previewGistFiles=R.map(V=>({filename:e.anonymizeGistContent(V.filename),content:e.anonymizeGistContent(V.content),language:V.language}))}e.watch("details.gist.files",ge,!0),e.watch("terms",ge);function he(){let R=e.conference;if(e.conference_data=null,!R)return;let V=e.isUpdate&&R===e._originalConference;t.get("/api/conferences/"+R).then(H=>{e.conference===R&&(e.conference_data=H.data,e.conference_data.startDate=new Date(e.conference_data.startDate),e.conference_data.endDate=new Date(e.conference_data.endDate),!V&&(e.options.expirationDate=new Date(e.conference_data.endDate),e.options.expirationMode="remove",e.options.update=e.conference_data.options.update,e.options.image=e.conference_data.options.image,e.options.pdf=e.conference_data.options.pdf,e.options.notebook=e.conference_data.options.notebook,e.options.link=e.conference_data.options.link))},()=>{e.conference===R&&(e.conference_data=null)})}function le(){g("repoId","used",!0),g("repoId","format",!0),g("pullRequestId","used",!0),g("pullRequestId","format",!0),g("gistId","used",!0),g("gistId","format",!0),g("sourceUrl","used",!0),g("sourceUrl","missing",!0),g("sourceUrl","access",!0),g("sourceUrl","github",!0),g("commit","exists",!0),g("conference","activated",!0),g("terms","format",!0),e.termsRegexWarning=!1}function Ie(){let R=e.anonymize&&e.anonymize.expirationDate;return!e.options.expirationDate||R&&R.invalid?(R&&R.setDirty&&R.setDirty(),e.error="Please choose a valid expiration date.",!0):!1}function Se(R){let V=e.detectedType==="pr"?"pullRequestId":e.detectedType==="gist"?"gistId":"repoId";
Line truncated
|
||||
`):[],image:!!e.options.image,link:!!e.options.link,repoId:e.repoId};e.source&&e.source.branch&&(R.branchName=e.source.branch);try{let V=parseGithubUrl(e.sourceUrl);R.repoName=`${V.owner}/${V.repo}`}catch{}return R}function I(R,V){let H=null,se=0;return function(){H&&a.cancel(H),H=a(()=>{H=null;let qe=++se,L=R();L&&t.post("/api/anonymize-preview",L).then(ne=>{qe===se&&V(ne.data)},()=>{})},200)}}let C=I(()=>e.readme?{content:e.readme,options:D()}:null,R=>{e.anonymize_readme=R.content||"";let V="";try{let se=parseGithubUrl(e.sourceUrl),ie=e.source.branch||e.details&&e.details.defaultBranch||"main";V=`https://github.com/${se.owner}/${se.repo}/raw/${ie}/`}catch{}let H=renderMD(e.anonymize_readme,V);e.html_readme=H,a(Prism.highlightAll,150)});function A(){!e.anonymize||!e.anonymize.terms||(e.termsRegexWarning=!!e.terms&&!!e.terms.match(/[-[\]{}()*+?.,\\^$|#]/g),C())}async function q(){let R=parseGithubUrl(e.sourceUrl);try{le();let V=await t.get(`/api/pr/${R.owner}/${R.repo}/${R.pullRequestId}`,{params:{connection:e.githubConnection}});e.details=V.data,e.pullRequestId||(e.pullRequestId=R.repo+"-PR"+R.pullRequestId+"-"+generateRandomId(4))}catch(V){throw V.data&&(i("ERRORS."+V.data.error).then(H=>{e.addToast({title:"Error",date:new Date,body:H}),e.error=H},console.error),Se(V.data.error)),g("sourceUrl","missing",!1),V}}let Z=ze(new Map),X=new Set;function K(){let R=new Set,V=e.details&&e.details.pullRequest;if(!V)return R;typeof V.title=="string"&&R.add(V.title),typeof V.body=="string"&&R.add(V.body),typeof V.diff=="string"&&R.add(V.diff);let H=V.comments||[];for(let se of H)typeof se.author=="string"&&R.add(se.author),typeof se.body=="string"&&R.add(se.body);return R}let U=I(()=>{let R=K();X=R;let V=Array.from(R);return V.length===0?null:{contents:V,options:D()}},R=>{if(!R||!Array.isArray(R.contents))return;let V=Array.from(X),H=new Map;for(let se=0;se<V.length&&se<R.contents.length;se++)H.set(V[se],R.contents[se]);Z.clear(),H.forEach((se,ie)=>Z.set(ie,se))});e.anonymizePrContent=function(R){return R&&(Z.has(R)?Z.get(R):(X.has(R)||U(),R))};async function ue(){let R=parseGithubUrl(e.sourceUrl);try{le();let V=await t.get(`/api/gist/source/${R.gistId}`);e.details=V.data,e.gistId||(e.gistId="gist-"+R.gistId.substring(0,6)+"-"+generateRandomId(4))}catch(V){throw V.data&&(i("ERRORS."+V.data.error).then(H=>{e.addToast({title:"Error",date:new Date,body:H}),e.error=H},console.error),Se(V.data.error)),g("sourceUrl","missing",!1),V}}let te=ze(new Map),re=new Set;function pe(){let R=new Set,V=e.details&&e.details.gist;if(!V)return R;typeof V.description=="string"&&R.add(V.description),typeof V.ownerLogin=="string"&&R.add(V.ownerLogin);let H=V.files||[];for(let ie of H)typeof ie.filename=="string"&&R.add(ie.filename),typeof ie.content=="string"&&R.add(ie.content);let se=V.comments||[];for(let ie of se)typeof ie.author=="string"&&R.add(ie.author),typeof ie.body=="string"&&R.add(ie.body);return R}let me=I(()=>{let R=pe();re=R;let V=Array.from(R);return V.length===0?null:{contents:V,options:D()}},R=>{if(!R||!Array.isArray(R.contents))return;let V=Array.from(re),H=new Map;for(let se=0;se<V.length&&se<R.contents.length;se++)H.set(V[se],R.contents[se]);te.clear(),H.forEach((se,ie)=>te.set(ie,se)),be()});e.anonymizeGistContent=function(R){return R&&(te.has(R)?te.get(R):(re.has(R)||me(),R))},e.previewGistFiles=[];function be(){let R=e.details&&e.details.gist&&e.details.gist.files||[];e.previewGistFiles=R.map(V=>({filename:e.anonymizeGistContent(V.filename),content:e.anonymizeGistContent(V.content),language:V.language}))}e.watch("details.gist.files",be,!0),e.watch("terms",be);function he(){let R=e.conference;if(e.conference_data=null,!R)return;let V=e.isUpdate&&R===e._originalConference;t.get("/api/conferences/"+R).then(H=>{e.conference===R&&(e.conference_data=H.data,e.conference_data.startDate=new Date(e.conference_data.startDate),e.conference_data.endDate=new Date(e.conference_data.endDate),!V&&(e.options.expirationDate=new Date(e.conference_data.endDate),e.options.expirationMode="remove",e.options.update=e.conference_data.options.update,e.options.image=e.conference_data.options.image,e.options.pdf=e.conference_data.options.pdf,e.options.notebook=e.conference_data.options.notebook,e.options.link=e.conference_data.options.link))},()=>{e.conference===R&&(e.conference_data=null)})}function le(){g("repoId","used",!0),g("repoId","format",!0),g("pullRequestId","used",!0),g("pullRequestId","format",!0),g("gistId","used",!0),g("gistId","format",!0),g("sourceUrl","used",!0),g("sourceUrl","missing",!0),g("sourceUrl","access",!0),g("sourceUrl","github",!0),g("commit","exists",!0),g("conference","activated",!0),g("terms","format",!0),e.termsRegexWarning=!1}function Ie(){let R=e.anonymize&&e.anonymize.expirationDate;return!e.options.expirationDate||R&&R.invalid?(R&&R.setDirty&&R.setDirty(),e.error="Please choose a valid expiration date.",!0):!1}function Se(R){let V=e.detectedType==="pr"?"pullRequestId":e.detectedType==="gist"?"gistId":"repoId";
Line truncated
|
||||
`).filter(ie=>ie),connection:e.githubConnection,fullName:`${V.owner}/${V.repo}`,repository:e.sourceUrl,options:e.options,source:e.source,conference:e.conference};e.details&&(H.options.pageSource=e.details.pageSource),le();let se=e.isUpdate?"/api/repo/"+e.repoId:"/api/repo/";t.post(se,H,{headers:{"Content-Type":"application/json"}}).then(()=>{window.location.href="/status/"+e.repoId},ie=>{ie.data&&(i("ERRORS."+ie.data.error).then(qe=>{e.error=qe},console.error),Se(ie.data.error))}).finally(()=>{R.target.disabled=!1})},e.anonymizeGist=R=>{if(Ie())return;R.target.disabled=!0;let V=parseGithubUrl(e.sourceUrl),H={gistId:e.gistId,terms:e.terms.trim().split(`
|
||||
`).filter(ie=>ie),source:{gistId:V.gistId},options:e.options,conference:e.conference};le();let se=e.isUpdate?"/api/gist/"+e.gistId:"/api/gist/";t.post(se,H,{headers:{"Content-Type":"application/json"}}).then(()=>{window.location.href="/gist/"+e.gistId},ie=>{ie.data&&(i("ERRORS."+ie.data.error).then(qe=>{e.error=qe},console.error),Se(ie.data.error))}).finally(()=>{R.target.disabled=!1})},e.anonymizePullRequest=R=>{if(Ie())return;R.target.disabled=!0;let V=parseGithubUrl(e.sourceUrl),H={pullRequestId:e.pullRequestId,connection:e.githubConnection,terms:e.terms.trim().split(`
|
||||
`).filter(ie=>ie),source:{repositoryFullName:`${V.owner}/${V.repo}`,pullRequestId:V.pullRequestId},options:e.options,conference:e.conference};le();let se=e.isUpdate?"/api/pr/"+e.pullRequestId:"/api/pr/";t.post(se,H,{headers:{"Content-Type":"application/json"}}).then(()=>{window.location.href="/pr/"+e.pullRequestId},ie=>{ie.data&&(i("ERRORS."+ie.data.error).then(qe=>{e.error=qe},console.error),Se(ie.data.error))}).finally(()=>{R.target.disabled=!1})},e.watch("conference",()=>{he()}),e.watch("terms",()=>{e.detectedType==="repo"&&A(),e.detectedType==="pr"&&U(),e.detectedType==="gist"&&me()}),e.watch("options.image",()=>{e.detectedType==="repo"&&A(),e.detectedType==="pr"&&U(),e.detectedType==="gist"&&me()}),e.watch("options.link",()=>{e.detectedType==="repo"&&A(),e.detectedType==="pr"&&U(),e.detectedType==="gist"&&me()}),e.watch("details",()=>{e.detectedType==="pr"&&U(),e.detectedType==="gist"&&me()},!0)},Yo=function(e,t,o,r,n,i){let a=mt(),u=as(),p=0,h=!1;e.on("dispose",()=>{h=!0,p++,v&&v.resolve()}),e.files=[],e.isMac=/Mac|iPhone|iPad|iPod/.test(navigator.platform||navigator.userAgent),e.fileSearchQuery="",e.fileSearchResults=null,e.fileSearchLoading=!1,u(document,"keydown",function(U){if((U.metaKey||U.ctrlKey)&&U.key==="k"){U.preventDefault();var ue=document.querySelector(".tree-search-input");ue&&(ue.focus(),ue.select())}});var v=null;e.onFileSearchChange=function(){v&&(v.resolve(),v=null);let U=e.fileSearchQuery;if(!U||U.length<2){e.fileSearchResults=null,e.fileSearchLoading=!1;return}e.fileSearchLoading=!0;let ue=i.defer();v=ue,t.get(`/api/repo/${e.repoId}/files/search?q=${encodeURIComponent(U)}`,{timeout:ue.promise}).then(function(te){if(!(h||v!==ue)){v=null,e.fileSearchLoading=!1;var re={};e.files.forEach(function(L){re[(L.path||"")+"/"+L.name]=!0});for(var pe=[],me={},ge=0;ge<te.data.length;ge++){var he=te.data[ge];if(he.path)for(var le=he.path.split("/"),Ie="",Se=0;Se<le.length;Se++){var R=Ie;Ie=Ie?Ie+"/"+le[Se]:le[Se];var V=R+"/"+le[Se];!re[V]&&!me[V]&&(me[V]=!0,pe.push({name:le[Se],path:R}))}}pe.sort(function(L,ne){return(L.path||"").split("/").length-(ne.path||"").split("/").length}),pe.length>0&&e.files.push.apply(e.files,pe);for(var H=[],se=0;se<te.data.length;se++){var ie=te.data[se],qe=(ie.path||"")+"/"+ie.name;!re[qe]&&ie.size!=null&&(H.push(ie),re[qe]=!0)}H.length>0&&e.files.push.apply(e.files,H),e.fileSearchResults=te.data}},function(){!h&&v===ue&&(v=null,e.fileSearchLoading=!1,e.fileSearchResults=[])})};let g={yml:"yaml",txt:"text",py:"python",js:"javascript",ts:"typescript"},f=["license","txt"],w=["png","jpg","jpeg","gif","svg","ico","bmp","tiff","tif","webp","avif","heif","heic"],k=["wav","mp3","ogg","wma","flac","aac","m4a"],b=["mp4","avi","webm","mov","mpg","mpeg","mkv","flv","wmv","3gp","3g2","m4v","f4v","f4p","f4a","f4b"];e.on("routeUpdate",function(U,ue){if(e.repoId!=r.repoId)return K();if((r.path||"")!=e.filePath){e.filePath=r.path||"",e.paths=e.filePath.split("/").filter(te=>te&&te.trim().length>0),x();for(let te=0;te<e.paths.length-1;te++){let re=te>0?e.paths.slice(0,te).join("/"):"";e.files.some(me=>me.path===re)||e.getFiles(re)}}});function T(){if(e.paths[0]!="")return;let U=["readme.md","readme.txt","readme.org","readme.1st","readme"],ue={};for(let re of e.files)re.name.toLowerCase().indexOf("readme")>-1&&(ue[re.name.toLowerCase()]=re.name);let te=null;for(let re of U)if(ue[re]){te=re;break}if(!te&&Object.keys(ue).length>0&&(te=Object.keys(ue)[0]),te){let re=o.url();re[re.length-1]!="/"&&(re+="/"),o.url(re+encodePathForUrl(ue[te]))}}e.fileCounts=null,e.getFiles=function(U){let ue=e.repoId;return t.get(`/api/repo/${e.repoId}/files/?path=${encodeURIComponent(U)}&v=${e.options.lastUpdateDate}`).then(function(te){if(h||ue!==e.repoId)return[];let re=U||"";return e.files=e.files.filter(pe=>pe.path!==re),e.files.push(...te.data),te.data},function(te){if(h||ue!==e.repoId)return[];e.type="error",e.content=te&&te.data&&te.data.error||"unknown_error",e.files=[]})};function N(){let U=e.repoId;t.get(`/api/repo/${e.repoId}/files/counts`).then(function(ue){h||U!==e.repoId||(e.fileCounts=ue.data)},function(){e.fileCounts={}})}function D(){return e.files.filter(U=>U.name==e.paths[e.paths.length-1]&&U.path==e.paths.slice(0,e.paths.length-1).join("/"))[0]}var I=null;e.on("dispose",function(){I&&a.interval.cancel(I)});function C(U){if(h)return;let ue=e.repoId;t.get(`/api/repo/${e.repoId}/options`).then(te=>{if(!(h||ue!==e.repoId)){if(e.options=te.data,e.options.url){window.location=e.options.url;return}U&&U(te.data)}},te=>{if(!(h||ue!==e.repoId)){var re=te.data||{};if(re.error==="rate_limited"&&re.resetAt){let me=function(){var ge=Math.max(0,Math.ceil((e.rateLimitResetAt-Date.now())/1e3));if(ge<=0)e.rateLimitCountdown="",e.rateLimitResetAt=0,I&&(a.interval.cancel(I),I=null),C(U);else{var he=Math.floor(ge/60),le=ge%60;e.rateLimitCountdown=he>0?he+"m "+le+"s":le+"s"}};var pe=me;e.type="rate_limited",e.rateLimitResetAt=re.resetAt,I&&a.interval.cancel(I),me(),I=a.interval(me,1e3)}else re.error==="rep
Line truncated
|
||||
`).filter(ie=>ie),source:{repositoryFullName:`${V.owner}/${V.repo}`,pullRequestId:V.pullRequestId},options:e.options,conference:e.conference};le();let se=e.isUpdate?"/api/pr/"+e.pullRequestId:"/api/pr/";t.post(se,H,{headers:{"Content-Type":"application/json"}}).then(()=>{window.location.href="/pr/"+e.pullRequestId},ie=>{ie.data&&(i("ERRORS."+ie.data.error).then(qe=>{e.error=qe},console.error),Se(ie.data.error))}).finally(()=>{R.target.disabled=!1})},e.watch("conference",()=>{he()}),e.watch("terms",()=>{e.detectedType==="repo"&&A(),e.detectedType==="pr"&&U(),e.detectedType==="gist"&&me()}),e.watch("options.image",()=>{e.detectedType==="repo"&&A(),e.detectedType==="pr"&&U(),e.detectedType==="gist"&&me()}),e.watch("options.link",()=>{e.detectedType==="repo"&&A(),e.detectedType==="pr"&&U(),e.detectedType==="gist"&&me()}),e.watch("details",()=>{e.detectedType==="pr"&&U(),e.detectedType==="gist"&&me()},!0)},Yo=function(e,t,o,r,n,i){let a=mt(),u=as(),p=0,h=!1;e.on("dispose",()=>{h=!0,p++,v&&v.resolve()}),e.files=[],e.isMac=/Mac|iPhone|iPad|iPod/.test(navigator.platform||navigator.userAgent),e.fileSearchQuery="",e.fileSearchResults=null,e.fileSearchLoading=!1,u(document,"keydown",function(U){if((U.metaKey||U.ctrlKey)&&U.key==="k"){U.preventDefault();var ue=document.querySelector(".tree-search-input");ue&&(ue.focus(),ue.select())}});var v=null;e.onFileSearchChange=function(){v&&(v.resolve(),v=null);let U=e.fileSearchQuery;if(!U||U.length<2){e.fileSearchResults=null,e.fileSearchLoading=!1;return}e.fileSearchLoading=!0;let ue=i.defer();v=ue,t.get(`/api/repo/${e.repoId}/files/search?q=${encodeURIComponent(U)}`,{timeout:ue.promise}).then(function(te){if(!(h||v!==ue)){v=null,e.fileSearchLoading=!1;var re={};e.files.forEach(function(L){re[(L.path||"")+"/"+L.name]=!0});for(var pe=[],me={},be=0;be<te.data.length;be++){var he=te.data[be];if(he.path)for(var le=he.path.split("/"),Ie="",Se=0;Se<le.length;Se++){var R=Ie;Ie=Ie?Ie+"/"+le[Se]:le[Se];var V=R+"/"+le[Se];!re[V]&&!me[V]&&(me[V]=!0,pe.push({name:le[Se],path:R}))}}pe.sort(function(L,ne){return(L.path||"").split("/").length-(ne.path||"").split("/").length}),pe.length>0&&e.files.push.apply(e.files,pe);for(var H=[],se=0;se<te.data.length;se++){var ie=te.data[se],qe=(ie.path||"")+"/"+ie.name;!re[qe]&&ie.size!=null&&(H.push(ie),re[qe]=!0)}H.length>0&&e.files.push.apply(e.files,H),e.fileSearchResults=te.data}},function(){!h&&v===ue&&(v=null,e.fileSearchLoading=!1,e.fileSearchResults=[])})};let g={yml:"yaml",txt:"text",py:"python",js:"javascript",ts:"typescript"},f=["license","txt"],w=["png","jpg","jpeg","gif","svg","ico","bmp","tiff","tif","webp","avif","heif","heic"],k=["wav","mp3","ogg","wma","flac","aac","m4a"],b=["mp4","avi","webm","mov","mpg","mpeg","mkv","flv","wmv","3gp","3g2","m4v","f4v","f4p","f4a","f4b"];e.on("routeUpdate",function(U,ue){if(e.repoId!=r.repoId)return K();if((r.path||"")!=e.filePath){e.filePath=r.path||"",e.paths=e.filePath.split("/").filter(te=>te&&te.trim().length>0),X();for(let te=0;te<e.paths.length-1;te++){let re=te>0?e.paths.slice(0,te).join("/"):"";e.files.some(me=>me.path===re)||e.getFiles(re)}}});function T(){if(e.paths[0]!="")return;let U=["readme.md","readme.txt","readme.org","readme.1st","readme"],ue={};for(let re of e.files)re.name.toLowerCase().indexOf("readme")>-1&&(ue[re.name.toLowerCase()]=re.name);let te=null;for(let re of U)if(ue[re]){te=re;break}if(!te&&Object.keys(ue).length>0&&(te=Object.keys(ue)[0]),te){let re=o.url();re[re.length-1]!="/"&&(re+="/"),o.url(re+encodePathForUrl(ue[te]))}}e.fileCounts=null,e.getFiles=function(U){let ue=e.repoId;return t.get(`/api/repo/${e.repoId}/files/?path=${encodeURIComponent(U)}&v=${e.options.lastUpdateDate}`).then(function(te){if(h||ue!==e.repoId)return[];let re=U||"";return e.files=e.files.filter(pe=>pe.path!==re),e.files.push(...te.data),te.data},function(te){if(h||ue!==e.repoId)return[];e.type="error",e.content=te&&te.data&&te.data.error||"unknown_error",e.files=[]})};function N(){let U=e.repoId;t.get(`/api/repo/${e.repoId}/files/counts`).then(function(ue){h||U!==e.repoId||(e.fileCounts=ue.data)},function(){e.fileCounts={}})}function D(){return e.files.filter(U=>U.name==e.paths[e.paths.length-1]&&U.path==e.paths.slice(0,e.paths.length-1).join("/"))[0]}var I=null;e.on("dispose",function(){I&&a.interval.cancel(I)});function C(U){if(h)return;let ue=e.repoId;t.get(`/api/repo/${e.repoId}/options`).then(te=>{if(!(h||ue!==e.repoId)){if(e.options=te.data,e.options.url){window.location=e.options.url;return}U&&U(te.data)}},te=>{if(!(h||ue!==e.repoId)){var re=te.data||{};if(re.error==="rate_limited"&&re.resetAt){let me=function(){var be=Math.max(0,Math.ceil((e.rateLimitResetAt-Date.now())/1e3));if(be<=0)e.rateLimitCountdown="",e.rateLimitResetAt=0,I&&(a.interval.cancel(I),I=null),C(U);else{var he=Math.floor(be/60),le=be%60;e.rateLimitCountdown=he>0?he+"m "+le+"s":le+"s"}};var pe=me;e.type="rate_limited",e.rateLimitResetAt=re.resetAt,I&&a.interval.cancel(I),me(),I=a.interval(me,1e3)}else re.error==="rep
Line truncated
|
||||
`+b.join(`
|
||||
`)],{type:"text/csv"}),N=document.createElement("a");N.href=URL.createObjectURL(T),N.download=r.username+"-repositories.csv",N.click()},e.showStatusMessage=f=>{let w=f.statusMessage||"(no message)";window.prompt(`Status message for ${f.repoId} (${f.status}):`,w)},e.fetchGithubInfo=f=>{let w=window.open("","_blank");w&&w.document.write("<pre>Loading GitHub info for "+f.repoId+"...</pre>"),t.get("/api/admin/repos/"+f.repoId+"/github").then(k=>{w&&(w.document.open(),w.document.write('<pre style="font:13px monospace;padding:16px;white-space:pre-wrap">'+JSON.stringify(k.data,null,2).replace(/[<>]/g,b=>b==="<"?"<":">")+"</pre>"),w.document.close())},k=>{let b=k&&k.data?JSON.stringify(k.data,null,2):String(k);w&&(w.document.body.innerHTML='<pre style="color:#B42318;padding:16px">'+b+"</pre>")})};function p(f){t.get("/api/admin/users/"+f+"/repos",{}).then(w=>{e.repositories=w.data},w=>{console.error(w)})}function h(f){t.get("/api/admin/users/"+f,{}).then(w=>{e.userInfo=w.data},w=>{console.error(w)})}h(r.username),p(r.username),e.banUser=()=>{confirm(`Ban user ${r.username}?`)&&t.post(`/api/admin/users/${r.username}/ban`).then(()=>h(r.username),f=>console.error(f))},e.activateUser=()=>{t.post(`/api/admin/users/${r.username}/activate`).then(()=>h(r.username),f=>console.error(f))},e.promoteUser=()=>{confirm(`Promote ${r.username} to admin?`)&&t.post(`/api/admin/users/${r.username}/promote`).then(()=>h(r.username),f=>console.error(f))},e.demoteUser=()=>{confirm(`Remove admin privileges from ${r.username}?`)&&t.post(`/api/admin/users/${r.username}/demote`).then(()=>h(r.username),f=>console.error(f))},e.tokens=[],e.tokenForm={name:"",plaintext:null};function v(){t.get("/api/admin/tokens").then(f=>{e.tokens=f.data||[]},f=>{f.status!==401&&f.status!==403&&console.error(f)})}v(),e.createToken=()=>{e.tokenForm.name&&t.post("/api/admin/tokens",{name:e.tokenForm.name}).then(f=>{e.tokenForm.plaintext=f.data.token,e.tokenForm.name="",v()},f=>console.error(f))},e.revokeToken=f=>{confirm(`Revoke token "${f.name}"?`)&&t.delete("/api/admin/tokens/"+f.id).then(()=>v(),w=>console.error(w))},e.removeCache=f=>{confirm("Remove cached files for "+f.repoId+"?")&&t.delete("/api/admin/repos/"+f.repoId).then(()=>p(r.username),w=>console.error(w))},e.removeRepository=f=>{confirm("Remove repository "+f.repoId+"?")&&t.delete("/api/repo/"+f.repoId+"/").then(()=>p(r.username),w=>console.error(w))},e.updateRepository=f=>{let w=ze({title:`Refreshing ${f.repoId}...`,date:new Date,body:`The repository ${f.repoId} is going to be refreshed.`});e.toasts.push(w),t.post(`/api/repo/${f.repoId}/refresh`).then(k=>{k.data.status=="ready"?w.title=`${f.repoId} is refreshed.`:w.title=`Refreshing of ${f.repoId}.`},k=>{w.title=`Error during the refresh of ${f.repoId}.`,w.body=k.body})},e.getGitHubRepositories=f=>{t.get(`/api/user/${e.userInfo.username}/all_repositories`,{params:{force:"1"}}).then(w=>{e.userInfo.repositories=w.data})};let g=null;e.watch("query",()=>{n.timeout.cancel(g),g=n.timeout(()=>{p(r.username)},500)},!0)},Ua=function(e,t,o){let r=mt(),n=as();e.Math=Math,e.watch("user.status",()=>{e.user==null&&o.url("/")}),e.user==null&&o.url("/"),e.conferences=[],e.total=-1,e.totalPage=0,e.statusCounts=[];let i=k=>{if(k.key==="/"&&!["INPUT","TEXTAREA","SELECT"].includes(document.activeElement?.tagName)){k.preventDefault();let b=document.querySelector('.admin-filter-toolbar input[type="search"]');b&&b.focus()}};n(document,"keydown",i),e.on("dispose",()=>document.removeEventListener("keydown",i)),e.clearFilter=k=>{k==="dateRange"?(e.query.dateFrom="",e.query.dateTo=""):e.query[k]="",e.query.page=1},e.chips=[];let a=()=>{let k=[];(e.query.dateFrom||e.query.dateTo)&&k.push({key:"dateRange",label:"Date",value:(e.query.dateFrom||"\u2026")+" \u2013 "+(e.query.dateTo||"\u2026")}),e.chips=k};e.statusCountFor=k=>{let b=(e.statusCounts||[]).find(T=>T._id===k);return b?b.count:0},e.toggleSortDirection=()=>{e.query.direction=e.query.direction==="asc"?"desc":"asc"},e.sortBy=k=>{e.query.sort===k?e.query.direction=e.query.direction==="asc"?"desc":"asc":(e.query.sort=k,e.query.direction="desc"),e.query.page=1},e.sortIcon=k=>e.query.sort===k?e.query.direction==="asc"?"fa-arrow-up":"fa-arrow-down":"";let u="admin.conferences.filterPrefs",p={page:1,limit:25,sort:"name",direction:"asc",search:"",dateFrom:"",dateTo:"",ready:!1,expired:!1,removed:!1,error:!0,preparing:!0},h=loadFilterPrefs(u)||{};e.query=Object.assign({},p,h,{page:1,search:""});let v=o.search();v.search&&(e.query.search=v.search);let g="admin.conferences.presets";e.presets=JSON.parse(localStorage.getItem(g)||"[]"),e.savePreset=()=>{let k=window.prompt("Preset name:");if(!k)return;let b=Object.assign({},e.query);delete b.page,e.presets=(e.presets||[]).filter(T=>T.name!==k),e.presets.push({name:k,query:b}),localStorage.setItem(g,JSON.stringify(e.presets))},e.applyPreset=k=>{Object.assign(e.query,k.query,{page:1})},e.deletePreset=k=>{e.presets=(e.presets||[]).filter(b=>b.name!==k.name),localStorage.setItem(g,JS
Line truncated
|
||||
`).map((ge,he)=>he===0?ge:me+ge).join(`
|
||||
`)],{type:"text/csv"}),N=document.createElement("a");N.href=URL.createObjectURL(T),N.download=r.username+"-repositories.csv",N.click()},e.showStatusMessage=f=>{let w=f.statusMessage||"(no message)";window.prompt(`Status message for ${f.repoId} (${f.status}):`,w)},e.fetchGithubInfo=f=>{let w=window.open("","_blank");w&&w.document.write("<pre>Loading GitHub info for "+f.repoId+"...</pre>"),t.get("/api/admin/repos/"+f.repoId+"/github").then(k=>{w&&(w.document.open(),w.document.write('<pre style="font:13px monospace;padding:16px;white-space:pre-wrap">'+JSON.stringify(k.data,null,2).replace(/[<>]/g,b=>b==="<"?"<":">")+"</pre>"),w.document.close())},k=>{let b=k&&k.data?JSON.stringify(k.data,null,2):String(k);w&&(w.document.body.innerHTML='<pre style="color:#B42318;padding:16px">'+b+"</pre>")})};function p(f){t.get("/api/admin/users/"+f+"/repos",{}).then(w=>{e.repositories=w.data},w=>{console.error(w)})}function h(f){t.get("/api/admin/users/"+f,{}).then(w=>{e.userInfo=w.data},w=>{console.error(w)})}h(r.username),p(r.username),e.banUser=()=>{confirm(`Ban user ${r.username}?`)&&t.post(`/api/admin/users/${r.username}/ban`).then(()=>h(r.username),f=>console.error(f))},e.activateUser=()=>{t.post(`/api/admin/users/${r.username}/activate`).then(()=>h(r.username),f=>console.error(f))},e.promoteUser=()=>{confirm(`Promote ${r.username} to admin?`)&&t.post(`/api/admin/users/${r.username}/promote`).then(()=>h(r.username),f=>console.error(f))},e.demoteUser=()=>{confirm(`Remove admin privileges from ${r.username}?`)&&t.post(`/api/admin/users/${r.username}/demote`).then(()=>h(r.username),f=>console.error(f))},e.tokens=[],e.tokenForm={name:"",plaintext:null};function v(){t.get("/api/admin/tokens").then(f=>{e.tokens=f.data||[]},f=>{f.status!==401&&f.status!==403&&console.error(f)})}v(),e.createToken=()=>{e.tokenForm.name&&t.post("/api/admin/tokens",{name:e.tokenForm.name}).then(f=>{e.tokenForm.plaintext=f.data.token,e.tokenForm.name="",v()},f=>console.error(f))},e.revokeToken=f=>{confirm(`Revoke token "${f.name}"?`)&&t.delete("/api/admin/tokens/"+f.id).then(()=>v(),w=>console.error(w))},e.removeCache=f=>{confirm("Remove cached files for "+f.repoId+"?")&&t.delete("/api/admin/repos/"+f.repoId).then(()=>p(r.username),w=>console.error(w))},e.removeRepository=f=>{confirm("Remove repository "+f.repoId+"?")&&t.delete("/api/repo/"+f.repoId+"/").then(()=>p(r.username),w=>console.error(w))},e.updateRepository=f=>{let w=ze({title:`Refreshing ${f.repoId}...`,date:new Date,body:`The repository ${f.repoId} is going to be refreshed.`});e.toasts.push(w),t.post(`/api/repo/${f.repoId}/refresh`).then(k=>{k.data.status=="ready"?w.title=`${f.repoId} is refreshed.`:w.title=`Refreshing of ${f.repoId}.`},k=>{w.title=`Error during the refresh of ${f.repoId}.`,w.body=k.body})},e.getGitHubRepositories=f=>{t.get(`/api/user/${e.userInfo.username}/all_repositories`,{params:{force:"1"}}).then(w=>{e.userInfo.repositories=w.data})};let g=null;e.watch("query",()=>{n.timeout.cancel(g),g=n.timeout(()=>{p(r.username)},500)},!0)},Ua=function(e,t,o){let r=mt(),n=as();e.Math=Math,e.watch("user.status",()=>{e.user==null&&o.url("/")}),e.user==null&&o.url("/"),e.conferences=[],e.total=-1,e.totalPage=0,e.statusCounts=[];let i=k=>{if(k.key==="/"&&!["INPUT","TEXTAREA","SELECT"].includes(document.activeElement?.tagName)){k.preventDefault();let b=document.querySelector('.admin-filter-toolbar input[type="search"]');b&&b.focus()}};n(document,"keydown",i),e.on("dispose",()=>document.removeEventListener("keydown",i)),e.clearFilter=k=>{k==="dateRange"?(e.query.dateFrom="",e.query.dateTo=""):e.query[k]="",e.query.page=1},e.chips=[];let a=()=>{let k=[];(e.query.dateFrom||e.query.dateTo)&&k.push({key:"dateRange",label:"Date",value:(e.query.dateFrom||"\u2026")+" \u2013 "+(e.query.dateTo||"\u2026")}),e.chips=k};e.statusCountFor=k=>{let b=(e.statusCounts||[]).find(T=>T._id===k);return b?b.count:0},e.toggleSortDirection=()=>{e.query.direction=e.query.direction==="asc"?"desc":"asc"},e.sortBy=k=>{e.query.sort===k?e.query.direction=e.query.direction==="asc"?"desc":"asc":(e.query.sort=k,e.query.direction="desc"),e.query.page=1},e.sortIcon=k=>e.query.sort===k?e.query.direction==="asc"?"fa-arrow-up":"fa-arrow-down":"";let u="admin.conferences.filterPrefs",p={page:1,limit:25,sort:"name",direction:"asc",search:"",dateFrom:"",dateTo:"",ready:!1,expired:!1,removed:!1,error:!0,preparing:!0},h=loadFilterPrefs(u)||{};e.query=Object.assign({},p,h,{page:1,search:""});let v=o.search();v.search&&(e.query.search=v.search);let g="admin.conferences.presets";e.presets=JSON.parse(localStorage.getItem(g)||"[]"),e.savePreset=()=>{let k=window.prompt("Preset name:");if(!k)return;let b=Object.assign({},e.query);delete b.page,e.presets=(e.presets||[]).filter(T=>T.name!==k),e.presets.push({name:k,query:b}),localStorage.setItem(g,JSON.stringify(e.presets))},e.applyPreset=k=>{Object.assign(e.query,k.query,{page:1})},e.deletePreset=k=>{e.presets=(e.presets||[]).filter(b=>b.name!==k.name),localStorage.setItem(g,JS
Line truncated
|
||||
`).map((be,he)=>he===0?be:me+be).join(`
|
||||
`)}else typeof K=="number"||typeof K=="boolean"?pe=String(K):pe=JSON.stringify(K);Z.push(`${te}${pe}${re}`)}),Z.push("}"),Z.join(`
|
||||
`)}function h(N){let D=[],I="",C=/(\w+):(>=|<=|!=|>|<|=)?([^\s]+)/g,A=0,q;for(;q=C.exec(N);)I+=N.slice(A,q.index),A=C.lastIndex,D.push({key:q[1],op:q[2]||"=",val:q[3]});return I+=N.slice(A),{filters:D,free:I.trim().toLowerCase()}}function v(N,D){for(let I of D.filters){let C=(q,Z,x)=>{let K=parseFloat(q),U=parseFloat(Z);return x==="="?String(q)===String(Z):x==="!="?String(q)!==String(Z):x===">="?K>=U:x==="<="?K<=U:x===">"?K>U:x==="<"?K<U:!0},A;if(I.key==="code")A=N.displayMessage;else if(I.key==="module")A=N.module;else if(I.key==="status")A=N._status;else if(I.key==="url")A=N._url;else if(I.key==="repo")A=N._repoId;else if(I.key==="level")A=N.level;else continue;if(A==null||!C(A,I.val,I.op))return!1}return!(D.free&&((N.displayMessage||"")+" "+(N.module||"")+" "+(N._url||"")+" "+JSON.stringify(N.raw||[])).toLowerCase().indexOf(D.free)===-1)}function g(){let N=h(e.query.search||"");e.parsedFilterCount=N.filters.length;let D=e.query.bucket,I=e.entries.filter(A=>D&&A._bucket!==D?!1:v(A,N)),C=e.query.group;if(C){let A=x=>C==="module"?x.module:x.displayMessage||x.message||"_",q=new Map;for(let x of I){let K=A(x);if(q.has(K)){let U=q.get(K);U.count++,U._related.push(x),new Date(x.ts)>new Date(U.ts)&&(U.ts=x.ts,U._url=x._url,U._status=x._status),new Date(x.ts)<new Date(U._firstSeen)&&(U._firstSeen=x.ts)}else{let U=Object.assign({},x);U._key=`${C}:${K}`,U._related=[x],U._firstSeen=x.ts,U._lastHourCount=0,U.count=1,q.set(K,U)}}let Z=Date.now()-3600*1e3;for(let x of q.values())x._lastHourCount=x._related.filter(K=>new Date(K.ts).getTime()>=Z).length;I=Array.from(q.values())}else I=I.map((A,q)=>(A._key="row:"+q+":"+A.ts,A._related=[A],A._firstSeen=A.ts,A._lastHourCount=0,A.count=1,A));e.query.sort==="count"?I.sort((A,q)=>q.count-A.count||new Date(q.ts)-new Date(A.ts)):I.sort((A,q)=>new Date(q.ts)-new Date(A.ts)),e.visible=I}function f(N){let D=N?e.entries.length:0,I=N?e.pageSize:Math.max(e.pageSize,e.entries.length||e.pageSize);t.get("/api/admin/errors",{params:{offset:D,limit:I}}).then(C=>{let A=(C.data.entries||[]).map(u);e.entries=N?e.entries.concat(A):A,e.available=!!C.data.available,e.cap=C.data.max||e.cap,e.total=C.data.total||e.entries.length,g()},C=>console.error(C))}e.loadMore=()=>f(!0),e.canLoadMore=()=>e.entries.length<e.total;function w(){t.get("/api/admin/errors/stats").then(N=>{let D=N.data||{},I=D.prev24h?Math.round((D.last24h-D.prev24h)/D.prev24h*100):0;e.stats={last24h:D.last24h||0,prev24h:D.prev24h||0,delta:I,severity:D.severity||{error:0,warn:0,info:0},unique:D.unique||{error:0,warn:0,info:0},buckets:D.buckets||[],dropped:D.dropped||0}},N=>console.error(N))}function k(){f(),w()}e.barPx=(N,D)=>{let I=e.stats.buckets||[],C=0;for(let x of I)C=Math.max(C,(x.error||0)+(x.warn||0)+(x.info||0));if(!C)return 0;let A=(N.error||0)+(N.warn||0)+(N.info||0);if(!A)return 0;let q=Math.round(A/C*60),Z=N[D]||0;return Math.round(Z/A*q)},e.bucketTitle=N=>`${new Date(N.hour).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})} \xB7 ${N.error||0} err \xB7 ${N.warn||0} warn \xB7 ${N.info||0} info`,e.toggle=N=>{e.expanded[N._key]=!e.expanded[N._key]},e.setBucket=N=>{e.query.bucket=N},e.refreshNow=k,e.clearAll=()=>{confirm("Clear all captured errors?")&&t.delete("/api/admin/errors").then(k,N=>console.error(N))},e.exportCsv=()=>{let N=["ts","level","module","displayMessage","_status","_url","_repoId"],D=[N.join(",")];for(let q of e.visible)D.push(N.map(Z=>{let x=q[Z]==null?"":String(q[Z]);return/[",\n]/.test(x)?`"${x.replace(/"/g,'""')}"`:x}).join(","));let I=new Blob([D.join(`
|
||||
`)],{type:"text/csv;charset=utf-8"}),C=URL.createObjectURL(I),A=document.createElement("a");A.href=C,A.download=`errors-${new Date().toISOString().slice(0,19)}.csv`,document.body.appendChild(A),A.click(),document.body.removeChild(A),URL.revokeObjectURL(C)};function b(N){e.copyHint=`${N} copied`,n.timeout(()=>{e.copyHint=""},1500)}e.copyJson=N=>{navigator.clipboard.writeText(N._detailJson).then(()=>b("JSON"))},e.copyCurl=N=>{if(!N._url)return;let I=`curl -X ${N._method||"GET"} '${window.location.origin}${N._url}'`;navigator.clipboard.writeText(I).then(()=>b("curl"))},k();let T=r(()=>{e.query.autoRefresh&&k()},15e3);e.on("dispose",()=>r.cancel(T)),e.watch("query.search",g),e.watch("query.bucket",g),e.watch("query.sort",g),e.watch("query.group",g)},Ba=function(e,t,o,r){if(e.Math=Math,e.watch("user.status",()=>{e.user==null&&o.url("/")}),e.user==null){o.url("/");return}e.data=null,e.loading=!0,e.error=null;function n(f){if(f==null)return"\u2014";for(var w=["B","KB","MB","GB","TB"],k=0,b=f;b>=1024&&k<w.length-1;)b/=1024,k++;return b.toFixed(k>0?1:0)+" "+w[k]}e.humanBytes=n;function i(f){if(!f)return"\u2014";var w=Math.floor(f/86400),k=Math.floor(f%86400/3600),b=Math.floor(f%3600/60);return w>0?w+"d "+(k<10?"0":"")+k+"h":k>0?k+"h "+(b<10?"0":"")+b+"m":b+"m"}e.humanDuration=i;function a(f){return f==null?"\u2014":f>=1e6?(f/1e6).toFixed(1)+"M":f>=1e3?(f/1e3).toFixed(1)+"K":String(f)}e.humanNum=a,e.queueTotal=function(f){return f?(f.waiting||0)+(f.active||0)+(f.delayed||0)+(f.failed||0):0},e.statusCount=function(f){if(!e.data||!e.data.repos)return 0;for(var w=e.data.repos.statusBreakdown||[],k=0;k<w.length;k++)if(w[k]._id===f)return w[k].count;return 0},e.barPct=function(f){var w=e.data&&e.data.repos?e.data.repos.total:0;if(!w)return 0;var k=[f];f==="expired"&&k.push("expiring"),f==="removed"&&k.push("removing"),f==="preparing"&&k.push("download");var b=0;return k.forEach(function(T){b+=e.statusCount(T)}),Math.max(.4,b/w*100)},e.errPct=function(f){if(!e.data||!e.data.errors)return 0;var w=Math.max(e.data.errors.severity.error,e.data.errors.severity.warn,e.data.errors.severity.info,1);return e.data.errors.severity[f]/w*100};function u(f){var w=f||[];return w.map(function(k,b){var T=w[b-1]||{},N=Object.assign({},k);return N.dailyRepositories=b?Math.max(0,(k.nbRepositories||0)-(T.nbRepositories||0)):0,N.dailyUsers=b?Math.max(0,(k.nbUsers||0)-(T.nbUsers||0)):0,N.dailyPageViews=b?Math.max(0,(k.nbPageViews||0)-(T.nbPageViews||0)):0,N})}function p(f){var w=f&&f.length?f[f.length-1]:{};return{repositories:w.dailyRepositories||0,users:w.dailyUsers||0,pageViews:w.dailyPageViews||0}}var h={};e.historyBarH=function(f,w){return!f||!h[w]?0:Math.max(1,Math.round(f[w]/h[w]*140))},e.historyLabel=function(f){if(!f||!f.date)return"";var w=new Date(f.date);return w.getUTCMonth()+1+"/"+w.getUTCDate()};function v(){t.get("/api/admin/overview").then(function(f){f.data.history=u(f.data.history),f.data.daily={today:p(f.data.history)},e.data=f.data,e.loading=!1,e.error=null,h={},(f.data.history||[]).forEach(function(w){["dailyPageViews","dailyRepositories","dailyUsers","nbUsers"].forEach(function(k){(!h[k]||w[k]>h[k])&&(h[k]=w[k])})})},function(f){e.loading=!1,e.error=f.data&&f.data.error||"Failed to load overview"})}v();var g=r(v,3e4);e.on("dispose",function(){r.cancel(g)})};var Ga=[{path:"/connections",template:"partials/connections.htm",title:"GitHub connections \u2013 Anonymous GitHub",preserveExplorer:!1,setup:(e,t)=>Ma(e,t.http)},{path:"/signin",template:"partials/signin.htm",title:"Sign in \u2013 Anonymous GitHub",preserveExplorer:!1,setup:()=>{}},{path:"/",template:"partials/home.htm",title:"Anonymous GitHub \u2013 Share the code, not the author",preserveExplorer:!1,setup:(e,t)=>Ta(e,t.http,t.location,t.window,t.timeout)},{path:"/dashboard",template:"partials/dashboard.htm",title:"Your anonymizations \u2013 Anonymous GitHub",preserveExplorer:!1,setup:(e,t)=>Oa(e,t.http,t.location,t.promises,t.window,t.quotaService)},{path:"/pr-dashboard",redirect:"/dashboard"},{path:"/anonymize/:repoId?",template:"partials/anonymize.htm",title:"New anonymization \u2013 Anonymous GitHub",preserveExplorer:!1,setup:(e,t)=>Yn(e,t.http,t.html,t.params,t.location,t.translate,t.timeout)},{path:"/pull-request-anonymize/:pullRequestId?",template:"partials/anonymize.htm",title:"Anonymize a pull request \u2013 Anonymous GitHub",preserveExplorer:!1,setup:(e,t)=>Yn(e,t.http,t.html,t.params,t.location,t.translate,t.timeout)},{path:"/gist-anonymize/:gistId?",template:"partials/anonymize.htm",title:"Anonymize a gist \u2013 Anonymous GitHub",preserveExplorer:!1,setup:(e,t)=>Yn(e,t.http,t.html,t.params,t.location,t.translate,t.timeout)},{path:"/status/:repoId",template:"partials/status.htm",title:"Repository status \u2013 Anonymous GitHub",preserveExplorer:!1,setup:(e,t)=>Aa(e,t.http,t.params)},{path:"/conferences",template:"partials/conferences.htm",title:"Your conferences \u2013 Anonymous GitHub",preserveExplorer:!1,setup:(e,t)=>Pa(e,t.http,t.location)},{path:"/con
Line truncated
|
||||
anonymous_github`)])])])])]),m(" Limitations "),s("h4",{class:"faq-cat"},[s("i",{class:"fas fa-exclamation-triangle mr-2"}),y("Limitations ")]),s("div",{class:"panel-group",id:"faq-limitations",role:"tablist","aria-multiselectable":"true"},[s("div",{class:"panel panel-default mb-3"},[s("div",{class:"panel-heading p-3",role:"tab",id:"headingLimitation"},[s("h3",{class:"panel-title"},[s("a",{class:"collapsed",role:"button","data-toggle":"collapse","data-parent":"#faq-limitations",href:"#limitation","aria-expanded":"false","aria-controls":"limitation"}," What are the limitations of Anonymous GitHub? ")])]),s("div",{id:"limitation",class:"panel-collapse collapse",role:"tabpanel","aria-labelledby":"headingLimitation"},[s("div",{class:"panel-body p-3"},[s("ul",null,[s("li",null," Anonymous GitHub only anonymizes text-based files. Binary files (compiled executables, archives, etc.) are served as-is without anonymization. "),s("li",null," Files larger than 8 MB are not supported. "),s("li",null," Static site generators (such as Jekyll) used with GitHub Pages are not fully supported, although Markdown files are converted to HTML. "),s("li",null," The anonymization of terms within source code may change the behavior of the program (e.g., if a replaced term appears in a string literal or identifier). ")])])])])]),m(" Privacy & Security "),s("h4",{class:"faq-cat"},[s("i",{class:"fas fa-shield-alt mr-2"}),y("Privacy & Security ")]),s("div",{class:"panel-group",id:"faq-privacy",role:"tablist","aria-multiselectable":"true"},[s("div",{class:"panel panel-default mb-3"},[s("div",{class:"panel-heading p-3",role:"tab",id:"headingData"},[s("h3",{class:"panel-title"},[s("a",{class:"collapsed",role:"button","data-toggle":"collapse","data-parent":"#faq-privacy",href:"#data","aria-expanded":"false","aria-controls":"data"}," How is my data handled? ")])]),s("div",{id:"data",class:"panel-collapse collapse",role:"tabpanel","aria-labelledby":"headingData"},[s("div",{class:"panel-body p-3"},[s("p",null," Data stored on Anonymous GitHub is never shared or used for any purpose beyond providing the anonymization service. When a repository is removed or expires, only its configuration is retained \u2014 this makes it easy to restore the repository if needed and ensures that no future repository reuses the same ID. ")])])]),s("div",{class:"panel panel-default mb-3"},[s("div",{class:"panel-heading p-3",role:"tab",id:"headingPermissions"},[s("h3",{class:"panel-title"},[s("a",{class:"collapsed",role:"button","data-toggle":"collapse","data-parent":"#faq-privacy",href:"#permissions","aria-expanded":"false","aria-controls":"permissions"}," Why does GitHub say Anonymous GitHub asks for write access? ")])]),s("div",{id:"permissions",class:"panel-collapse collapse",role:"tabpanel","aria-labelledby":"headingPermissions"},[s("div",{class:"panel-body p-3"},[s("p",null," Anonymous GitHub only reads your repositories \u2014 it never pushes commits, opens issues, modifies settings, or deletes anything. From your perspective as a user, the service is read-only. "),s("p",null,[y(" However, GitHub's OAuth scopes do not offer a read-only option for private repositories: the only scope that grants access to private repos is "),s("code",null,"repo"),y(", which is documented as full read/write access. To support users who want to anonymize a private repository, Anonymous GitHub must request that scope, and GitHub then displays the broader permission text at sign-in. The application itself only ever performs read operations against the GitHub API. ")]),s("p",null,[y(" If you only anonymize public repositories, the source code is open and can be audited on the "),s("a",{href:"https://github.com/tdurieux/anonymous_github/",target:"_blank"},"GitHub repository"),y(", or you can self-host your own instance. ")])])])]),s("div",{class:"panel panel-default mb-3"},[s("div",{class:"panel-heading p-3",role:"tab",id:"headingViewer"},[s("h3",{class:"panel-title"},[s("a",{class:"collapsed",role:"button","data-toggle":"collapse","data-parent":"#faq-privacy",href:"#viewer","aria-expanded":"false","aria-controls":"viewer"}," Can repository owners see who viewed their anonymized repository? ")])]),s("div",{id:"viewer",class:"panel-collapse collapse",role:"tabpanel","aria-labelledby":"headingViewer"},[s("div",{class:"panel-body p-3"},[s("p",null," No. Only the total number of views is tracked as an incremental counter. It is not possible for the repository owner or for Anonymous GitHub to identify individual viewers. Reviewer anonymity is fully preserved. ")])])])]),m(" Self-Hosting "),s("h4",{class:"faq-cat"},[s("i",{class:"fas fa-server mr-2"}),y("Self-Hosting ")]),s("div",{class:"panel-group",id:"faq-hosting",role:"tablist","aria-multiselectable":"true"},[s("div",{class:"panel panel-default mb-3"},[s("div",{class:"panel-heading p-3",role:"tab",id:"headingDeploy"},[s("h3",{class:"panel-title"},[s("a",{class:"collapsed",role:"button","data-toggle":"collapse","data-parent":"#faq-ho
Line truncated
|
||||
`)}function h(N){let D=[],I="",C=/(\w+):(>=|<=|!=|>|<|=)?([^\s]+)/g,A=0,q;for(;q=C.exec(N);)I+=N.slice(A,q.index),A=C.lastIndex,D.push({key:q[1],op:q[2]||"=",val:q[3]});return I+=N.slice(A),{filters:D,free:I.trim().toLowerCase()}}function v(N,D){for(let I of D.filters){let C=(q,Z,X)=>{let K=parseFloat(q),U=parseFloat(Z);return X==="="?String(q)===String(Z):X==="!="?String(q)!==String(Z):X===">="?K>=U:X==="<="?K<=U:X===">"?K>U:X==="<"?K<U:!0},A;if(I.key==="code")A=N.displayMessage;else if(I.key==="module")A=N.module;else if(I.key==="status")A=N._status;else if(I.key==="url")A=N._url;else if(I.key==="repo")A=N._repoId;else if(I.key==="level")A=N.level;else continue;if(A==null||!C(A,I.val,I.op))return!1}return!(D.free&&((N.displayMessage||"")+" "+(N.module||"")+" "+(N._url||"")+" "+JSON.stringify(N.raw||[])).toLowerCase().indexOf(D.free)===-1)}function g(){let N=h(e.query.search||"");e.parsedFilterCount=N.filters.length;let D=e.query.bucket,I=e.entries.filter(A=>D&&A._bucket!==D?!1:v(A,N)),C=e.query.group;if(C){let A=X=>C==="module"?X.module:X.displayMessage||X.message||"_",q=new Map;for(let X of I){let K=A(X);if(q.has(K)){let U=q.get(K);U.count++,U._related.push(X),new Date(X.ts)>new Date(U.ts)&&(U.ts=X.ts,U._url=X._url,U._status=X._status),new Date(X.ts)<new Date(U._firstSeen)&&(U._firstSeen=X.ts)}else{let U=Object.assign({},X);U._key=`${C}:${K}`,U._related=[X],U._firstSeen=X.ts,U._lastHourCount=0,U.count=1,q.set(K,U)}}let Z=Date.now()-3600*1e3;for(let X of q.values())X._lastHourCount=X._related.filter(K=>new Date(K.ts).getTime()>=Z).length;I=Array.from(q.values())}else I=I.map((A,q)=>(A._key="row:"+q+":"+A.ts,A._related=[A],A._firstSeen=A.ts,A._lastHourCount=0,A.count=1,A));e.query.sort==="count"?I.sort((A,q)=>q.count-A.count||new Date(q.ts)-new Date(A.ts)):I.sort((A,q)=>new Date(q.ts)-new Date(A.ts)),e.visible=I}function f(N){let D=N?e.entries.length:0,I=N?e.pageSize:Math.max(e.pageSize,e.entries.length||e.pageSize);t.get("/api/admin/errors",{params:{offset:D,limit:I}}).then(C=>{let A=(C.data.entries||[]).map(u);e.entries=N?e.entries.concat(A):A,e.available=!!C.data.available,e.cap=C.data.max||e.cap,e.total=C.data.total||e.entries.length,g()},C=>console.error(C))}e.loadMore=()=>f(!0),e.canLoadMore=()=>e.entries.length<e.total;function w(){t.get("/api/admin/errors/stats").then(N=>{let D=N.data||{},I=D.prev24h?Math.round((D.last24h-D.prev24h)/D.prev24h*100):0;e.stats={last24h:D.last24h||0,prev24h:D.prev24h||0,delta:I,severity:D.severity||{error:0,warn:0,info:0},unique:D.unique||{error:0,warn:0,info:0},buckets:D.buckets||[],dropped:D.dropped||0}},N=>console.error(N))}function k(){f(),w()}e.barPx=(N,D)=>{let I=e.stats.buckets||[],C=0;for(let X of I)C=Math.max(C,(X.error||0)+(X.warn||0)+(X.info||0));if(!C)return 0;let A=(N.error||0)+(N.warn||0)+(N.info||0);if(!A)return 0;let q=Math.round(A/C*60),Z=N[D]||0;return Math.round(Z/A*q)},e.bucketTitle=N=>`${new Date(N.hour).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})} \xB7 ${N.error||0} err \xB7 ${N.warn||0} warn \xB7 ${N.info||0} info`,e.toggle=N=>{e.expanded[N._key]=!e.expanded[N._key]},e.setBucket=N=>{e.query.bucket=N},e.refreshNow=k,e.clearAll=()=>{confirm("Clear all captured errors?")&&t.delete("/api/admin/errors").then(k,N=>console.error(N))},e.exportCsv=()=>{let N=["ts","level","module","displayMessage","_status","_url","_repoId"],D=[N.join(",")];for(let q of e.visible)D.push(N.map(Z=>{let X=q[Z]==null?"":String(q[Z]);return/[",\n]/.test(X)?`"${X.replace(/"/g,'""')}"`:X}).join(","));let I=new Blob([D.join(`
|
||||
`)],{type:"text/csv;charset=utf-8"}),C=URL.createObjectURL(I),A=document.createElement("a");A.href=C,A.download=`errors-${new Date().toISOString().slice(0,19)}.csv`,document.body.appendChild(A),A.click(),document.body.removeChild(A),URL.revokeObjectURL(C)};function b(N){e.copyHint=`${N} copied`,n.timeout(()=>{e.copyHint=""},1500)}e.copyJson=N=>{navigator.clipboard.writeText(N._detailJson).then(()=>b("JSON"))},e.copyCurl=N=>{if(!N._url)return;let I=`curl -X ${N._method||"GET"} '${window.location.origin}${N._url}'`;navigator.clipboard.writeText(I).then(()=>b("curl"))},k();let T=r(()=>{e.query.autoRefresh&&k()},15e3);e.on("dispose",()=>r.cancel(T)),e.watch("query.search",g),e.watch("query.bucket",g),e.watch("query.sort",g),e.watch("query.group",g)},Ba=function(e,t,o,r){if(e.Math=Math,e.watch("user.status",()=>{e.user==null&&o.url("/")}),e.user==null){o.url("/");return}e.data=null,e.loading=!0,e.error=null;function n(f){if(f==null)return"\u2014";for(var w=["B","KB","MB","GB","TB"],k=0,b=f;b>=1024&&k<w.length-1;)b/=1024,k++;return b.toFixed(k>0?1:0)+" "+w[k]}e.humanBytes=n;function i(f){if(!f)return"\u2014";var w=Math.floor(f/86400),k=Math.floor(f%86400/3600),b=Math.floor(f%3600/60);return w>0?w+"d "+(k<10?"0":"")+k+"h":k>0?k+"h "+(b<10?"0":"")+b+"m":b+"m"}e.humanDuration=i;function a(f){return f==null?"\u2014":f>=1e6?(f/1e6).toFixed(1)+"M":f>=1e3?(f/1e3).toFixed(1)+"K":String(f)}e.humanNum=a,e.queueTotal=function(f){return f?(f.waiting||0)+(f.active||0)+(f.delayed||0)+(f.failed||0):0},e.statusCount=function(f){if(!e.data||!e.data.repos)return 0;for(var w=e.data.repos.statusBreakdown||[],k=0;k<w.length;k++)if(w[k]._id===f)return w[k].count;return 0},e.barPct=function(f){var w=e.data&&e.data.repos?e.data.repos.total:0;if(!w)return 0;var k=[f];f==="expired"&&k.push("expiring"),f==="removed"&&k.push("removing"),f==="preparing"&&k.push("download");var b=0;return k.forEach(function(T){b+=e.statusCount(T)}),Math.max(.4,b/w*100)},e.errPct=function(f){if(!e.data||!e.data.errors)return 0;var w=Math.max(e.data.errors.severity.error,e.data.errors.severity.warn,e.data.errors.severity.info,1);return e.data.errors.severity[f]/w*100};function u(f){var w=f||[];return w.map(function(k,b){var T=w[b-1]||{},N=Object.assign({},k);return N.dailyRepositories=b?Math.max(0,(k.nbRepositories||0)-(T.nbRepositories||0)):0,N.dailyUsers=b?Math.max(0,(k.nbUsers||0)-(T.nbUsers||0)):0,N.dailyPageViews=b?Math.max(0,(k.nbPageViews||0)-(T.nbPageViews||0)):0,N})}function p(f){var w=f&&f.length?f[f.length-1]:{};return{repositories:w.dailyRepositories||0,users:w.dailyUsers||0,pageViews:w.dailyPageViews||0}}var h={};e.historyBarH=function(f,w){return!f||!h[w]?0:Math.max(1,Math.round(f[w]/h[w]*140))},e.historyLabel=function(f){if(!f||!f.date)return"";var w=new Date(f.date);return w.getUTCMonth()+1+"/"+w.getUTCDate()};function v(){t.get("/api/admin/overview").then(function(f){f.data.history=u(f.data.history),f.data.daily={today:p(f.data.history)},e.data=f.data,e.loading=!1,e.error=null,h={},(f.data.history||[]).forEach(function(w){["dailyPageViews","dailyRepositories","dailyUsers","nbUsers"].forEach(function(k){(!h[k]||w[k]>h[k])&&(h[k]=w[k])})})},function(f){e.loading=!1,e.error=f.data&&f.data.error||"Failed to load overview"})}v();var g=r(v,3e4);e.on("dispose",function(){r.cancel(g)})};var Ga=[{path:"/connections",template:"partials/connections.htm",title:"GitHub connections \u2013 Anonymous GitHub",preserveExplorer:!1,setup:(e,t)=>Ma(e,t.http)},{path:"/signin",template:"partials/signin.htm",title:"Sign in \u2013 Anonymous GitHub",preserveExplorer:!1,setup:()=>{}},{path:"/",template:"partials/home.htm",title:"Anonymous GitHub \u2013 Share the code, not the author",preserveExplorer:!1,setup:(e,t)=>Ta(e,t.http,t.location,t.window,t.timeout)},{path:"/dashboard",template:"partials/dashboard.htm",title:"Your anonymizations \u2013 Anonymous GitHub",preserveExplorer:!1,setup:(e,t)=>Oa(e,t.http,t.location,t.promises,t.window,t.quotaService)},{path:"/pr-dashboard",redirect:"/dashboard"},{path:"/anonymize/:repoId?",template:"partials/anonymize.htm",title:"New anonymization \u2013 Anonymous GitHub",preserveExplorer:!1,setup:(e,t)=>Yn(e,t.http,t.html,t.params,t.location,t.translate,t.timeout)},{path:"/pull-request-anonymize/:pullRequestId?",template:"partials/anonymize.htm",title:"Anonymize a pull request \u2013 Anonymous GitHub",preserveExplorer:!1,setup:(e,t)=>Yn(e,t.http,t.html,t.params,t.location,t.translate,t.timeout)},{path:"/gist-anonymize/:gistId?",template:"partials/anonymize.htm",title:"Anonymize a gist \u2013 Anonymous GitHub",preserveExplorer:!1,setup:(e,t)=>Yn(e,t.http,t.html,t.params,t.location,t.translate,t.timeout)},{path:"/status/:repoId",template:"partials/status.htm",title:"Repository status \u2013 Anonymous GitHub",preserveExplorer:!1,setup:(e,t)=>Aa(e,t.http,t.params)},{path:"/conferences",template:"partials/conferences.htm",title:"Your conferences \u2013 Anonymous GitHub",preserveExplorer:!1,setup:(e,t)=>Pa(e,t.http,t.location)},{path:"/con
Line truncated
|
||||
anonymous_github`)])])])])]),m(" Limitations "),s("h4",{class:"faq-cat"},[s("i",{class:"fas fa-exclamation-triangle mr-2"}),y("Limitations ")]),s("div",{class:"panel-group",id:"faq-limitations",role:"tablist","aria-multiselectable":"true"},[s("div",{class:"panel panel-default mb-3"},[s("div",{class:"panel-heading p-3",role:"tab",id:"headingLimitation"},[s("h3",{class:"panel-title"},[s("a",{class:"collapsed",role:"button","data-toggle":"collapse","data-parent":"#faq-limitations",href:"#limitation","aria-expanded":"false","aria-controls":"limitation"}," What are the limitations of Anonymous GitHub? ")])]),s("div",{id:"limitation",class:"panel-collapse collapse",role:"tabpanel","aria-labelledby":"headingLimitation"},[s("div",{class:"panel-body p-3"},[s("ul",null,[s("li",null," Anonymous GitHub only anonymizes text-based files. Binary files (compiled executables, archives, etc.) are served as-is without anonymization. "),s("li",null," Files larger than 8 MB are not supported. "),s("li",null," Static site generators (such as Jekyll) used with GitHub Pages are not fully supported, although Markdown files are converted to HTML. "),s("li",null," The anonymization of terms within source code may change the behavior of the program (e.g., if a replaced term appears in a string literal or identifier). ")])])])])]),m(" Privacy & Security "),s("h4",{class:"faq-cat"},[s("i",{class:"fas fa-shield-alt mr-2"}),y("Privacy & Security ")]),s("div",{class:"panel-group",id:"faq-privacy",role:"tablist","aria-multiselectable":"true"},[s("div",{class:"panel panel-default mb-3"},[s("div",{class:"panel-heading p-3",role:"tab",id:"headingData"},[s("h3",{class:"panel-title"},[s("a",{class:"collapsed",role:"button","data-toggle":"collapse","data-parent":"#faq-privacy",href:"#data","aria-expanded":"false","aria-controls":"data"}," How is my data handled? ")])]),s("div",{id:"data",class:"panel-collapse collapse",role:"tabpanel","aria-labelledby":"headingData"},[s("div",{class:"panel-body p-3"},[s("p",null," Data stored on Anonymous GitHub is never shared or used for any purpose beyond providing the anonymization service. When a repository is removed or expires, only its configuration is retained \u2014 this makes it easy to restore the repository if needed and ensures that no future repository reuses the same ID. ")])])]),s("div",{class:"panel panel-default mb-3"},[s("div",{class:"panel-heading p-3",role:"tab",id:"headingPermissions"},[s("h3",{class:"panel-title"},[s("a",{class:"collapsed",role:"button","data-toggle":"collapse","data-parent":"#faq-privacy",href:"#permissions","aria-expanded":"false","aria-controls":"permissions"}," Why does GitHub say Anonymous GitHub asks for write access? ")])]),s("div",{id:"permissions",class:"panel-collapse collapse",role:"tabpanel","aria-labelledby":"headingPermissions"},[s("div",{class:"panel-body p-3"},[s("p",null," Anonymous GitHub only reads your repositories \u2014 it never pushes commits, opens issues, modifies settings, or deletes anything. From your perspective as a user, the service is read-only. "),s("p",null,[y(" However, GitHub's OAuth scopes do not offer a read-only option for private repositories: the only scope that grants access to private repos is "),s("code",null,"repo"),y(", which is documented as full read/write access. To support users who want to anonymize a private repository, Anonymous GitHub must request that scope, and GitHub then displays the broader permission text at sign-in. The application itself only ever performs read operations against the GitHub API. ")]),s("p",null,[y(" If you only anonymize public repositories, the source code is open and can be audited on the "),s("a",{href:"https://github.com/tdurieux/anonymous_github/",target:"_blank"},"GitHub repository"),y(", or you can self-host your own instance. ")])])])]),s("div",{class:"panel panel-default mb-3"},[s("div",{class:"panel-heading p-3",role:"tab",id:"headingViewer"},[s("h3",{class:"panel-title"},[s("a",{class:"collapsed",role:"button","data-toggle":"collapse","data-parent":"#faq-privacy",href:"#viewer","aria-expanded":"false","aria-controls":"viewer"}," Can repository owners see who viewed their anonymized repository? ")])]),s("div",{id:"viewer",class:"panel-collapse collapse",role:"tabpanel","aria-labelledby":"headingViewer"},[s("div",{class:"panel-body p-3"},[s("p",null," No. Only the total number of views is tracked as an incremental counter. It is not possible for the repository owner or for Anonymous GitHub to identify individual viewers. Reviewer anonymity is fully preserved. ")])])])]),m(" Self-Hosting "),s("h4",{class:"faq-cat"},[s("i",{class:"fas fa-server mr-2"}),y("Self-Hosting ")]),s("div",{class:"panel-group",id:"faq-hosting",role:"tablist","aria-multiselectable":"true"},[s("div",{class:"panel panel-default mb-3"},[s("div",{class:"panel-heading p-3",role:"tab",id:"headingDeploy"},[s("h3",{class:"panel-title"},[s("a",{class:"collapsed",role:"button","data-toggle":"collapse","data-parent":"#faq-ho
Line truncated
|
||||
anonymized repository often think it is about the paper, so the
|
||||
label names the service and the tooltip says who to contact. `),t[12]||(t[12]=s("li",{class:"nav-item d-none d-lg-block"},[s("a",{class:"nav-link",target:"_blank",rel:"noopener",href:"https://github.com/tdurieux/anonymous_github/issues/new?template=issue_report.yml",title:"Report a problem with the Anonymous GitHub service. Questions about an anonymized repository or paper go to its authors.","data-offset":"30"},[s("i",{class:"fas fa-bug d-lg-none mr-1","aria-hidden":"true"}),y("Report a bug ")])],-1)),e.isDarkMode?m("v-if",!0):(l(),d("li",uO,[s("a",{class:"nav-link nav-icon",href:"#",title:"Switch to dark mode","aria-label":"Switch to dark mode",role:"button",onClick:t[0]||(t[0]=we(o=>{e.darkMode(!0)},["prevent"]))},[...t[7]||(t[7]=[s("i",{class:"fas fa-moon","aria-hidden":"true"},null,-1)])])])),e.isDarkMode?(l(),d("li",cO,[s("a",{class:"nav-link nav-icon",href:"#",title:"Switch to light mode","aria-label":"Switch to light mode",role:"button",onClick:t[1]||(t[1]=we(o=>{e.darkMode(!1)},["prevent"]))},[...t[8]||(t[8]=[s("i",{class:"fas fa-sun","aria-hidden":"true"},null,-1)])])])):m("v-if",!0),e.user?m("v-if",!0):(l(),d("li",pO,[...t[9]||(t[9]=[s("a",{class:"nav-link btn-signin",target:"_self",href:"/signin","data-offset":"30"},[s("i",{class:"fab fa-github mr-1"}),y(" Sign in ")],-1)])])),e.user?(l(),d("li",fO,[s("a",mO,[e.user?.photo?(l(),d("img",{key:0,width:"22",height:"22",class:"rounded-circle",src:e.safeUrl(e.user?.photo)},null,8,hO)):m("v-if",!0),s("span",vO,c(e.user?.username),1)]),s("div",yO,[s("h6",gO,"Signed in as @"+c(e.user?.username),1),t[10]||(t[10]=Ee('<a class="dropdown-item" href="/connections">GitHub connections</a><a class="dropdown-item" href="/profile"><i class="fas fa-sliders-h" aria-hidden="true"></i><span>Settings<small>Defaults, quotas, account</small></span></a><a class="dropdown-item" href="/claim"><i class="fas fa-link" aria-hidden="true"></i><span>Claim an anonymization<small>Attach an existing mirror to your account</small></span></a><div class="dropdown-divider"></div><a class="dropdown-item" href="https://github.com/tdurieux/anonymous_github/issues/new?template=issue_report.yml" target="_blank" rel="noopener"><i class="fas fa-bug" aria-hidden="true"></i><span>Report a bug<small>About this service, not a paper</small></span></a><a class="dropdown-item" href="https://github.com/tdurieux/anonymous_github/" target="_blank" rel="noopener"><i class="fab fa-github" aria-hidden="true"></i><span>Source code</span></a><div class="dropdown-divider"></div><a class="dropdown-item" href="/api/user/logout" target="_self"><i class="fas fa-sign-out-alt" aria-hidden="true"></i><span>Sign out</span></a>',8))])])):m("v-if",!0)])])],2),e.generalMessage?(l(),d("div",{key:0,class:"navbar shadow generalMessage",innerHTML:e.sanitize(e.generalMessage)},null,8,bO)):m("v-if",!0)],64)}var wO={class:"paper-landing"},kO={class:"paper-hero"},_O={class:"paper-hero-copy"},EO={class:"paper-cta-row"},CO={key:0,href:"/signin",target:"_self",class:"btn-hero"},NO={key:1,href:"/anonymize",class:"btn-hero"},SO={class:"paper-stats paper-wrap",id:"metrics","aria-label":"Usage over the last 60 days"},DO={class:"paper-stats-grid"},RO={class:"paper-stat-value"},TO={class:"paper-stat-label"},OO=["viewBox"],AO=["x","y","width","height"],IO={key:1,class:"paper-stat-delta"},VO={class:"paper-features paper-wrap","aria-label":"Product features"},PO={class:"paper-features-list",role:"tablist","aria-label":"Features","aria-orientation":"vertical"},qO=["onClick","onKeydown","id","aria-controls","aria-selected","tabindex"],MO={class:"paper-eyebrow"},$O={class:"paper-feature-title"},LO={class:"paper-feature-more"},FO={class:"paper-feature-title paper-feature-title-m","aria-hidden":"true"},UO=["href","target"],zO={class:"paper-features-stage"},HO=["id","aria-labelledby"],BO={class:"paper-frame"},GO={class:"paper-frame-bar","aria-hidden":"true"},jO={class:"url"},WO=["src","alt"],KO={class:"paper-footer"},YO={class:"paper-footer-inner"},JO={class:"paper-footer-col"},QO={key:0,href:"/dashboard"},xO={key:1,href:"/conferences"},XO={class:"paper-footer-foot"};function cl(e,t){return l(),d("div",wO,[m(" Hero: copy on the left, the product on the right "),s("section",kO,[s("div",_O,[t[2]||(t[2]=s("div",{class:"paper-eyebrow"},"For double-blind peer review",-1)),t[3]||(t[3]=s("h1",{class:"hero-title"},[y(" Share the code,"),s("br"),s("span",{class:"accent"},"not the author.")],-1)),t[4]||(t[4]=s("p",{class:"hero-subtitle"}," Anonymous GitHub makes a read-only mirror of your repository, pull request, or gist with every trace of identity removed, so you can attach a link to your submission without breaking anonymity. ",-1)),s("div",EO,[e.user?m("v-if",!0):(l(),d("a",CO,[...t[0]||(t[0]=[s("i",{class:"fab fa-github mr-2","aria-hidden":"true"},null,-1),y("Sign in with GitHub ",-1)])])),e.user?(l(),d("a",NO," Anonymize a repository \u2192 ")):m("v-if",!0),t[1]||(t[1]=s("a",{class:"paper-link-arrow",target:"_self",href:"https://anonymo
Line truncated
|
||||
label names the service and the tooltip says who to contact. `),t[12]||(t[12]=s("li",{class:"nav-item d-none d-lg-block"},[s("a",{class:"nav-link",target:"_blank",rel:"noopener",href:"https://github.com/tdurieux/anonymous_github/issues/new?template=issue_report.yml",title:"Report a problem with the Anonymous GitHub service. Questions about an anonymized repository or paper go to its authors.","data-offset":"30"},[s("i",{class:"fas fa-bug d-lg-none mr-1","aria-hidden":"true"}),y("Report a bug ")])],-1)),e.isDarkMode?m("v-if",!0):(l(),d("li",OO,[s("a",{class:"nav-link nav-icon",href:"#",title:"Switch to dark mode","aria-label":"Switch to dark mode",role:"button",onClick:t[0]||(t[0]=ke(o=>{e.darkMode(!0)},["prevent"]))},[...t[7]||(t[7]=[s("i",{class:"fas fa-moon","aria-hidden":"true"},null,-1)])])])),e.isDarkMode?(l(),d("li",AO,[s("a",{class:"nav-link nav-icon",href:"#",title:"Switch to light mode","aria-label":"Switch to light mode",role:"button",onClick:t[1]||(t[1]=ke(o=>{e.darkMode(!1)},["prevent"]))},[...t[8]||(t[8]=[s("i",{class:"fas fa-sun","aria-hidden":"true"},null,-1)])])])):m("v-if",!0),e.user?m("v-if",!0):(l(),d("li",IO,[...t[9]||(t[9]=[s("a",{class:"nav-link btn-signin",target:"_self",href:"/signin","data-offset":"30"},[s("i",{class:"fab fa-github mr-1"}),y(" Sign in ")],-1)])])),e.user?(l(),d("li",VO,[s("a",PO,[e.user?.photo?(l(),d("img",{key:0,width:"22",height:"22",class:"rounded-circle",src:e.safeUrl(e.user?.photo)},null,8,qO)):m("v-if",!0),s("span",MO,c(e.user?.username),1)]),s("div",$O,[s("h6",LO,"Signed in as @"+c(e.user?.username),1),t[10]||(t[10]=ge('<a class="dropdown-item" href="/profile"><i class="fas fa-sliders-h" aria-hidden="true"></i><span>Settings<small>Defaults, quotas, account</small></span></a><a class="dropdown-item" href="/connections"><i class="fab fa-github" aria-hidden="true"></i><span>GitHub connections<small>Repository access and OAuth</small></span></a><a class="dropdown-item" href="/claim"><i class="fas fa-link" aria-hidden="true"></i><span>Claim an anonymization<small>Attach an existing mirror to your account</small></span></a><div class="dropdown-divider"></div><a class="dropdown-item" href="https://github.com/tdurieux/anonymous_github/issues/new?template=issue_report.yml" target="_blank" rel="noopener"><i class="fas fa-bug" aria-hidden="true"></i><span>Report a bug<small>About this service, not a paper</small></span></a><a class="dropdown-item" href="https://github.com/tdurieux/anonymous_github/" target="_blank" rel="noopener"><i class="fab fa-github" aria-hidden="true"></i><span>Source code</span></a><div class="dropdown-divider"></div><a class="dropdown-item" href="/api/user/logout" target="_self"><i class="fas fa-sign-out-alt" aria-hidden="true"></i><span>Sign out</span></a>',8))])])):m("v-if",!0)])])],2),e.generalMessage?(l(),d("div",{key:0,class:"navbar shadow generalMessage",innerHTML:e.sanitize(e.generalMessage)},null,8,FO)):m("v-if",!0)],64)}var UO={class:"paper-landing"},zO={class:"paper-hero"},HO={class:"paper-hero-copy"},BO={class:"paper-cta-row"},GO={key:0,href:"/signin",target:"_self",class:"btn-hero"},jO={key:1,href:"/anonymize",class:"btn-hero"},WO={class:"paper-stats paper-wrap",id:"metrics","aria-label":"Usage over the last 60 days"},KO={class:"paper-stats-grid"},YO={class:"paper-stat-value"},JO={class:"paper-stat-label"},QO=["viewBox"],XO=["x","y","width","height"],xO={key:1,class:"paper-stat-delta"},ZO={class:"paper-features paper-wrap","aria-label":"Product features"},eA={class:"paper-features-list",role:"tablist","aria-label":"Features","aria-orientation":"vertical"},tA=["onClick","onKeydown","id","aria-controls","aria-selected","tabindex"],sA={class:"paper-eyebrow"},nA={class:"paper-feature-title"},oA={class:"paper-feature-more"},rA={class:"paper-feature-title paper-feature-title-m","aria-hidden":"true"},iA=["href","target"],aA={class:"paper-features-stage"},lA=["id","aria-labelledby"],dA={class:"paper-frame"},uA={class:"paper-frame-bar","aria-hidden":"true"},cA={class:"url"},pA=["src","alt"],fA={class:"paper-footer"},mA={class:"paper-footer-inner"},hA={class:"paper-footer-col"},vA={key:0,href:"/dashboard"},yA={key:1,href:"/conferences"},gA={class:"paper-footer-foot"};function cl(e,t){return l(),d("div",UO,[m(" Hero: copy on the left, the product on the right "),s("section",zO,[s("div",HO,[t[2]||(t[2]=s("div",{class:"paper-eyebrow"},"For double-blind peer review",-1)),t[3]||(t[3]=s("h1",{class:"hero-title"},[y(" Share the code,"),s("br"),s("span",{class:"accent"},"not the author.")],-1)),t[4]||(t[4]=s("p",{class:"hero-subtitle"}," Anonymous GitHub makes a read-only mirror of your repository, pull request, or gist with every trace of identity removed, so you can attach a link to your submission without breaking anonymity. ",-1)),s("div",BO,[e.user?m("v-if",!0):(l(),d("a",GO,[...t[0]||(t[0]=[s("i",{class:"fab fa-github mr-2","aria-hidden":"true"},null,-1),y("Sign in with GitHub ",-1)])])),e.user?(l(),d("a",jO," Anonymize a repository \
Line truncated
|
||||
MIT CSAIL
|
||||
jane.smith@example.org`},XV={id:"termsHelp",class:"form-text text-muted"},ZV={class:"invalid-feedback"},eP={id:"settings-display",class:"paper-settings-section"},tP={class:"form-group paper-check-list"},sP={class:"form-check"},nP={class:"form-check-input",type:"checkbox",id:"link",name:"link"},oP={class:"form-check"},rP={class:"form-check-input",type:"checkbox",id:"image",name:"image"},iP={class:"form-check"},aP={class:"form-check-input",type:"checkbox",id:"pdf",name:"pdf"},lP={class:"form-check"},dP={class:"form-check-input",type:"checkbox",id:"notebook",name:"notebook"},uP={id:"settings-features",class:"paper-settings-section"},cP={class:"form-group paper-check-list"},pP={class:"form-check"},fP={class:"form-check-input",type:"checkbox",id:"page",name:"page"},mP={class:"form-check"},hP={class:"form-check-input",type:"checkbox",id:"loc",name:"loc"},vP={class:"form-check"},yP={class:"form-check-input",type:"checkbox",id:"update",name:"update"},gP={class:"form-group"},bP={class:"form-control",id:"mode",name:"mode"},wP={class:"form-text text-muted"},kP={id:"settings-expiration",class:"paper-settings-section"},_P={class:"form-group"},EP={class:"form-control",id:"expiration",name:"expiration"},CP={class:"paper-settings-footer"},NP={key:0,class:"paper-inline-alert paper-inline-alert-error",role:"alert"},SP=["textContent"],DP={class:"paper-settings-actions"},RP=["disabled"],TP={key:0,class:"fas fa-check mr-1","aria-hidden":"true"},OP={id:"settings-account",class:"paper-settings-section"},AP={class:"paper-account-card"},IP=["src"],VP={class:"paper-account-identity"},PP={class:"paper-account-name"},qP={class:"paper-danger-zone"},MP={key:0,class:"paper-inline-alert paper-inline-alert-error",role:"alert"},$P=["textContent"],LP=["disabled"];function vl(e,t){let o=be("paper-scrollspy"),r=be("field"),n=be("form");return l(),d("div",AV,[t[47]||(t[47]=Ee('<div class="paper-crumbs"><a href="/dashboard">My work</a> \xA0/\xA0 <span class="here">Settings</span></div><h1 class="paper-page-title">Your <em>settings</em></h1><p class="paper-page-lede">Defaults applied to every new anonymization, your quotas, and your account.</p>',3)),s("div",IV,[E((l(),d("aside",VV,[...t[2]||(t[2]=[Ee('<div class="paper-settings-toc-head">On this page</div><nav><a href="#settings-quota">Quota</a><a href="#settings-terms">Terms to redact</a><a href="#settings-display">Display</a><a href="#settings-features">Features</a><a href="#settings-expiration">Expiration</a><a href="#settings-account">Account</a></nav>',2)])])),[[o]]),s("div",PV,[m(" Quota: same markup as the dashboard, driven by quotaService "),s("section",qV,[t[4]||(t[4]=s("div",{class:"paper-section-eyebrow"},"Quota",-1)),t[5]||(t[5]=s("p",{class:"paper-section-copy"},"What you are using across all your anonymizations. Conferences can lift these limits during a review window.",-1)),e.quota?(l(),d("div",MV,[(l(),d(Y,null,oe([{key:"repository",label:"Repositories",kind:"count"},{key:"storage",label:"Storage",kind:"bytes"},{key:"file",label:"Files",kind:"count"}],(i,a)=>s("div",$V,[s("div",LV,[s("span",FV,c(i?.label),1),i?.kind==="count"?(l(),d("span",UV,[y(c(e.fmt?.number(e.quota[i?.key].used)),1),e.quota[i?.key].unlimited?m("v-if",!0):(l(),d("span",zV," / "+c(e.fmt?.number(e.quota[i?.key].total)),1)),e.quota[i?.key].unlimited?(l(),d("span",HV,"Unlimited")):m("v-if",!0)])):m("v-if",!0),i?.kind==="bytes"?(l(),d("span",BV,[y(c(e.fmt?.humanFileSize(e.quota[i?.key].used)),1),e.quota[i?.key].unlimited?m("v-if",!0):(l(),d("span",GV," / "+c(e.fmt?.humanFileSize(e.quota[i?.key].total)),1)),e.quota[i?.key].unlimited?(l(),d("span",jV,"Unlimited")):m("v-if",!0)])):m("v-if",!0)]),s("div",{class:O(["quota-track","quota-"+e.quota[i?.key].level]),role:"progressbar","aria-valuemin":"0","aria-label":i?.label+" quota","aria-valuenow":e.quota[i?.key].used,"aria-valuemax":e.quota[i?.key].unlimited?e.quota[i?.key].used:e.quota[i?.key].total,"aria-valuetext":e.quota[i?.key].unlimited?"unlimited":e.fmt.number(e.quota[i?.key].percent,0)+"% used"},[e.quota[i?.key].unlimited?m("v-if",!0):(l(),d("div",{key:0,class:"quota-fill",style:Ve({width:e.quota[i?.key].percent+"%"})},null,4))],10,WV)])),64))])):m("v-if",!0),e.quota?m("v-if",!0):(l(),d("div",KV,[(l(),d(Y,null,oe([1,2,3],(i,a)=>s("div",YV,[...t[3]||(t[3]=[s("div",{class:"quota-header"},[s("span",{class:"skeleton skeleton-line",style:{width:"40%"}}),s("span",{class:"skeleton skeleton-line",style:{width:"25%"}})],-1),s("div",{class:"quota-track"},null,-1)])])),64))]))]),E((l(),d("form",{class:"form needs-validation",name:"defaultsForm",novalidate:"",onSubmit:t[0]||(t[0]=we(i=>e.submitForm(i,()=>{e.saveDefault(i)}),["prevent"]))},[s("section",JV,[t[11]||(t[11]=s("div",{class:"paper-section-eyebrow"},"Terms to redact",-1)),t[12]||(t[12]=s("p",{class:"paper-section-copy"},"Pre-filled in every new anonymization. You can still edit the list per anonymization.",-1)),s("div",QV,[t[10]||(t[10]=s("label",{class:"paper-field-label",for:"terms"},"Default terms",-1)),E(s("tex
Line truncated
|
||||
`);for(let g=0;g<v.length;g++){let f=v[g];if(f.startsWith("diff --git")){h(),p();continue}if(f.startsWith("--- ")){i&&i.lines.length&&h(),p().oldPath=f.replace(/^--- (a\/)?/,"").trim();continue}if(f.startsWith("+++ ")){p().newPath=f.replace(/^\+\+\+ (b\/)?/,"").trim();continue}if(!(f.startsWith("index ")||f.startsWith("similarity index")||f.startsWith("rename ")||f.startsWith("new file mode")||f.startsWith("deleted file mode")||f.startsWith("Binary files"))){if(f.startsWith("@@")){let w=f.match(/@@\s+-(\d+)(?:,\d+)?\s+\+(\d+)(?:,\d+)?\s+@@/);w&&(a=parseInt(w[1],10),u=parseInt(w[2],10)),p().lines.push({kind:"hunk",oldNo:"",newNo:"",text:f});continue}i&&(f.startsWith("+")?(i.lines.push({kind:"add",oldNo:"",newNo:u,text:f.slice(1)}),u++):f.startsWith("-")?(i.lines.push({kind:"remove",oldNo:a,newNo:"",text:f.slice(1)}),a++):(i.lines.push({kind:"ctx",oldNo:a,newNo:u,text:f.startsWith(" ")?f.slice(1):f}),a++,u++))}}return o(n,i),n.join("")}})({trustAsHtml:e=>e});function J3(e,t){return e==null?"":Number(e).toLocaleString(void 0,t==null?{}:{minimumFractionDigits:t,maximumFractionDigits:t})}function Q3(e){return String(e??"").toUpperCase()}function x3(e,t,o=0){return(e||[]).slice(o,o+t)}function X3(e,t){return Array.isArray(e)?typeof t=="function"?e.filter(t):e:[]}function Z3(e,t){if(!t)return e||[];let o=Array.isArray(t)?t:[t];return[...e||[]].sort((r,n)=>{for(let i of o){let a=i[0]==="-"?-1:1;i=i.replace(/^[+-]/,"");let u=i.split(".").reduce((h,v)=>h?.[v],r),p=i.split(".").reduce((h,v)=>h?.[v],n);if(typeof u=="string"&&(u=u.toLowerCase()),typeof p=="string"&&(p=p.toLowerCase()),u!==p)return(u==null?-1:p==null?1:u<p?-1:1)*a}return 0})}function eq(e,t){if(!e)return"";let o=new Date(e);if(isNaN(o))return String(e);if(!t||t==="mediumDate")return o.toLocaleDateString(void 0,{year:"numeric",month:"short",day:"numeric"});let r={yyyy:o.getFullYear(),MMM:o.toLocaleDateString(void 0,{month:"short"}),MM:String(o.getMonth()+1).padStart(2,"0"),dd:String(o.getDate()).padStart(2,"0"),d:o.getDate(),HH:String(o.getHours()).padStart(2,"0"),mm:String(o.getMinutes()).padStart(2,"0"),ss:String(o.getSeconds()).padStart(2,"0")};return t.replace(/yyyy|MMM|MM|dd|HH|mm|ss|d/g,n=>r[n])}function tq(e,t){return(t?.[e]??t?.[e===1?"one":"other"]??"").replace(/\{\}/g,e??0)}var El={ERRORS:{repository_job_cancelled:"The repository changed or was removed while processing.",storage_delete_failed:"Unable to remove cached files. Please try again later.",unknown_error:"Unknown error, contact the admin.",unreachable:"Anonymous GitHub is unreachable, contact the admin.",request_error:"Unable to download the file, check your connection or contact the admin.",not_found:"The requested resource could not be found.",not_connected:"You must be logged in to perform this action.",not_authorized:"You do not have permission to perform this action.",unable_to_connect_user:"Unable to connect your account. Please try again later.",user_not_found:"The requested user could not be found.",user_banned:"Your account has been banned. Contact the admin for more information.",repo_access_limited:"GitHub blocked access because the repository's organization restricts third-party OAuth apps. Ask an org owner to approve Anonymous GitHub under Settings \u2192 Third-party Access \u2192 OAuth app policy, or anonymize a personal fork instead.",repo_saml_enforcement:"The repository's organization enforces SAML single sign-on. Authorize your token for that organization (GitHub \u2192 Settings \u2192 Applications, or re-run the org's SSO sign-in), then retry. Alternatively, anonymize a personal fork.",repo_not_found:"The repository was not found on GitHub. Check the URL and spelling, make sure you are signed in to the account that can see it, and confirm the repo isn't hidden under an org that restricts third-party app access.",repo_empty:"The selected branch has no commits on GitHub. Push at least one commit, or pick a different branch, then retry.",repo_not_accessible:"Anonymous GitHub cannot access this repository. Verify the repository exists and that Anonymous GitHub has been authorized for the owning organization.",repository_archived:"This repository has been archived and its files are no longer available.",repository_expired:"The repository is expired.",invalid_status:"This action cannot be performed while the resource is in its current state.",repository_not_ready:"Anonymous GitHub is still processing the repository, it can take several minutes.",repository_not_accessible:"This repository is currently not accessible.",repo_is_updating:"Anonymous GitHub is still processing the repository, it can take several minutes.",invalid_repo:"The provided repository is not valid.",invalid_source_repository:"The repository source name is invalid; expected the form 'owner/name'.",repoId_not_defined:"A repository ID must be provided.",repoUrl_not_defined:"The repository URL needs to be defined.",source_not_provided:"A repository source must be provided.",github_rate_limit_exceeded:"GitHub
Line truncated
|
||||
jane.smith@example.org`},gP={id:"termsHelp",class:"form-text text-muted"},bP={class:"invalid-feedback"},wP={id:"settings-display",class:"paper-settings-section"},kP={class:"form-group paper-check-list"},_P={class:"form-check"},EP={class:"form-check-input",type:"checkbox",id:"link",name:"link"},CP={class:"form-check"},NP={class:"form-check-input",type:"checkbox",id:"image",name:"image"},SP={class:"form-check"},DP={class:"form-check-input",type:"checkbox",id:"pdf",name:"pdf"},RP={class:"form-check"},TP={class:"form-check-input",type:"checkbox",id:"notebook",name:"notebook"},OP={id:"settings-features",class:"paper-settings-section"},AP={class:"form-group paper-check-list"},IP={class:"form-check"},VP={class:"form-check-input",type:"checkbox",id:"page",name:"page"},PP={class:"form-check"},qP={class:"form-check-input",type:"checkbox",id:"loc",name:"loc"},MP={class:"form-check"},$P={class:"form-check-input",type:"checkbox",id:"update",name:"update"},LP={class:"form-group"},FP={class:"form-control",id:"mode",name:"mode"},UP={class:"form-text text-muted"},zP={id:"settings-expiration",class:"paper-settings-section"},HP={class:"form-group"},BP={class:"form-control",id:"expiration",name:"expiration"},GP={class:"paper-settings-footer"},jP={key:0,class:"paper-inline-alert paper-inline-alert-error",role:"alert"},WP=["textContent"],KP={class:"paper-settings-actions"},YP=["disabled"],JP={key:0,class:"fas fa-check mr-1","aria-hidden":"true"},QP={id:"settings-account",class:"paper-settings-section"},XP={class:"paper-account-card"},xP=["src"],ZP={class:"paper-account-identity"},e3={class:"paper-account-name"},t3={class:"paper-danger-zone"},s3={key:0,class:"paper-inline-alert paper-inline-alert-error",role:"alert"},n3=["textContent"],o3=["disabled"];function vl(e,t){let o=we("paper-scrollspy"),r=we("field"),n=we("form");return l(),d("div",XV,[t[48]||(t[48]=ge('<div class="paper-crumbs"><a href="/dashboard">My work</a> \xA0/\xA0 <span class="here">Settings</span></div><h1 class="paper-page-title">Your <em>settings</em></h1><p class="paper-page-lede">Defaults applied to every new anonymization, your quotas, and your account.</p>',3)),s("div",xV,[E((l(),d("aside",ZV,[...t[2]||(t[2]=[ge('<div class="paper-settings-toc-head">On this page</div><nav><a href="#settings-quota">Quota</a><a href="#settings-terms">Terms to redact</a><a href="#settings-display">Display</a><a href="#settings-features">Features</a><a href="#settings-expiration">Expiration</a><a href="#settings-account">Account</a></nav>',2)])])),[[o]]),s("div",eP,[m(" Quota: same markup as the dashboard, driven by quotaService "),s("section",tP,[t[4]||(t[4]=s("div",{class:"paper-section-eyebrow"},"Quota",-1)),t[5]||(t[5]=s("p",{class:"paper-section-copy"},"What you are using across all your anonymizations. Conferences can lift these limits during a review window.",-1)),e.quota?(l(),d("div",sP,[(l(),d(Y,null,oe([{key:"repository",label:"Repositories",kind:"count"},{key:"storage",label:"Storage",kind:"bytes"},{key:"file",label:"Files",kind:"count"}],(i,a)=>s("div",nP,[s("div",oP,[s("span",rP,c(i?.label),1),i?.kind==="count"?(l(),d("span",iP,[y(c(e.fmt?.number(e.quota[i?.key].used)),1),e.quota[i?.key].unlimited?m("v-if",!0):(l(),d("span",aP," / "+c(e.fmt?.number(e.quota[i?.key].total)),1)),e.quota[i?.key].unlimited?(l(),d("span",lP,"Unlimited")):m("v-if",!0)])):m("v-if",!0),i?.kind==="bytes"?(l(),d("span",dP,[y(c(e.fmt?.humanFileSize(e.quota[i?.key].used)),1),e.quota[i?.key].unlimited?m("v-if",!0):(l(),d("span",uP," / "+c(e.fmt?.humanFileSize(e.quota[i?.key].total)),1)),e.quota[i?.key].unlimited?(l(),d("span",cP,"Unlimited")):m("v-if",!0)])):m("v-if",!0)]),s("div",{class:O(["quota-track","quota-"+e.quota[i?.key].level]),role:"progressbar","aria-valuemin":"0","aria-label":i?.label+" quota","aria-valuenow":e.quota[i?.key].used,"aria-valuemax":e.quota[i?.key].unlimited?e.quota[i?.key].used:e.quota[i?.key].total,"aria-valuetext":e.quota[i?.key].unlimited?"unlimited":e.fmt.number(e.quota[i?.key].percent,0)+"% used"},[e.quota[i?.key].unlimited?m("v-if",!0):(l(),d("div",{key:0,class:"quota-fill",style:Ve({width:e.quota[i?.key].percent+"%"})},null,4))],10,pP)])),64))])):m("v-if",!0),e.quota?m("v-if",!0):(l(),d("div",fP,[(l(),d(Y,null,oe([1,2,3],(i,a)=>s("div",mP,[...t[3]||(t[3]=[s("div",{class:"quota-header"},[s("span",{class:"skeleton skeleton-line",style:{width:"40%"}}),s("span",{class:"skeleton skeleton-line",style:{width:"25%"}})],-1),s("div",{class:"quota-track"},null,-1)])])),64))]))]),E((l(),d("form",{class:"form needs-validation",name:"defaultsForm",novalidate:"",onSubmit:t[0]||(t[0]=ke(i=>e.submitForm(i,()=>{e.saveDefault(i)}),["prevent"]))},[s("section",hP,[t[11]||(t[11]=s("div",{class:"paper-section-eyebrow"},"Terms to redact",-1)),t[12]||(t[12]=s("p",{class:"paper-section-copy"},"Pre-filled in every new anonymization. You can still edit the list per anonymization.",-1)),s("div",vP,[t[10]||(t[10]=s("label",{class:"paper-field-label",for:"terms"},"Default terms",-1)),E(s("tex
Line truncated
|
||||
`);for(let g=0;g<v.length;g++){let f=v[g];if(f.startsWith("diff --git")){h(),p();continue}if(f.startsWith("--- ")){i&&i.lines.length&&h(),p().oldPath=f.replace(/^--- (a\/)?/,"").trim();continue}if(f.startsWith("+++ ")){p().newPath=f.replace(/^\+\+\+ (b\/)?/,"").trim();continue}if(!(f.startsWith("index ")||f.startsWith("similarity index")||f.startsWith("rename ")||f.startsWith("new file mode")||f.startsWith("deleted file mode")||f.startsWith("Binary files"))){if(f.startsWith("@@")){let w=f.match(/@@\s+-(\d+)(?:,\d+)?\s+\+(\d+)(?:,\d+)?\s+@@/);w&&(a=parseInt(w[1],10),u=parseInt(w[2],10)),p().lines.push({kind:"hunk",oldNo:"",newNo:"",text:f});continue}i&&(f.startsWith("+")?(i.lines.push({kind:"add",oldNo:"",newNo:u,text:f.slice(1)}),u++):f.startsWith("-")?(i.lines.push({kind:"remove",oldNo:a,newNo:"",text:f.slice(1)}),a++):(i.lines.push({kind:"ctx",oldNo:a,newNo:u,text:f.startsWith(" ")?f.slice(1):f}),a++,u++))}}return o(n,i),n.join("")}})({trustAsHtml:e=>e});function hq(e,t){return e==null?"":Number(e).toLocaleString(void 0,t==null?{}:{minimumFractionDigits:t,maximumFractionDigits:t})}function vq(e){return String(e??"").toUpperCase()}function yq(e,t,o=0){return(e||[]).slice(o,o+t)}function gq(e,t){return Array.isArray(e)?typeof t=="function"?e.filter(t):e:[]}function bq(e,t){if(!t)return e||[];let o=Array.isArray(t)?t:[t];return[...e||[]].sort((r,n)=>{for(let i of o){let a=i[0]==="-"?-1:1;i=i.replace(/^[+-]/,"");let u=i.split(".").reduce((h,v)=>h?.[v],r),p=i.split(".").reduce((h,v)=>h?.[v],n);if(typeof u=="string"&&(u=u.toLowerCase()),typeof p=="string"&&(p=p.toLowerCase()),u!==p)return(u==null?-1:p==null?1:u<p?-1:1)*a}return 0})}function wq(e,t){if(!e)return"";let o=new Date(e);if(isNaN(o))return String(e);if(!t||t==="mediumDate")return o.toLocaleDateString(void 0,{year:"numeric",month:"short",day:"numeric"});let r={yyyy:o.getFullYear(),MMM:o.toLocaleDateString(void 0,{month:"short"}),MM:String(o.getMonth()+1).padStart(2,"0"),dd:String(o.getDate()).padStart(2,"0"),d:o.getDate(),HH:String(o.getHours()).padStart(2,"0"),mm:String(o.getMinutes()).padStart(2,"0"),ss:String(o.getSeconds()).padStart(2,"0")};return t.replace(/yyyy|MMM|MM|dd|HH|mm|ss|d/g,n=>r[n])}function kq(e,t){return(t?.[e]??t?.[e===1?"one":"other"]??"").replace(/\{\}/g,e??0)}var El={ERRORS:{repository_job_cancelled:"The repository changed or was removed while processing.",storage_delete_failed:"Unable to remove cached files. Please try again later.",unknown_error:"Unknown error, contact the admin.",unreachable:"Anonymous GitHub is unreachable, contact the admin.",request_error:"Unable to download the file, check your connection or contact the admin.",not_found:"The requested resource could not be found.",not_connected:"You must be logged in to perform this action.",not_authorized:"You do not have permission to perform this action.",unable_to_connect_user:"Unable to connect your account. Please try again later.",user_not_found:"The requested user could not be found.",user_banned:"Your account has been banned. Contact the admin for more information.",repo_access_limited:"GitHub blocked access because the repository's organization restricts third-party OAuth apps. Ask an org owner to approve Anonymous GitHub under Settings \u2192 Third-party Access \u2192 OAuth app policy, or anonymize a personal fork instead.",repo_saml_enforcement:"The repository's organization enforces SAML single sign-on. Authorize your token for that organization (GitHub \u2192 Settings \u2192 Applications, or re-run the org's SSO sign-in), then retry. Alternatively, anonymize a personal fork.",repo_not_found:"The repository was not found on GitHub. Check the URL and spelling, make sure you are signed in to the account that can see it, and confirm the repo isn't hidden under an org that restricts third-party app access.",repo_empty:"The selected branch has no commits on GitHub. Push at least one commit, or pick a different branch, then retry.",repo_not_accessible:"Anonymous GitHub cannot access this repository. Verify the repository exists and that Anonymous GitHub has been authorized for the owning organization.",repository_archived:"This repository has been archived and its files are no longer available.",repository_expired:"The repository is expired.",invalid_status:"This action cannot be performed while the resource is in its current state.",repository_not_ready:"Anonymous GitHub is still processing the repository, it can take several minutes.",repository_not_accessible:"This repository is currently not accessible.",repo_is_updating:"Anonymous GitHub is still processing the repository, it can take several minutes.",invalid_repo:"The provided repository is not valid.",invalid_source_repository:"The repository source name is invalid; expected the form 'owner/name'.",repoId_not_defined:"A repository ID must be provided.",repoUrl_not_defined:"The repository URL needs to be defined.",source_not_provided:"A repository source must be provided.",github_rate_limit_exceeded:"GitHub
Line truncated
|
||||
/*! Bundled license information:
|
||||
|
||||
@vue/shared/dist/shared.esm-bundler.js:
|
||||
|
||||
+6
-1
@@ -243,7 +243,12 @@ app.get("/api/user", (req, res) =>
|
||||
? res.status(401).json({ error: "not_connected" })
|
||||
: res.json({ username: "tdurieux", photo: "https://avatars.githubusercontent.com/u/5577568?v=4", isAdmin: false })
|
||||
);
|
||||
app.get("/api/options", (req, res) => res.json({ MAX_REPO_SIZE: 8 * 1024, ANONYMIZATION_MASK: "XXXX" }));
|
||||
// Local connection fixtures keep the account screens usable without GitHub.
|
||||
app.get("/github/connections", (req, res) => res.json({
|
||||
appEnabled: true, appConnected: true, oauthEnabled: true, oauthConnected: true,
|
||||
installations: [], gistCount: 0, resources: [], csrf: "local-preview-only",
|
||||
}));
|
||||
app.get("/api/options", (req, res) => res.json({ MAX_REPO_SIZE: 8 * 1024, ANONYMIZATION_MASK: "XXXX", GITHUB_APP_ENABLED: true, GITHUB_OAUTH_ENABLED: true }));
|
||||
app.get("/api/message", (req, res) => res.status(404).end());
|
||||
app.get("/api/user/quota", (req, res) => res.json(quota));
|
||||
app.get("/api/user/anonymized_repositories", (req, res) => res.json(repositories));
|
||||
|
||||
+9
-1
@@ -121,9 +121,17 @@ describe("Vue 3 UI", function () {
|
||||
});
|
||||
|
||||
|
||||
for (const [appConnected, oauthConnected] of [[true, false], [false, true], [false, false], [true, true]]) {
|
||||
it(`shows the access chooser only for two connections: ${appConnected}/${oauthConnected}`, async () => {
|
||||
ui = await browser("/anonymize", { "/github/connections": { appEnabled: true, appConnected, oauthConnected } });
|
||||
expect(Boolean(ui.window.document.querySelector(".repo-access"))).to.equal(appConnected && oauthConnected);
|
||||
expect(ui.errors).to.deep.equal([]);
|
||||
});
|
||||
}
|
||||
|
||||
it("preserves redactions, identifiers and pinned commits when switching connections", async () => {
|
||||
ui = await browser("/anonymize", {
|
||||
"/github/connections": { appEnabled: true, oauthConnected: true },
|
||||
"/github/connections": { appEnabled: true, appConnected: true, oauthConnected: true },
|
||||
"/api/repo/owner/repo/": { defaultBranch: "main", repo: "repo" },
|
||||
"/api/repo/owner/repo/branches": [{ name: "main", commit: "abcdef123" }],
|
||||
"/api/repo/owner/repo/readme": "",
|
||||
|
||||
Reference in new issue
Block a user