File tree Expand file tree Collapse file tree 4 files changed +47
-8
lines changed
Expand file tree Collapse file tree 4 files changed +47
-8
lines changed Original file line number Diff line number Diff line change 517517 const hashMatch = document.location.hash.replace("#", "").split("/");
518518 const albumID = hashMatch[0] ?? '';
519519 const photoID = hashMatch[1] ?? '';
520+ const elem = document.getElementById('redirectData');
521+ const gallery = elem.dataset.gallery;
522+ const base = elem.dataset.redirect;
523+
520524 if (photoID !== '') {
521- window.location = '{{ $ gallery }} /' + albumID + '/' + photoID;
525+ window.location = gallery + ' /' + albumID + '/' + photoID;
522526 } else if (albumID !== '') {
523- window.location = '{{ $ gallery }} /' + albumID;
527+ window.location = gallery + ' /' + albumID;
524528 } else {
525- window.location = '{{ $ base }}' ;
529+ window.location = base;
526530 }
527531 */
528- '9zK0oWYjhW+ACIwFsQ6ksB1HCJ5EoUi+lRyrSt465A4 = ' ,
532+ 'okzzdI+OgeNYCr3oJXDZ/rPI5WwGyiU5V/RwOQrv5zE = ' ,
529533
530534 /*
531535 document.addEventListener("DOMContentLoaded", function(event) {
Original file line number Diff line number Diff line change 1+ <?php
2+
3+ use Illuminate \Database \Migrations \Migration ;
4+ use Illuminate \Support \Facades \DB ;
5+
6+ return new class () extends Migration {
7+ /**
8+ * Run the migrations.
9+ *
10+ * @return void
11+ */
12+ public function up (): void
13+ {
14+ DB ::table ('configs ' )->where ('key ' , 'version ' )->update (['value ' => '050102 ' ]);
15+ }
16+
17+ /**
18+ * Reverse the migrations.
19+ *
20+ * @return void
21+ */
22+ public function down (): void
23+ {
24+ DB ::table ('configs ' )->where ('key ' , 'version ' )->update (['value ' => '050101 ' ]);
25+ }
26+ };
Original file line number Diff line number Diff line change 1+ <div
2+ id =" redirectData"
3+ data-gallery =" {{ $gallery } }"
4+ data-redirect =" {{ $base } }"
5+ ></div >
16<script >
27 // Dirty work around.
38 const hashMatch = document .location .hash .replace (" #" , " " ).split (" /" );
49 const albumID = hashMatch[0 ] ?? ' ' ;
510 const photoID = hashMatch[1 ] ?? ' ' ;
11+ const elem = document .getElementById (' redirectData' );
12+ const gallery = elem .dataset .gallery ;
13+ const base = elem .dataset .redirect ;
14+
615 if (photoID !== ' ' ) {
7- window .location = ' {{ $ gallery } } /' + albumID + ' /' + photoID;
16+ window .location = gallery + ' /' + albumID + ' /' + photoID;
817 } else if (albumID !== ' ' ) {
9- window .location = ' {{ $ gallery } } /' + albumID;
18+ window .location = gallery + ' /' + albumID;
1019 } else {
11- window .location = ' {{ $ base } } ' ;
20+ window .location = base;
1221 }
1322< / script>
Original file line number Diff line number Diff line change 1- 5.1.1
1+ 5.1.2
You can’t perform that action at this time.
0 commit comments