1
0
Fork 0
mirror of synced 2024-05-25 15:09:47 +12:00

Upgrading JS framework version

This commit is contained in:
eldadfux 2019-05-09 19:15:51 +03:00
parent c8747a0c5e
commit b09cc8ab6e
21 changed files with 430 additions and 260 deletions

View file

@ -38,7 +38,7 @@ use Utopia\Locale\Locale;
<div class="row">
<div class="col span-8">
<input name="name" id="name" type="text" autocomplete="off" data-ls-echo="{{account.name}}" required class="margin-bottom-no">
<input name="name" id="name" type="text" autocomplete="off" data-ls-bind="{{account.name}}" required class="margin-bottom-no">
</div>
<div class="col span-4">
<button type="submit" class="fill reverse"><?php echo Locale::getText('console.account.section.overview.actions.update-name'); ?></button>
@ -65,7 +65,7 @@ use Utopia\Locale\Locale;
<label><?php echo Locale::getText('console.account.section.overview.labels.email'); ?></label>
<div class="row">
<div class="col span-8">
<input name="email" type="email" class="margin-bottom-no" autocomplete="off" placeholder="me@example.com" data-ls-echo="{{account.email}}" required>
<input name="email" type="email" class="margin-bottom-no" autocomplete="off" placeholder="me@example.com" data-ls-bind="{{account.email}}" required>
</div>
<div class="col span-4">
<div data-ui-modal class="modal close width-small height-small" data-button-text="<?php echo $this->escape(Locale::getText('console.account.section.overview.actions.update-email')); ?>" data-button-class="fill reverse">
@ -191,7 +191,7 @@ use Utopia\Locale\Locale;
data-success-triggers="account.update"
data-error="alert"
data-error-alert="<?php echo $this->escape(Locale::getText('console.account.section.security.devices.logout.failure')); ?>">
<input type="hidden" name="userId" data-ls-echo="{{session.id}}">
<input type="hidden" name="userId" data-ls-bind="{{session.id}}">
<button class="danger"><?php echo Locale::getText('console.account.section.security.devices.logout'); ?></button>
</form>
</span>
@ -207,22 +207,22 @@ use Utopia\Locale\Locale;
data-success-redirect-url="/"
data-error="alert"
data-error-alert="<?php echo $this->escape(Locale::getText('console.account.section.security.devices.logout.failure')); ?>">
<input type="hidden" name="userId" data-ls-echo="{{session.id}}">
<input type="hidden" name="userId" data-ls-bind="{{session.id}}">
<button class="danger"><?php echo Locale::getText('console.account.section.security.devices.logout'); ?></button>
</form>
</span>
<img data-ls-src="{{env.API}}/v1/avatars/browsers/{{session.client.short_name|lowerCase}}?width=120&height=120" data-ls-title="{{session.client.name}}" data-ls-alt="{{session.client.name}}" class="avatar trans pull-start margin-end" />
<img data-ls-attrs="src={{env.API}}/v1/avatars/browsers/{{session.client.short_name|lowerCase}}?width=120&height=120" data-ls-title="{{session.client.name}}" data-ls-alt="{{session.client.name}}" class="avatar trans pull-start margin-end" />
<span data-ls-echo="{{session.client.name}}"></span> <span data-ls-echo="{{session.client.version}}"></span> on <span data-ls-echo="{{session.model}}"></span> <span data-ls-echo="{{session.OS.name}}"></span> <span data-ls-echo="{{session.OS.version}}"></span>
<span data-ls-bind="{{session.client.name}}"></span> <span data-ls-bind="{{session.client.version}}"></span> on <span data-ls-bind="{{session.model}}"></span> <span data-ls-bind="{{session.OS.name}}"></span> <span data-ls-bind="{{session.OS.version}}"></span>
&nbsp;
<span data-ls-if="true == {{session.current}}" style="display: none;">
<span class="tag green"><?php echo Locale::getText('console.account.section.security.devices.current'); ?></span>
</span>
<div class="note info margin-top-small">
<img data-ls-src="{{env.API}}/v1/avatars/flags/{{session.geo.isoCode}}?width=80&height=80" class="avatar xs margin-end-small inline" />
<small data-ls-echo="{{session.ip}}"></small> / <small data-ls-echo="{{session.geo.country}}"></small>
<img data-ls-attrs="src={{env.API}}/v1/avatars/flags/{{session.geo.isoCode}}?width=80&height=80" class="avatar xs margin-end-small inline" />
<small data-ls-bind="{{session.ip}}"></small> / <small data-ls-bind="{{session.geo.country}}"></small>
</div>
</li>
</ul>
@ -265,17 +265,17 @@ use Utopia\Locale\Locale;
</thead>
<tbody data-ls-loop="securityLogs" data-ls-as="log">
<tr>
<td data-title="<?php echo $this->escape(Locale::getText('console.account.section.security.recent-activity.date')); ?>: "><span data-ls-echo="{{log.time|date-time}}"></span></td>
<td data-title="<?php echo $this->escape(Locale::getText('console.account.section.security.recent-activity.event')); ?>: "><span data-ls-echo="{{log.event}}"></span></td>
<td data-title="<?php echo $this->escape(Locale::getText('console.account.section.security.recent-activity.date')); ?>: "><span data-ls-bind="{{log.time|date-time}}"></span></td>
<td data-title="<?php echo $this->escape(Locale::getText('console.account.section.security.recent-activity.event')); ?>: "><span data-ls-bind="{{log.event}}"></span></td>
<td data-title="<?php echo $this->escape(Locale::getText('console.account.section.security.recent-activity.client')); ?>: ">
<img data-ls-src="{{env.API}}/v1/avatars/browsers/{{log.client.short_name|lowerCase}}?width=80&height=80" data-ls-title="{{log.client.name}}" data-ls-alt="{{log.client.name}}" class="avatar xs inline margin-end-small" />
<span data-ls-echo="{{log.client.name}} {{log.client.version}} on {{log.model}} {{log.OS.name}} {{log.OS.version}}"></span>
<img data-ls-attrs="src={{env.API}}/v1/avatars/browsers/{{log.client.short_name|lowerCase}}?width=80&height=80" data-ls-title="{{log.client.name}}" data-ls-alt="{{log.client.name}}" class="avatar xs inline margin-end-small" />
<span data-ls-bind="{{log.client.name}} {{log.client.version}} on {{log.model}} {{log.OS.name}} {{log.OS.version}}"></span>
</td>
<td data-title="<?php echo $this->escape(Locale::getText('console.account.section.security.recent-activity.location')); ?>: ">
<img data-ls-src="{{env.API}}/v1/avatars/flags/{{log.geo.isoCode}}?width=80&height=80" class="avatar xs inline margin-end-small" />
<span data-ls-echo="{{log.geo.country}}"></span>
<img data-ls-attrs="src={{env.API}}/v1/avatars/flags/{{log.geo.isoCode}}?width=80&height=80" class="avatar xs inline margin-end-small" />
<span data-ls-bind="{{log.geo.country}}"></span>
</td>
<td data-title="<?php echo $this->escape(Locale::getText('console.account.section.security.recent-activity.ip')); ?>: "><span data-ls-echo="{{log.ip}}"></span></td>
<td data-title="<?php echo $this->escape(Locale::getText('console.account.section.security.recent-activity.ip')); ?>: "><span data-ls-bind="{{log.ip}}"></span></td>
</tr>
</tbody>
</table>

View file

@ -4,7 +4,12 @@ use Utopia\Locale\Locale;
<header class="clear" data-ls-rerender="project.update">
&nbsp;&nbsp;&nbsp;
<div data-ls-wait="projects.load" class="list pull-start project-only">
<select data-ls-options="{{projects}}" data-key="{{option.$uid}}" data-label="{{option.name}}" data-ls-echo="{{router.params.project}}" aria-label="<?php echo $this->escape(Locale::getText('console.navigation.switch')); ?>" data-switch=""></select>
<!-- <select data-ls-options="{{projects}}" data-key="{{option.$uid}}" data-label="{{option.name}}" data-ls-bind="{{router.params.project}}" aria-label="<?php /*echo $this->escape(Locale::getText('console.navigation.switch')); */?>" data-switch=""></select>
-->
<select data-ls-loop="projects" data-ls-as="option" data-ls-bind="{{router.params.project}}">
<option data-ls-attrs="value={{option.$uid}}" data-ls-bind="{{option.name}}"></option>
</select>
</div>
<button style="width: 40px; height: 40px; line-height: 40px; overflow: visible;" id="setup" class="tooltip round down project-only" aria-label="Quick Start" data-tooltip="Create a new project"><i class="icon-plus"></i></button>
@ -24,34 +29,22 @@ use Utopia\Locale\Locale;
<a href="/console">Back to Console &nbsp;<i class="icon-right-open"></i></a>
</div>
<a data-ls-href="/console/account" class="account pull-end clear">
<img src="" data-ui-gravatar="{{account.email}}" data-name="{{account.name}}" alt="<?php echo $this->escape(Locale::getText('console.navigation.user-avatar')); ?>" class="avatar margin-start pull-end" />
<span class="name pull-end" data-ls-echo="{{account.name}}"></span>
<a href="/console/account" class="account pull-end clear">
<img src="" data-ui-gravatar="{{account.email}}" data-name="{{account.name}}" alt="User Avatar" class="avatar margin-start pull-end" />
<span class="name pull-end" data-ls-bind="{{account.name}}"></span>
</a>
</div>
<!--
<div class="notifications margin-end-large pull-end">
<div class="drop-list bottom" data-ls-ui-open="" data-button-class="link" data-button-icon="icon-bell" tabindex="1">
<ul>
<ul>
<li><div class="link">Message 1</div></li>
<li><div class="link">Message 2</div></li>
<li><div class="link">Message 3</div></li>
</ul>
</ul>
</div>
</div>
-->
<nav data-ls-rerender="project.load,project.update">
<a class="logo" href="/console">
<img src="/images/appwrite-nav.svg" alt="<?php echo Locale::getText('console.navigation.logo'); ?>" />
<img src="/images/appwrite-nav.svg" alt="Appwrite Logo" />
</a>
<div data-ui-highlight class="project-only">
<ul class="links">
<li>
<a data-ls-href="/console/home?project={{router.params.project}}">
<a data-ls-attrs="href=/console/home?project={{router.params.project}}">
<i class="icon-home"></i>
Home
</a>
@ -62,19 +55,19 @@ use Utopia\Locale\Locale;
<ul class="links">
<li>
<a data-ls-href="/console/database?project={{router.params.project}}">
<a data-ls-attrs="href=/console/database?project={{router.params.project}}">
<i class="icon-database"></i>
Database
</a>
</li>
<li>
<a data-ls-href="/console/storage?project={{router.params.project}}">
<a data-ls-attrs="href=/console/storage?project={{router.params.project}}">
<i class="icon-folder"></i>
Storage
</a>
</li>
<li>
<a data-ls-href="/console/users?project={{router.params.project}}">
<a data-ls-attrs="href=/console/users?project={{router.params.project}}">
<i class="icon-users"></i>
Users
</a>
@ -85,19 +78,19 @@ use Utopia\Locale\Locale;
<ul class="links">
<li>
<a data-ls-href="/console/settings/keys?project={{router.params.project}}">
<a data-ls-attrs="href=/console/settings/keys?project={{router.params.project}}">
<i class="icon-key-inv"></i>
API Keys
</a>
</li>
<li>
<a data-ls-href="/console/settings/webhooks?project={{router.params.project}}">
<a data-ls-attrs="href=/console/settings/webhooks?project={{router.params.project}}">
<i class="icon-link"></i>
Webhooks
</a>
</li>
<li>
<a data-ls-href="/console/settings/tasks?project={{router.params.project}}">
<a data-ls-attrs="href=/console/settings/tasks?project={{router.params.project}}">
<i class="icon-clock"></i>
Tasks
</a>
@ -106,7 +99,7 @@ use Utopia\Locale\Locale;
<ul class="links bottom project-only">
<li>
<a data-ls-href="/console/settings?project={{router.params.project}}"><i class="icon-cog"></i> Settings</a>
<a data-ls-attrs="href=/console/settings?project={{router.params.project}}"><i class="icon-cog"></i> Settings</a>
</li>
</ul>
</div>

