File tree Expand file tree Collapse file tree 2 files changed +21
-3
lines changed
Expand file tree Collapse file tree 2 files changed +21
-3
lines changed Original file line number Diff line number Diff line change @@ -86,7 +86,25 @@ let vm = new Vue({
8686 return this . buildRecipeRepoUrl ( recipe ) + '/' + version
8787 } ,
8888 buildRecipeRepoUrl ( recipe ) {
89- return recipe . repo . url + '/tree/master/' + recipe . officialPackageName
89+ let repoUrl , pattern , gitServerHostName
90+
91+ repoUrl = recipe . repo . url . replace ( '.git' , '' )
92+
93+ pattern = / ^ g i t \@ [ a - z . ] * \: /
94+ if ( pattern . test ( repoUrl ) ) {
95+ gitServerHostName = pattern . exec ( repoUrl ) [ 0 ] . replace ( 'git@' , '' ) . replace ( ':' , '' )
96+ repoUrl . replace ( pattern , 'https://' + gitServerHostName + '/' )
97+ }
98+
99+ pattern = / ^ h t t p s ? \: \/ \/ [ a - z . ] * /
100+ gitServerHostName = pattern . exec ( repoUrl ) [ 0 ] . replace ( / h t t p s ? \: \/ \/ / , '' )
101+
102+ switch ( gitServerHostName ) {
103+ case 'bitbucket.org' :
104+ return repoUrl + '/src/master/' + recipe . officialPackageName
105+ default :
106+ return repoUrl + '/tree/master/' + recipe . officialPackageName
107+ }
90108 } ,
91109 showSearch ( ) {
92110 this . enableFilter = true ;
Original file line number Diff line number Diff line change 11{
2- "build/dashboard.css" : " /build/dashboard.css" ,
3- "build/dashboard.js" : " /build/dashboard.js"
2+ "build/dashboard.css" : " /build/dashboard.b1963f9d56ce5d23c3b365942619a02a. css" ,
3+ "build/dashboard.js" : " /build/dashboard.37bb0847d2441133ec9d. js"
44}
You can’t perform that action at this time.
0 commit comments