Added npm, bower and grunt to compile files
This commit is contained in:
父節點
a2a5f7e440
當前提交
ee2630b93a
3
.gitignore
vendored
3
.gitignore
vendored
@ -1,4 +1,5 @@
|
|||||||
*.esproj
|
build/node_modules/
|
||||||
|
build/bower_components/
|
||||||
|
|
||||||
php/config.php
|
php/config.php
|
||||||
data/config.php
|
data/config.php
|
||||||
|
檔案差異因為一行或多行太長而無法顯示
檔案差異因為一行或多行太長而無法顯示
檔案差異因為一行或多行太長而無法顯示
@ -276,7 +276,7 @@ album = {
|
|||||||
|
|
||||||
if ($(".message input.text").length>0&&$(".message input.text").val().length>0) {
|
if ($(".message input.text").length>0&&$(".message input.text").val().length>0) {
|
||||||
|
|
||||||
params = "setAlbumPublic&albumID=" + albumID + "&password=" + hex_md5($(".message input.text").val());
|
params = "setAlbumPublic&albumID=" + albumID + "&password=" + md5($(".message input.text").val());
|
||||||
album.json.password = true;
|
album.json.password = true;
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
@ -113,7 +113,7 @@ var lychee = {
|
|||||||
login: function() {
|
login: function() {
|
||||||
|
|
||||||
var user = $("input#username").val(),
|
var user = $("input#username").val(),
|
||||||
password = hex_md5($("input#password").val()),
|
password = md5($("input#password").val()),
|
||||||
params;
|
params;
|
||||||
|
|
||||||
params = "login&user=" + user + "&password=" + password;
|
params = "login&user=" + user + "&password=" + password;
|
||||||
|
@ -22,7 +22,7 @@ password = {
|
|||||||
view.album.password();
|
view.album.password();
|
||||||
}
|
}
|
||||||
|
|
||||||
params = "setAlbumPassword&albumID=" + albumID + "&password=" + hex_md5($(".message input.text").val());
|
params = "setAlbumPassword&albumID=" + albumID + "&password=" + md5($(".message input.text").val());
|
||||||
lychee.api(params, function(data) {
|
lychee.api(params, function(data) {
|
||||||
|
|
||||||
if (data!==true) lychee.error(null, params, data);
|
if (data!==true) lychee.error(null, params, data);
|
||||||
@ -58,11 +58,11 @@ password = {
|
|||||||
} else {
|
} else {
|
||||||
|
|
||||||
// Check password
|
// Check password
|
||||||
params = "checkAlbumAccess&albumID=" + albumID + "&password=" + hex_md5(passwd);
|
params = "checkAlbumAccess&albumID=" + albumID + "&password=" + md5(passwd);
|
||||||
lychee.api(params, function(data) {
|
lychee.api(params, function(data) {
|
||||||
|
|
||||||
if (data===true) {
|
if (data===true) {
|
||||||
password.value = hex_md5(passwd);
|
password.value = md5(passwd);
|
||||||
callback();
|
callback();
|
||||||
} else {
|
} else {
|
||||||
lychee.goto("");
|
lychee.goto("");
|
||||||
|
@ -45,14 +45,14 @@ search = {
|
|||||||
else if (photosData==="") code = build.divider("Albums")+albumsData;
|
else if (photosData==="") code = build.divider("Albums")+albumsData;
|
||||||
else code = build.divider("Photos")+photosData+build.divider("Albums")+albumsData;
|
else code = build.divider("Photos")+photosData+build.divider("Albums")+albumsData;
|
||||||
|
|
||||||
if (search.code!==hex_md5(code)) {
|
if (search.code!==md5(code)) {
|
||||||
|
|
||||||
$(".no_content").remove();
|
$(".no_content").remove();
|
||||||
|
|
||||||
lychee.animate(".album, .photo", "contentZoomOut");
|
lychee.animate(".album, .photo", "contentZoomOut");
|
||||||
lychee.animate(".divider", "fadeOut");
|
lychee.animate(".divider", "fadeOut");
|
||||||
|
|
||||||
search.code = hex_md5(code);
|
search.code = md5(code);
|
||||||
|
|
||||||
setTimeout(function() {
|
setTimeout(function() {
|
||||||
|
|
||||||
|
@ -113,7 +113,7 @@ var settings = {
|
|||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
params = "setLogin&username=" + escape(username) + "&password=" + hex_md5(password);
|
params = "setLogin&username=" + escape(username) + "&password=" + md5(password);
|
||||||
lychee.api(params, function(data) {
|
lychee.api(params, function(data) {
|
||||||
|
|
||||||
if (data!==true) {
|
if (data!==true) {
|
||||||
@ -173,7 +173,7 @@ var settings = {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
params = "setLogin&oldPassword=" + hex_md5(old_password) + "&username=" + escape(username) + "&password=" + hex_md5(password);
|
params = "setLogin&oldPassword=" + md5(old_password) + "&username=" + escape(username) + "&password=" + md5(password);
|
||||||
lychee.api(params, function(data) {
|
lychee.api(params, function(data) {
|
||||||
|
|
||||||
if (data!==true) lychee.error(null, params, data);
|
if (data!==true) lychee.error(null, params, data);
|
||||||
|
2
assets/min/main.css
Normal file
2
assets/min/main.css
Normal file
檔案差異因為一行或多行太長而無法顯示
7
assets/min/main.js
Normal file
7
assets/min/main.js
Normal file
檔案差異因為一行或多行太長而無法顯示
81
build/Gruntfile.coffee
Normal file
81
build/Gruntfile.coffee
Normal file
@ -0,0 +1,81 @@
|
|||||||
|
module.exports = (grunt) ->
|
||||||
|
|
||||||
|
grunt.initConfig
|
||||||
|
|
||||||
|
pkg: grunt.file.readJSON 'package.json'
|
||||||
|
|
||||||
|
concat:
|
||||||
|
|
||||||
|
js:
|
||||||
|
options:
|
||||||
|
separator: "\n"
|
||||||
|
src: [
|
||||||
|
'bower_components/jQuery/dist/jquery.min.js'
|
||||||
|
'bower_components/js-md5/js/md5.min.js'
|
||||||
|
'bower_components/mousetrap/mousetrap.min.js'
|
||||||
|
'bower_components/mousetrap/plugins/global-bind/mousetrap-global-bind.min.js'
|
||||||
|
'../assets/js/*.js'
|
||||||
|
]
|
||||||
|
dest: '../assets/min/main.js'
|
||||||
|
|
||||||
|
css:
|
||||||
|
options:
|
||||||
|
separator: "\n"
|
||||||
|
src: [
|
||||||
|
'../assets/css/*.css'
|
||||||
|
]
|
||||||
|
dest: '../assets/min/main.css'
|
||||||
|
|
||||||
|
uglify:
|
||||||
|
|
||||||
|
assets:
|
||||||
|
options:
|
||||||
|
banner: '/*! <%= pkg.name %> <%= pkg.version %> | <%= grunt.template.today("yyyy-mm-dd") %> */\n'
|
||||||
|
files:
|
||||||
|
'../assets/min/main.js': '../assets/min/main.js'
|
||||||
|
|
||||||
|
cssmin:
|
||||||
|
|
||||||
|
assets:
|
||||||
|
options:
|
||||||
|
banner: '/*! <%= pkg.name %> <%= pkg.version %> | <%= grunt.template.today("yyyy-mm-dd") %> */'
|
||||||
|
files:
|
||||||
|
'../assets/min/main.css': '../assets/min/main.css'
|
||||||
|
|
||||||
|
watch:
|
||||||
|
|
||||||
|
js:
|
||||||
|
files: [
|
||||||
|
'../assets/js/*.js'
|
||||||
|
]
|
||||||
|
tasks: ['js']
|
||||||
|
options:
|
||||||
|
spawn: false
|
||||||
|
interrupt: true
|
||||||
|
|
||||||
|
css:
|
||||||
|
files: [
|
||||||
|
'../assets/css/*.css'
|
||||||
|
]
|
||||||
|
tasks: ['css']
|
||||||
|
options:
|
||||||
|
spawn: false
|
||||||
|
interrupt: true
|
||||||
|
|
||||||
|
require('load-grunt-tasks')(grunt)
|
||||||
|
|
||||||
|
grunt.registerTask 'default', ->
|
||||||
|
grunt.task.run [
|
||||||
|
'js'
|
||||||
|
'css'
|
||||||
|
]
|
||||||
|
|
||||||
|
grunt.registerTask 'js', [
|
||||||
|
'concat:js'
|
||||||
|
'uglify:assets'
|
||||||
|
]
|
||||||
|
|
||||||
|
grunt.registerTask 'css', [
|
||||||
|
'concat:css'
|
||||||
|
'cssmin:assets'
|
||||||
|
]
|
8
build/bower.json
Normal file
8
build/bower.json
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
{
|
||||||
|
"name": "Lychee",
|
||||||
|
"dependencies": {
|
||||||
|
"jQuery": "~2.1.0",
|
||||||
|
"js-md5": "~1.1.0",
|
||||||
|
"mousetrap": "~1.4.6"
|
||||||
|
}
|
||||||
|
}
|
21
build/package.json
Normal file
21
build/package.json
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
{
|
||||||
|
"name": "Lychee",
|
||||||
|
"version": "2.1.1",
|
||||||
|
"description": "Self-hosted photo-management done right.",
|
||||||
|
"authors": "Tobias Reich <tobias.reich.ich@gmail.com>",
|
||||||
|
"license": "MIT",
|
||||||
|
"repository": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/electerious/Lychee.git"
|
||||||
|
},
|
||||||
|
"devDependencies": {
|
||||||
|
"grunt": "~0.4.2",
|
||||||
|
"grunt-contrib-uglify": "~0.4.0",
|
||||||
|
"grunt-contrib-concat": "~0.3.0",
|
||||||
|
"grunt-contrib-coffee": "~0.10.1",
|
||||||
|
"grunt-contrib-cssmin": "~0.9.0",
|
||||||
|
"grunt-contrib-clean": "~0.5.0",
|
||||||
|
"grunt-contrib-watch": "~0.6.0",
|
||||||
|
"load-grunt-tasks": "~0.4.0"
|
||||||
|
}
|
||||||
|
}
|
44
index.html
44
index.html
@ -9,25 +9,8 @@
|
|||||||
<meta name="keywords" content="">
|
<meta name="keywords" content="">
|
||||||
<meta name="description" content="">
|
<meta name="description" content="">
|
||||||
|
|
||||||
<!-- Development
|
<!-- CSS -->
|
||||||
<link type="text/css" rel="stylesheet" href="assets/css/_reset.css">
|
<link type="text/css" rel="stylesheet" href="assets/min/main.css">
|
||||||
<link type="text/css" rel="stylesheet" href="assets/css/upload.css">
|
|
||||||
<link type="text/css" rel="stylesheet" href="assets/css/tooltip.css">
|
|
||||||
<link type="text/css" rel="stylesheet" href="assets/css/misc.css">
|
|
||||||
<link type="text/css" rel="stylesheet" href="assets/css/message.css">
|
|
||||||
<link type="text/css" rel="stylesheet" href="assets/css/mediaquery.css">
|
|
||||||
<link type="text/css" rel="stylesheet" href="assets/css/loading.css">
|
|
||||||
<link type="text/css" rel="stylesheet" href="assets/css/infobox.css">
|
|
||||||
<link type="text/css" rel="stylesheet" href="assets/css/imageview.css">
|
|
||||||
<link type="text/css" rel="stylesheet" href="assets/css/header.css">
|
|
||||||
<link type="text/css" rel="stylesheet" href="assets/css/font.css">
|
|
||||||
<link type="text/css" rel="stylesheet" href="assets/css/contextmenu.css">
|
|
||||||
<link type="text/css" rel="stylesheet" href="assets/css/content.css">
|
|
||||||
<link type="text/css" rel="stylesheet" href="assets/css/animations.css">
|
|
||||||
<link type="text/css" rel="stylesheet" href="assets/css/multiselect.css"> -->
|
|
||||||
|
|
||||||
<!-- Production -->
|
|
||||||
<link type="text/css" rel="stylesheet" href="assets/build/main.css">
|
|
||||||
|
|
||||||
<link rel="shortcut icon" href="favicon.ico">
|
<link rel="shortcut icon" href="favicon.ico">
|
||||||
<link rel="apple-touch-icon" href="assets/img/apple-touch-icon-iphone.png" sizes="120x120">
|
<link rel="apple-touch-icon" href="assets/img/apple-touch-icon-iphone.png" sizes="120x120">
|
||||||
@ -95,27 +78,8 @@
|
|||||||
<input id="upload_files" type="file" name="fileElem[]" multiple accept="image/*">
|
<input id="upload_files" type="file" name="fileElem[]" multiple accept="image/*">
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Development
|
<!-- JS -->
|
||||||
<script defer type="text/javascript" src="assets/js/_frameworks.js"></script>
|
<script async type="text/javascript" src="assets/min/main.js"></script>
|
||||||
<script defer type="text/javascript" src="assets/js/init.js"></script>
|
|
||||||
<script defer type="text/javascript" src="assets/js/lychee.js"></script>
|
|
||||||
<script defer type="text/javascript" src="assets/js/build.js"></script>
|
|
||||||
<script defer type="text/javascript" src="assets/js/settings.js"></script>
|
|
||||||
<script defer type="text/javascript" src="assets/js/upload.js"></script>
|
|
||||||
<script defer type="text/javascript" src="assets/js/view.js"></script>
|
|
||||||
<script defer type="text/javascript" src="assets/js/password.js"></script>
|
|
||||||
<script defer type="text/javascript" src="assets/js/modal.js"></script>
|
|
||||||
<script defer type="text/javascript" src="assets/js/album.js"></script>
|
|
||||||
<script defer type="text/javascript" src="assets/js/albums.js"></script>
|
|
||||||
<script defer type="text/javascript" src="assets/js/photo.js"></script>
|
|
||||||
<script defer type="text/javascript" src="assets/js/visible.js"></script>
|
|
||||||
<script defer type="text/javascript" src="assets/js/loadingBar.js"></script>
|
|
||||||
<script defer type="text/javascript" src="assets/js/contextMenu.js"></script>
|
|
||||||
<script defer type="text/javascript" src="assets/js/search.js"></script>
|
|
||||||
<script defer type="text/javascript" src="assets/js/multiselect.js"></script> -->
|
|
||||||
|
|
||||||
<!-- Production -->
|
|
||||||
<script async type="text/javascript" src="assets/build/main.js"></script>
|
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
載入中…
新增問題並參考
Block a user