View file

@ -3,7 +3,7 @@ use Utopia\Locale\Locale;
?>
<div class="cover margin-bottom-large">
<h1 class="zone xl margin-bottom-large margin-top">
<a data-ls-href="/console/openings/new?company={{router.params.company}}" class="button icon margin-top-tiny pull-end"><i class="icon-plus"></i> &nbsp;Upload</a>
<a data-ls-attrs="href=/console/openings/new?company={{router.params.company}}" class="button icon margin-top-tiny pull-end"><i class="icon-plus"></i> &nbsp;Upload</a>
<?php echo Locale::getText('console.database.title'); ?>
</h1>

View file

@ -2,17 +2,16 @@
<div class="cover margin-bottom-small">
<div class="zone xl margin-bottom-large margin-top-small">
<h1 class="margin-bottom-small">
<span class="title" data-ls-echo="{{console-project.name}}">&nbsp;</span>&nbsp;&nbsp;<span class="tag focus" style="vertical-align: middle">Beta Plan</span>
<span class="title" data-ls-bind="{{console-project.name}}">&nbsp;</span>&nbsp;&nbsp;<span class="tag focus" style="vertical-align: middle">Beta Plan</span>
</h1>
<p data-ls-echo="{{console-project.description}}" data-default="Update your project description under project settings." class="note text-one-liner margin-bottom-large">&nbsp;</p>
<p data-ls-bind="{{console-project.description}}" class="note text-one-liner margin-bottom-large">&nbsp;</p>
<ul class="margin-top margin-bottom-large clear">
<li class="pull-start margin-end"><a data-ls-href="/console/settings?project={{router.params.project}}"><i class="icon-cog"></i> &nbsp;Settings</a> &nbsp;&nbsp;</li>
<li class="pull-start margin-end"><a data-ls-href="/console/settings/keys?project={{router.params.project}}"><i class="icon-key-inv"></i> &nbsp;API Keys</a> &nbsp;&nbsp;</li>
<li class="pull-start margin-end"><a data-ls-href="/console/settings/webhooks?project={{router.params.project}}"><i class="icon-link"></i> &nbsp;Webhooks</a> &nbsp;&nbsp;</li>
<li class="pull-start margin-end"><a data-ls-href="/console/settings/tasks?project={{router.params.project}}"><i class="icon-clock"></i> &nbsp;Tasks</a> &nbsp;&nbsp;</li>
<!--<li class="pull-start margin-end"><a data-ls-href="/console/settings/members?project={{router.params.project}}"><i class="icon-users"></i> &nbsp;Members</a> &nbsp;&nbsp;</li>-->
<li class="pull-start margin-end"><a data-ls-attrs="href=/console/settings?project={{router.params.project}}"><i class="icon-cog"></i> &nbsp;Settings</a> &nbsp;&nbsp;</li>
<li class="pull-start margin-end"><a data-ls-attrs="href=/console/settings/keys?project={{router.params.project}}"><i class="icon-key-inv"></i> &nbsp;API Keys</a> &nbsp;&nbsp;</li>
<li class="pull-start margin-end"><a data-ls-attrs="href=/console/settings/webhooks?project={{router.params.project}}"><i class="icon-link"></i> &nbsp;Webhooks</a> &nbsp;&nbsp;</li>
<li class="pull-start margin-end"><a data-ls-attrs="href=/console/settings/tasks?project={{router.params.project}}"><i class="icon-clock"></i> &nbsp;Tasks</a> &nbsp;&nbsp;</li>
</ul>
</div>
</div>
@ -30,7 +29,7 @@
<div class="row responsive">
<div class="col span-9">
<div class="pull-start margin-end">
<div class="value margin-bottom-small"><span class="sum" data-ls-echo="{{usage.requests.total|statsTotal}}">N/A</span></div>
<div class="value margin-bottom-small"><span class="sum" data-ls-bind="{{usage.requests.total|statsTotal}}">N/A</span></div>
<div class="metric margin-bottom-small">Requests <span class="tooltip" data-tooltip="Total number of API requests this month"><i class="icon-info-circled"></i></span></div>
<div class="range">Current Month</div>
</div>
@ -40,7 +39,7 @@
</div>
</div>
<div class="col span-3">
<div class="value margin-bottom-small"><span class="sum" data-ls-echo="{{usage.network.total|humanFileSize}}" data-default="0">0</span></div>
<div class="value margin-bottom-small"><span class="sum" data-ls-bind="{{usage.network.total|humanFileSize}}" data-default="0">0</span></div>
<div class="metric margin-bottom-small">Bandwidth</div>
<div class="range">Current Month</div>
<div class="margin-top dev-feature">
@ -55,19 +54,19 @@
<div class="row responsive">
<div class="col span-3">
<div class="value"><span class="sum" data-ls-echo="{{usage.documents.total|statsTotal}}" data-default="0">0</span></div>
<div class="value"><span class="sum" data-ls-bind="{{usage.documents.total|statsTotal}}" data-default="0">0</span></div>
<div class="margin-top-small"><b class="text-size-small unit">Documents</b></div>
</div>
<div class="col span-3">
<div class="value"><span class="sum" data-ls-echo="{{usage.storage.total|humanFileSize}}" data-default="0">0</span></div>
<div class="value"><span class="sum" data-ls-bind="{{usage.storage.total|humanFileSize}}" data-default="0">0</span></div>
<div class="margin-top-small"><b class="text-size-small unit">Storage</b></div>
</div>
<div class="col span-3">
<div class="value"><span class="sum" data-ls-echo="{{usage.users.total}}" data-default="0">0</span></div>
<div class="value"><span class="sum" data-ls-bind="{{usage.users.total}}" data-default="0">0</span></div>
<div class="margin-top-small"><b class="text-size-small unit">Users</b></div>
</div>
<div class="col span-3">
<div class="value"><span class="sum" data-ls-echo="{{usage.tasks.total}}" data-default="0">0</span></div>
<div class="value"><span class="sum" data-ls-bind="{{usage.tasks.total}}" data-default="0">0</span></div>
<div class="margin-top-small"><b class="text-size-small unit">Tasks</b></div>
</div>
</div>
@ -102,18 +101,18 @@
data-error="alert"
data-error-alert="Failed to delete platform">
<input type="hidden" name="projectId" data-ls-echo="{{console-project.$uid}}">
<input type="hidden" name="platformId" data-ls-echo="{{platform.$uid}}">
<input type="hidden" name="projectId" data-ls-bind="{{console-project.$uid}}">
<input type="hidden" name="platformId" data-ls-bind="{{platform.$uid}}">
<button class="reverse danger">Delete</button>
</form>
<div class="margin-bottom-tiny">
<img src="" data-ls-src="/images/clients/{{platform.type}}.png" class="avatar pull-start margin-end" />
<span data-ls-echo="{{platform.name}}"></span>
<img src="" data-ls-attrs="src=/images/clients/{{platform.type}}.png" class="avatar pull-start margin-end" />
<span data-ls-bind="{{platform.name}}"></span>
</div>
<p class="note margin-bottom-no"><span data-ls-echo="{{platform.domains.0}}"></span></p>
<p class="note margin-bottom-no"><span data-ls-bind="{{platform.domains.0}}"></span></p>
</li>
</ul>
</div>
@ -126,7 +125,7 @@
</div>
</div>
<a data-ls-href="/console/settings/keys?project={{router.params.project}}" class="pull-end">Manage Your API Keys</a>
<a data-ls-attrs="href=/console/settings/keys?project={{router.params.project}}" class="pull-end">Manage Your API Keys</a>
<div class="drop-list pull-start" data-ls-ui-open="" data-button-text="Add Platform" data-button-class="button" tabindex="1">
<ul>
@ -161,8 +160,8 @@
data-error="alert"
data-error-alert="Failed to create platform">
<input type="hidden" name="projectId" data-ls-echo="{{console-project.$uid}}">
<input type="hidden" name="type" data-ls-echo="web">
<input type="hidden" name="projectId" data-ls-bind="{{console-project.$uid}}">
<input type="hidden" name="type" data-ls-bind="web">
<label for="name">Name <span class="tooltip large" data-tooltip="Choose any name that will help you distinguish between your different apps."><i class="icon-question"></i></span></label>
<input type="text" class="full-width" id="name" name="name" required autocomplete="off" />
@ -210,11 +209,11 @@
data-error="alert"
data-error-alert="Failed to update platform">
<input type="hidden" name="projectId" data-ls-echo="{{console-project.$uid}}">
<input type="hidden" name="platformId" data-ls-echo="{{platform.$uid}}">
<input type="hidden" name="projectId" data-ls-bind="{{console-project.$uid}}">
<input type="hidden" name="platformId" data-ls-bind="{{platform.$uid}}">
<label for="name">Name <span class="tooltip large" data-tooltip="Choose any name that will help you distinguish between your different apps."><i class="icon-question"></i></span></label>
<input type="text" class="full-width" id="name" name="name" required autocomplete="off" data-ls-echo="{{platform.name}}" />
<input type="text" class="full-width" id="name" name="name" required autocomplete="off" data-ls-bind="{{platform.name}}" />
<label for="domains">Domains <span class="tooltip large" data-tooltip="List the domains your website will use to interact with the <?php echo APP_NAME; ?> API in production or development environments."><i class="icon-question"></i></span></label>
@ -224,7 +223,7 @@
<div>
<div data-forms-remove class="row thin">
<div class="col span-10">
<input name="domains" type="text" class="margin-bottom-small" autocomplete="off" placeholder="example.com" data-ls-echo="{{domain}}" data-cast-to="array" pattern="^([a-zA-Z0-9]([a-zA-Z0-9\-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,6}$" title="Please enter a valid domain name" required>
<input name="domains" type="text" class="margin-bottom-small" autocomplete="off" placeholder="example.com" data-ls-bind="{{domain}}" data-cast-to="array" pattern="^([a-zA-Z0-9]([a-zA-Z0-9\-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,6}$" title="Please enter a valid domain name" required>
</div>
<div class="col span-2">
<button type="button" data-remove class="reverse round danger pull-end"><i class="icon-cancel"></i></button>

