From 333369b9434b5d4c2ca788a96d45124907022ff1 Mon Sep 17 00:00:00 2001 From: seguinleo Date: Tue, 2 Jan 2024 20:45:46 +0100 Subject: [PATCH] v24.1.1 --- CHANGELOG.txt | 5 + src/assets/css/style.css | 2 +- src/assets/css/style.css.map | 2 +- src/assets/js/script.js | 135 +++++++++++---- src/assets/js/scriptConnect.js | 71 ++++---- src/assets/php/addNote.php | 6 +- src/assets/php/connectUser.php | 1 - src/assets/php/updateNote.php | 4 - src/assets/sass/style.scss | 237 ++++++++++---------------- src/composer.lock | 7 +- src/de/index.php | 295 +++++++++++++++----------------- src/en/index.php | 300 +++++++++++++++------------------ src/es/index.php | 300 +++++++++++++++------------------ src/index.php | 224 +++++++++++------------- src/package-lock.json | 22 +-- src/package.json | 2 +- src/share/stylePublic.css | 23 ++- 17 files changed, 762 insertions(+), 874 deletions(-) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index d68ac6f..0168934 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -1,3 +1,8 @@ +#----v24.1.1----# +-Better local use +-Improve code structure +-Bug fixes + #----v23.12.3----# -Add categories diff --git a/src/assets/css/style.css b/src/assets/css/style.css index 8547b11..6205060 100644 --- a/src/assets/css/style.css +++ b/src/assets/css/style.css @@ -1 +1 @@ -@keyframes slide-left{0%{transform:translateX(-100%)}100%{transform:translateX(0)}}@keyframes slide-right{0%{transform:translateX(100%)}100%{transform:translateX(0)}}@font-face{font-family:OpenSans;font-style:normal;font-weight:400;font-display:swap;src:url("../fonts/OpenSans.woff2") format("woff2")}@font-face{font-family:OpenSans;font-style:normal;font-weight:700;font-display:swap;src:url("../fonts/OpenSans-700.woff2") format("woff2")}html{scroll-behavior:smooth;-webkit-tap-highlight-color:rgba(0,0,0,0);scrollbar-color:rgba(100,100,125,.5) rgba(0,0,0,0);font-family:OpenSans,sans-serif}*{margin:0;box-sizing:border-box}::-webkit-scrollbar-thumb{background:rgba(100,100,125,.5)}::-webkit-scrollbar{width:5px;height:5px}::placeholder{opacity:1}h1{font-size:1.2rem}h2{font-size:1.1rem}h3{font-size:1rem}table{border-collapse:collapse;text-align:center;border:1px solid #000;margin:10px 0}table thead{background:rgba(100,100,125,.2)}table th,table td{padding:4px 8px;border:1px solid #000}a{text-decoration:none;display:inline;word-wrap:break-word;font-weight:700}kbd{border-radius:5px;margin:0 2px;font-size:.8rem;font-weight:700;padding:2px 4px}header{padding:10px}header .fa-xmark{cursor:pointer;display:inline-flex;align-items:center;justify-content:center;width:30px;height:30px;border-radius:50%;transition:.1s}header .fa-xmark:hover{background:rgba(100,100,125,.2)}pre,code{background:#383a59;color:#8be9fd;border-radius:5px;padding:0 4px;white-space:pre-wrap}li{margin-left:-1.4rem;word-break:break-word}img{max-width:100%;height:auto;border-radius:10px}#noscript{padding:4px}nav{top:0;left:0;right:0;text-align:center;position:fixed;z-index:2;-webkit-user-select:none;user-select:none}nav h1{display:inline-block}nav h1 i{font-size:2rem}nav div{margin:10px 2rem;display:inline-block;vertical-align:middle}nav button{width:200px}nav #divSearch{width:300px;height:50px;border-radius:10px;display:inline-block}nav #divSearch:focus-within{box-shadow:0 1px 3px 0 rgba(0,0,0,.2),0 2px 6px 0 rgba(0,0,0,.2)}nav #divSearch i{font-size:1rem;margin:0 5px}nav #divSearch input{width:180px;border:none;border-radius:24px;margin-right:5px;padding:0 10px}nav #divSearch input:focus{outline:none}nav #divSearch .manage-account,nav #divSearch .log-in,nav #divSearch .fa-bars{display:none;cursor:pointer}nav #last-sync{font-size:.8rem}nav #last-sync i{margin:0 5px;cursor:pointer}main{margin:86px auto 2rem;padding:0 2rem 0 414px;display:flex;justify-content:center;align-items:center;flex-wrap:wrap;gap:2rem}#sideBar{position:fixed;display:flex;flex-direction:column;-webkit-user-select:none;user-select:none;left:0;top:70px;bottom:0;width:382px;padding:1rem;border-radius:1rem;margin:1rem}#sideBar #listNotes{flex-grow:1;overflow-y:auto}#sideBar header{display:none}#sideBar button{margin:1rem auto}#sideBar p{margin:5px 0;padding:5px;border-radius:0 1rem 1rem 0;font-size:.8rem;font-weight:700;overflow:hidden;cursor:pointer}#sideBar p:hover,#sideBar p:focus{outline:none;background:rgba(100,100,125,.2)}#sideBar p:hover .titleList,#sideBar p:focus .titleList{display:none}#sideBar p:hover .dateList,#sideBar p:focus .dateList{display:inline-block}#sideBar p .category{background:rgba(100,100,125,.2);padding:4px 8px;margin:0 8px 0 0;border-radius:24px;vertical-align:middle}#sideBar p .titleList{display:inline-block}#sideBar p .dateList{display:none}input{font-family:OpenSans,sans-serif}input[type=text],input[type=password],input[type=search],input[type=number],input[type=date],select{height:50px;width:100%;font-size:1rem;padding:0 1rem}input[type=text]:disabled,input[type=password]:disabled{cursor:not-allowed;opacity:.6}input[type=radio],input[type=checkbox]{margin-right:10px}select,option{font-family:Arial,sans-serif}textarea{font-family:OpenSans,sans-serif;font-size:1rem;height:35vh;width:100%;min-height:200px;max-height:600px;resize:vertical;padding:10px}button{font-family:OpenSans,sans-serif;font-size:1rem;cursor:pointer;width:100%;height:50px;border:none;padding:0 1rem;transition:.1s}button:disabled{cursor:not-allowed}form{margin:10px 0}#welcome{font-size:1.2rem}.note{position:relative;display:flex;flex-direction:column;justify-content:space-between;border-radius:1rem;clip-path:polygon(1rem 0, 100% 0, 100% 100%, 0 100%, 0 1rem);transition:clip-path .4s;width:350px;line-height:2;padding:10px 1rem}.note:hover,.note:focus{clip-path:polygon(0 0, 100% 0, 100% 100%, 0 100%, 0 0)}.note:hover .bottom-content,.note:focus .bottom-content{visibility:visible;opacity:1}.note:after{position:absolute;content:"";top:0;left:0;width:1rem;height:1rem;border-radius:0 0 1rem;transition:transform .4s}.note:hover:after,.note:focus:after{transform:translate(-100%, -100%)}.note:focus-within .bottom-content{visibility:visible;opacity:1}.note .title{text-align:right;font-weight:700;margin:0 10px}.note .category{background:rgba(100,100,125,.2);padding:4px 8px;border-radius:24px;margin:5px 0}.note a{text-decoration:underline}.note a:hover{text-decoration:none}.note .details{max-height:420px;overflow-x:hidden;overflow-y:auto;overflow-wrap:break-word;word-break:break-word;padding:0 4px;font-size:.9rem;font-weight:700}.note .bottom-content{-webkit-user-select:none;user-select:none;margin-top:5px;text-align:center;opacity:0;visibility:hidden;transition:opacity .1s}.note .bottom-content:focus-within{opacity:1;visibility:visible}.note .bottom-content i{display:inline-flex;align-items:center;justify-content:center;cursor:pointer;margin:0 5px;width:30px;height:30px;border-radius:50%;transition:.1s}.note .bottom-content i:hover{background:rgba(100,100,125,.2)}.linkp{cursor:pointer;font-weight:700}.fullscreen{position:fixed;z-index:3;width:100vw;min-height:100vh;margin:auto;inset:0;border-radius:5px}.fullscreen .title{text-align:center}.fullscreen .details{max-height:100%}.popup,header{display:flex;align-items:center;justify-content:space-between}.popup .content,input,textarea,select,button{border-radius:10px}#colors{display:flex;justify-content:center;min-height:26px}#colors span{width:20px;height:20px;margin:0 10px;border-radius:50%;cursor:pointer;transition:.1s}#colors span.selected{width:26px;height:26px}#connect-box,#create-box,#manage-popup-box,#public-note-popup-box,#private-note-popup-box,#note-popup-box,#sort-popup-box,#filter-popup-box{display:none;position:fixed;top:0;left:0;z-index:2;height:100vh;width:100vw;-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px)}#connect-box .popup,#create-box .popup,#manage-popup-box .popup,#public-note-popup-box .popup,#private-note-popup-box .popup,#note-popup-box .popup,#sort-popup-box .popup,#filter-popup-box .popup{-webkit-user-select:none;user-select:none;position:absolute;top:50%;left:50%;z-index:3;overflow-y:auto;justify-content:center;transform:translate(-50%, -50%)}#connect-box.show,#create-box.show,#manage-popup-box.show,#note-popup-box.show,#public-note-popup-box.show,#private-note-popup-box.show,#sort-popup-box.show,#filter-popup-box.show{display:flex}#connect-box.show .popup,#create-box.show .popup,#manage-popup-box.show .popup,#note-popup-box.show .popup,#public-note-popup-box.show .popup,#private-note-popup-box.show .popup,#sort-popup-box.show .popup,#filter-popup-box.show .popup{display:flex;max-height:100vh;transform:translate(-50%, -50%)}.content{width:500px;padding:5px 1rem}#note-popup-box .content{width:900px}.row{margin-bottom:10px}.category{margin:2px 1px;display:inline-flex}.category span{padding:4px 8px;border-radius:24px;cursor:pointer}.category input[type=radio]{display:none}.switch{position:relative;display:inline-block;vertical-align:middle;width:4rem;height:2rem;margin:0 5px}.switch input{opacity:0;width:0;height:0}.switch input:checked+.slider:before{left:2rem}.switch input:disabled+.slider{cursor:not-allowed}.switch .slider{position:absolute;cursor:pointer;border-radius:2rem;inset:0}.switch .slider:before{position:absolute;content:"";border-radius:50%;height:2rem;width:2rem;box-shadow:1px 1px 3px rgba(0,0,0,.2)}.version{text-align:right;font-size:.8rem;margin:0 5px}.fa-eye-slash{margin:10px}#newVersion{-webkit-user-select:none;user-select:none;width:350px;height:350px;border:2px dashed rgba(100,100,125,.2);text-align:center;border-radius:1rem}#newVersion h2{font-size:1.6rem;margin:1.6rem auto}#newVersion p{margin:3rem 1rem}#language{width:50px;height:40px;padding:0}#textareaLength{font-size:.8rem}#genPsswd{margin:10px auto}#genPsswd input{margin:10px auto;width:65%}#genPsswd button{margin:10px auto;width:15%}.delete-account{font-weight:700;cursor:pointer}#copyright{font-size:.8rem}#successNotification,#errorNotification{position:fixed;top:1rem;right:2rem;text-align:center;font-weight:700;max-width:300px;padding:10px;border-radius:5px;color:#fff;display:none;z-index:999}#successNotification{background:#1c7f1d}#errorNotification{background:#a93b3b}#copyNotification{position:fixed;top:1rem;right:2rem;text-align:center;font-weight:700;max-width:125px;padding:10px;border-radius:5px;display:none;z-index:999}#copyNotification.show{display:block}#copyNoteLink{margin:auto;border-radius:20px;text-align:center;padding:10px;font-weight:700;word-break:break-all;cursor:pointer}#btnTheme{font-size:1.2rem;width:36px;height:36px;border-radius:48px;border:none;display:flex;justify-content:center;align-items:center;cursor:pointer;transition:.1s}#btnTheme:focus{box-shadow:0 1px 3px 0 rgba(0,0,0,.2),0 2px 6px 0 rgba(0,0,0,.2)}#btnSort,#btnFilter{position:fixed;right:1.5rem;font-size:1.2rem;width:36px;height:36px;border-radius:48px;border:none;display:flex;justify-content:center;align-items:center;cursor:pointer;z-index:2;transition:.1s}#btnSort:focus,#btnFilter:focus{box-shadow:0 1px 3px 0 rgba(0,0,0,.2),0 2px 6px 0 rgba(0,0,0,.2)}#btnSort{top:135px}#btnFilter{top:195px}.task-list-item{list-style-type:none;margin-left:-2.4rem}@media(min-width: 901px){#iconFloatAdd{display:none}}@media(max-width: 900px){nav{position:fixed;margin:0;background:none;box-shadow:none}nav div{margin:10px 5px}nav button.log-in,nav #welcome{display:none}nav #divSearch{width:75%}nav #divSearch input{width:60%;padding:5px}nav #divSearch .linkp{margin:0}nav #divSearch .manage-account,nav #divSearch .log-in,nav #divSearch .fa-bars{display:inline;cursor:pointer}nav #divSearch i{vertical-align:middle;font-size:1.8rem}nav #divSearch .fa-bars{font-size:1.3rem}nav #divSearch .fa-magnifying-glass{display:none}nav #last-sync{display:none}main{padding:0 0 5rem;gap:10px}#iconFloatAdd{position:fixed;bottom:2rem;right:2rem;z-index:2;width:60px;height:60px;font-size:1.4rem;border-radius:48px;display:flex;justify-content:center;align-items:center}kbd{display:none}#sideBar{display:none;width:95vw;margin:0;top:0;border-radius:0 1rem 1rem 0;animation:slide-right .3s ease-in-out}#sideBar header{display:flex}#sideBar button{display:none}#sideBar .titleList{max-width:140px}#sideBar.show{display:flex;z-index:3;animation:slide-left .3s ease-in-out}.note{width:100%;max-height:300px;margin:0 10px}.note .bottom-content{visibility:visible;opacity:1}.note .title{font-size:1.1rem}.note .details{overflow:hidden}#newVersion{width:100%;margin:0 10px}.fullscreen{min-height:100vh;inset:auto;top:0}.fullscreen .details{overflow:auto}#colors span{margin:0 4px}.popup{max-width:98vw}.bottom-content i{margin:0 2px}#btnTheme{display:inline-flex}#copyNotification.show{display:none}}html.dark{background:#000;color:#c6c6c6;accent-color:#8ab4f8}html.dark ::placeholder{color:#c6c6c6}html.dark a{color:#8ab4f8}html.dark kbd{background:#171717}html.dark nav{background:#171717}html.dark nav #divSearch{background:#000}html.dark nav #divSearch input{background:#000;border:none}html.dark nav #divSearch input:focus{outline:none}html.dark #sideBar{background:#171717}html.dark input,html.dark textarea,html.dark select{border:2px solid #000}html.dark input:focus,html.dark textarea:focus,html.dark select:focus{outline:#8ab4f8 solid 2px}html.dark button{color:#000;background:#8ab4f8}html.dark button:hover,html.dark button:focus{background:#9ec3ff}html.dark button:disabled{background:#c6c6c6}html.dark .linkp{color:#8ab4f8}html.dark .popup .content,html.dark input,html.dark textarea,html.dark select{background:#171717;color:#c6c6c6}html.dark #colors span{border:1px solid #000}html.dark .Rouge a,html.dark .Orange a,html.dark .Jaune a,html.dark .Vert a,html.dark .Cyan a,html.dark .BleuCiel a,html.dark .Bleu a,html.dark .Violet a,html.dark .Rose a{color:#000}html.dark .Noir{background:#171717}html.dark .category span{background:#000}html.dark .category input[type=radio]:checked+span{background:#8ab4f8;color:#000}html.dark .switch input:checked+.slider{background:#8ab4f8}html.dark .switch input:disabled+.slider:before{background:#c6c6c6}html.dark .switch .slider{background:#000}html.dark .switch .slider:before{background:#fff}html.dark #note-popup-box,html.dark #create-box,html.dark #manage-popup-box,html.dark #connect-box,html.dark #private-note-popup-box,html.dark #public-note-popup-box,html.dark #sort-popup-box,html.dark #filter-popup-box{background:rgba(0,0,0,.5)}html.dark #noscript{background:#fe7575;color:#000}html.dark .warning{color:#fe7575}html.dark #btnTheme{background:#000;color:#c6c6c6}html.dark #language{border:none;background:#171717}html.dark #copyNotification{background:#000;color:#c6c6c6}html.dark #copyNoteLink{background:#000}html.dark #copyNoteLink:hover{opacity:.8}html.dusk{background:#272342;color:#cecbe3;accent-color:#8ab4f8}html.dusk ::placeholder{color:#cecbe3}html.dusk a{color:#8ab4f8}html.dusk kbd{background:#1c1936}html.dusk nav{background:#1c1936}html.dusk nav #divSearch{background:#272342}html.dusk nav #divSearch input{background:#272342;border:none}html.dusk nav #divSearch input:focus{outline:none}html.dusk #sideBar{background:#1c1936}html.dusk input,html.dusk textarea,html.dusk select{border:2px solid #1c1936}html.dusk input:focus,html.dusk textarea:focus,html.dusk select:focus{outline:#8ab4f8 solid 2px}html.dusk button{color:#272342;background:#8ab4f8}html.dusk button:hover,html.dusk button:focus{background:#9ec3ff}html.dusk button:disabled{background:#cecbe3}html.dusk .linkp{color:#8ab4f8}html.dusk .popup .content,html.dusk input,html.dusk textarea,html.dusk select{background:#272342;color:#cecbe3}html.dusk #colors span{border:1px solid #1c1936}html.dusk .Rouge a,html.dusk .Orange a,html.dusk .Jaune a,html.dusk .Vert a,html.dusk .Cyan a,html.dusk .BleuCiel a,html.dusk .Bleu a,html.dusk .Violet a,html.dusk .Rose a{color:#272342}html.dusk .Noir{background:#1c1936}html.dusk .category span{background:#1c1936}html.dusk .category input[type=radio]:checked+span{background:#8ab4f8;color:#000}html.dusk .switch input:checked+.slider{background:#8ab4f8}html.dusk .switch input:disabled+.slider:before{background:#c6c6c6}html.dusk .switch .slider{background:#1c1936}html.dusk .switch .slider:before{background:#cecbe3}html.dusk #note-popup-box,html.dusk #create-box,html.dusk #manage-popup-box,html.dusk #connect-box,html.dusk #private-note-popup-box,html.dusk #public-note-popup-box,html.dusk #sort-popup-box,html.dusk #filter-popup-box{background:rgba(0,0,0,.5)}html.dusk #noscript{background:#fe7575;color:#000}html.dusk .warning{color:#fe7575}html.dusk #btnTheme{background:#272342;color:#cecbe3}html.dusk #language{border:none;background:#1c1936}html.dusk #copyNotification{background:#272342;color:#cecbe3}html.dusk #copyNoteLink{background:#1c1936}html.dusk #copyNoteLink:hover{opacity:.8}html.light{background:#fff;color:#171717;accent-color:#2b5790}html.light ::placeholder{color:#171717}html.light a{color:#2b5790}html.light kbd{background:#eee}html.light input,html.light textarea,html.light select{border:2px solid #c6c6c6}html.light input:focus,html.light textarea:focus,html.light select:focus{outline:#2b5790 solid 2px}html.light nav{background:#eee}html.light nav #divSearch{background:#fff}html.light nav #divSearch input{background:#fff;border:none}html.light nav #divSearch input:focus{outline:none}html.light #sideBar{background:#eee}html.light button{color:#fff;background:#2b5790}html.light button:hover,html.light button:focus{background:#34629f}html.light button:disabled{background:#c6c6c6;color:#000}html.light .linkp{color:#2b5790}html.light .popup .content,html.light input,html.light textarea,html.light select{background:#fff;color:#171717}html.light #colors span{border:1px solid #c6c6c6}html.light .Rouge a,html.light .Orange a,html.light .Jaune a,html.light .Vert a,html.light .Cyan a,html.light .BleuCiel a,html.light .Bleu a,html.light .Violet a,html.light .Rose a{color:#000}html.light .Noir{background:#eee}html.light .category span{background:#eee}html.light .category input[type=radio]:checked+span{background:#9ec3ff}html.light .switch input:checked+.slider{background:#2b5790}html.light .switch input:disabled+.slider:before{background:#c6c6c6}html.light .switch .slider{background:#eee}html.light .switch .slider:before{background:#fff}html.light #note-popup-box,html.light #create-box,html.light #manage-popup-box,html.light #connect-box,html.light #private-note-popup-box,html.light #public-note-popup-box,html.light #sort-popup-box,html.light #filter-popup-box{background:rgba(220,220,220,.5)}html.light #noscript{background:#a93b3b;color:#fff}html.light .warning{color:#a93b3b}html.light #copyNotification{background:#fff;color:#171717}html.light #copyNoteLink{background:#eee}html.light #copyNoteLink:hover{opacity:.8}html.light #btnTheme{background:#fff;color:#171717}html.light #language{border:none;background:none}.note:after{box-shadow:2px 2px 2px rgba(0,0,0,.2)}.Rouge{background:#fd948a}.Orange{background:#ffc65c}.Jaune{background:#fdf488}.Vert{background:#d6fe9d}.Cyan{background:#bbfdec}.BleuCiel{background:#d2eff7}.Bleu{background:#b4caf6}.Violet{background:#d1acff}.Rose{background:#fdd0e7}.Rouge,.Orange,.Jaune,.Vert,.Cyan,.BleuCiel,.Bleu,.Violet,.Rose{color:#000}.bold{font-weight:700}.italic{font-style:italic}.underline{text-decoration:underline}.strikethrough{text-decoration:line-through}.align-left{text-align:left}.align-center{text-align:center}.align-right{text-align:right}.align-justify{text-align:justify}/*# sourceMappingURL=style.css.map */ +@keyframes slide-left{0%{transform:translateX(-100%)}100%{transform:translateX(0)}}@keyframes slide-right{0%{transform:translateX(100%)}100%{transform:translateX(0)}}@font-face{font-family:OpenSans;font-style:normal;font-weight:400;font-display:swap;src:url("../fonts/OpenSans.woff2") format("woff2")}@font-face{font-family:OpenSans;font-style:normal;font-weight:700;font-display:swap;src:url("../fonts/OpenSans-700.woff2") format("woff2")}html{scroll-behavior:smooth;-webkit-tap-highlight-color:rgba(0,0,0,0);scrollbar-color:rgba(100,100,125,.5) rgba(0,0,0,0);font-family:OpenSans,sans-serif}*{margin:0;box-sizing:border-box}::-webkit-scrollbar-thumb{background:rgba(100,100,125,.5)}::-webkit-scrollbar{width:5px;height:5px}::placeholder{opacity:1}h1{font-size:1.2rem}h2{font-size:1.1rem}h3{font-size:1rem}table{border-collapse:collapse;text-align:center;border:1px solid #000;margin:10px 0}table thead{background:rgba(100,100,125,.2)}table th,table td{padding:4px 8px;border:1px solid #000}a{text-decoration:none;font-weight:700}kbd{border-radius:5px;margin:0 2px;font-size:.8rem;font-weight:700;padding:2px 4px}header{padding:10px}header .fa-xmark{cursor:pointer;display:inline-flex;align-items:center;justify-content:center;width:30px;height:30px;border-radius:50%;transition:.1s}header .fa-xmark:hover{background:rgba(100,100,125,.2)}pre,code{background:#383a59;color:#8be9fd;border-radius:5px;padding:0 2px;white-space:break-spaces}li{margin-left:-1.4rem}img{max-width:100%;height:auto;border-radius:10px}#noscript{padding:4px}nav{top:0;left:0;right:0;text-align:center;position:fixed;z-index:2;-webkit-user-select:none;user-select:none}nav h1{display:none}nav .log-in,nav .manage-account{font-size:2rem}nav div{margin:10px 2rem;display:inline-flex;align-items:center;vertical-align:middle}nav #divSearch{width:300px;height:50px;border-radius:10px;padding:0 10px}nav #divSearch:focus-within{box-shadow:0 1px 3px 0 rgba(0,0,0,.2),0 2px 6px 0 rgba(0,0,0,.2)}nav #divSearch i{font-size:1rem;margin:0 5px}nav #divSearch input{width:180px;border:none;border-radius:24px;padding:0 10px}nav #divSearch input:focus{outline:none}nav #last-sync{font-size:.8rem}nav #last-sync i{margin:0 5px;cursor:pointer}main{margin:86px auto 2rem;padding:0 2rem 0 414px;display:flex;justify-content:center;align-items:center;flex-wrap:wrap;gap:2rem}#sideBar{position:fixed;display:flex;flex-direction:column;-webkit-user-select:none;user-select:none;left:0;top:70px;bottom:0;width:382px;padding:1rem;border-radius:1rem;margin:1rem}#sideBar #listNotes{flex-grow:1;overflow-y:auto}#sideBar #listNotes p{margin:5px 0;padding:5px;border-radius:0 1rem 1rem 0;font-size:.8rem;font-weight:700;overflow:hidden;cursor:pointer}#sideBar #listNotes p:hover,#sideBar #listNotes p:focus{outline:none;background:rgba(100,100,125,.2)}#sideBar #listNotes p:hover .titleList,#sideBar #listNotes p:focus .titleList{display:none}#sideBar #listNotes p:hover .dateList,#sideBar #listNotes p:focus .dateList{display:inline-flex}#sideBar #listNotes p .category{background:rgba(100,100,125,.2);padding:4px 8px;margin:0 8px 0 0;border-radius:24px}#sideBar #listNotes p .titleList{display:inline-flex}#sideBar #listNotes p .dateList{display:none}#sideBar #close-sidebar{display:none}#sideBar button{margin:1rem auto}#sidebar-indicator{position:fixed;height:20vh;width:4px;border-radius:5px;background:rgba(100,100,125,.5);left:4px;top:50%;transform:translate(-50%, -50%)}input{font-family:OpenSans,sans-serif}input[type=text],input[type=password],input[type=search],input[type=number],input[type=date],select{height:50px;width:100%;font-size:1rem;padding:0 1rem}input[type=text]:disabled,input[type=password]:disabled{cursor:not-allowed;opacity:.6}input[type=radio],input[type=checkbox]{margin-right:10px}input[type=checkbox]{pointer-events:none}select,option{font-family:Arial,sans-serif}textarea{font-family:OpenSans,sans-serif;font-size:1rem;height:35vh;width:100%;min-height:200px;max-height:600px;resize:vertical;padding:10px}button{font-family:OpenSans,sans-serif;font-size:1rem;cursor:pointer;width:100%;height:50px;border:none;padding:0 1rem;transition:.1s}button:disabled{cursor:not-allowed}form{margin:10px 0}.note{position:relative;display:flex;flex-direction:column;justify-content:space-between;border-radius:1rem;clip-path:polygon(1rem 0, 100% 0, 100% 100%, 0 100%, 0 1rem);transition:clip-path .4s;width:350px;line-height:2;padding:10px 1rem}.note:hover,.note:focus{clip-path:polygon(0 0, 100% 0, 100% 100%, 0 100%, 0 0)}.note:hover .bottom-content,.note:focus .bottom-content{visibility:visible;opacity:1}.note:after{position:absolute;content:"";top:0;left:0;width:1rem;height:1rem;border-radius:0 0 1rem;transition:transform .4s}.note:hover:after,.note:focus:after{transform:translate(-100%, -100%)}.note:focus-within .bottom-content{visibility:visible;opacity:1}.note .title{text-align:right;font-weight:700;margin:0 10px}.note a{text-decoration:underline}.note a:hover{text-decoration:none}.note .details{max-height:420px;overflow-x:hidden;overflow-y:auto;overflow-wrap:break-word;word-break:break-word;padding:0 4px;font-size:.9rem;font-weight:700}.note .bottom-content{-webkit-user-select:none;user-select:none;margin-top:5px;text-align:center;opacity:0;visibility:hidden;transition:opacity .1s}.note .bottom-content:focus-within{opacity:1;visibility:visible}.note .bottom-content i{display:inline-flex;align-items:center;justify-content:center;cursor:pointer;margin:0 5px;width:30px;height:30px;border-radius:50%;transition:.1s}.note .bottom-content i:hover{background:rgba(100,100,125,.2)}.linkp{cursor:pointer;font-weight:700}.body-fullscreen{overflow:hidden}.fullscreen{position:fixed;z-index:3;width:100vw;min-height:100vh;margin:auto;inset:0;border-radius:5px}.fullscreen .title{text-align:center}.fullscreen .details{max-height:100%}.popup .content,input,textarea,select,button{border-radius:10px}#colors{display:flex;justify-content:center;min-height:26px}#colors span{width:20px;height:20px;margin:0 10px;border-radius:50%;cursor:pointer;transition:.1s}#colors span.selected{width:26px;height:26px}#connect-box,#create-box,#manage-popup-box,#settings-popup-box,#public-note-popup-box,#private-note-popup-box,#note-popup-box,#sort-popup-box,#filter-popup-box{display:none;position:fixed;top:0;left:0;z-index:2;height:100vh;width:100vw;-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px)}#connect-box .popup,#create-box .popup,#manage-popup-box .popup,#settings-popup-box .popup,#public-note-popup-box .popup,#private-note-popup-box .popup,#note-popup-box .popup,#sort-popup-box .popup,#filter-popup-box .popup{-webkit-user-select:none;user-select:none;position:absolute;top:50%;left:50%;z-index:3;overflow-y:auto;transform:translate(-50%, -50%)}#connect-box.show,#create-box.show,#manage-popup-box.show,#settings-popup-box.show,#note-popup-box.show,#public-note-popup-box.show,#private-note-popup-box.show,#sort-popup-box.show,#filter-popup-box.show{display:flex}.content{width:500px;max-width:98vw;padding:5px 1rem}#note-popup-box .content{width:900px}.row{margin-bottom:10px}.category{margin:2px 1px;display:inline-flex}.category span{padding:4px 8px;border-radius:24px;cursor:pointer}.category input[type=radio]{display:none}.switch{position:relative;display:inline-flex;vertical-align:middle;width:4rem;height:2rem;margin:0 5px}.switch input{opacity:0;width:0;height:0}.switch input:checked+.slider:before{left:2rem}.switch input:disabled+.slider{cursor:not-allowed}.switch .slider{position:absolute;cursor:pointer;border-radius:2rem;inset:0}.switch .slider:before{position:absolute;content:"";border-radius:50%;height:2rem;width:2rem;box-shadow:1px 1px 3px rgba(0,0,0,.2)}.version{text-align:right;font-size:.8rem;margin:0 5px}.fa-eye-slash{margin:10px}#newVersion{-webkit-user-select:none;user-select:none;border:2px dashed rgba(100,100,125,.2);text-align:center;border-radius:1rem;margin:10px 0;padding-bottom:1.5rem;font-size:.9rem}#newVersion header{padding:4px;text-align:left}#newVersion p{margin:.5rem}#language{width:50px;height:40px;vertical-align:middle;padding:0}#textareaLength{font-size:.8rem}#genPsswd{margin:10px auto}#genPsswd input{margin:10px auto;width:65%}#genPsswd button{margin:10px auto;width:15%}.delete-account{font-weight:700;cursor:pointer}#settings{font-size:1.2rem;vertical-align:middle;margin-right:1rem}#legal,#license{font-size:.8rem}#successNotification,#errorNotification{position:fixed;top:1rem;right:2rem;text-align:center;font-weight:700;max-width:300px;padding:10px;border-radius:5px;color:#fff;display:none;z-index:999}#successNotification{background:#1c7f1d}#errorNotification{background:#a93b3b}#copyNotification{position:fixed;top:1rem;right:2rem;text-align:center;font-weight:700;max-width:125px;padding:10px;border-radius:5px;display:none;z-index:999}#copyNotification.show{display:flex}#copyNoteLink{margin:auto;border-radius:20px;text-align:center;padding:10px;font-weight:700;word-break:break-all;cursor:pointer}#btnTheme{font-size:1.2rem;width:36px;height:36px;border-radius:48px;border:none;display:flex;justify-content:center;align-items:center;cursor:pointer;transition:.1s}#btnTheme:focus{box-shadow:0 1px 3px 0 rgba(0,0,0,.2),0 2px 6px 0 rgba(0,0,0,.2)}#btnSort,#btnFilter{position:fixed;right:1.5rem;font-size:1.2rem;width:36px;height:36px;border-radius:48px;border:none;display:flex;justify-content:center;align-items:center;cursor:pointer;z-index:2;transition:.1s}#btnSort:focus,#btnFilter:focus{box-shadow:0 1px 3px 0 rgba(0,0,0,.2),0 2px 6px 0 rgba(0,0,0,.2)}#btnSort{top:135px}#btnFilter{top:195px}.task-list-item{list-style-type:none;margin-left:-2.4rem}@media(min-width: 901px){#iconFloatAdd,#sidebar-indicator{display:none}}@media(max-width: 900px){nav{position:fixed;margin:0}nav div{margin:10px 5px}nav #divSearch{width:60%}nav #divSearch input{width:80%;padding:5px}nav #divSearch .linkp{margin:0}nav #last-sync{display:none}main{padding:0 0 5rem;gap:10px}#iconFloatAdd{position:fixed;bottom:2rem;right:2rem;z-index:2;width:60px;height:60px;font-size:1.4rem;border-radius:48px;display:flex;justify-content:center;align-items:center}kbd{display:none}#sideBar{display:none;width:95vw;margin:0;top:0;border-radius:0 1rem 1rem 0;animation:slide-right .3s ease-in-out}#sideBar button{display:none}#sideBar .titleList{max-width:140px}#sideBar.show{display:flex;z-index:3;animation:slide-left .3s ease-in-out}.note{width:100%;max-height:300px;margin:0 10px}.note .bottom-content{visibility:visible;opacity:1}.note .title{font-size:1.1rem}.note .details{overflow:hidden}.fullscreen{min-height:100vh;inset:auto;top:0}.fullscreen .details{overflow:auto}#colors span{margin:0 4px}.bottom-content i{margin:0 2px}#copyNotification.show{display:none}}html.dark{background:#000;color:#c6c6c6;accent-color:#8ab4f8}html.dark ::placeholder{color:#c6c6c6}html.dark a{color:#8ab4f8}html.dark kbd{background:#171717}html.dark nav{background:#171717}html.dark nav #divSearch{background:#000}html.dark nav #divSearch input{background:#000;border:none}html.dark nav #divSearch input:focus{outline:none}html.dark #sideBar{background:#171717}html.dark input,html.dark textarea,html.dark select{border:2px solid #000}html.dark input:focus,html.dark textarea:focus,html.dark select:focus{outline:#8ab4f8 solid 2px}html.dark button{color:#000;background:#8ab4f8}html.dark button:hover,html.dark button:focus{background:#9ec3ff}html.dark button:disabled{background:#c6c6c6}html.dark .linkp{color:#8ab4f8}html.dark .popup .content,html.dark input,html.dark textarea,html.dark select{background:#171717;color:#c6c6c6}html.dark #colors span{border:1px solid #000}html.dark .Rouge a,html.dark .Orange a,html.dark .Jaune a,html.dark .Vert a,html.dark .Cyan a,html.dark .BleuCiel a,html.dark .Bleu a,html.dark .Violet a,html.dark .Rose a{color:#000}html.dark .Noir{background:#171717}html.dark .category span{background:#000}html.dark .category input[type=radio]:checked+span{background:#8ab4f8;color:#000}html.dark .switch input:checked+.slider{background:#8ab4f8}html.dark .switch input:disabled+.slider:before{background:#c6c6c6}html.dark .switch .slider{background:#000}html.dark .switch .slider:before{background:#fff}html.dark #note-popup-box,html.dark #create-box,html.dark #manage-popup-box,html.dark #settings-popup-box,html.dark #connect-box,html.dark #private-note-popup-box,html.dark #public-note-popup-box,html.dark #sort-popup-box,html.dark #filter-popup-box{background:rgba(0,0,0,.5)}html.dark #noscript{background:#fe7575;color:#000}html.dark .warning{color:#fe7575}html.dark #btnTheme{background:#000;color:#c6c6c6}html.dark #language{border:none;background:#171717}html.dark #copyNotification{background:#000;color:#c6c6c6}html.dark #copyNoteLink{background:#000}html.dark #copyNoteLink:hover{opacity:.8}html.dusk{background:#272342;color:#cecbe3;accent-color:#8ab4f8}html.dusk ::placeholder{color:#cecbe3}html.dusk a{color:#8ab4f8}html.dusk kbd{background:#1c1936}html.dusk nav{background:#1c1936}html.dusk nav #divSearch{background:#272342}html.dusk nav #divSearch input{background:#272342;border:none}html.dusk nav #divSearch input:focus{outline:none}html.dusk #sideBar{background:#1c1936}html.dusk input,html.dusk textarea,html.dusk select{border:2px solid #1c1936}html.dusk input:focus,html.dusk textarea:focus,html.dusk select:focus{outline:#8ab4f8 solid 2px}html.dusk button{color:#272342;background:#8ab4f8}html.dusk button:hover,html.dusk button:focus{background:#9ec3ff}html.dusk button:disabled{background:#cecbe3}html.dusk .linkp{color:#8ab4f8}html.dusk .popup .content,html.dusk input,html.dusk textarea,html.dusk select{background:#272342;color:#cecbe3}html.dusk #colors span{border:1px solid #1c1936}html.dusk .Rouge a,html.dusk .Orange a,html.dusk .Jaune a,html.dusk .Vert a,html.dusk .Cyan a,html.dusk .BleuCiel a,html.dusk .Bleu a,html.dusk .Violet a,html.dusk .Rose a{color:#272342}html.dusk .Noir{background:#1c1936}html.dusk .category span{background:#1c1936}html.dusk .category input[type=radio]:checked+span{background:#8ab4f8;color:#000}html.dusk .switch input:checked+.slider{background:#8ab4f8}html.dusk .switch input:disabled+.slider:before{background:#c6c6c6}html.dusk .switch .slider{background:#1c1936}html.dusk .switch .slider:before{background:#cecbe3}html.dusk #note-popup-box,html.dusk #create-box,html.dusk #manage-popup-box,html.dusk #settings-popup-box,html.dusk #connect-box,html.dusk #private-note-popup-box,html.dusk #public-note-popup-box,html.dusk #sort-popup-box,html.dusk #filter-popup-box{background:rgba(0,0,0,.5)}html.dusk #noscript{background:#fe7575;color:#000}html.dusk .warning{color:#fe7575}html.dusk #btnTheme{background:#272342;color:#cecbe3}html.dusk #language{border:none;background:#1c1936}html.dusk #copyNotification{background:#272342;color:#cecbe3}html.dusk #copyNoteLink{background:#1c1936}html.dusk #copyNoteLink:hover{opacity:.8}html.light{background:#fff;color:#171717;accent-color:#2b5790}html.light ::placeholder{color:#171717}html.light a{color:#2b5790}html.light kbd{background:#eee}html.light input,html.light textarea,html.light select{border:2px solid #c6c6c6}html.light input:focus,html.light textarea:focus,html.light select:focus{outline:#2b5790 solid 2px}html.light nav{background:#eee}html.light nav #divSearch{background:#fff}html.light nav #divSearch input{background:#fff;border:none}html.light nav #divSearch input:focus{outline:none}html.light #sideBar{background:#eee}html.light button{color:#fff;background:#2b5790}html.light button:hover,html.light button:focus{background:#34629f}html.light button:disabled{background:#c6c6c6;color:#000}html.light .linkp{color:#2b5790}html.light .popup .content,html.light input,html.light textarea,html.light select{background:#fff;color:#171717}html.light #colors span{border:1px solid #c6c6c6}html.light .Rouge a,html.light .Orange a,html.light .Jaune a,html.light .Vert a,html.light .Cyan a,html.light .BleuCiel a,html.light .Bleu a,html.light .Violet a,html.light .Rose a{color:#000}html.light .Noir{background:#eee}html.light .category span{background:#eee}html.light .category input[type=radio]:checked+span{background:#9ec3ff}html.light .switch input:checked+.slider{background:#2b5790}html.light .switch input:disabled+.slider:before{background:#c6c6c6}html.light .switch .slider{background:#eee}html.light .switch .slider:before{background:#fff}html.light #note-popup-box,html.light #create-box,html.light #manage-popup-box,html.light #settings-popup-box,html.light #connect-box,html.light #private-note-popup-box,html.light #public-note-popup-box,html.light #sort-popup-box,html.light #filter-popup-box{background:rgba(220,220,220,.5)}html.light #noscript{background:#a93b3b;color:#fff}html.light .warning{color:#a93b3b}html.light #copyNotification{background:#fff;color:#171717}html.light #copyNoteLink{background:#eee}html.light #copyNoteLink:hover{opacity:.8}html.light #btnTheme{background:#fff;color:#171717}html.light #language{border:none;background:none}.note:after{box-shadow:2px 2px 2px rgba(0,0,0,.2)}.Rouge{background:#fd948a}.Orange{background:#ffc65c}.Jaune{background:#fdf488}.Vert{background:#d6fe9d}.Cyan{background:#bbfdec}.BleuCiel{background:#d2eff7}.Bleu{background:#b4caf6}.Violet{background:#d1acff}.Rose{background:#fdd0e7}.Rouge,.Orange,.Jaune,.Vert,.Cyan,.BleuCiel,.Bleu,.Violet,.Rose{color:#000}.bold{font-weight:700}.italic{font-style:italic}.underline{text-decoration:underline}.strikethrough{text-decoration:line-through}.align-left{text-align:left}.align-center{text-align:center}.align-right{text-align:right}.align-justify{text-align:justify}/*# sourceMappingURL=style.css.map */ diff --git a/src/assets/css/style.css.map b/src/assets/css/style.css.map index 8f9ff46..ea6d525 100644 --- a/src/assets/css/style.css.map +++ b/src/assets/css/style.css.map @@ -1 +1 @@ -{"version":3,"sourceRoot":"","sources":["../sass/style.scss"],"names":[],"mappings":"AAaA,sBACE,GACE,4BAGF,KACE,yBAIJ,uBACE,GACE,2BAGF,KACE,yBAIJ,WACE,qBACA,kBACA,gBACA,kBACA,mDAGF,WACE,qBACA,kBACA,gBACA,kBACA,uDAGF,KACE,uBACA,0CACA,mDACA,gCAGF,EACE,SACA,sBAGF,0BACE,gCAGF,oBACE,UACA,WAGF,cACE,UAGF,GACE,iBAGF,GACE,iBAGF,GACE,eAGF,MACE,yBACA,kBACA,sBACA,cAEA,YACE,gCAGF,kBAEE,gBACA,sBAIJ,EACE,qBACA,eACA,qBACA,gBAGF,IACE,kBACA,aACA,gBACA,gBACA,gBAGF,OACE,aAEA,iBACE,eACA,oBACA,mBACA,uBACA,WACA,YACA,kBACA,eAEA,uBACE,gCAKN,SAEE,mBACA,cACA,kBACA,cACA,qBAGF,GACE,oBACA,sBAGF,IACE,eACA,YACA,mBAGF,UACE,YAGF,IACE,MACA,OACA,QACA,kBACA,eACA,UACA,yBACA,iBAEA,OACE,qBAEA,SACE,eAIJ,QACE,iBACA,qBACA,sBAGF,WACE,YAGF,eACE,YACA,YACA,mBACA,qBAEA,4BACE,iEAGF,iBACE,eACA,aAGF,qBACE,YACA,YACA,mBACA,iBACA,eAEA,2BACE,aAIJ,8EAGE,aACA,eAIJ,eACE,gBAEA,iBACE,aACA,eAKN,KACE,sBACA,uBACA,aACA,uBACA,mBACA,eACA,SAGF,SACE,eACA,aACA,sBACA,yBACA,iBACA,OACA,SACA,SACA,YACA,aACA,mBACA,YAEA,oBACE,YACA,gBAGF,gBACE,aAGF,gBACE,iBAGF,WACE,aACA,YACA,4BACA,gBACA,gBACA,gBACA,eAEA,kCAEE,aACA,gCAEA,wDACE,aAGF,sDACE,qBAIJ,qBACE,gCACA,gBACA,iBACA,mBACA,sBAGF,sBACE,qBAGF,qBACE,aAKN,MACE,gCAGF,oGAME,YACA,WACA,eACA,eAGF,wDAEE,mBACA,WAGF,uCAEE,kBAGF,cAEE,6BAGF,SACE,gCACA,eACA,YACA,WACA,iBACA,iBACA,gBACA,aAGF,OACE,gCACA,eACA,eACA,WACA,YACA,YACA,eACA,eAEA,gBACE,mBAIJ,KACE,cAGF,SACE,iBAGF,MACE,kBACA,aACA,sBACA,8BACA,mBACA,6DACA,yBACA,YACA,cACA,kBAEA,wBAEE,uDAEA,wDACE,mBACA,UAIJ,YACE,kBACA,WACA,MACA,OACA,WACA,YACA,uBACA,yBAGF,oCAEE,kCAIA,mCACE,mBACA,UAIJ,aACE,iBACA,gBACA,cAGF,gBACE,gCACA,gBACA,mBACA,aAGF,QACE,0BAEA,cACE,qBAIJ,eACE,iBACA,kBACA,gBACA,yBACA,sBACA,cACA,gBACA,gBAGF,sBACE,yBACA,iBACA,eACA,kBACA,UACA,kBACA,uBAEA,mCACE,UACA,mBAGF,wBACE,oBACA,mBACA,uBACA,eACA,aACA,WACA,YACA,kBACA,eAEA,8BACE,gCAMR,OACE,eACA,gBAGF,YACE,eACA,UACA,YACA,iBACA,YACA,QACA,kBAEA,mBACE,kBAGF,qBACE,gBAIJ,cAEE,aACA,mBACA,8BAGF,6CAKE,mBAGF,QACE,aACA,uBACA,gBAEA,aACE,WACA,YACA,cACA,kBACA,eACA,eAGF,sBACE,WACA,YAIJ,4IAQE,aACA,eACA,MACA,OACA,UACA,aACA,YACA,mCACA,2BAEA,oMACE,yBACA,iBACA,kBACA,QACA,SACA,UACA,gBACA,uBACA,gCAIJ,oLAQE,aAGF,4OAQE,aACA,iBACA,gCAGF,SACE,YACA,iBAGF,yBACE,YAGF,KACE,mBAGF,UACE,eACA,oBAEA,eACE,gBACA,mBACA,eAGF,4BACE,aAIJ,QACE,kBACA,qBACA,sBACA,WACA,YACA,aAEA,cACE,UACA,QACA,SAGE,qCACE,UAIJ,+BACE,mBAIJ,gBACE,kBACA,eACA,mBACA,QAEA,uBACE,kBACA,WACA,kBACA,YACA,WACA,sCAKN,SACE,iBACA,gBACA,aAGF,cACE,YAGF,YACE,yBACA,iBACA,YACA,aACA,uCACA,kBACA,mBAEA,eACE,iBACA,mBAGF,cACE,iBAIJ,UACE,WACA,YACA,UAGF,gBACE,gBAGF,UACE,iBAEA,gBACE,iBACA,UAGF,iBACE,iBACA,UAIJ,gBACE,gBACA,eAGF,WACE,gBAGF,wCAEE,eACA,SACA,WACA,kBACA,gBACA,gBACA,aACA,kBACA,MA9tBQ,KA+tBR,aACA,YAGF,qBACE,mBAGF,mBACE,mBAGF,kBACE,eACA,SACA,WACA,kBACA,gBACA,gBACA,aACA,kBACA,aACA,YAEA,uBACE,cAIJ,cACE,YACA,mBACA,kBACA,aACA,gBACA,qBACA,eAGF,UACE,iBACA,WACA,YACA,mBACA,YACA,aACA,uBACA,mBACA,eACA,eAEA,gBACE,iEAIJ,oBAEE,eACA,aACA,iBACA,WACA,YACA,mBACA,YACA,aACA,uBACA,mBACA,eACA,UACA,eAEA,gCACE,iEAIJ,SACE,UAGF,WACE,UAGF,gBACE,qBACA,oBAGF,yBAEE,cACE,cAIJ,yBAEE,IACE,eACA,SACA,gBACA,gBAEA,QACE,gBAGF,+BAEE,aAGF,eACE,UAEA,qBACE,UACA,YAGF,sBACE,SAGF,8EAGE,eACA,eAGF,iBACE,sBACA,iBAGF,wBACE,iBAGF,oCACE,aAIJ,eACE,aAIJ,KACE,iBACA,SAGF,cACE,eACA,YACA,WACA,UACA,WACA,YACA,iBACA,mBACA,aACA,uBACA,mBAGF,IACE,aAGF,SACE,aACA,WACA,SACA,MACA,4BACA,sCAEA,gBACE,aAGF,gBACE,aAGF,oBACE,gBAIJ,cACE,aACA,UACA,qCAGF,MACE,WACA,iBACA,cAEA,sBACE,mBACA,UAGF,aACE,iBAGF,eACE,gBAIJ,YACE,WACA,cAGF,YACE,iBACA,WACA,MAEA,qBACE,cAIJ,aACE,aAGF,OACE,eAGF,kBACE,aAGF,UACE,oBAGF,uBACE,cAIJ,UACE,WAx+BQ,KAy+BR,MA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ACE,mBAGF,UACE,mBAGF,MACE,mBAGF,QACE,mBAGF,MACE,mBAGF,gEASE,MAxiDQ,KA2iDV,MACE,gBAGF,QACE,kBAGF,WACE,0BAGF,eACE,6BAGF,YACE,gBAGF,cACE,kBAGF,aACE,iBAGF,eACE","file":"style.css"} \ No newline at end of file +{"version":3,"sourceRoot":"","sources":["../sass/style.scss"],"names":[],"mappings":"AAaA,sBACE,GACE,4BAGF,KACE,yBAIJ,uBACE,GACE,2BAGF,KACE,yBAIJ,WACE,qBACA,kBACA,gBACA,kBACA,mDAGF,WACE,qBACA,kBACA,gBACA,kBACA,uDAGF,KACE,uBACA,0CACA,mDACA,gCAGF,EACE,SACA,sBAGF,0BACE,gCAGF,oBACE,UACA,WAGF,cACE,UAGF,GACE,iBAGF,GACE,iBAGF,GACE,eAGF,MACE,yBACA,kBACA,sBACA,cAEA,YACE,gCAGF,kBAEE,gBACA,sBAIJ,EACE,qBACA,gBAGF,IACE,kBACA,aACA,gBACA,gBACA,gBAGF,OACE,aAEA,iBACE,eACA,oBACA,mBACA,uBACA,WACA,YACA,kBACA,eAEA,uBACE,gCAKN,SAEE,mBACA,cACA,kBACA,cACA,yBAGF,GACE,oBAGF,IACE,eACA,YACA,mBAGF,UACE,YAGF,IACE,MACA,OACA,QACA,kBACA,eACA,UACA,yBACA,iBAEA,OACE,aAGF,gCAEE,eAGF,QACE,iBACA,oBACA,mBACA,sBAGF,eACE,YACA,YACA,mBACA,eAEA,4BACE,iEAGF,iBACE,eACA,aAGF,qBACE,YACA,YACA,mBACA,eAEA,2BACE,aAKN,eACE,gBAEA,iBACE,aACA,eAKN,KACE,sBACA,uBACA,aACA,uBACA,mBACA,eACA,SAGF,SACE,eACA,aACA,sBACA,yBACA,iBACA,OACA,SACA,SACA,YACA,aACA,mBACA,YAEA,oBACE,YACA,gBAEA,sBACE,aACA,YACA,4BACA,gBACA,gBACA,gBACA,eAEA,wDAEE,aACA,gCAEA,8EACE,aAGF,4EACE,oBAIJ,gCACE,gCACA,gBACA,iBACA,mBAGF,iCACE,oBAGF,gCACE,aAKN,wBACE,aAGF,gBACE,iBAIJ,mBACE,eACA,YACA,UACA,kBACA,gCACA,SACA,QACA,gCAGF,MACE,gCAGF,oGAME,YACA,WACA,eACA,eAGF,wDAEE,mBACA,WAGF,uCAEE,kBAGF,qBACE,oBAGF,cAEE,6BAGF,SACE,gCACA,eACA,YACA,WACA,iBACA,iBACA,gBACA,aAGF,OACE,gCACA,eACA,eACA,WACA,YACA,YACA,eACA,eAEA,gBACE,mBAIJ,KACE,cAGF,MACE,kBACA,aACA,sBACA,8BACA,mBACA,6DACA,yBACA,YACA,cACA,kBAEA,wBAEE,uDAEA,wDACE,mBACA,UAIJ,YACE,kBACA,WACA,MACA,OACA,WACA,YACA,uBACA,yBAGF,oCAEE,kCAIA,mCACE,mBACA,UAIJ,aACE,iBACA,gBACA,cAGF,QACE,0BAEA,cACE,qBAIJ,eACE,iBACA,kBACA,gBACA,yBACA,sBACA,cACA,gBACA,gBAGF,sBACE,yBACA,iBACA,eACA,kBACA,UACA,kBACA,uBAEA,mCACE,UACA,mBAGF,wBACE,oBACA,mBACA,uBACA,eACA,aACA,WACA,YACA,kBACA,eAEA,8BACE,gCAMR,OACE,eACA,gBAGF,iBACE,gBAGF,YACE,eACA,UACA,YACA,iBACA,YACA,QACA,kBAEA,mBACE,kBAGF,qBACE,gBAIJ,6CAKE,mBAGF,QACE,aACA,uBACA,gBAEA,aACE,WACA,YACA,cACA,kBACA,eACA,eAGF,sBACE,WACA,YAIJ,gKASE,aACA,eACA,MACA,OACA,UACA,aACA,YACA,mCACA,2BAEA,+NACE,yBACA,iBACA,kBACA,QACA,SACA,UACA,gBACA,gCAIJ,6MASE,aAGF,SACE,YACA,eACA,iBAGF,yBACE,YAGF,KACE,mBAGF,UACE,eACA,oBAEA,eACE,gBACA,mBACA,eAGF,4BACE,aAIJ,QACE,kBACA,oBACA,sBACA,WACA,YACA,aAEA,cACE,UACA,QACA,SAGE,qCACE,UAIJ,+BACE,mBAIJ,gBACE,kBACA,eACA,mBACA,QAEA,uBACE,kBACA,WACA,kBACA,YACA,WACA,sCAKN,SACE,iBACA,gBACA,aAGF,cACE,YAGF,YACE,yBACA,iBACA,uCACA,kBACA,mBACA,cACA,sBACA,gBAEA,mBACE,YACA,gBAGF,cACE,aAIJ,UACE,WACA,YACA,sBACA,UAGF,gBACE,gBAGF,UACE,iBAEA,gBACE,iBACA,UAGF,iBACE,iBACA,UAIJ,gBACE,gBACA,eAGF,UACE,iBACA,sBACA,kBAGF,gBAEE,gBAGF,wCAEE,eACA,SACA,WACA,kBACA,gBACA,gBACA,aACA,kBACA,MA/sBQ,KAgtBR,aACA,YAGF,qBACE,mBAGF,mBACE,mBAGF,kBACE,eACA,SACA,WACA,kBACA,gBACA,gBACA,aACA,kBACA,aACA,YAEA,uBACE,aAIJ,cACE,YACA,mBACA,kBACA,aACA,gBACA,qBACA,eAGF,UACE,iBACA,WACA,YACA,mBACA,YACA,aACA,uBACA,mBACA,eACA,eAEA,gBACE,iEAIJ,oBAEE,eACA,aACA,iBACA,WACA,YACA,mBACA,YACA,aACA,uBACA,mBACA,eACA,UACA,eAEA,gCACE,iEAIJ,SACE,UAGF,WACE,UAGF,gBACE,qBACA,oBAGF,yBAEE,iCAEE,cAIJ,yBAEE,IACE,eACA,SAEA,QACE,gBAGF,eACE,UAEA,qBACE,UACA,YAGF,sBACE,SAIJ,eACE,aAIJ,KACE,iBACA,SAGF,cACE,eACA,YACA,WACA,UACA,WACA,YACA,iBACA,mBACA,aACA,uBACA,mBAGF,IACE,aAGF,SACE,aACA,WACA,SACA,MACA,4BACA,sCAEA,gBACE,aAGF,oBACE,gBAIJ,cACE,aACA,UACA,qCAGF,MACE,WACA,iBACA,cAEA,sBACE,mBACA,UAGF,aACE,iBAGF,eACE,gBAIJ,YACE,iBACA,WACA,MAEA,qBACE,cAIJ,aACE,aAGF,kBACE,aAGF,uBACE,cAIJ,UACE,WA96BQ,KA+6BR,MA76BQ,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AGF,MACE,mBAGF,QACE,mBAGF,MACE,mBAGF,gEASE,MAj/CQ,KAo/CV,MACE,gBAGF,QACE,kBAGF,WACE,0BAGF,eACE,6BAGF,YACE,gBAGF,cACE,kBAGF,aACE,iBAGF,eACE","file":"style.css"} \ No newline at end of file diff --git a/src/assets/js/script.js b/src/assets/js/script.js index 4b2fbaf..1e33b0d 100644 --- a/src/assets/js/script.js +++ b/src/assets/js/script.js @@ -8,6 +8,7 @@ const connectBox = document.querySelector('#connect-box'); const sortBox = document.querySelector('#sort-popup-box'); const filterBox = document.querySelector('#filter-popup-box'); const createBox = document.querySelector('#create-box'); +const popupBoxSettings = document.querySelector('#settings-popup-box'); const titleNote = noteBox.querySelector('#title'); const contentNote = noteBox.querySelector('#content'); const colors = document.querySelectorAll('#colors span'); @@ -33,6 +34,12 @@ if (localStorage.getItem('theme') === 'light') { if (localStorage.getItem('version') === 'hide') document.querySelector('#newVersion').style.display = 'none'; if (localStorage.getItem('sort_notes') === null) localStorage.setItem('sort_notes', '3'); +function generateRandomBytes(length) { + const array = new Uint8Array(length); + window.crypto.getRandomValues(array); + return array; +} + const showSuccess = (message) => { if (timeoutNotification) clearTimeout(timeoutNotification); const notification = document.querySelector('#successNotification'); @@ -54,7 +61,7 @@ const showError = (message) => { }; const searchSideBar = () => { - sideBar.querySelectorAll('p').forEach((e) => { + sideBar.querySelectorAll('#listNotes p').forEach((e) => { e.addEventListener('click', () => { const titleList = e.querySelector('.titleList').textContent; document.querySelectorAll('.note').forEach((note) => { @@ -193,6 +200,16 @@ const showNotes = async () => { const deContentString = JSON.parse(new TextDecoder().decode(deContent)); const contentHtml = converter.makeHtml(deContentString); const noteElement = document.createElement('div'); + const detailsElement = document.createElement('div'); + const titleElement = document.createElement('h2'); + const contentElement = document.createElement('span'); + const bottomContentElement = document.createElement('div'); + const editIconElement = document.createElement('i'); + const trashIconElement = document.createElement('i'); + const paragraph = document.createElement('p'); + const titleSpan = document.createElement('span'); + const dateSpan = document.createElement('span'); + noteElement.id = `note${id}`; noteElement.classList.add('note', color); noteElement.tabIndex = 0; @@ -202,40 +219,20 @@ const showNotes = async () => { noteElement.setAttribute('data-note-color', color); noteElement.setAttribute('data-note-hidden', hidden); noteElement.setAttribute('data-note-category', category); - - const detailsElement = document.createElement('div'); detailsElement.classList.add('details'); - - const titleElement = document.createElement('h2'); titleElement.classList.add('title'); titleElement.textContent = deTitleString; - const contentElement = document.createElement('span'); - if (hidden === false) contentElement.innerHTML = contentHtml; else contentElement.innerHTML = ''; detailsElement.appendChild(titleElement); - - if (category !== '0') { - const categoryElement = document.createElement('span'); - categoryElement.classList.add('category'); - categoryElement.textContent = document.querySelector(`input[name="category"][value="${category}"]`).parentElement.textContent; - detailsElement.appendChild(categoryElement); - } - detailsElement.appendChild(contentElement); - - const bottomContentElement = document.createElement('div'); bottomContentElement.classList.add('bottom-content'); - - const editIconElement = document.createElement('i'); editIconElement.classList.add('fa-solid', 'fa-pen', 'note-action'); editIconElement.tabIndex = 0; editIconElement.setAttribute('role', 'button'); editIconElement.setAttribute('aria-label', 'Edit'); - - const trashIconElement = document.createElement('i'); trashIconElement.classList.add('fa-solid', 'fa-trash-can', 'note-action'); trashIconElement.tabIndex = 0; trashIconElement.setAttribute('role', 'button'); @@ -268,17 +265,10 @@ const showNotes = async () => { noteElement.appendChild(detailsElement); noteElement.appendChild(bottomContentElement); - document.querySelector('main').appendChild(noteElement); - - const paragraph = document.createElement('p'); paragraph.setAttribute('tabindex', '0'); paragraph.setAttribute('role', 'button'); - - const titleSpan = document.createElement('span'); titleSpan.classList.add('titleList'); titleSpan.textContent = deTitleString; - - const dateSpan = document.createElement('span'); dateSpan.classList.add('dateList'); dateSpan.textContent = date; @@ -289,21 +279,66 @@ const showNotes = async () => { paragraph.appendChild(categoryElement); } + document.querySelector('main').appendChild(noteElement); paragraph.appendChild(titleSpan); paragraph.appendChild(dateSpan); sideBar.querySelector('#listNotes').appendChild(paragraph); searchSideBar(); }); + document.querySelector('#last-sync span').textContent = new Date().toLocaleTimeString(); +}; + +const verifyFingerprint = async () => { + try { + const challenge = generateRandomBytes(32); + const userId = generateRandomBytes(16); + await navigator.credentials.create({ + publicKey: { + challenge, + rp: { + name: 'Bloc-notes', + }, + user: { + id: userId, + name: 'Bloc-notes', + displayName: 'Bloc-notes', + }, + pubKeyCredParams: [ + { + type: 'public-key', + alg: -7, + }, + ], + authenticatorSelection: { + authenticatorAttachment: 'platform', + }, + timeout: 60000, + attestation: 'direct', + }, + }); + if (localStorage.getItem('fingerprint') === 'true') await showNotes(); + else localStorage.setItem('fingerprint', 'true'); + } catch (error) { + if (localStorage.getItem('fingerprint') === 'true') window.location.href = '/error/403/'; + else document.querySelector('#checkFingerprint').checked = false; + } }; +if (localStorage.getItem('fingerprint') === 'true') { + verifyFingerprint(); + document.querySelector('#checkFingerprint').checked = true; +} + const toggleFullscreen = (id) => { const note = document.querySelector(`#note${id}`); note.classList.toggle('fullscreen'); + document.body.classList.toggle('body-fullscreen'); }; const updateNote = (id, title, content, color, hidden, category) => { isUpdate = true; document.querySelectorAll('.note').forEach((note) => note.classList.remove('fullscreen')); + document.body.classList.remove('body-fullscreen'); document.querySelector('#idNote').value = id; document.querySelector('#iconAdd').click(); titleNote.value = title; @@ -339,7 +374,7 @@ const copy = (content) => { }; const deleteNote = (e) => { - let message; + let message = ''; if (window.location.href.endsWith('/en/')) message = 'Do you really want to delete this note?'; else if (window.location.href.endsWith('/de/')) message = 'Möchten Sie diese Notiz wirklich löschen?'; else if (window.location.href.endsWith('/es/')) message = '¿Estás seguro que quieres eliminar esta nota?'; @@ -398,6 +433,19 @@ document.querySelector('#create-account').addEventListener('click', () => { document.querySelector('#nameCreate').focus(); }); +document.querySelectorAll('#settings').forEach((e) => { + e.addEventListener('click', () => { + popupBoxSettings.classList.add('show'); + popupBoxSettings.querySelector('i').focus(); + sideBar.classList.remove('show'); + }); +}); + +document.querySelector('#checkFingerprint').addEventListener('change', () => { + if (document.querySelector('#checkFingerprint').checked) verifyFingerprint(); + else localStorage.removeItem('fingerprint'); +}); + document.querySelectorAll('#iconAdd, #iconFloatAdd').forEach((e) => { e.addEventListener('click', () => { noteBox.classList.add('show'); @@ -431,13 +479,34 @@ document.querySelectorAll('header i').forEach((e) => { createBox.classList.remove('show'); sortBox.classList.remove('show'); filterBox.classList.remove('show'); - closeSidebar(); + popupBoxSettings.classList.remove('show'); }); e.addEventListener('keydown', (event) => { if (event.key === 'Enter') e.click(); }); }); +document.querySelector('#export-all-notes').addEventListener('click', () => { + if (document.querySelector('.note') === null) return; + const notes = []; + document.querySelectorAll('.note').forEach((e) => { + const title = e.querySelector('.title').textContent; + const content = e.querySelector('.details span').textContent; + const noteObject = { + title, + content, + }; + notes.push(noteObject); + }); + const a = document.createElement('a'); + a.setAttribute('href', `data:text/plain;charset=utf-8,${encodeURIComponent(JSON.stringify(notes))}`); + a.setAttribute('download', 'notes.json'); + a.style.display = 'none'; + document.body.appendChild(a); + a.click(); + document.body.removeChild(a); +}); + document.querySelector('#search-input').addEventListener('input', () => { const searchValue = document.querySelector('#search-input').value.trim().toLowerCase(); document.querySelectorAll('.note').forEach((e) => { @@ -514,7 +583,6 @@ document.addEventListener('touchend', (event) => { handleGesture(); }, false); -document.querySelector('#menuIcon').addEventListener('click', () => openSidebar()); document.querySelector('#btnFilter').addEventListener('click', () => filterBox.classList.add('show')); document.querySelector('#btnSort').addEventListener('click', () => sortBox.classList.add('show')); document.querySelector('#submitGenPsswd').addEventListener('click', () => getPassword(16)); @@ -592,7 +660,7 @@ document.querySelector('#createForm').addEventListener('submit', async () => { if (response.ok) { createBox.classList.remove('show'); forms.forEach((form) => form.reset()); - let message; + let message = ''; if (window.location.href.endsWith('/en/')) message = 'Account created successfully! You can now log in.'; else if (window.location.href.endsWith('/de/')) message = 'Konto erfolgreich erstellt! Sie können sich jetzt anmelden.'; else if (window.location.href.endsWith('/es/')) message = '¡Cuenta creada exitosamente! Puedes iniciar sesión ahora.'; @@ -699,5 +767,6 @@ document.querySelector('#addNote').addEventListener('submit', async () => { document.addEventListener('DOMContentLoaded', async () => { if ('serviceWorker' in navigator) await navigator.serviceWorker.register('sw.js'); - await showNotes(); + if (localStorage.getItem('fingerprint') !== 'true') await showNotes(); + document.querySelector('#last-sync').addEventListener('click', () => window.location.reload()); }); diff --git a/src/assets/js/scriptConnect.js b/src/assets/js/scriptConnect.js index 443cf26..48cf9b1 100644 --- a/src/assets/js/scriptConnect.js +++ b/src/assets/js/scriptConnect.js @@ -8,6 +8,7 @@ const noteBox = document.querySelector('#note-popup-box'); const sortBox = document.querySelector('#sort-popup-box'); const filterBox = document.querySelector('#filter-popup-box'); const popupBoxManage = document.querySelector('#manage-popup-box'); +const popupBoxSettings = document.querySelector('#settings-popup-box'); const privateNote = document.querySelector('#private-note-popup-box'); const publicNote = document.querySelector('#public-note-popup-box'); const titleNote = noteBox.querySelector('#title'); @@ -93,6 +94,8 @@ const showNotes = async () => { if (data.length === 0) return; + const fragment = document.createDocumentFragment(); + data.forEach((row) => { const { id, title, content, color, date, hidden, category, link, @@ -102,6 +105,15 @@ const showNotes = async () => { const contentHtml = converter.makeHtml(content); const noteElement = document.createElement('div'); + const detailsElement = document.createElement('div'); + const titleElement = document.createElement('h2'); + const contentElement = document.createElement('span'); + const bottomContentElement = document.createElement('div'); + const editIconElement = document.createElement('i'); + const paragraph = document.createElement('p'); + const titleSpan = document.createElement('span'); + const dateSpan = document.createElement('span'); + noteElement.id = `note${id}`; noteElement.classList.add('note', color); noteElement.tabIndex = 0; @@ -112,34 +124,16 @@ const showNotes = async () => { noteElement.setAttribute('data-note-hidden', hidden); noteElement.setAttribute('data-note-category', category); noteElement.setAttribute('data-note-link', link); - - const detailsElement = document.createElement('div'); detailsElement.classList.add('details'); - - const titleElement = document.createElement('h2'); titleElement.classList.add('title'); titleElement.textContent = title; - const contentElement = document.createElement('span'); - if (hidden === 0) contentElement.innerHTML = contentHtml; else contentElement.innerHTML = ''; detailsElement.appendChild(titleElement); - - if (category !== 0) { - const categoryElement = document.createElement('span'); - categoryElement.classList.add('category'); - categoryElement.textContent = document.querySelector(`input[name="category"][value="${category}"]`).parentElement.textContent; - detailsElement.appendChild(categoryElement); - } - detailsElement.appendChild(contentElement); - - const bottomContentElement = document.createElement('div'); bottomContentElement.classList.add('bottom-content'); - - const editIconElement = document.createElement('i'); editIconElement.classList.add('fa-solid', 'fa-pen', 'note-action'); editIconElement.tabIndex = 0; editIconElement.setAttribute('role', 'button'); @@ -153,6 +147,10 @@ const showNotes = async () => { trashIconElement.setAttribute('role', 'button'); trashIconElement.setAttribute('aria-label', 'Supprimer la note'); bottomContentElement.appendChild(trashIconElement); + + const iconLink = document.createElement('i'); + iconLink.classList.add('fa-solid', 'fa-link'); + titleSpan.appendChild(iconLink); } if (hidden === 0 && content !== '') { @@ -187,22 +185,10 @@ const showNotes = async () => { noteElement.appendChild(detailsElement); noteElement.appendChild(bottomContentElement); - document.querySelector('main').appendChild(noteElement); - - const paragraph = document.createElement('p'); paragraph.setAttribute('tabindex', '0'); paragraph.setAttribute('role', 'button'); - - const titleSpan = document.createElement('span'); titleSpan.classList.add('titleList'); titleSpan.textContent = title; - if (link !== '') { - const iconLink = document.createElement('i'); - iconLink.classList.add('fa-solid', 'fa-link'); - titleSpan.appendChild(iconLink); - } - - const dateSpan = document.createElement('span'); dateSpan.classList.add('dateList'); dateSpan.textContent = date; @@ -213,10 +199,13 @@ const showNotes = async () => { paragraph.appendChild(categoryElement); } + fragment.appendChild(noteElement); paragraph.appendChild(titleSpan); paragraph.appendChild(dateSpan); sideBar.querySelector('#listNotes').appendChild(paragraph); }); + + document.querySelector('main').appendChild(fragment); searchSideBar(); noteActions(); document.querySelector('#last-sync span').textContent = new Date().toLocaleTimeString(); @@ -312,11 +301,13 @@ const fetchLogout = async () => { const toggleFullscreen = (id) => { const note = document.querySelector(`#note${id}`); note.classList.toggle('fullscreen'); + document.body.classList.toggle('body-fullscreen'); }; const updateNote = (id, title, content, color, hidden, category, link) => { isUpdate = true; document.querySelectorAll('.note').forEach((e) => e.classList.remove('fullscreen')); + document.body.classList.remove('body-fullscreen'); document.querySelector('#iconAdd').click(); document.querySelector('#idNote').value = id; document.querySelector('#checkLink').value = link; @@ -356,7 +347,7 @@ const copy = (content) => { }; const deleteNote = (e) => { - let message; + let message = ''; if (window.location.href.endsWith('/en/')) message = 'Do you really want to delete this note?'; else if (window.location.href.endsWith('/de/')) message = 'Möchten Sie diese Notiz wirklich löschen?'; else if (window.location.href.endsWith('/es/')) message = '¿Estás seguro que quieres eliminar esta nota?'; @@ -367,6 +358,7 @@ const deleteNote = (e) => { const noteAccess = (id, link) => { document.querySelectorAll('.note').forEach((e) => e.classList.remove('fullscreen')); + document.body.classList.remove('body-fullscreen'); if (link === '') { privateNote.classList.add('show'); document.querySelector('#idNotePublic').value = id; @@ -382,7 +374,7 @@ const noteAccess = (id, link) => { }; const searchSideBar = () => { - sideBar.querySelectorAll('p').forEach((e) => { + sideBar.querySelectorAll('#listNotes p').forEach((e) => { e.addEventListener('click', () => { const titleList = e.querySelector('.titleList').textContent; document.querySelectorAll('.note').forEach((note) => { @@ -454,6 +446,14 @@ document.querySelectorAll('.manage-account').forEach((e) => { }); }); +document.querySelectorAll('#settings').forEach((e) => { + e.addEventListener('click', () => { + popupBoxSettings.classList.add('show'); + popupBoxSettings.querySelector('i').focus(); + sideBar.classList.remove('show'); + }); +}); + document.querySelectorAll('.linkp').forEach((e) => { e.addEventListener('keydown', (event) => { if (event.key === 'Enter') e.click(); @@ -461,7 +461,7 @@ document.querySelectorAll('.linkp').forEach((e) => { }); document.querySelector('#delete-account').addEventListener('click', () => { - let message; + let message = ''; if (window.location.href.endsWith('/en/')) message = 'Do you really want to delete your account as well as all your notes saved in the cloud? Your username will become available again for other users.'; else if (window.location.href.endsWith('/de/')) message = 'Möchten Sie wirklich Ihr Konto sowie alle Ihre in der Cloud gespeicherten Notizen löschen? Ihr Benutzername wird für andere Benutzer wieder verfügbar.'; else if (window.location.href.endsWith('/es/')) message = '¿Estás seguro de que quieres eliminar tu cuenta y todas tus notas almacenadas en la nube? Su nombre de usuario volverá a estar disponible para otros usuarios.'; @@ -480,7 +480,7 @@ document.querySelectorAll('header i').forEach((e) => { privateNote.classList.remove('show'); sortBox.classList.remove('show'); filterBox.classList.remove('show'); - closeSidebar(); + popupBoxSettings.classList.remove('show'); }); e.addEventListener('keydown', (event) => { if (event.key === 'Enter') e.click(); @@ -611,7 +611,6 @@ document.addEventListener('touchend', (event) => { }, false); document.querySelector('#log-out').addEventListener('click', () => fetchLogout()); -document.querySelector('#menuIcon').addEventListener('click', () => openSidebar()); document.querySelector('#btnSort').addEventListener('click', () => sortBox.classList.add('show')); document.querySelector('#btnFilter').addEventListener('click', () => filterBox.classList.add('show')); forms.forEach((e) => e.addEventListener('submit', (event) => event.preventDefault())); @@ -667,7 +666,7 @@ document.querySelector('#addNote').addEventListener('submit', async () => { if (!titleBrut || titleBrut.length > 30 || contentBrut.length > 5000) return; if (isUpdate && !idNote) return; - const data = isUpdate ? `noteId=${idNote}&title=${title}&content=${content}&color=${color}&date=${date}&hidden=${hidden}&category=${category}&link=${link}&csrf_token_note=${document.querySelector('#csrf_token_note').value}` : `title=${title}&content=${content}&color=${color}&date=${date}&hidden=${hidden}&category=${category}&csrf_token_note=${document.querySelector('#csrf_token_note').value}`; + const data = isUpdate ? `noteId=${idNote}&title=${title}&content=${content}&color=${color}&date=${date}&hidden=${hidden}&category=${category}&link=${link}` : `title=${title}&content=${content}&color=${color}&date=${date}&hidden=${hidden}&category=${category}`; const url = isUpdate ? '/seguinleo-notes/assets/php/updateNote.php' : '/seguinleo-notes/assets/php/addNote.php'; const response = await fetch(url, { method: 'POST', diff --git a/src/assets/php/addNote.php b/src/assets/php/addNote.php index 5be2985..aa6a4aa 100644 --- a/src/assets/php/addNote.php +++ b/src/assets/php/addNote.php @@ -1,11 +1,7 @@ + Bloc-notes – Léo SEGUIN @@ -35,6 +29,7 @@ + @@ -42,48 +37,33 @@ +
- - - - - +
Kopiert!
@@ -456,27 +445,10 @@ -
-

