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="input-group">
<div class="row no-gutter" ng-show="false"> <div class="row no-gutter" ng-show="false">
<div class="col-sm-9"> <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>
<div class="col-sm-3"> <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> </div>
</div> </div>
@ -129,10 +137,7 @@
</label> </label>
</div> </div>
<div class="checkbox" ng-show="false"> <div class="checkbox" ng-show="false">
<label class="control-label" for="ssl"> <input type="hidden" id="ssl" ng-value="true">
<input type="hidden" id="ssl" ng-model="settings.ssl">
Encryption. <strong>Strongly recommended!</strong> Need help? Check below.
</label>
</div> </div>
</div> </div>
<button class="btn btn-lg btn-primary" ng-click="connect()" ng-cloak>{{ connectbutton }} <i ng-class="connectbuttonicon" class="glyphicon"></i></button> <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. // or else they won't be saved to the localStorage.
settings.setDefaults({ settings.setDefaults({
'theme': 'dark', 'theme': 'dark',
'host': window.location.hostname, 'host': window.location.hostname, // Left here for compat - not sure if necessary
'port': 443, 'port': 443, // Left here for compat - not sure if necessary
'ssl': true, 'ssl': true, // Left here for compat - not sure if necessary
'savepassword': false, 'savepassword': false,
'autoconnect': false, 'autoconnect': false,
'nonicklist': utils.isMobileUi(), 'nonicklist': utils.isMobileUi(),