From cba34c1ff3fc4fa3e4444884133a9140443bb233 Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Wed, 30 May 2018 14:37:03 +0200 Subject: parse urls using the old parser --- public/assets/css/css.css | 61 ++-- public/assets/img/audio-thumbnail.png | Bin 0 -> 29403 bytes public/assets/img/video-thumbnail.png | Bin 0 -> 25510 bytes public/bundle.js | 593 ++++++++++++++++++++++++++++++++-- public/bundle.js.map | 2 +- 5 files changed, 600 insertions(+), 56 deletions(-) create mode 100644 public/assets/img/audio-thumbnail.png create mode 100644 public/assets/img/video-thumbnail.png (limited to 'public') diff --git a/public/assets/css/css.css b/public/assets/css/css.css index 014fa83..7fa6676 100644 --- a/public/assets/css/css.css +++ b/public/assets/css/css.css @@ -50,6 +50,17 @@ h3 { display: flex; flex-direction: column; } +.rows { + margin-bottom: 10px; +} +.rows .row { + width: 100%; +} +.rows .row > div { + padding: 3px; + overflow: hidden; + text-overflow: ellipsis; +} .app { display: flex; @@ -88,6 +99,21 @@ h3 { .group h3 { margin-bottom: 3px; } +.gray { + color: #888; + opacity: 0.5; +} + +.heading { + width: 100%; + margin-bottom: 10px; +} +.row .heading, +.col .heading { + margin-bottom: 3px; + align-items: center; + justify-content: space-between; +} .paramGroup > label { display: flex; flex-direction: row; @@ -141,28 +167,8 @@ h3 { .fileUpload button { pointer-events: none; } -.gray { - color: #888; - opacity: 0.5; -} -/* dashboard */ - -.heading { - width: 100%; - margin-bottom: 10px; -} -.rows { - margin-bottom: 10px; -} -.rows .row { - width: 100%; -} -.rows .row > div { - padding: 3px; - overflow: hidden; - text-overflow: ellipsis; -} +/* file list */ .filelist { border: 1px solid #d0d0e0; margin-top: 3px; } .filelist .file:nth-child(odd) { background-color: #e6f0f0; } .desktop .filelist .file:nth-child(odd):hover { background-color: #d8e0ec; color: #000000; } @@ -184,6 +190,7 @@ h3 { .filelist .date { width: 100px; } + .rows .row .link { color: #13f; text-decoration: none; @@ -198,6 +205,8 @@ h3 { text-align: right; width: 100px; } + +/* semitransparent bg on datasets */ .rows .row .dataset { width: 200px; border-left: 1px solid #c8c0c0; @@ -207,6 +216,8 @@ h3 { .rows .row:last-child .dataset { border-bottom: 1px solid #c8c0c0; } .rows .row:nth-child(even) .dataset { background-color: rgba(10,13,18,0.1); } .rows .row:nth-child(odd) .dataset { background-color: rgba(10,13,18,0.05); } + +/* gallery */ .gallery { margin-top: 10px; display: flex; @@ -217,6 +228,14 @@ h3 { margin-right: 10px; } +/* bucky bogart.css color shading :) */ +.new { color: #000000; font-weight: bold; } +.recent { color: #001111; } +.med { color: #203838; } +.old { color: #425050; } +.older { color: #5D6464; } +.quiet { color: #787878; } + /* system */ .screen { width: 600px; diff --git a/public/assets/img/audio-thumbnail.png b/public/assets/img/audio-thumbnail.png new file mode 100644 index 0000000..90facb8 Binary files /dev/null and b/public/assets/img/audio-thumbnail.png differ diff --git a/public/assets/img/video-thumbnail.png b/public/assets/img/video-thumbnail.png new file mode 100644 index 0000000..a129916 Binary files /dev/null and b/public/assets/img/video-thumbnail.png differ diff --git a/public/bundle.js b/public/bundle.js index b788ccc..a5fe85b 100644 --- a/public/bundle.js +++ b/public/bundle.js @@ -387,7 +387,7 @@ var upload_action = exports.upload_action = function upload_action(type, id, fd) Object.defineProperty(exports, "__esModule", { value: true }); -exports.actions = undefined; +exports.actions = exports.parser = exports.util = undefined; var _crud = __webpack_require__(/*! ./crud.actions */ "./app/client/api/crud.actions.js"); @@ -395,6 +395,10 @@ var _util = __webpack_require__(/*! ./util */ "./app/client/api/util.js"); var util = _interopRequireWildcard(_util); +var _parser = __webpack_require__(/*! ./parser */ "./app/client/api/parser.js"); + +var parser = _interopRequireWildcard(_parser); + function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } /* @@ -410,12 +414,367 @@ so you can do ... folderActions.upload(12, form_data) */ +exports.util = util; +exports.parser = parser; var actions = exports.actions = ['folder', 'file', 'dataset', 'task', 'user'].reduce(function (a, b) { return (a[b] = (0, _crud.crud_actions)(b)) && a; }, {}); /***/ }), +/***/ "./app/client/api/parser.js": +/*!**********************************!*\ + !*** ./app/client/api/parser.js ***! + \**********************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.tumblr = exports.thumbnail = exports.loadImage = exports.tag = exports.parse = exports.lookup = exports.integrations = undefined; + +var _nodeFetch = __webpack_require__(/*! node-fetch */ "./node_modules/node-fetch/browser.js"); + +var _nodeFetch2 = _interopRequireDefault(_nodeFetch); + +var _fetchJsonp = __webpack_require__(/*! fetch-jsonp */ "./node_modules/fetch-jsonp/build/fetch-jsonp.js"); + +var _fetchJsonp2 = _interopRequireDefault(_fetchJsonp); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var integrations = exports.integrations = [{ + type: 'image', + regex: /\.(jpeg|jpg|gif|png|svg)(\?.*)?$/i, + fetch: function fetch(url, done) { + var img = new Image(); + img.onload = function () { + if (!img) return; + var width = img.naturalWidth, + height = img.naturalHeight; + img = null; + done({ + url: url, + type: "image", + token: "", + thumbnail: "", + title: "", + width: width, + height: height + }); + }; + img.src = url; + if (img.complete) { + img.onload(); + } + }, + tag: function tag(media) { + return ''; + } +}, { + type: 'video', + regex: /\.(mp4|webm)(\?.*)?$/i, + fetch: function fetch(url, done) { + var video = document.createElement("video"); + var url_parts = url.replace(/\?.*$/, "").split("/"); + var filename = url_parts[url_parts.length - 1]; + video.addEventListener("loadedmetadata", function () { + var width = video.videoWidth, + height = video.videoHeight; + video = null; + done({ + url: url, + type: "video", + token: url, + thumbnail: "/public/assets/img/video-thumbnail.png", + title: filename, + width: width, + height: height + }); + }); + video.src = url; + video.load(); + }, + tag: function tag(media) { + return '