- v23.12.3 -

-
-
-
- -
-

v23.12.3🎉

-

- Bloc-notes wurde aktualisiert! -

-

- Liste der Änderungen -

-
@@ -486,4 +458,5 @@ + diff --git a/src/en/index.php b/src/en/index.php index 170a3f6..2f79c3f 100644 --- a/src/en/index.php +++ b/src/en/index.php @@ -10,23 +10,17 @@ session_set_cookie_params($cookieParams); session_start(); session_regenerate_id(); - -if (isset($_SESSION['name']) === false) { - $_SESSION['csrf_token_connect'] = bin2hex(random_bytes(32)); - $_SESSION['csrf_token_create'] = bin2hex(random_bytes(32)); - $csrf_token_connect = $_SESSION['csrf_token_connect']; - $csrf_token_create = $_SESSION['csrf_token_create']; - $name = null; -} else { - $_SESSION['csrf_token_note'] = bin2hex(random_bytes(32)); - $_SESSION['csrf_token_psswd'] = bin2hex(random_bytes(32)); - $csrf_token_note = $_SESSION['csrf_token_note']; - $csrf_token_psswd = $_SESSION['csrf_token_psswd']; - $name = $_SESSION['name']; -} +$name = $_SESSION['name'] ?? null; +$csrf_token_connect = bin2hex(random_bytes(16)); +$csrf_token_create = bin2hex(random_bytes(16)); +$csrf_token_psswd = bin2hex(random_bytes(16)); +$_SESSION['csrf_token_connect'] = $csrf_token_connect; +$_SESSION['csrf_token_create'] = $csrf_token_create; +$_SESSION['csrf_token_psswd'] = $csrf_token_psswd; ?> + Bloc-notes – Léo SEGUIN @@ -35,6 +29,7 @@ + @@ -42,48 +37,33 @@ +
- - - - - +
Copied!
@@ -455,27 +445,10 @@ -
-

