rozetko
6 years ago
2 changed files with 33 additions and 30 deletions
@ -0,0 +1,32 @@
|
||||
import { normalizeUrl } from '../utlis'; |
||||
import configTemplate from './partials/config.html'; |
||||
|
||||
|
||||
export class HasticConfigCtrl { |
||||
public static template = configTemplate; |
||||
public ACCESS_OPTIONS = [ |
||||
{ key: 'proxy', value: 'Server (Default)' }, |
||||
{ key: 'direct', value: 'Browser' } |
||||
]; |
||||
|
||||
private showAccessHelp: boolean = false; |
||||
|
||||
constructor(private $scope: any) { |
||||
if(this.$scope.current === undefined) { |
||||
this.$scope.current = { |
||||
access: 'proxy' |
||||
}; |
||||
} |
||||
} |
||||
|
||||
normalizeUrl() { |
||||
if(this.$scope.current.url === '') { |
||||
return; |
||||
} |
||||
this.$scope.current.url = normalizeUrl(this.$scope.current.url); |
||||
} |
||||
|
||||
toggleAccessHelp() { |
||||
this.showAccessHelp = !this.showAccessHelp; |
||||
} |
||||
} |
Loading…
Reference in new issue