View file

@ -27,9 +27,9 @@
<ul data-ls-loop="console-projects" data-ls-as="project" data-ls-append="" class="tiles cell-3">
<li class="margin-bottom">
<a data-ls-href="/console/home?project={{project.$uid}}" class="box">
<span data-ls-echo="{{project.name}}" class="text-one-liner">&nbsp;</span>
<p data-ls-echo="{{project.description}}" data-default="No Description.&nbsp;" class="note margin-top-small text-one-liner">&nbsp;</p>
<a data-ls-attrs="href=/console/home?project={{project.$uid}}" class="box">
<span data-ls-bind="{{project.name}}" class="text-one-liner">&nbsp;</span>
<p data-ls-bind="{{project.description}}" class="note margin-top-small text-one-liner">&nbsp;</p>
<i class="icon-right-open"></i>
</a>
</li>

View file

@ -70,24 +70,24 @@ $scopes = [ // TODO sync with project list
data-error="alert"
data-error-alert="Failed to update project">
<input name="$uid" type="hidden" data-ls-echo="{{console-project.$uid}}" />
<input name="$uid" type="hidden" data-ls-bind="{{console-project.$uid}}" />
<div class="row">
<div class="col span-9">
<div class="box">
<label for="name">Name</label>
<input name="name" id="name" type="text" autocomplete="off" data-ls-echo="{{console-project.name}}" data-forms-text-direction required>
<input name="name" id="name" type="text" autocomplete="off" data-ls-bind="{{console-project.name}}" data-forms-text-direction required>
<label for="name">Project ID</label>
<div class="input-copy">
<input data-forms-copy type="text" disabled data-ls-echo="{{router.params.project}}" />
<input data-forms-copy type="text" disabled data-ls-bind="{{router.params.project}}" />
</div>
<label for="description">Description &nbsp;<small>(optional)</small></label>
<textarea name="description" id="description" autocomplete="off" placeholder="Help us make the world a better place" data-ls-echo="{{console-project.description}}" data-forms-text-direction data-forms-text-count></textarea>
<textarea name="description" id="description" autocomplete="off" placeholder="Help us make the world a better place" data-ls-bind="{{console-project.description}}" data-forms-text-direction data-forms-text-count></textarea>
<label for="url">Website &nbsp;<small>(optional)</small></label>
<input name="url" id="url" type="url" class="full-width" autocomplete="off" placeholder="https://acme-corp.com" data-ls-echo="{{console-project.url}}">
<input name="url" id="url" type="url" class="full-width" autocomplete="off" placeholder="https://acme-corp.com" data-ls-bind="{{console-project.url}}">
<hr />
@ -99,7 +99,7 @@ $scopes = [ // TODO sync with project list
<div class="margin-bottom-small">
<div data-forms-remove class="row thin">
<div class="col span-9">
<input name="clients" type="url" class="full-width" autocomplete="off" placeholder="https://acme-corp.com" data-ls-echo="{{client}}" data-cast-to="array">
<input name="clients" type="url" class="full-width" autocomplete="off" placeholder="https://acme-corp.com" data-ls-bind="{{client}}" data-cast-to="array">
</div>
<div class="col span-3">
<button type="button" data-remove class="reverse danger pull-end"><i class="icon-cancel"></i></button>
@ -128,26 +128,26 @@ $scopes = [ // TODO sync with project list
<div class="row thin">
<div class="col span-6">
<label for="legalName">Legal Name</label>
<input name="legalName" id="legalName" type="text" autocomplete="off" data-ls-echo="{{console-project.legalName}}" data-forms-text-direction>
<input name="legalName" id="legalName" type="text" autocomplete="off" data-ls-bind="{{console-project.legalName}}" data-forms-text-direction>
<div data-ls-rerender="geo-countries-load">
<label for="legalCountry">Country</label>
<select id="legalCountry" name="legalCountry" data-ls-options="{{geo-countries}}" data-ls-echo="{{console-project.legalCountry}}"></select>
<select id="legalCountry" name="legalCountry" data-ls-options="{{geo-countries}}" data-ls-bind="{{console-project.legalCountry}}"></select>
</div>
<label for="legalCity">City</label>
<input name="legalCity" id="legalCity" type="text" autocomplete="off" data-ls-echo="{{console-project.legalCity}}" data-forms-text-direction>
<input name="legalCity" id="legalCity" type="text" autocomplete="off" data-ls-bind="{{console-project.legalCity}}" data-forms-text-direction>
</div>
<div class="col span-6">
<label for="legalTaxId">Tax ID</label>
<input name="legalTaxId" id="legalTaxId" type="text" autocomplete="off" data-ls-echo="{{console-project.legalTaxId}}" data-forms-text-direction>
<input name="legalTaxId" id="legalTaxId" type="text" autocomplete="off" data-ls-bind="{{console-project.legalTaxId}}" data-forms-text-direction>
<label for="legalState">State</label>
<input name="legalState" id="legalState" type="text" autocomplete="off" data-ls-echo="{{console-project.legalState}}" data-forms-text-direction>
<input name="legalState" id="legalState" type="text" autocomplete="off" data-ls-bind="{{console-project.legalState}}" data-forms-text-direction>
<label for="legalAddress">Address</label>
<input name="legalAddress" id="legalAddress" type="text" autocomplete="off" data-ls-echo="{{console-project.legalAddress}}" data-forms-text-direction>
<input name="legalAddress" id="legalAddress" type="text" autocomplete="off" data-ls-bind="{{console-project.legalAddress}}" data-forms-text-direction>
</div>
</div>
@ -161,7 +161,7 @@ $scopes = [ // TODO sync with project list
<div class="col span-3 box-aside">
<label for="name">Logo</label>
<div class="text-center clear">
<input type="hidden" name="logo" data-ls-echo="{{console-project.logo}}"
<input type="hidden" name="logo" data-ls-bind="{{console-project.logo}}"
data-read="<?php echo $this->escape(json_encode(['*'])); ?>"
data-write="<?php echo $this->escape(json_encode(['team:{{console-project.teamId}}'])); ?>"
data-accept="image/*"
@ -209,17 +209,17 @@ $scopes = [ // TODO sync with project list
data-error="alert"
data-error-alert="Failed to update API key">
<input type="hidden" name="projectId" data-ls-echo="{{console-project.$uid}}">
<input type="hidden" name="keyId" data-ls-echo="{{key.$uid}}">
<input type="hidden" name="projectId" data-ls-bind="{{console-project.$uid}}">
<input type="hidden" name="keyId" data-ls-bind="{{key.$uid}}">
<label data-ls-for="name-{{key.$uid}}">Name</label>
<input type="text" class="full-width" data-ls-id="name-{{key.$uid}}" name="name" required autocomplete="off" data-ls-echo="{{key.name}}" />
<input type="text" class="full-width" data-ls-id="name-{{key.$uid}}" name="name" required autocomplete="off" data-ls-bind="{{key.name}}" />
<label data-ls-for="scopes-{{key.$uid}}">Scopes (<a href="/docs/keys" target="_blank">Learn More</a>)</label>
<div class="row thin margin-bottom">
<?php foreach ($scopes as $i => $scope): ?>
<div class="col span-6">
<input type="checkbox" name="scopes" data-ls-echo="<?php echo $scope; ?>" data-default="{{key.scopes}}" /> <?php echo $scope; ?>
<input type="checkbox" name="scopes" data-ls-bind="<?php echo $scope; ?>" data-default="{{key.scopes}}" /> <?php echo $scope; ?>
</div>
<?php if(($i+1) % 2 === 0): ?>
</div>
@ -246,13 +246,13 @@ $scopes = [ // TODO sync with project list
data-error="alert"
data-error-alert="Failed to delete API key">
<input type="hidden" name="projectId" data-ls-echo="{{console-project.$uid}}">
<input type="hidden" name="keyId" data-ls-echo="{{key.$uid}}">
<input type="hidden" name="projectId" data-ls-bind="{{console-project.$uid}}">
<input type="hidden" name="keyId" data-ls-bind="{{key.$uid}}">
<button class="reverse danger">Delete</button>
</form>
<div class="margin-bottom-tiny"><span data-ls-echo="{{key.name}}"></span> <span class="note">(<span data-ls-echo="{{key.scopes.length}}"></span> scopes granted)</span></div>
<div class="margin-bottom-tiny"><span data-ls-bind="{{key.name}}"></span> <span class="note">(<span data-ls-bind="{{key.scopes.length}}"></span> scopes granted)</span></div>
<div data-ui-modal class="modal close" data-button-text="Show Secret" data-button-class="link margin-top-small" data-button-icon="icon-right-open">
<button type="button" class="close pull-end" data-ls-trigger="modal-close"><i class="icon-cancel"></i></button>
@ -261,7 +261,7 @@ $scopes = [ // TODO sync with project list
<form>
<div class="input-copy">
<textarea disabled style="height: 130px; line-height: 26px" data-forms-copy data-ls-echo="{{key.secret}}"></textarea>
<textarea disabled style="height: 130px; line-height: 26px" data-forms-copy data-ls-bind="{{key.secret}}"></textarea>
</div>
<div>
<button data-ls-trigger="modal-close" type="button" class="reverse">Cancel</button>
@ -287,7 +287,7 @@ $scopes = [ // TODO sync with project list
data-error="alert"
data-error-alert="Failed to create API key">
<input type="hidden" name="projectId" data-ls-echo="{{console-project.$uid}}">
<input type="hidden" name="projectId" data-ls-bind="{{console-project.$uid}}">
<label for="name">Name</label>
<input type="text" class="full-width" id="name" name="name" required autocomplete="off" />
@ -355,17 +355,17 @@ $scopes = [ // TODO sync with project list
data-error="alert"
data-error-alert="Failed to update webhook">
<input type="hidden" name="projectId" data-ls-echo="{{console-project.$uid}}">
<input type="hidden" name="webhookId" data-ls-echo="{{webhook.$uid}}">
<input type="hidden" name="projectId" data-ls-bind="{{console-project.$uid}}">
<input type="hidden" name="webhookId" data-ls-bind="{{webhook.$uid}}">
<label data-ls-for="name-{{webhook.$uid}}">Name</label>
<input type="text" class="full-width" data-ls-id="name-{{webhook.$uid}}" name="name" required autocomplete="off" data-ls-echo="{{webhook.name}}" />
<input type="text" class="full-width" data-ls-id="name-{{webhook.$uid}}" name="name" required autocomplete="off" data-ls-bind="{{webhook.name}}" />
<label data-ls-for="events-{{webhook.$uid}}">Events</label>
<div class="row thin margin-bottom">
<?php foreach ($events as $i => $event): ?>
<div class="col span-6">
<input type="checkbox" name="events" data-ls-echo="<?php echo $event; ?>" data-default="{{webhook.events}}" /> <?php echo $event; ?>
<input type="checkbox" name="events" data-ls-bind="<?php echo $event; ?>" data-default="{{webhook.events}}" /> <?php echo $event; ?>
</div>
<?php if(($i+1) % 2 === 0): ?>
</div>
@ -376,14 +376,14 @@ $scopes = [ // TODO sync with project list
</div>
<label data-ls-for="url-{{webhook.$uid}}">POST URL</label>
<input type="url" class="full-width" data-ls-id="url-{{webhook.$uid}}" name="url" required autocomplete="off" placeholder="https://example.com/callback" data-ls-echo="{{webhook.url}}" />
<input type="url" class="full-width" data-ls-id="url-{{webhook.$uid}}" name="url" required autocomplete="off" placeholder="https://example.com/callback" data-ls-bind="{{webhook.url}}" />
<label data-ls-for="secure-{{webhook.$uid}}">SSL / TLS</label>
<p class="note">Certificate verification</p>
<input name="security" data-ls-id="secure-yes-{{webhook.$uid}}" type="radio" required data-ls-echo="1" data-default="{{webhook.security}}" /> &nbsp; <span>Enabled</span>
<input name="security" data-ls-id="secure-yes-{{webhook.$uid}}" type="radio" required data-ls-bind="1" data-default="{{webhook.security}}" /> &nbsp; <span>Enabled</span>
&nbsp;&nbsp;
<input name="security" data-ls-id="secure-no-{{webhook.$uid}}" type="radio" required data-ls-echo="0" data-default="{{webhook.security}}" /> &nbsp; <span>Disabled</span>
<input name="security" data-ls-id="secure-no-{{webhook.$uid}}" type="radio" required data-ls-bind="0" data-default="{{webhook.security}}" /> &nbsp; <span>Disabled</span>
<br />
<br />
@ -397,11 +397,11 @@ $scopes = [ // TODO sync with project list
<div class="row thin">
<div class="col span-6">
<label data-ls-for="httpUser-{{webhook.$uid}}">User</label>
<input type="text" class="full-width" data-ls-id="httpUser-{{webhook.$uid}}" name="httpUser" autocomplete="off" data-ls-echo="{{webhook.httpUser}}" />
<input type="text" class="full-width" data-ls-id="httpUser-{{webhook.$uid}}" name="httpUser" autocomplete="off" data-ls-bind="{{webhook.httpUser}}" />
</div>
<div class="col span-6">
<label data-ls-for="httpPass-{{webhook.$uid}}">Password</label>
<input type="password" class="full-width" data-ls-id="httpPass-{{webhook.$uid}}" name="httpPass" autocomplete="off" data-ls-echo="{{webhook.httpPass}}" />
<input type="password" class="full-width" data-ls-id="httpPass-{{webhook.$uid}}" name="httpPass" autocomplete="off" data-ls-bind="{{webhook.httpPass}}" />
</div>
</div>
@ -424,17 +424,17 @@ $scopes = [ // TODO sync with project list
data-error="alert"
data-error-alert="Failed to delete webhook">
<input type="hidden" name="projectId" data-ls-echo="{{console-project.$uid}}">
<input type="hidden" name="webhookId" data-ls-echo="{{webhook.$uid}}">
<input type="hidden" name="projectId" data-ls-bind="{{console-project.$uid}}">
<input type="hidden" name="webhookId" data-ls-bind="{{webhook.$uid}}">
<button class="danger reverse">Delete</button>
</form>
<span data-ls-echo="{{webhook.name}}"></span> &nbsp; (<span data-ls-echo="{{webhook.events.length}}"></span> events)
<span data-ls-bind="{{webhook.name}}"></span> &nbsp; (<span data-ls-bind="{{webhook.events.length}}"></span> events)
<span data-ls-if="0 == {{webhook.security}}" style="display: none;">
&nbsp; <span class="note text-danger">(SSL/TLS Disabled)</span>
</span>
<p class="note margin-bottom-no margin-top-small"><span class="tag green">POST</span> <span data-ls-echo="{{webhook.url}}"></span></p>
<p class="note margin-bottom-no margin-top-small"><span class="tag green">POST</span> <span data-ls-bind="{{webhook.url}}"></span></p>
</li>
</ul>
</div>
@ -454,7 +454,7 @@ $scopes = [ // TODO sync with project list
data-error="alert"
data-error-alert="Failed to create webhook">
<input type="hidden" name="projectId" data-ls-echo="{{console-project.$uid}}">
<input type="hidden" name="projectId" data-ls-bind="{{console-project.$uid}}">
<label for="name">Name</label>
<input type="text" class="full-width" id="name" name="name" required autocomplete="off" />
@ -550,17 +550,17 @@ $scopes = [ // TODO sync with project list
<tr>
<td>
<div class="margin-bottom-tiny text-one-liner">
<span data-ls-echo="{{task.name}}"></span>
<span data-ls-bind="{{task.name}}"></span>
<span data-ls-if="0 === {{task.security}}" style="display: none;">
&nbsp; <span class="text-danger">SSL/TLS Disabled</span>
</span>
<span data-ls-if="0 !== {{task.failures}}" style="display: none;">
&nbsp; <span class="text-danger" data-ls-echo="({{task.failures}} errors)"></span>
&nbsp; <span class="text-danger" data-ls-bind="({{task.failures}} errors)"></span>
</span>
</div>
<a data-ls-href="{{task.httpUrl}}" data-ls-echo="{{task.httpUrl}}" target="_blank" class="text-one-liner"></a>
<a data-ls-attrs="href={{task.httpUrl}}" data-ls-bind="{{task.httpUrl}}" target="_blank" class="text-one-liner"></a>
</td>
<td style="vertical-align: middle">
<span data-ls-if="'play' === '{{task.status}}'" style="display: none;">
@ -571,14 +571,14 @@ $scopes = [ // TODO sync with project list
</span>
</td>
<td style="vertical-align: middle">
<span data-ls-echo="{{task.next|date-time}}" class="note"></span>
<span data-ls-bind="{{task.next|date-time}}" class="note"></span>
</td>
<td style="vertical-align: middle">
<div data-ls-if="'undefined' !== '{{task.previous}}'" class="note">
<span data-ls-echo="{{task.previous|date-time}}"></span>
<span data-ls-bind="{{task.previous|date-time}}"></span>
<div data-ls-if="'undefined' !== '{{task.delay}}' && 59 < {{task.delay}}" class="note text-danger margin-top-tiny">
<span data-ls-echo="({{task.delay|ms2hum}} Delay)"></span>
<span data-ls-bind="({{task.delay|ms2hum}} Delay)"></span>
</div>
</div>
<div data-ls-if="'undefined' === '{{task.previous}}'" class="note">
@ -600,26 +600,26 @@ $scopes = [ // TODO sync with project list
data-error="alert"
data-error-alert="Failed to update task">
<input type="hidden" name="projectId" data-ls-echo="{{console-project.$uid}}">
<input type="hidden" name="taskId" data-ls-echo="{{task.$uid}}">
<input type="hidden" name="projectId" data-ls-bind="{{console-project.$uid}}">
<input type="hidden" name="taskId" data-ls-bind="{{task.$uid}}">
<label data-ls-for="name-{{task.$uid}}">Name</label>
<input type="text" class="full-width" data-ls-id="name-{{task.$uid}}" name="name" required autocomplete="off" data-ls-echo="{{task.name}}" />
<input type="text" class="full-width" data-ls-id="name-{{task.$uid}}" name="name" required autocomplete="off" data-ls-bind="{{task.name}}" />
<label data-ls-for="status-{{task.$uid}}" class="margin-bottom">Status
<div class="margin-top-small">
<input name="status" type="radio" checked="checked" required data-ls-echo="play" data-default="{{task.status}}" /> &nbsp; <span>Play</span>
<input name="status" type="radio" required data-ls-echo="pause" data-default="{{task.status}}" /> &nbsp; <span>Pause</span>
<input name="status" type="radio" checked="checked" required data-ls-bind="play" data-default="{{task.status}}" /> &nbsp; <span>Play</span>
<input name="status" type="radio" required data-ls-bind="pause" data-default="{{task.status}}" /> &nbsp; <span>Pause</span>
</div>
</label>
<label data-ls-for="schedule-{{task.$uid}}">Schedule (CRON Syntax)</label>
<input type="text" class="full-width" data-ls-id="schedule-{{task.$uid}}" name="schedule" required autocomplete="off" data-ls-echo="{{task.schedule}}" />
<input type="text" class="full-width" data-ls-id="schedule-{{task.$uid}}" name="schedule" required autocomplete="off" data-ls-bind="{{task.schedule}}" />
<div class="row thin">
<div class="col span-4">
<label data-ls-for="httpMethod-{{task.$uid}}">HTTP Method</label>
<select data-ls-id="httpMethod-{{task.$uid}}" name="httpMethod" required data-ls-echo="{{task.httpMethod}}">
<select data-ls-id="httpMethod-{{task.$uid}}" name="httpMethod" required data-ls-bind="{{task.httpMethod}}">
<option value="POST">POST</option>
<option value="GET">GET</option>
<option value="PUT">PUT</option>
@ -633,7 +633,7 @@ $scopes = [ // TODO sync with project list
</div>
<div class="col span-8">
<label data-ls-for="httpUrl-{{task.$uid}}">HTTP URL</label>
<input type="url" class="full-width" data-ls-id="httpUrl-{{task.$uid}}" name="httpUrl" required autocomplete="off" placeholder="https://example.com/callback" data-ls-echo="{{task.httpUrl}}" />
<input type="url" class="full-width" data-ls-id="httpUrl-{{task.$uid}}" name="httpUrl" required autocomplete="off" placeholder="https://example.com/callback" data-ls-bind="{{task.httpUrl}}" />
</div>
</div>
@ -643,7 +643,7 @@ $scopes = [ // TODO sync with project list
<div class="margin-bottom-small">
<div data-forms-remove class="row thin">
<div class="col span-10">
<input type="hidden" name="httpHeaders" data-forms-headers data-ls-echo="{{header}}" data-cast-to="array" />
<input type="hidden" name="httpHeaders" data-forms-headers data-ls-bind="{{header}}" data-cast-to="array" />
</div>
<div class="col span-2">
<button type="button" data-remove class="reverse danger round pull-end"><i class="icon-cancel"></i></button>
@ -668,8 +668,8 @@ $scopes = [ // TODO sync with project list
<label data-ls-for="security-{{task.$uid}}" class="margin-bottom">SSL / TLS
<p class="note">Certificate verification</p>
<input name="security" type="radio" required data-ls-echo="1" data-default="{{task.security}}" /> &nbsp; <span>Enabled</span>
<input name="security" type="radio" required data-ls-echo="0" data-default="{{task.security}}" /> &nbsp; <span>Disabled</span>
<input name="security" type="radio" required data-ls-bind="1" data-default="{{task.security}}" /> &nbsp; <span>Enabled</span>
<input name="security" type="radio" required data-ls-bind="0" data-default="{{task.security}}" /> &nbsp; <span>Disabled</span>
</label>
<p class="note margin-bottom"><span class="tag red">Warning</span> &nbsp; Untrusted or self-signed certificates may not be secure.
@ -681,11 +681,11 @@ $scopes = [ // TODO sync with project list
<div class="row thin">
<div class="col span-6">
<label data-ls-for="httpUser-{{task.$uid}}">User</label>
<input type="text" class="full-width" data-ls-id="httpUser-{{task.$uid}}" name="httpUser" autocomplete="off" data-ls-echo="{{task.httpUser}}" />
<input type="text" class="full-width" data-ls-id="httpUser-{{task.$uid}}" name="httpUser" autocomplete="off" data-ls-bind="{{task.httpUser}}" />
</div>
<div class="col span-6">
<label data-ls-for="httpPass-{{task.$uid}}">Password</label>
<input type="password" class="full-width" data-ls-id="httpPass-{{task.$uid}}" name="httpPass" autocomplete="off" data-ls-echo="{{task.httpPass}}" />
<input type="password" class="full-width" data-ls-id="httpPass-{{task.$uid}}" name="httpPass" autocomplete="off" data-ls-bind="{{task.httpPass}}" />
</div>
</div>
@ -705,8 +705,8 @@ $scopes = [ // TODO sync with project list
data-error="alert"
data-error-alert="Failed to delete task">
<input type="hidden" name="projectId" data-ls-echo="{{console-project.$uid}}">
<input type="hidden" name="taskId" data-ls-echo="{{task.$uid}}">
<input type="hidden" name="projectId" data-ls-bind="{{console-project.$uid}}">
<input type="hidden" name="taskId" data-ls-bind="{{task.$uid}}">
<button class="danger fill">Delete</button>
</form>
@ -732,7 +732,7 @@ $scopes = [ // TODO sync with project list
data-error="alert"
data-error-alert="Failed to create task">
<input type="hidden" name="projectId" data-ls-echo="{{console-project.$uid}}">
<input type="hidden" name="projectId" data-ls-bind="{{console-project.$uid}}">
<label for="name">Name</label>
<input type="text" class="full-width" id="name" name="name" required autocomplete="off" />
@ -842,7 +842,7 @@ $scopes = [ // TODO sync with project list
data-error="alert"
data-error-alert="<?php echo Locale::getText('console.settings.section.members.leave.failure'); ?>">
<input name="inviteId" id="inviteId" type="hidden" data-ls-echo="{{member.inviteId}}">
<input name="inviteId" id="inviteId" type="hidden" data-ls-bind="{{member.inviteId}}">
<button class="danger"><?php echo Locale::getText('console.settings.section.members.labels.leave'); ?></button>
</form>
@ -857,8 +857,8 @@ $scopes = [ // TODO sync with project list
data-success-triggers="auth.invite"
data-error="alert"
data-error-alert="<?php echo Locale::getText('console.settings.section.members.invite.failure'); ?>">
<input name="inviteId" id="inviteId" type="hidden" data-ls-echo="{{member.inviteId}}">
<input name="redirect" type="hidden" data-ls-echo="https://{{env.DOMAIN}}/auth/join?project={{router.params.project}}" />
<input name="inviteId" id="inviteId" type="hidden" data-ls-bind="{{member.inviteId}}">
<input name="redirect" type="hidden" data-ls-bind="https://{{env.DOMAIN}}/auth/join?project={{router.params.project}}" />
<button class="reverse"><?php echo Locale::getText('console.settings.section.members.labels.resend'); ?></button>
</form>
@ -866,9 +866,9 @@ $scopes = [ // TODO sync with project list
<img src="" data-ui-gravatar="{{member.email}}" data-name="{{member.name}}" data-size="100" alt="User Avatar" class="avatar pull-start margin-end" />
<div class="margin-bottom-small">
<span data-ls-echo="{{member.name}}"></span> &nbsp;&nbsp;<span class="tag" data-ls-echo="{{member.roles.0|id2role}}"></span> &nbsp;&nbsp;<span data-ls-if="'false' == '{{member.confirm}}'" class="tag red" style="display: none;"><?php echo Locale::getText('console.settings.section.members.labels.pending'); ?></span>
<span data-ls-bind="{{member.name}}"></span> &nbsp;&nbsp;<span class="tag" data-ls-bind="{{member.roles.0|id2role}}"></span> &nbsp;&nbsp;<span data-ls-if="'false' == '{{member.confirm}}'" class="tag red" style="display: none;"><?php echo Locale::getText('console.settings.section.members.labels.pending'); ?></span>
</div>
<span class="note" data-ls-echo="{{member.email}}"></span>
<span class="note" data-ls-bind="{{member.email}}"></span>
</li>
</ul>
</div>
@ -888,8 +888,8 @@ $scopes = [ // TODO sync with project list
data-error="alert"
data-error-alert="<?php echo Locale::getText('console.settings.section.members.invite.failure'); ?>">
<input name="team" id="team" type="hidden" data-ls-echo="{{console-project.teamId}}">
<input name="redirect" type="hidden" data-ls-echo="https://{{env.DOMAIN}}/auth/join?project={{router.params.project}}" />
<input name="team" id="team" type="hidden" data-ls-bind="{{console-project.teamId}}">
<input name="redirect" type="hidden" data-ls-bind="https://{{env.DOMAIN}}/auth/join?project={{router.params.project}}" />
<label for="name"><?php echo Locale::getText('console.settings.section.members.labels.name'); ?> <small>(<?php echo Locale::getText('general.optional'); ?>)</small></label>
<input name="name" id="name" type="text" autocomplete="name">

View file

@ -6,7 +6,7 @@ $providers = $this->getParam('providers', []);
<div class="cover margin-bottom-large">
<h1 class="zone xl margin-bottom-large margin-top">
<a data-ls-href="/console/openings/new?company={{router.params.company}}" class="button icon margin-top-tiny pull-end"><i class="icon-plus"></i> &nbsp;Upload</a>
<a data-ls-attrs="href=/console/openings/new?company={{router.params.company}}" class="button icon margin-top-tiny pull-end"><i class="icon-plus"></i> &nbsp;Upload</a>
<?php echo Locale::getText('console.storage.title'); ?>
</h1>
@ -53,11 +53,11 @@ $providers = $this->getParam('providers', []);
<li>
<div class="box padding-small margin-bottom">
<img data-ls-src="//{{env.DOMAIN}}/v1/storage/files/{{file.$uid}}/preview?width=100&height=100&project={{router.params.project}}&mode=admin" class="pull-start avatar margin-end" />
<img data-ls-attrs="src=//{{env.DOMAIN}}/v1/storage/files/{{file.$uid}}/preview?width=100&height=100&project={{router.params.project}}&mode=admin" class="pull-start avatar margin-end" />
<button class="pull-end strip margin-top-tiny"><i class="icon icon-dot-3"></i></button>
<div data-ls-echo="{{file.name}}" data-ls-title="{{file.name}}" class="text-one-liner margin-bottom-tiny">&nbsp;</div>
<div data-ls-echo="{{file.sizeOriginal|humanFileSize}}" class="note text-one-liner">&nbsp;</div>
<div data-ls-bind="{{file.name}}" data-ls-title="{{file.name}}" class="text-one-liner margin-bottom-tiny">&nbsp;</div>
<div data-ls-bind="{{file.sizeOriginal|humanFileSize}}" class="note text-one-liner">&nbsp;</div>
</div>
</li>
</ul>

View file

@ -96,10 +96,10 @@ $providers = $this->getParam('providers', []);
<img src="" data-ui-gravatar="{{user.email}}" data-name="{{user.name}}" data-size="60" alt="User Avatar" class="avatar pull-start" />
</td>
<td data-title="Name: ">
<a data-ls-href="/console/users/view?id={{user.$uid}}&project={{router.params.project}}" data-ls-echo="{{user.name}}"></a>
<a data-ls-attrs="href=/console/users/view?id={{user.$uid}}&project={{router.params.project}}" data-ls-bind="{{user.name}}"></a>
</td>
<td data-title="Email: ">
<span data-ls-echo="{{user.email}}" class="note"></span>
<span data-ls-bind="{{user.email}}" class="note"></span>
</td>
<td data-title="Status: ">
<span data-ls-if="'{{user.confirm}}' === 'true'">
@ -114,7 +114,7 @@ $providers = $this->getParam('providers', []);
&nbsp;<span class="tag red">Blocked</span>
</span>
</td>
<td data-title="Created: "><span data-ls-echo="{{user.registration}}" data-filter="date-text" class="note"></span></td>
<td data-title="Created: "><span data-ls-bind="{{user.registration}}" data-filter="date-text" class="note"></span></td>
</tr>
</tbody>
</table>
@ -227,18 +227,18 @@ $providers = $this->getParam('providers', []);
<label for="name">UID</label>
<div class="input-copy">
<input name="teamId" data-forms-copy type="text" disabled data-ls-echo="{{team.$uid}}" />
<input name="teamId" data-forms-copy type="text" disabled data-ls-bind="{{team.$uid}}" />
</div>
<label for="name">Name</label>
<input name="name" id="name" type="text" autocomplete="off" data-ls-echo="{{team.name}}">
<input name="name" id="name" type="text" autocomplete="off" data-ls-bind="{{team.name}}">
<button>Update</button> &nbsp; <button data-ls-trigger="modal-close" type="button" class="reverse">Cancel</button>
</form>
</div>
</td>
<td data-title="Members: "><span data-ls-echo="{{team.sum}}"></span></td>
<td data-title="Date Created: "><span data-ls-echo="{{team.dateCreated}}" data-filter="date-text" class="note"></span></td>
<td data-title="Members: "><span data-ls-bind="{{team.sum}}"></span></td>
<td data-title="Date Created: "><span data-ls-bind="{{team.dateCreated}}" data-filter="date-text" class="note"></span></td>
</tr>
</tbody>
</table>
@ -287,10 +287,10 @@ $providers = $this->getParam('providers', []);
<input name="provider" id="provider" type="hidden" autocomplete="off" value="<?php echo $provider; ?>">
<label for="oauth<?php echo ucfirst($provider); ?>Appid">App ID</label>
<input name="appId" id="oauth<?php echo ucfirst($provider); ?>Appid" type="text" autocomplete="off" data-ls-echo="{{console-project.usersOauth<?php echo ucfirst($provider); ?>Appid}}">
<input name="appId" id="oauth<?php echo ucfirst($provider); ?>Appid" type="text" autocomplete="off" data-ls-bind="{{console-project.usersOauth<?php echo ucfirst($provider); ?>Appid}}">
<label for="oauth<?php echo ucfirst($provider); ?>Secret">App Secret</label>
<input name="secret" id="oauth<?php echo ucfirst($provider); ?>Secret" type="text" autocomplete="off" data-ls-echo="{{console-project.usersOauth<?php echo ucfirst($provider); ?>Secret}}">
<input name="secret" id="oauth<?php echo ucfirst($provider); ?>Secret" type="text" autocomplete="off" data-ls-bind="{{console-project.usersOauth<?php echo ucfirst($provider); ?>Secret}}">
<div class="info row thin margin-bottom margin-top">
<div class="col span-1">
@ -300,7 +300,7 @@ $providers = $this->getParam('providers', []);
<p>To complete set up, add this OAuth redirect URI to your <?php echo ucfirst($provider); ?> app configuration.</p>
<div class="input-copy">
<input data-forms-copy type="text" disabled data-ls-echo="https://{{env.DOMAIN}}/v1/oauth/callback/<?php echo $provider; ?>/{{router.params.project}}" class="margin-bottom-no" />
<input data-forms-copy type="text" disabled data-ls-bind="https://{{env.DOMAIN}}/v1/oauth/callback/<?php echo $provider; ?>/{{router.params.project}}" class="margin-bottom-no" />
</div>
</div>
</div>

View file

@ -14,10 +14,10 @@ use Utopia\Locale\Locale;
<div class="cover">
<h1 class="zone xl margin-bottom-large">
<a data-ls-href="/console/users?project={{router.params.project}}" class="back text-size-small"><i class="icon-left-open"></i> <?php echo $this->escape(Locale::getText('console.users.title')); ?></a>
<a data-ls-attrs="href=/console/users?project={{router.params.project}}" class="back text-size-small"><i class="icon-left-open"></i> <?php echo $this->escape(Locale::getText('console.users.title')); ?></a>
<br />
<span data-ls-echo="{{user.name}}">&nbsp;</span>
<span data-ls-bind="{{user.name}}">&nbsp;</span>
</h1>
</div>
@ -36,7 +36,7 @@ use Utopia\Locale\Locale;
<div class="text-center">
<img src="" data-ui-gravatar="{{user.email}}" data-name="{{user.name}}" data-size="200" alt="User Avatar" class="avatar huge margin-top-negative-xxl" />
<div class="margin-top-small note" data-ls-echo="Member since {{user.registration|date-text}}"></div>
<div class="margin-top-small note" data-ls-bind="Member since {{user.registration|date-text}}"></div>
<div class="margin-top-small">
<span data-ls-if="'{{user.confirm}}' === 'true'" style="display: none;">
<span class="tag green">Verified</span>
@ -45,7 +45,7 @@ use Utopia\Locale\Locale;
<span class="tag">Unverified</span>
</span>
</div>
<div class="margin-top-small" data-ls-echo="{{user.email}}"></div>
<div class="margin-top-small" data-ls-bind="{{user.email}}"></div>
</div>
</div>
@ -73,10 +73,10 @@ use Utopia\Locale\Locale;
<tbody data-ls-loop="user-prefs" data-ls-as="pref">
<tr>
<td data-title="Key: ">
<span data-ls-echo="{{$index}}"></span>
<span data-ls-bind="{{$index}}"></span>
</td>
<td data-title="Value: ">
<span data-ls-echo="{{pref}}"></span>
<span data-ls-bind="{{pref}}"></span>
</td>
</tr>
</tbody>
@ -91,7 +91,7 @@ use Utopia\Locale\Locale;
<div class="col span-4">
<label>User ID</label>
<div class="input-copy margin-bottom-large">
<input id="uid" type="text" autocomplete="off" placeholder="" data-ls-echo="{{user.$uid}}" disabled data-forms-copy>
<input id="uid" type="text" autocomplete="off" placeholder="" data-ls-bind="{{user.$uid}}" disabled data-forms-copy>
</div>
<div data-ls-if="'{{user.status}}' !== '<?php echo \Auth\Auth::USER_STATUS_BLOCKED; ?>'" style="display: none">
@ -152,18 +152,18 @@ use Utopia\Locale\Locale;
data-success-triggers="user.update"
data-error="alert"
data-error-alert="Failed to logout session">
<input type="hidden" name="userId" data-ls-echo="{{router.params.id}}">
<input type="hidden" name="sessionId" data-ls-echo="{{session.id}}">
<input type="hidden" name="userId" data-ls-bind="{{router.params.id}}">
<input type="hidden" name="sessionId" data-ls-bind="{{session.id}}">
<button class="danger">Logout</button>
</form>
<img data-ls-src="{{env.API}}/v1/avatars/browsers/{{session.client.short_name|lowercase}}?width=120&height=120" data-ls-title="{{session.client.name}}" data-ls-alt="{{session.client.name}}" class="avatar trans pull-start margin-end" />
<img data-ls-attrs="src={{env.API}}/v1/avatars/browsers/{{session.client.short_name|lowercase}}?width=120&height=120" data-ls-title="{{session.client.name}}" data-ls-alt="{{session.client.name}}" class="avatar trans pull-start margin-end" />
<span data-ls-echo="{{session.client.name}}"></span> <span data-ls-echo="{{session.client.version}}"></span> on <span data-ls-echo="{{session.model}}"></span> <span data-ls-echo="{{session.OS.name}}"></span> <span data-ls-echo="{{session.OS.version}}"></span>
<span data-ls-bind="{{session.client.name}}"></span> <span data-ls-bind="{{session.client.version}}"></span> on <span data-ls-bind="{{session.model}}"></span> <span data-ls-bind="{{session.OS.name}}"></span> <span data-ls-bind="{{session.OS.version}}"></span>
<div class="note info margin-top-small">
<img data-ls-src="{{env.API}}/v1/avatars/flags/{{session.geo.isoCode}}?width=80&height=80" class="avatar xs margin-end-small inline" />
<small data-ls-echo="{{session.ip}}"></small> / <small data-ls-echo="{{session.geo.country}}"></small>
<img data-ls-attrs="src={{env.API}}/v1/avatars/flags/{{session.geo.isoCode}}?width=80&height=80" class="avatar xs margin-end-small inline" />
<small data-ls-bind="{{session.ip}}"></small> / <small data-ls-bind="{{session.geo.country}}"></small>
</div>
</li>
</ul>
@ -211,17 +211,17 @@ use Utopia\Locale\Locale;
</thead>
<tbody data-ls-loop="logs" data-ls-as="log">
<tr>
<td data-title="<?php echo $this->escape(Locale::getText('console.account.section.security.recent-activity.date')); ?>: "><span data-ls-echo="{{log.time|date-time}}"></span></td>
<td data-title="<?php echo $this->escape(Locale::getText('console.account.section.security.recent-activity.event')); ?>: "><span data-ls-echo="{{log.event}}"></span></td>
<td data-title="<?php echo $this->escape(Locale::getText('console.account.section.security.recent-activity.date')); ?>: "><span data-ls-bind="{{log.time|date-time}}"></span></td>
<td data-title="<?php echo $this->escape(Locale::getText('console.account.section.security.recent-activity.event')); ?>: "><span data-ls-bind="{{log.event}}"></span></td>
<td data-title="<?php echo $this->escape(Locale::getText('console.account.section.security.recent-activity.client')); ?>: ">
<img data-ls-src="{{env.API}}/v1/avatars/browsers/{{log.client.short_name|lowercase}}?width=80&height=80" data-ls-title="{{log.client.name}}" data-ls-alt="{{log.client.name}}" class="avatar xs inline margin-end-small" />
<span data-ls-echo="{{log.client.name}} {{log.client.version}} on {{log.model}} {{log.OS.name}} {{log.OS.version}}"></span>
<img data-ls-attrs="src={{env.API}}/v1/avatars/browsers/{{log.client.short_name|lowercase}}?width=80&height=80" data-ls-title="{{log.client.name}}" data-ls-alt="{{log.client.name}}" class="avatar xs inline margin-end-small" />
<span data-ls-bind="{{log.client.name}} {{log.client.version}} on {{log.model}} {{log.OS.name}} {{log.OS.version}}"></span>
</td>
<td data-title="<?php echo $this->escape(Locale::getText('console.account.section.security.recent-activity.location')); ?>: ">
<img data-ls-src="{{env.API}}/v1/avatars/flags/{{log.geo.isoCode}}?width=80&height=80" class="avatar xs inline margin-end-small" />
<span data-ls-echo="{{log.geo.country}}"></span>
<img data-ls-attrs="src={{env.API}}/v1/avatars/flags/{{log.geo.isoCode}}?width=80&height=80" class="avatar xs inline margin-end-small" />
<span data-ls-bind="{{log.geo.country}}"></span>
</td>
<td data-title="<?php echo $this->escape(Locale::getText('console.account.section.security.recent-activity.ip')); ?>: "><span data-ls-echo="{{log.ip}}"></span></td>
<td data-title="<?php echo $this->escape(Locale::getText('console.account.section.security.recent-activity.ip')); ?>: "><span data-ls-bind="{{log.ip}}"></span></td>
</tr>
</tbody>
</table>

View file

@ -18,8 +18,8 @@ use Utopia\Locale\Locale;
<div class="text-danger margin-bottom-large" style="display: none;" data-ls-if="{{router.params.failure}} == 1"><?php echo $this->escape(Locale::getText('home.auth.join.failure')); ?></div>
<input name="success" type="hidden" data-ls-echo="https://{{env.DOMAIN}}/console?company={{router.params.company}}">
<input name="failure" type="hidden" data-ls-echo="https://{{env.DOMAIN}}/auth/join?failure=1&company={{router.params.company}}&inviteId={{router.params.inviteId}}&secret={{router.params.secret}}&userId={{router.params.userId}}">
<input name="success" type="hidden" data-ls-bind="https://{{env.DOMAIN}}/console?company={{router.params.company}}">
<input name="failure" type="hidden" data-ls-bind="https://{{env.DOMAIN}}/auth/join?failure=1&company={{router.params.company}}&inviteId={{router.params.inviteId}}&secret={{router.params.secret}}&userId={{router.params.userId}}">
<div class=""
data-appwrite="companies.getPreview"
@ -37,7 +37,7 @@ use Utopia\Locale\Locale;
<div data-ls-if="'{{api-company.logo}}' !== '' || '{{api-company.logo}}' !== 'undefined'">
<div data-ls-style="background: {{api-company.theme-color}}; color: {{api-company.theme-color-contrast}}; width: 100px; height: 100px; line-height: 100px; border-radius: 50%; margin: 0 auto; text-align: center">
<img data-ls-src="{{env.API}}/v1/storage/files/{{api-company.logo}}/preview?project={{env.PROJECT}}&height=120" alt="Logo" style="opacity: 0; line-height: 80px; vertical-align: middle; max-width: 80px; max-height: 80px" />
<img data-ls-attrs="src={{env.API}}/v1/storage/files/{{api-company.logo}}/preview?project={{env.PROJECT}}&height=120" alt="Logo" style="opacity: 0; line-height: 80px; vertical-align: middle; max-width: 80px; max-height: 80px" />
</div>
</div>
</div>

View file

@ -20,7 +20,7 @@ use Utopia\Locale\Locale;
<label><?php echo $this->escape(Locale::getText('home.auth.recovery.labels.email')); ?></label>
<input name="email" type="email" class="full-width" autocomplete="email" placeholder="me@example.com" required>
<input name="redirect" type="hidden" data-ls-echo="https://{{env.DOMAIN}}/auth/recovery/reset" />
<input name="redirect" type="hidden" data-ls-bind="https://{{env.DOMAIN}}/auth/recovery/reset" />
<button type="submit" class="btn btn-primary"><i class="fa fa-sign-in"></i> <?php echo $this->escape(Locale::getText('home.auth.recovery.action')); ?></button>
</form>

View file

@ -21,8 +21,8 @@ use Utopia\Locale\Locale;
data-error="alert"
data-error-alert="<?php echo $this->escape(Locale::getText('home.auth.reset.failure')); ?>">
<input type="hidden" name="userId" data-ls-echo="{{router.params.userId}}">
<input type="hidden" name="token" data-ls-echo="{{router.params.token}}">
<input type="hidden" name="userId" data-ls-bind="{{router.params.userId}}">
<input type="hidden" name="token" data-ls-bind="{{router.params.token}}">
<label><?php echo $this->escape(Locale::getText('home.auth.reset.labels.passwordA')); ?></label>
<input name="passwordA" type="password" autocomplete="off" placeholder="" required data-forms-password-meter pattern=".{6,}" title="<?php echo $this->escape(Locale::getText('home.auth.reset.labels.password.validation')); ?>">

View file

@ -32,8 +32,8 @@ use Utopia\Locale\Locale;
data-error="alert"
data-error-alert="<?php echo $this->escape(Locale::getText('home.auth.signin.failure')); ?>">
<input name="success" type="hidden" data-ls-echo="https://{{env.DOMAIN}}/console">
<input name="failure" type="hidden" data-ls-echo="https://{{env.DOMAIN}}/auth/signin?failure=1">
<input name="success" type="hidden" data-ls-bind="https://{{env.DOMAIN}}/console">
<input name="failure" type="hidden" data-ls-bind="https://{{env.DOMAIN}}/auth/signin?failure=1">
<input name="email" type="email" class="full-width" autocomplete="email" placeholder="<?php echo $this->escape(Locale::getText('home.auth.signin.labels.email')); ?>" required>

View file

@ -22,14 +22,14 @@ use Utopia\Locale\Locale;
data-error="alert"
data-error-alert="<?php echo $this->escape(Locale::getText('home.auth.signup.failure')); ?>">
<input name="success" type="hidden" data-ls-echo="https://{{env.DOMAIN}}/console">
<input name="failure" type="hidden" data-ls-echo="https://{{env.DOMAIN}}/auth/signup?failure=1">
<input name="success" type="hidden" data-ls-bind="https://{{env.DOMAIN}}/console">
<input name="failure" type="hidden" data-ls-bind="https://{{env.DOMAIN}}/auth/signup?failure=1">
<label><?php echo $this->escape(Locale::getText('home.auth.signup.labels.name')); ?></label>
<input name="name" type="text" autocomplete="name" placeholder="" required>
<label><?php echo $this->escape(Locale::getText('home.auth.signup.labels.email')); ?></label>
<input name="email" type="email" autocomplete="email" placeholder="" required data-ls-echo="{{router.params.email}}">
<input name="email" type="email" autocomplete="email" placeholder="" required data-ls-bind="{{router.params.email}}">
<label><?php echo $this->escape(Locale::getText('home.auth.signup.labels.password')); ?></label>
<input name="password" type="password" autocomplete="off" placeholder="" required data-forms-password-meter pattern=".{6,}" title="<?php echo $this->escape(Locale::getText('home.auth.signup.labels.password.validation')); ?>">
@ -41,7 +41,7 @@ use Utopia\Locale\Locale;
<?php echo $this->escape(Locale::getText('home.auth.signup.labels.agree')); ?><a href="/policy/terms" target="_blank"><?php echo $this->escape(Locale::getText('home.auth.signup.labels.terms')); ?></a><?php echo $this->escape(Locale::getText('home.auth.signup.labels.and')); ?><a href="/policy/privacy" target="_blank"><?php echo $this->escape(Locale::getText('home.auth.signup.labels.privacy')); ?></a>
</div>
<input name="redirect" type="hidden" data-ls-echo="https://{{env.DOMAIN}}/auth/confirm" />
<input name="redirect" type="hidden" data-ls-bind="https://{{env.DOMAIN}}/auth/confirm" />
<button type="submit"><?php echo $this->escape(Locale::getText('home.auth.signup.labels.action')); ?></button>
</form>

View file

@ -88,10 +88,10 @@ $env = $this->getParam('env', '');
<li>
<div data-ls-class="{{alert.class}} message">
<i class="icon-cancel" data-ls-ui-alerts-delete data-message="{{alert.id}}"></i>
<span data-ls-echo="{{alert.text}}"></span>
<span data-ls-bind="{{alert.text}}"></span>
<span data-ls-if="'undefined' !== '{{alert.link}}'" style="display: none;">
<a data-ls-href="{{alert.link}}" data-ls-ui-alerts-delete data-message="{{alert.id}}"><?php echo Locale::getText('general.alerts.learn'); ?></a>
<a data-ls-attrs="href={{alert.link}}" data-ls-ui-alerts-delete data-message="{{alert.id}}"><?php echo Locale::getText('general.alerts.learn'); ?></a>
</span>
</div>
</li>

View file

@ -12,6 +12,8 @@ const gulpCleanCSS = require('gulp-clean-css');
const configApp = {
mainFile: 'app.js',
src: [
'public/scripts/dependencies/litespeed.js',
'public/scripts/sdk.js',
'public/scripts/init.js',
@ -79,7 +81,7 @@ const configDep = {
'public/scripts/dependencies/pell.js',
'public/scripts/dependencies/prism.js',
'public/scripts/dependencies/turndown.js',
'public/scripts/dependencies/litespeed.js',
'public/scripts/polyfills/date-input.js',
'public/scripts/polyfills/datalist.js',
],

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -67,13 +67,13 @@ else{window.history.replaceState({},'',URL);}
result=(null===result||undefined===result)?def:result;result=(typeof result==='object')?JSON.stringify(result):result;if(reference.length>=2){for(let i=1;i<reference.length;i++){result=filter.apply(reference[i],result);}}
return result;});},getPaths:function(){return paths;},}},true,false,false);window.ls.container.set('filter',function(container){let filters={};let add=function(name,callback){filters[name]=callback;return this;};let apply=function(name,value){container.set('$value',value,true,false,false);return container.resolve(filters[name]);};add('uppercase',function($value){return $value.toUpperCase();});add('lowercase',function($value){return $value.toLowerCase();});return{add:add,apply:apply}},true,false,false);window.ls.container.get('filter').add('escape',function(value){if(typeof value!=='string'){return value;}
return value.replace(/&/g,'&amp;').replace(/</g,'&lt;').replace(/>/g,'&gt;').replace(/\"/g,'&quot;').replace(/\'/g,'&#39;').replace(/\//g,'&#x2F;');});window.ls=window.ls||{};window.ls.container.set('window',window,true,false,false).set('document',window.document,true,false,false).set('element',window.document,true,false,false);window.ls.run=function(window){try{this.view.render(window.document);}
catch(error){let handler=window.ls.container.resolve(this.error);handler(error);}};window.ls.error=function(){return function(error){console.error('ls-error',error.message,error.stack,error.toString());}};window.ls.router=window.ls.container.get('router');window.ls.view=window.ls.container.get('view');window.ls.filter=window.ls.container.get('filter');window.ls.container.get('view').add({selector:'data-ls-router',controller:function(element,window,document,view,router){let firstFromServer=(element.getAttribute('data-first-from-server')==='true');let scope={selector:'data-ls-scope',template:false,repeat:true,controller:function(){},};let scopeElement=document.createElement('div');let init=function(route){window.scrollTo(0,0);if(window.document.body.scrollTo){window.document.body.scrollTo(0,0);}
catch(error){let handler=window.ls.container.resolve(this.error);handler(error);}};window.ls.error=function(){return function(error){console.error('ls-error',error.message,error.stack,error.toString());}};window.ls.router=window.ls.container.get('router');window.ls.view=window.ls.container.get('view');window.ls.filter=window.ls.container.get('filter');window.ls.container.get('view').add({selector:'data-ls-router',repeat:false,controller:function(element,window,document,view,router){let firstFromServer=(element.getAttribute('data-first-from-server')==='true');let scope={selector:'data-ls-scope',template:false,repeat:true,controller:function(){},};let init=function(route){window.scrollTo(0,0);if(window.document.body.scrollTo){window.document.body.scrollTo(0,0);}
router.reset();if(null===route){return;}
scope.template=(undefined!==route.view.template)?route.view.template:null;scope.controller=(undefined!==route.view.controller)?route.view.controller:function(){};document.dispatchEvent(new CustomEvent('state-change'));if(firstFromServer&&null===router.getPrevious()){scope.template='';}
else if(null!==router.getPrevious()){view.render(element);}
else if(null!==router.getPrevious()){view.render(element);console.log('render 3')}
document.dispatchEvent(new CustomEvent('state-changed'));};let findParent=function(tagName,el){if((el.nodeName||el.tagName).toLowerCase()===tagName.toLowerCase()){return el;}
while(el=el.parentNode){if((el.nodeName||el.tagName).toLowerCase()===tagName.toLowerCase()){return el;}}
return null;};scopeElement.setAttribute('data-ls-scope','');element.insertBefore(scopeElement,element.firstChild);view.add(scope);document.addEventListener('click',function(event){let target=findParent('a',event.target);if(!target){return false;}
return null;};element.setAttribute('data-ls-scope','');view.add(scope);document.addEventListener('click',function(event){let target=findParent('a',event.target);if(!target){return false;}
if(!target.href){return false;}
if((event.metaKey)){return false;}
if((target.hasAttribute('target'))&&('_blank'===target.getAttribute('target'))){return false;}
@ -82,7 +82,7 @@ catch(error){let handler=window.ls.container.resolve(this.error);handler(error);
event.preventDefault();if(window.location===target.href){return false;}
route.view.state=(undefined===route.view.state)?true:route.view.state;if(true===route.view.state){if(router.getPrevious()&&router.getPrevious().view&&(router.getPrevious().view.scope!==route.view.scope)){window.location.href=target.href;return false;}
window.history.pushState({},'Unknown',target.href);}
init(route);return true;});window.addEventListener('popstate',function(){init(router.match(window.location));});window.addEventListener('hashchange',function(){init(router.match(window.location));});init(router.match(window.location));}});window.ls.container.get('view').add({selector:'data-ls-attrs',controller:function(element,expression,container,$as,$prefix){let attrs=element.getAttribute('data-ls-attrs').trim().split(',');let paths=[];let check=function(){for(let i=0;i<attrs.length;i++){let attr=attrs[i].split('=');let key=(attr[0])?expression.parse(attr[0],null,$as,$prefix):null;paths=paths.concat(expression.getPaths());let value=(attr[1])?expression.parse(attr[1],null,$as,$prefix):null;paths=paths.concat(expression.getPaths());if(!key){return null;}
init(route);return true;});window.addEventListener('popstate',function(){init(router.match(window.location));});window.addEventListener('hashchange',function(){init(router.match(window.location));});init(router.match(window.location));}});window.ls.container.get('view').add({selector:'data-ls-attrs',controller:function(element,expression,container,$as,$prefix){let attrs=element.getAttribute('data-ls-attrs').trim().split(',');let paths=[];let check=function(){for(let i=0;i<attrs.length;i++){let attr=attrs[i];let key=expression.parse(attr.substring(0,attr.indexOf('=')),null,$as,$prefix)||null;paths=paths.concat(expression.getPaths());let value=expression.parse(attr.substring(attr.indexOf('=')+1),null,$as,$prefix)||null;paths=paths.concat(expression.getPaths());if(!key){return null;}
element.setAttribute(key,value);}};check();for(let i=0;i<paths.length;i++){container.bind(element,paths[i],check);}}});window.ls.container.get('view').add({selector:'data-ls-bind',controller:function(element,expression,container,$prefix,$as){let echo=function(value,bind=true){if(element.tagName==='INPUT'||element.tagName==='SELECT'||element.tagName==='BUTTON'||element.tagName==='TEXTAREA'){let type=element.getAttribute('type');if('radio'===type){if(value.toString()===element.value){element.setAttribute('checked','checked');}
else{element.removeAttribute('checked');}}
if('checkbox'===type){if(typeof value==='boolean'||value==='true'||value==='false'){if(value===true||value==='true'){element.setAttribute('checked','checked');element.checked=true;}

View file

@ -1,108 +1,108 @@
window.ls.router
.add('/auth/signin', {
template: '/auth/signin',
template: '/auth/signin?version=' + APP_ENV.VERSION,
scope: 'home'
})
.add('/auth/signup', {
template: '/auth/signup',
template: '/auth/signup?version=' + APP_ENV.VERSION,
scope: 'home'
})
.add('/auth/recovery', {
template: '/auth/recovery',
template: '/auth/recovery?version=' + APP_ENV.VERSION,
scope: 'home'
})
.add('/auth/recovery/reset', {
template: '/auth/recovery/reset',
template: '/auth/recovery/reset?version=' + APP_ENV.VERSION,
scope: 'home'
})
.add('/auth/confirm', {
template: '/auth/confirm',
template: '/auth/confirm?version=' + APP_ENV.VERSION,
scope: 'home'
})
.add('/auth/join', {
template: '/auth/join',
template: '/auth/join?version=' + APP_ENV.VERSION,
scope: 'home'
})
.add('/console', {
template: '/console',
template: '/console?version=' + APP_ENV.VERSION,
scope: 'console'
})
.add('/console/account', {
template: '/console/account',
template: '/console/account?version=' + APP_ENV.VERSION,
scope: 'console'
})
.add('/console/account/:tab', {
template: '/console/account',
template: '/console/account?version=' + APP_ENV.VERSION,
scope: 'console'
})
.add('/console/home', {
template: '/console/home',
template: '/console/home?version=' + APP_ENV.VERSION,
scope: 'console',
project: true
})
.add('/console/home/:tab', {
template: '/console/home',
template: '/console/home?version=' + APP_ENV.VERSION,
scope: 'console',
project: true
})
.add('/console/platforms/:platform', {
template: function (window) {
return window.location.pathname;
return window.location.pathname + '?version=' + APP_ENV.VERSION;
},
scope: 'console',
project: true
})
.add('/console/notifications', {
template: '/console/notifications',
template: '/console/notifications?version=' + APP_ENV.VERSION,
scope: 'console'
})
.add('/console/settings', {
template: '/console/settings',
template: '/console/settings?version=' + APP_ENV.VERSION,
scope: 'console',
project: true
})
.add('/console/settings/:tab', {
template: '/console/settings',
template: '/console/settings?version=' + APP_ENV.VERSION,
scope: 'console',
project: true
})
.add('/console/database', {
template: '/console/database',
template: '/console/database?version=' + APP_ENV.VERSION,
scope: 'console',
project: true
})
.add('/console/database/:tab', {
template: '/console/database',
template: '/console/database?version=' + APP_ENV.VERSION,
scope: 'console',
project: true
})
.add('/console/storage', {
template: '/console/storage',
template: '/console/storage?version=' + APP_ENV.VERSION,
scope: 'console',
project: true
})
.add('/console/storage/:tab', {
template: '/console/storage',
template: '/console/storage?version=' + APP_ENV.VERSION,
scope: 'console',
project: true
})
.add('/console/users', {
template: '/console/users',
template: '/console/users?version=' + APP_ENV.VERSION,
scope: 'console',
project: true
})
.add('/console/users/view', {
template: '/console/users/view',
template: '/console/users/view?version=' + APP_ENV.VERSION,
scope: 'console',
project: true
})
.add('/console/users/view/:tab', {
template: '/console/users/view',
template: '/console/users/view?version=' + APP_ENV.VERSION,
scope: 'console',
project: true
})
.add('/console/users/:tab', {
template: '/console/users',
template: '/console/users?version=' + APP_ENV.VERSION,
scope: 'console',
project: true
})