276 lines
15 KiB
HTML
276 lines
15 KiB
HTML
<!-- Modal change avatar -->
|
|
<div class="modal fade" id="avatarChangeModal" tabindex="-1" role="dialog">
|
|
<div class="modal-dialog">
|
|
<div class="modal-content">
|
|
<div class="modal-header">
|
|
<h4 class="modal-title">Change your Cloudron Avatar</h4>
|
|
</div>
|
|
<div class="modal-body settings-avatar-selector">
|
|
<img id="previewAvatar" width="128" height="128" ng-src="{{avatarChange.avatar.data || avatarChange.avatar.url || client.avatar}}"/>
|
|
<input type="file" id="avatarFileInput" style="display: none" accept="image/png"/>
|
|
|
|
<br/>
|
|
<br/>
|
|
|
|
<div class="grid">
|
|
<div class="item" ng-repeat="avatar in avatarChange.availableAvatars" style="background-image: url('{{avatar.data || avatar.url}}');" ng-click="setPreviewAvatar(avatar)"></div>
|
|
<div class="item add" ng-click="showCustomAvatarSelector()"></div>
|
|
</div>
|
|
</div>
|
|
<div class="modal-footer">
|
|
<button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
|
|
<button type="button" class="btn btn-success" ng-click="doChangeAvatar()" ng-disabled="avatarChange.busy"><i class="fa fa-spinner fa-pulse" ng-show="avatarChange.busy"></i> Change</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Modal change cloudron name -->
|
|
<div class="modal fade" id="cloudronNameChangeModal" tabindex="-1" role="dialog">
|
|
<div class="modal-dialog">
|
|
<div class="modal-content">
|
|
<div class="modal-header">
|
|
<h4 class="modal-title">Change Cloudron Name</h4>
|
|
</div>
|
|
<div class="modal-body">
|
|
<form name="cloudronNameChangeForm" role="form" novalidate ng-submit="cloudronNameChange.submit()" autocomplete="off">
|
|
<div class="form-group" ng-class="{ 'has-error': (cloudronNameChangeForm.name.$dirty && cloudronNameChangeForm.name.$invalid) }">
|
|
<label class="control-label">Name</label>
|
|
<div class="control-label" ng-show="(!cloudronNameChangeForm.name.$dirty && cloudronNameChange.error.name) || (cloudronNameChangeForm.name.$dirty && cloudronNameChangeForm.name.$invalid)">
|
|
<small ng-show="cloudronNameChangeForm.name.$error.required">A name is required</small>
|
|
<small ng-show="cloudronNameChangeForm.name.$error.maxlength">The name is too long</small>
|
|
<small ng-show="!cloudronNameChangeForm.name.$dirty && cloudronNameChange.error.name">{{ cloudronNameChange.error.name }}</small>
|
|
</div>
|
|
<input type="text" class="form-control" ng-model="cloudronNameChange.name" name="name" id="inputCloudronName" ng-maxlength="30" required autofocus>
|
|
</div>
|
|
<input class="ng-hide" type="submit" ng-disabled="cloudronNameChangeForm.$invalid"/>
|
|
</form>
|
|
</div>
|
|
<div class="modal-footer">
|
|
<button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
|
|
<button type="button" class="btn btn-success" ng-click="cloudronNameChange.submit()" ng-disabled="cloudronNameChangeForm.$invalid || cloudronNameChange.busy"><i class="fa fa-spinner fa-pulse" ng-show="cloudronNameChange.busy"></i> Change</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Modal backup -->
|
|
<div class="modal fade" id="createBackupModal" tabindex="-1" role="dialog">
|
|
<div class="modal-dialog">
|
|
<div class="modal-content">
|
|
<div class="modal-header">
|
|
<h4 class="modal-title">Create a new Backup</h4>
|
|
</div>
|
|
<div class="modal-body">
|
|
Do you really want to create a new backup?
|
|
</div>
|
|
<div class="modal-footer">
|
|
<button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
|
|
<button type="button" class="btn btn-success" ng-click="doCreateBackup()" ng-disabled="createBackup.busy"><i class="fa fa-spinner fa-pulse" ng-show="developerModeChange.busy"></i> Confirm</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Modal plan change -->
|
|
<div class="modal fade" id="planChangeModal" tabindex="-1" role="dialog">
|
|
<div class="modal-dialog">
|
|
<div class="modal-content">
|
|
<div class="modal-header">
|
|
<button type="button" class="close" data-dismiss="modal">×</button>
|
|
<h4 class="modal-title">Cloudron Change Plan</h4>
|
|
</div>
|
|
<div class="modal-body">
|
|
This will change your plan from <b>{{ currentPlan.name }}</b> to <b>{{ planChange.requestedPlan.name }}</b>.
|
|
<br/>
|
|
<br/>
|
|
Your apps and data will be migrated to the new Cloudron and will take around 15 minutes.
|
|
<br/>
|
|
<br/>
|
|
<br/>
|
|
<form name="planChangeForm" role="form" novalidate ng-submit="doChangePlan(planChangeForm)" autocomplete="off">
|
|
<fieldset>
|
|
<input type="password" style="display: none;">
|
|
<div class="form-group" ng-class="{ 'has-error': (!planChangeForm.password.$dirty && planChange.error.password) || (planChangeForm.password.$dirty && planChangeForm.password.$invalid) }">
|
|
<label class="control-label" for="inputDeveloperModeChangePassword">Give your password to verify that you are performing that action</label>
|
|
<div class="control-label" ng-show="(!planChangeForm.password.$dirty && planChange.error.password) || (planChangeForm.password.$dirty && planChangeForm.password.$invalid)">
|
|
<small ng-show=" planChangeForm.password.$dirty && planChangeForm.password.$invalid">A password is required</small>
|
|
<small ng-show="!planChangeForm.password.$dirty && planChange.error.password">Wrong password</small>
|
|
</div>
|
|
<input type="password" class="form-control" ng-model="planChange.password" id="inputPlanChangePassword" name="password" required autofocus>
|
|
</div>
|
|
<input class="ng-hide" type="submit" ng-disabled="planChangeForm.$invalid"/>
|
|
</fieldset>
|
|
</form>
|
|
</div>
|
|
<div class="modal-footer">
|
|
<button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
|
|
<button type="button" class="btn btn-success" ng-click="doChangePlan()" ng-disabled="planChange.busy"><i class="fa fa-spinner fa-pulse" ng-show="planChange.busy"></i> Confirm</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Modal appstore login -->
|
|
<div class="modal fade" id="appstoreLoginModal" tabindex="-1" role="dialog">
|
|
<div class="modal-dialog">
|
|
<div class="modal-content">
|
|
<div class="modal-header">
|
|
<h4 class="modal-title">Login to the Cloudron Store</h4>
|
|
</div>
|
|
<div class="modal-body">
|
|
<center>
|
|
<img ng-src="{{ config.webServerOrigin }}/img/logo.png" width="128px" height="128px"/>
|
|
</center>
|
|
|
|
<form name="appstoreLoginForm" role="form" novalidate ng-submit="appstoreLogin.submit()" autocomplete="off">
|
|
<input type="password" style="display: none;">
|
|
|
|
<div class="form-group" ng-class="{ 'has-error': (appstoreLoginForm.email.$dirty && appstoreLoginForm.email.$invalid) }">
|
|
<label class="control-label">Email Address</label>
|
|
<input type="email" class="form-control" ng-model="appstoreLogin.email" name="email" required autofocus>
|
|
<div class="control-label" ng-show="(!appstoreLoginForm.email.$dirty && appstoreLogin.error.email) || (appstoreLoginForm.email.$dirty && appstoreLoginForm.email.$invalid)">
|
|
<small ng-show="appstoreLoginForm.email.$error.required">A valid email address is required</small>
|
|
<small ng-show="(appstoreLoginForm.email.$dirty && appstoreLoginForm.email.$invalid) && !appstoreLoginForm.email.$error.required">The Email address is not valid</small>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="form-group" ng-class="{ 'has-error': (!appstoreLoginForm.password.$dirty && appstoreLogin.error.password) || (appstoreLoginForm.password.$dirty && appstoreLoginForm.password.$invalid) }">
|
|
<label class="control-label">Password</label>
|
|
<input type="password" class="form-control" ng-model="appstoreLogin.password" id="inputAppstoreLoginPassword" name="password" required autofocus>
|
|
<div class="control-label" ng-show="(!appstoreLoginForm.password.$dirty && appstoreLogin.error.password) || (appstoreLoginForm.password.$dirty && appstoreLoginForm.password.$invalid)">
|
|
<small ng-show=" appstoreLoginForm.password.$dirty && appstoreLoginForm.password.$invalid">A password is required</small>
|
|
<small ng-show="!appstoreLoginForm.password.$dirty && appstoreLogin.error.password">Wrong password</small>
|
|
</div>
|
|
</div>
|
|
|
|
<input class="ng-hide" type="submit" ng-disabled="appstoreLoginForm.$invalid"/>
|
|
</form>
|
|
</div>
|
|
<div class="modal-footer">
|
|
<a class="btn btn-primary pull-left" href="{{ config.webServerOrigin }}/console.html#/register" target="_blank">Register</a>
|
|
|
|
<button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
|
|
<button type="button" class="btn btn-success" ng-click="appstoreLogin.submit()" ng-disabled="appstoreLoginForm.$invalid || appstoreLogin.busy"><i class="fa fa-spinner fa-pulse" ng-show="appstoreLogin.busy"></i> Login</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<br/>
|
|
|
|
<div class="section-header">
|
|
<div class="text-left">
|
|
<h1>Settings</h1>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="section-header">
|
|
<div class="text-left">
|
|
<h3>About</h3>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="card" style="margin-bottom: 15px;">
|
|
<div class="row">
|
|
<div class="col-xs-4" style="min-width: 150px;">
|
|
<div class="settings-avatar" ng-click="showChangeAvatar()" style="background-image: url('{{ client.avatar }}');">
|
|
<div class="overlay"></div>
|
|
</div>
|
|
</div>
|
|
<div class="col-xs-8">
|
|
<table width="100%">
|
|
<tr>
|
|
<td class="text-muted" style="vertical-align: top;">Name</td>
|
|
<td class="text-right" style="vertical-align: top; white-space: nowrap;">{{ config.cloudronName }} <a href="" ng-click="cloudronNameChange.show()"><i class="fa fa-pencil text-small"></i></a></td>
|
|
</tr>
|
|
<tr ng-show="config.provider === 'caas'">
|
|
<td class="text-muted" style="vertical-align: top;">Model</td>
|
|
<td class="text-right" style="vertical-align: top; white-space: nowrap;">{{ config.size }} - {{ config.region }}</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="text-muted" style="vertical-align: top;">Version</td>
|
|
<td class="text-right" style="vertical-align: top; white-space: nowrap;">{{ config.version }}</td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="section-header" ng-hide="true && config.provider === 'caas'">
|
|
<div class="text-left">
|
|
<h3>Appstore Account (<a href="https://cloudron.io" target="_blank">cloudron.io</a>)</h3>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="card" style="margin-bottom: 15px;" ng-hide="true && config.provider === 'caas'">
|
|
<div class="row">
|
|
<div class="col-xs-12 text-center" ng-show="!appstoreConfig.userId">
|
|
<button class="btn btn-success" ng-click="appstoreLogin.show()">Login to the Cloudron Store</button>
|
|
</div>
|
|
<div class="col-xs-12" ng-show="appstoreConfig.userId">
|
|
This Cloudron is using {{ appstoreConfig.profile.email }}.
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="section-header" ng-show="config.provider === 'caas'">
|
|
<div class="text-left">
|
|
<h3>Plans</h3>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="card" style="margin-bottom: 15px;" ng-show="config.provider === 'caas'">
|
|
<div class="row">
|
|
<div class="col-xs-10 plans" style="margin-left: 20px">
|
|
<div ng-repeat="plan in availablePlans">
|
|
<label>
|
|
<input type="radio" ng-model="planChange.requestedPlan" ng-value="plan">
|
|
{{ plan.name }} ({{ plan.slug | uppercase }}) - {{ plan.price/100 }}{{ currency }}/month
|
|
<span ng-show="currentPlan.name === plan.name" style="font-weight: bold"> (current plan)
|
|
</span>
|
|
</label>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="row">
|
|
<div class="col-xs-12">
|
|
<button class="btn btn-primary pull-right" ng-disabled="planChange.requestedPlan.name === currentPlan.name" ng-click="showChangePlan()">Change Plan</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="section-header">
|
|
<div class="text-left">
|
|
<h3>Backups</h3>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="card" style="margin-bottom: 15px;">
|
|
<div class="row">
|
|
<div class="col-xs-6">
|
|
<span class="text-muted">Last Backup</span>
|
|
</div>
|
|
<div class="col-xs-6 text-right">
|
|
<span ng-show="lastBackup">{{ lastBackup.creationTime | prettyDate }}</span>
|
|
<span ng-hide="lastBackup">No backups have been made yet</span>
|
|
</div>
|
|
</div>
|
|
<!-- If a backup is blocked (not triggered), the UI does not give feedback currently. This button is only available in dev at the moment! -->
|
|
<div class="row" ng-show="config.isDev">
|
|
<br/>
|
|
<div class="col-xs-9">
|
|
<div ng-show="createBackup.busy" class="progress progress-striped active animateMe">
|
|
<div class="progress-bar progress-bar-success" role="progressbar" style="width: {{ createBackup.percent }}%">Backup in progress</div>
|
|
</div>
|
|
</div>
|
|
<div class="col-xs-3 text-right">
|
|
<button class="btn btn-outline btn-xs btn-primary" ng-click="showCreateBackup()" ng-disabled="createBackup.busy">Backup now</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Offset the footer -->
|
|
<br/><br/>
|