mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-01-23 02:35:49 +00:00
feature(html) html -> tmpl: 2 x times speed up
This commit is contained in:
parent
c9bbf0cf2b
commit
d533a4259d
14 changed files with 9 additions and 8 deletions
17
tmpl/auth.hbs
Normal file
17
tmpl/auth.hbs
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
<!doctype html>
|
||||
<html>
|
||||
<head></head>
|
||||
<body>
|
||||
<script>
|
||||
(function() {
|
||||
'use strict';
|
||||
|
||||
window.opener
|
||||
.CloudCmd
|
||||
.GitHub
|
||||
.authorize(window.location.search);
|
||||
})();
|
||||
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
11
tmpl/auth/dropbox.hbs
Normal file
11
tmpl/auth/dropbox.hbs
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<script src=//cdnjs.cloudflare.com/ajax/libs/dropbox.js/0.10.2/dropbox.min.js></script>
|
||||
</head>
|
||||
<body>
|
||||
<script>
|
||||
Dropbox.AuthDriver.Popup.oauthReceiver()
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
22
tmpl/auth/github.hbs
Normal file
22
tmpl/auth/github.hbs
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head></head>
|
||||
<body>
|
||||
<script src="/cloudcmd/join:modules/promise-polyfill/Promise.js:lib/util.js:lib/client/dom.js:lib/client/events.js:lib/client/load.js:lib/client/files.js:lib/client.js"></script>
|
||||
<script>
|
||||
(function() {
|
||||
"use strict";
|
||||
|
||||
DOM.Files.get('modules', function(error, modules) {
|
||||
var URL = 'https://github.com/login/oauth/authorize?client_id=',
|
||||
Storage = Util.findObjByNameInArr(modules, 'storage'),
|
||||
GitHub = Util.findObjByNameInArr(Storage, 'GitHub'),
|
||||
GitHub_ID = GitHub && GitHub.key;
|
||||
|
||||
window.location =
|
||||
URL + GitHub_ID + '&&scope=repo,user,gist';
|
||||
});
|
||||
})();
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
130
tmpl/config.hbs
Normal file
130
tmpl/config.hbs
Normal file
|
|
@ -0,0 +1,130 @@
|
|||
<ul class="list" >
|
||||
<li>
|
||||
<label>
|
||||
<input data-name="js-auth" type="checkbox" {{ auth }} >
|
||||
Auth
|
||||
</label>
|
||||
</li>
|
||||
<li>
|
||||
<input
|
||||
data-name="js-username"
|
||||
type="text"
|
||||
class="form-control"
|
||||
placeholder="username"
|
||||
value="{{ username }}"
|
||||
title="Username">
|
||||
</li>
|
||||
<li>
|
||||
<input
|
||||
data-name="js-password"
|
||||
type="password"
|
||||
class="form-control"
|
||||
placeholder="password"
|
||||
value="{{ password }}"
|
||||
title="Password">
|
||||
</li>
|
||||
<li>
|
||||
<label>
|
||||
<input
|
||||
data-name="js-diff"
|
||||
type="checkbox"
|
||||
{{ diff }}>
|
||||
Diff
|
||||
</label>
|
||||
</li>
|
||||
<li>
|
||||
<label>
|
||||
<input
|
||||
data-name="js-zip"
|
||||
type="checkbox"
|
||||
{{ zip }}>
|
||||
Zip
|
||||
</label>
|
||||
</li>
|
||||
<li>
|
||||
<select data-name="js-editor" class="form-control full-width" title="Editor">
|
||||
<option {{ edward-selected }}>edward</option>
|
||||
<option {{ dword-selected }}>dword</option>
|
||||
</select>
|
||||
</li>
|
||||
<li>
|
||||
<label>
|
||||
<input
|
||||
data-name="js-notifications"
|
||||
type="checkbox"
|
||||
{{ notifications }}>
|
||||
Notifications
|
||||
</label>
|
||||
</li>
|
||||
<li>
|
||||
<label>
|
||||
<input
|
||||
data-name="js-localStorage"
|
||||
type="checkbox"
|
||||
{{ localStorage }}>
|
||||
Local Storage
|
||||
</label>
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<label>
|
||||
<input data-name="js-buffer" type="checkbox" {{ buffer }}>
|
||||
Buffer
|
||||
</label>
|
||||
</li>
|
||||
<li>
|
||||
<label>
|
||||
<input data-name="js-dirStorage" type="checkbox" {{ dirStorage }} >
|
||||
Directory Storage
|
||||
</label>
|
||||
</li>
|
||||
<li>
|
||||
<label>
|
||||
<input data-name="js-minify" type="checkbox" {{ minify }}>
|
||||
Minify
|
||||
</label>
|
||||
</li>
|
||||
<li>
|
||||
<label>
|
||||
<input data-name="js-online" type="checkbox" {{ online }}>
|
||||
Online
|
||||
</label>
|
||||
</li>
|
||||
<li>
|
||||
<label>
|
||||
<input data-name="js-cache" type="checkbox" {{ cache }} >
|
||||
Cache
|
||||
</label>
|
||||
</li>
|
||||
<li>
|
||||
<label>
|
||||
<input data-name="js-showKeysPanel" type="checkbox" {{ showKeysPanel }}>
|
||||
Show keys panel
|
||||
</label>
|
||||
</li>
|
||||
<li>
|
||||
<input
|
||||
data-name="js-root"
|
||||
title="Root"
|
||||
value="{{ root }}"
|
||||
placeholder="root"
|
||||
class="form-control">
|
||||
</li>
|
||||
<li>
|
||||
<input
|
||||
data-name="js-port"
|
||||
min="0"
|
||||
max="65535"
|
||||
title="Port"
|
||||
type="number"
|
||||
value="{{ port }}"
|
||||
placeholder="Port"
|
||||
class="form-control">
|
||||
</li>
|
||||
<li>
|
||||
<label>
|
||||
<input data-name="js-progressOfCopying" type="checkbox" {{ progressOfCopying }}>
|
||||
Progress of copying
|
||||
</label>
|
||||
</li>
|
||||
</ul>
|
||||
7
tmpl/fs/file.hbs
Normal file
7
tmpl/fs/file.hbs
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
<{{ tag }} {{ attribute }}class="{{ className }}">
|
||||
<span data-name="js-type" class="mini-icon {{ type }}"></span>
|
||||
<span data-name="js-name" class="name reduce-text">{{ name }}</span>
|
||||
<span data-name="js-size" class="size reduce-text">{{ size }}</span>
|
||||
<span data-name="js-owner" class="owner reduce-text">{{ owner }}</span>
|
||||
<span data-name="js-mode" class="mode reduce-text">{{ mode }}</span>
|
||||
</{{ tag }}>
|
||||
48
tmpl/fs/index.hbs
Normal file
48
tmpl/fs/index.hbs
Normal file
|
|
@ -0,0 +1,48 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="robots" content="noindex,nofollow">
|
||||
<!-- mobile first design -->
|
||||
<meta content="width=device-width,initial-scale=1" name="viewport">
|
||||
<link rel="icon" href="/favicon.ico" />
|
||||
<title>{{ title }}</title>
|
||||
|
||||
<link rel=stylesheet href=/cloudcmd/css/urls.css>
|
||||
<link rel=stylesheet href=/cloudcmd/join:css/reset.css:css/style.css:css/icons.css:css/help.css>
|
||||
|
||||
<noscript>
|
||||
<link rel=stylesheet href="/cloudcmd/css/nojs.css">
|
||||
</noscript>
|
||||
</head>
|
||||
<body>
|
||||
<div class=fm>{{ fm }}</div>
|
||||
<div id="js-keyspanel" class="keyspanel">
|
||||
<button id=f1 class="cmd-button reduce-text icon-help" title="help" >F1</button>
|
||||
<button id=f2 class="cmd-button reduce-text icon-rename" title="rename" >F2</button>
|
||||
<button id=f3 class="cmd-button reduce-text icon-view" title="view" >F3</button>
|
||||
<button id=f4 class="cmd-button reduce-text icon-edit " title="edit" >F4</button>
|
||||
<button id=f5 class="cmd-button reduce-text icon-copy" title="copy" >F5</button>
|
||||
<button id=f6 class="cmd-button reduce-text icon-move" title="move" >F6</button>
|
||||
<button id=f7 class="cmd-button reduce-text icon-directory" title="new directory" >F7</button>
|
||||
<button id=f8 class="cmd-button reduce-text icon-delete" title="delete" >F8</button>
|
||||
<button id=f9 class="cmd-button reduce-text icon-menu" title="menu" >F9</button>
|
||||
<button id=f10 class="cmd-button reduce-text icon-config" title="config" >F10</button>
|
||||
<button id=~ class="cmd-button reduce-text icon-console" title="console" >~</button>
|
||||
<button id=contact class="cmd-button reduce-text icon-contact" title="contact" ></button>
|
||||
</div>
|
||||
<script src="/cloudcmd/cloudcmd.js"></script>
|
||||
<script>
|
||||
!(function() {
|
||||
'use strict';
|
||||
|
||||
window.addEventListener('DOMContentLoaded', load);
|
||||
|
||||
function load() {
|
||||
window.removeEventListener('DOMContentLoaded', load);
|
||||
CloudCmd();
|
||||
}
|
||||
})();
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
1
tmpl/fs/link.hbs
Normal file
1
tmpl/fs/link.hbs
Normal file
|
|
@ -0,0 +1 @@
|
|||
<a href="{{ link }}" title="{{ title }}" {{ attribute }}draggable="true">{{ name }}</a>
|
||||
1
tmpl/fs/panel.hbs
Normal file
1
tmpl/fs/panel.hbs
Normal file
|
|
@ -0,0 +1 @@
|
|||
<section data-name="js-{{ side }}" class="panel panel-{{ side }}">{{ content }}</section>
|
||||
1
tmpl/fs/path.hbs
Normal file
1
tmpl/fs/path.hbs
Normal file
|
|
@ -0,0 +1 @@
|
|||
<div data-name="js-path" class="reduce-text" title="{{ fullPath }}"><span data-name="js-clear-storage" class="path-icon icon-clear" title="clear storage (Ctrl+D)"></span><a data-name="js-refresh" href="{{ link }}" class="path-icon icon-refresh" title="refresh (Ctrl+R)"></a><span data-name="js-links" class=links>{{ path }}</span></div>
|
||||
1
tmpl/fs/pathLink.hbs
Normal file
1
tmpl/fs/pathLink.hbs
Normal file
|
|
@ -0,0 +1 @@
|
|||
<a data-name="js-path-link" href="/fs{{ path }}" title="{{ path }}">{{ name }}</a>{{ slash }}
|
||||
1
tmpl/upload.hbs
Normal file
1
tmpl/upload.hbs
Normal file
|
|
@ -0,0 +1 @@
|
|||
<input type="file" name="file" data-name="js-upload-file-button" multiple>
|
||||
4
tmpl/view/media.hbs
Normal file
4
tmpl/view/media.hbs
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
<div class="media">
|
||||
<{{ type }} data-name="js-media" src="{{ src }}" controls autoplay></{{ type }}>
|
||||
<p class="reduce-text"><strong>{{ name }}</strong></p>
|
||||
</div>
|
||||
Loading…
Add table
Add a link
Reference in a new issue