- v23.12.3 -

-
-
-
- -
-

v23.12.3🎉

-

- Bloc-notes has been updated! -

-

- Changelog -

-
@@ -485,4 +458,5 @@ + diff --git a/src/es/index.php b/src/es/index.php index 20f0c2c..71f82bb 100644 --- a/src/es/index.php +++ b/src/es/index.php @@ -10,23 +10,17 @@ session_set_cookie_params($cookieParams); session_start(); session_regenerate_id(); - -if (isset($_SESSION['name']) === false) { - $_SESSION['csrf_token_connect'] = bin2hex(random_bytes(32)); - $_SESSION['csrf_token_create'] = bin2hex(random_bytes(32)); - $csrf_token_connect = $_SESSION['csrf_token_connect']; - $csrf_token_create = $_SESSION['csrf_token_create']; - $name = null; -} else { - $_SESSION['csrf_token_note'] = bin2hex(random_bytes(32)); - $_SESSION['csrf_token_psswd'] = bin2hex(random_bytes(32)); - $csrf_token_note = $_SESSION['csrf_token_note']; - $csrf_token_psswd = $_SESSION['csrf_token_psswd']; - $name = $_SESSION['name']; -} +$name = $_SESSION['name'] ?? null; +$csrf_token_connect = bin2hex(random_bytes(16)); +$csrf_token_create = bin2hex(random_bytes(16)); +$csrf_token_psswd = bin2hex(random_bytes(16)); +$_SESSION['csrf_token_connect'] = $csrf_token_connect; +$_SESSION['csrf_token_create'] = $csrf_token_create; +$_SESSION['csrf_token_psswd'] = $csrf_token_psswd; ?> + Bloc-notes – Léo SEGUIN @@ -35,6 +29,7 @@ + @@ -42,48 +37,33 @@ +
- - - - - +
¡Copiado!
@@ -457,27 +445,10 @@ -
-

