mirror of
https://github.com/openstf/stf
synced 2025-10-05 02:29:26 +02:00
allow user to create an access token to access stf api from user settings tab.
This commit is contained in:
parent
ddc24e5dc5
commit
62413b3780
21 changed files with 263 additions and 65 deletions
|
@ -0,0 +1,26 @@
|
|||
module.exports = function generateAccessTokenDirective() {
|
||||
return {
|
||||
restrict: 'EA',
|
||||
replace: true,
|
||||
scope: {
|
||||
showGenerate: '=',
|
||||
showClipboard: '=',
|
||||
},
|
||||
template: require('./generate-access-token.jade'),
|
||||
controller: function($scope, UserService) {
|
||||
$scope.generateForm = {
|
||||
title: ''
|
||||
}
|
||||
|
||||
$scope.generateToken = function () {
|
||||
UserService.generateAccessToken($scope.generateForm.title)
|
||||
$scope.closeGenerateToken()
|
||||
}
|
||||
|
||||
$scope.closeGenerateToken = function () {
|
||||
$scope.title = ''
|
||||
$scope.showGenerate = false
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue