You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
33 lines
731 B
33 lines
731 B
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' } |
|
]; |
|
|
|
public showAccessHelp = false; |
|
|
|
constructor(private $scope: any) { |
|
if(this.$scope.current === undefined) { |
|
this.$scope.current = { |
|
url: '', |
|
access: 'proxy' |
|
}; |
|
} |
|
} |
|
|
|
normalizeUrl() { |
|
if(this.$scope.current.url === '') { |
|
return; |
|
} |
|
this.$scope.current.url = normalizeUrl(this.$scope.current.url); |
|
} |
|
|
|
toggleAccessHelp() { |
|
this.showAccessHelp = !this.showAccessHelp; |
|
} |
|
}
|
|
|