File tree 1 file changed +18
-6
lines changed
1 file changed +18
-6
lines changed Original file line number Diff line number Diff line change @@ -67,7 +67,8 @@ <h1 class="mt-5 text-5xl font-semibold text-gray-800">Laravel Upgrade Helper</h1
67
67
< a :href ="releaseLink " target ="_blank " class ="underline italic "> link</ a >
68
68
</ div >
69
69
70
- < div class ="text-center ">
70
+
71
+ < div class ="text-center " v-show ="documentationLink !== '' ">
71
72
For upgrade guide see:
72
73
< a :href ="documentationLink " target ="_blank " class ="underline italic "> link</ a >
73
74
</ div >
@@ -212,11 +213,22 @@ <h3 class="text-xl font-semibold text-gray-900 dark:text-white">
212
213
213
214
documentationLink ( ) {
214
215
if ( this . upgradeVersion ) {
215
- const splitVersion = this . upgradeVersion . split ( '.' ) ;
216
- const majorVersion = parseInt ( splitVersion [ 0 ] . replace ( 'v' , '' ) ) ;
217
- const minorVersion = majorVersion === 5 ? splitVersion [ 1 ] : 'x' ;
218
-
219
- return `https://laravel.com/docs/${ majorVersion } .${ minorVersion } /upgrade` ;
216
+ const splitUpgradeVersion = this . upgradeVersion . split ( '.' ) ;
217
+ const upgradeMajorVersion = parseInt ( splitUpgradeVersion [ 0 ] . replace ( 'v' , '' ) ) ;
218
+ const upgradeMinorVersion = upgradeMajorVersion === 5 ? splitUpgradeVersion [ 1 ] : 'x' ;
219
+
220
+ const splitBaseVersion = this . baseVersion . split ( '.' ) ;
221
+ const baseMajorVersion = parseInt ( splitBaseVersion [ 0 ] . replace ( 'v' , '' ) ) ;
222
+ const baseMinorVersion = baseMajorVersion === 5 ? splitBaseVersion [ 1 ] : 'x' ;
223
+
224
+ if (
225
+ upgradeMajorVersion === baseMajorVersion &&
226
+ upgradeMinorVersion === baseMinorVersion
227
+ ) {
228
+ return '' ;
229
+ }
230
+
231
+ return `https://laravel.com/docs/${ upgradeMajorVersion } .${ upgradeMinorVersion } /upgrade` ;
220
232
}
221
233
222
234
return '' ;
You can’t perform that action at this time.
0 commit comments