Cleaner pre-filling

This commit is contained in:
Théophile Bastian 2018-08-01 15:41:49 +02:00
parent f9498aae7f
commit 45ffe8b370
2 changed files with 14 additions and 9 deletions

View file

@ -103,10 +103,18 @@
<div class="input-group">
<div class="row no-gutter" ng-show="false">
<div class="col-sm-9">
<input type="hidden" class="form-control favorite-font" id="host" ng-model="settings.host" placeholder="Address" autocapitalize="off">
<input type="hidden"
class="form-control favorite-font"
id="host"
ng-value="window.location.hostname"
/>
</div>
<div class="col-sm-3">
<input type="hidden" class="form-control favorite-font" id="port" ng-model="settings.port" placeholder="Port">
<input type="hidden"
class="form-control favorite-font"
id="port"
ng-value="443"
/>
</div>
</div>
</div>
@ -129,10 +137,7 @@
</label>
</div>
<div class="checkbox" ng-show="false">
<label class="control-label" for="ssl">
<input type="hidden" id="ssl" ng-model="settings.ssl">
Encryption. <strong>Strongly recommended!</strong> Need help? Check below.
</label>
<input type="hidden" id="ssl" ng-value="true">
</div>
</div>
<button class="btn btn-lg btn-primary" ng-click="connect()" ng-cloak>{{ connectbutton }} <i ng-class="connectbuttonicon" class="glyphicon"></i></button>

View file

@ -41,9 +41,9 @@ weechat.controller('WeechatCtrl', ['$rootScope', '$scope', '$store', '$timeout',
// or else they won't be saved to the localStorage.
settings.setDefaults({
'theme': 'dark',
'host': window.location.hostname,
'port': 443,
'ssl': true,
'host': window.location.hostname, // Left here for compat - not sure if necessary
'port': 443, // Left here for compat - not sure if necessary
'ssl': true, // Left here for compat - not sure if necessary
'savepassword': false,
'autoconnect': false,
'nonicklist': utils.isMobileUi(),