Skip to content

Commit 9c13c3f

Browse files
authored
Update changelog url (#4480)
1 parent fb7c15a commit 9c13c3f

4 files changed

Lines changed: 41 additions & 13 deletions

File tree

app/Http/Controllers/VersionController.php

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -95,12 +95,16 @@ public function changeLogs(): array
9595
*/
9696
protected function convert(string $response): array
9797
{
98-
// remove the </style> block at the beginning of the changelogs
99-
$pos = strpos($response, '</style>');
100-
if ($pos === false) {
101-
return [];
98+
// remove the first 12 lines at the beginning of the changelogs
99+
$pos = 0;
100+
for ($i = 0; $i < 12; $i++) {
101+
$pos = strpos($response, "\n", $pos);
102+
if ($pos === false) {
103+
return [];
104+
}
105+
$pos++;
102106
}
103-
$changelog = substr($response, $pos + strlen('</style>'));
107+
$changelog = substr($response, $pos);
104108

105109
// Apply the split and map functions
106110
// to get the changelogs in the right format

config/urls.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
'tags' => 'https://api.github.com/repos/LycheeOrg/Lychee/tags',
99
],
1010
'json' => 'https://lycheeorg.dev/update.json',
11-
'changelogs' => 'https://raw.githubusercontent.com/LycheeOrg/LycheeOrg.github.io/refs/heads/master/docs/releases.md',
11+
'changelogs' => 'https://raw.githubusercontent.com/LycheeOrg/LycheeOrg.github.io/refs/heads/master/src/content/docs/docs/getting-started/releases.md',
1212
],
1313
'git' => [
1414
'pull' => 'https://github.com/LycheeOrg/Lychee.git',

resources/js/views/admin/AdminDashboard.vue

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,21 @@
142142
</div>
143143
</div>
144144
</Panel>
145+
146+
<div class="flex items-center justify-center gap-6 mt-6 text-sm">
147+
<a
148+
v-if="initData?.settings.can_edit"
149+
:href="`${Constants.BASE_URL}/docs/api`"
150+
target="_blank"
151+
rel="noopener noreferrer"
152+
class="text-muted-color hover:text-color underline"
153+
>
154+
{{ $t("left-menu.api") }}
155+
</a>
156+
<RouterLink :to="{ name: 'changelogs' }" class="text-muted-color hover:text-color underline">
157+
{{ $t("left-menu.changelog") }}
158+
</RouterLink>
159+
</div>
145160
</div>
146161
</template>
147162

@@ -160,6 +175,7 @@ import OpenLeftMenu from "@/components/headers/OpenLeftMenu.vue";
160175
import PiMiniIcon from "@/components/icons/PiMiniIcon.vue";
161176
import { useLycheeStateStore } from "@/stores/LycheeState";
162177
import { useLeftMenuStateStore } from "@/stores/LeftMenuState";
178+
import Constants from "@/services/constants";
163179
import SecurityAdvisoriesService from "@/services/security-advisories-service";
164180
import AdminStatsService, { type AdminUpdateStatusResource } from "@/services/admin-stats-service";
165181
import { useAdminTiles, type AdminTile, type AdminTileGroup } from "@/composables/useAdminTiles";

tests/Feature_v2/VersionTest.php

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,20 @@ public function public_convert(string $response): array
5454
};
5555

5656
$test_string = '
57-
<style>
58-
test
59-
</style>
57+
58+
59+
60+
61+
62+
63+
64+
65+
66+
67+
68+
69+
70+
6071
6172
## Version 6
6273
@@ -66,9 +77,6 @@ public function public_convert(string $response): array
6677
6778
#### New Settings page & translations (French, Russian)
6879
69-
`klo` refers to *Keep the Light On*. In other words, basic software updates.
70-
`SE` refers to functionalities that are aimed at the Supporter Edition.
71-
7280
* `new` #3081 : Refactoring Settings page by @ildyria.
7381
7482
## Version 5
@@ -88,7 +96,7 @@ public function public_convert(string $response): array
8896
new ChangeLogInfo(
8997
'6.4.2',
9098
'Released on Apr 4, 2025',
91-
"<h4>New Settings page &amp; translations (French, Russian)</h4>\n<p><code>klo</code> refers to <em>Keep the Light On</em>. In other words, basic software updates.<br />\n<code>SE</code> refers to functionalities that are aimed at the Supporter Edition.</p>\n<ul>\n<li><code>new</code> <a href=\"https://github.com/LycheeOrg/Lychee/pull/3081\">#3081</a> : Refactoring Settings page by @ildyria.</li>\n</ul>\n"
99+
"<h4>New Settings page &amp; translations (French, Russian)</h4>\n<ul>\n<li><code>new</code> <a href=\"https://github.com/LycheeOrg/Lychee/pull/3081\">#3081</a> : Refactoring Settings page by @ildyria.</li>\n</ul>\n"
92100
),
93101
new ChangeLogInfo(
94102
'5.5.1',

0 commit comments

Comments
 (0)