added repo link to func store. will open repo page on new window or tab

Signed-off-by: Ken Fukuyama <kenfdev@gmail.com>
This commit is contained in:
Ken Fukuyama 2017-12-16 00:12:48 +09:00 committed by Alex Ellis
parent 4d785c8dfb
commit cc103ada94
5 changed files with 19 additions and 2 deletions

View File

@ -0,0 +1,4 @@
<svg height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg">
<path d="M0 0h24v24H0z" fill="none"/>
<path d="M3.9 12c0-1.71 1.39-3.1 3.1-3.1h4V7H7c-2.76 0-5 2.24-5 5s2.24 5 5 5h4v-1.9H7c-1.71 0-3.1-1.39-3.1-3.1zM8 13h8v-2H8v2zm9-6h-4v1.9h4c1.71 0 3.1 1.39 3.1 3.1s-1.39 3.1-3.1 3.1h-4V17h4c2.76 0 5-2.24 5-5s-2.24-5-5-5z"/>
</svg>

After

Width:  |  Height:  |  Size: 360 B

View File

@ -38,7 +38,7 @@
<md-content layout-padding>
<md-list>
<md-list-item class="primary-item" ng-disabled="isFunctionBeingCreated" ng-click="newFunction()">
<md-icon style="margin-right: 16px; opacity:0.6" md-svg-icon="img/icons/ic_shop_two_black_24px.svg"></md-icon>
<md-icon style="margin-right: 16px" md-svg-icon="img/icons/ic_shop_two_black_24px.svg"></md-icon>
<p>Deploy New Function</p>
</md-list-item>
</md-list>

View File

@ -17,7 +17,7 @@ funcStoreModule.component('funcStore', {
selectedFunc: '<',
onSelected: '&',
},
controller: ['FuncStoreService', '$mdDialog', function FuncStoreController(FuncStoreService, $mdDialog) {
controller: ['FuncStoreService', '$mdDialog', '$window', function FuncStoreController(FuncStoreService, $mdDialog, $window) {
var self = this;
this.storeUrl = 'https://raw.githubusercontent.com/openfaas/store/master/store.json';
@ -70,6 +70,10 @@ funcStoreModule.component('funcStore', {
);
}
this.openRepo = function (url) {
$window.open(url, '_blank');
}
this.loadStore();
}]

View File

@ -67,3 +67,11 @@ span.md-avatar {
background-color: #1398D6;
color: white;
}
md-icon {
opacity: 0.6;
}
md-icon.link {
fill: #303AA5;
}

View File

@ -19,6 +19,7 @@
<h3>{{ func.title }}</h3>
<p>{{ func.description }}</p>
</div>
<md-icon ng-if="func.repo_url" class="link md-secondary" ng-click="$ctrl.openRepo(func.repo_url)" aria-label="repo-link" md-svg-src="img/icons/ic_link_black_24px.svg"></md-icon>
<md-divider md-inset ng-if="!$last"></md-divider>
</md-list-item>
</md-list>