- v23.12.3 -

-
-
-
- -
-

v23.12.3🎉

-

- ¡Bloc-notes ha sido actualizado! -

-

- Lista de cambios -

-
@@ -487,4 +458,5 @@ + diff --git a/src/index.php b/src/index.php index ff35a3b..df01b3b 100644 --- a/src/index.php +++ b/src/index.php @@ -10,23 +10,17 @@ session_set_cookie_params($cookieParams); session_start(); session_regenerate_id(); - -if (isset($_SESSION['name']) === false) { - $_SESSION['csrf_token_connect'] = bin2hex(random_bytes(32)); - $_SESSION['csrf_token_create'] = bin2hex(random_bytes(32)); - $csrf_token_connect = $_SESSION['csrf_token_connect']; - $csrf_token_create = $_SESSION['csrf_token_create']; - $name = null; -} else { - $_SESSION['csrf_token_note'] = bin2hex(random_bytes(32)); - $_SESSION['csrf_token_psswd'] = bin2hex(random_bytes(32)); - $csrf_token_note = $_SESSION['csrf_token_note']; - $csrf_token_psswd = $_SESSION['csrf_token_psswd']; - $name = $_SESSION['name']; -} +$name = $_SESSION['name'] ?? null; +$csrf_token_connect = bin2hex(random_bytes(16)); +$csrf_token_create = bin2hex(random_bytes(16)); +$csrf_token_psswd = bin2hex(random_bytes(16)); +$_SESSION['csrf_token_connect'] = $csrf_token_connect; +$_SESSION['csrf_token_create'] = $csrf_token_create; +$_SESSION['csrf_token_psswd'] = $csrf_token_psswd; ?> + Bloc-notes – Léo SEGUIN @@ -35,6 +29,7 @@ + @@ -42,48 +37,33 @@ +
- - - - - +
Copié !
+
+ +
@@ -416,11 +409,6 @@ -
-

- v23.12.3 -

-
@@ -457,27 +445,10 @@ -
-

- v23.12.3 -

-
-
-
- -
-

v23.12.3🎉

-

- Bloc-notes à été mis à jour ! -

-

- Liste des changements -

-
@@ -487,4 +458,5 @@ + diff --git a/src/package-lock.json b/src/package-lock.json index 6d1681f..7ef010e 100644 --- a/src/package-lock.json +++ b/src/package-lock.json @@ -12,7 +12,7 @@ "eslint": "^8.56.0", "eslint-config-airbnb-base": "^15.0.0", "eslint-plugin-import": "^2.29.1", - "sass": "^1.69.5", + "sass": "^1.69.6", "typescript": "^5.3.3" } }, @@ -1052,20 +1052,6 @@ "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", "dev": true }, - "node_modules/fsevents": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", - "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", - "dev": true, - "hasInstallScript": true, - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": "^8.16.0 || ^10.6.0 || >=11.0.0" - } - }, "node_modules/function-bind": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", @@ -2130,9 +2116,9 @@ } }, "node_modules/sass": { - "version": "1.69.5", - "resolved": "https://registry.npmjs.org/sass/-/sass-1.69.5.tgz", - "integrity": "sha512-qg2+UCJibLr2LCVOt3OlPhr/dqVHWOa9XtZf2OjbLs/T4VPSJ00udtgJxH3neXZm+QqX8B+3cU7RaLqp1iVfcQ==", + "version": "1.69.6", + "resolved": "https://registry.npmjs.org/sass/-/sass-1.69.6.tgz", + "integrity": "sha512-qbRr3k9JGHWXCvZU77SD2OTwUlC+gNT+61JOLcmLm+XqH4h/5D+p4IIsxvpkB89S9AwJOyb5+rWNpIucaFxSFQ==", "dev": true, "dependencies": { "chokidar": ">=3.0.0 <4.0.0", diff --git a/src/package.json b/src/package.json index bc82b6f..1d85659 100644 --- a/src/package.json +++ b/src/package.json @@ -12,7 +12,7 @@ "eslint": "^8.56.0", "eslint-config-airbnb-base": "^15.0.0", "eslint-plugin-import": "^2.29.1", - "sass": "^1.69.5", + "sass": "^1.69.6", "typescript": "^5.3.3" } } diff --git a/src/share/stylePublic.css b/src/share/stylePublic.css index 5d6fad5..b858e63 100644 --- a/src/share/stylePublic.css +++ b/src/share/stylePublic.css @@ -78,17 +78,13 @@ a { color: #8ab4f8; } -progress { - width: 100%; -} - pre, code { background: #383a59; color: #8be9fd; border-radius: 5px; - padding: 2px 5px; - white-space: pre-wrap; + padding: 0 2px; + white-space: break-spaces; } li { @@ -102,6 +98,11 @@ img { border-radius: 10px; } +input[type="checkbox"] { + pointer-events: none; + margin-right: 10px; +} + .note { position: relative; display: flex; @@ -180,12 +181,12 @@ img { text-decoration: none; } -.note .details { +.details { overflow-x: hidden; overflow-y: auto; overflow-wrap: break-word; word-break: break-word; - padding-right: 5px; + padding: 0 4px; font-size: .9rem; font-weight: 700; } @@ -294,12 +295,10 @@ img { footer { font-size: .8rem; - text-align: center; - width: 100%; -webkit-user-select: none; user-select: none; - position: fixed; - bottom: 1rem; + text-align: center; + margin: 1rem auto; } @media(max-width: 900px) {