aboutsummaryrefslogtreecommitdiff
path: root/client/js/models
diff options
context:
space:
mode:
authorShyam Sunder2018-07-05 19:25:08 -0400
committerMarcin Kurczewski2018-07-06 19:40:20 +0200
commit60ab9246c66cba422ccd79592173a0791817e45b (patch)
tree210552a517f2b7326b2664576f3d6d14519bdded /client/js/models
parent3972b902d840e54bd4f8dd47a9d13bc20ee22c65 (diff)
client: improved build.js, use relative links
* Removed unnecessary require('config.js') calls * 'markdown.js' now uses rel. links in EntityPermalinkWrapper * 'password_reset.py' now generates rel. links * Removed 'Base URL' config parameter * Removed 'API URL' config parameter * 'build.js' no longer reads/requires config.yaml * Updated documentation * Removed unnecessary node packages used in 'build.js' abandon api_url parameter
Diffstat (limited to 'client/js/models')
-rw-r--r--client/js/models/post.js2
-rw-r--r--client/js/models/post_list.js1
2 files changed, 2 insertions, 1 deletions
diff --git a/client/js/models/post.js b/client/js/models/post.js
index c575066..be0230c 100644
--- a/client/js/models/post.js
+++ b/client/js/models/post.js
@@ -30,6 +30,7 @@ class Post extends events.EventTarget {
get user() { return this._user; }
get safety() { return this._safety; }
get contentUrl() { return this._contentUrl; }
+ get fullContentUrl() { return this._fullContentUrl; }
get thumbnailUrl() { return this._thumbnailUrl; }
get canvasWidth() { return this._canvasWidth || 800; }
get canvasHeight() { return this._canvasHeight || 450; }
@@ -275,6 +276,7 @@ class Post extends events.EventTarget {
_user: response.user,
_safety: response.safety,
_contentUrl: response.contentUrl,
+ _fullContentUrl: new URL(response.contentUrl, window.location.href).href,
_thumbnailUrl: response.thumbnailUrl,
_canvasWidth: response.canvasWidth,
_canvasHeight: response.canvasHeight,
diff --git a/client/js/models/post_list.js b/client/js/models/post_list.js
index 2bfd056..74f089f 100644
--- a/client/js/models/post_list.js
+++ b/client/js/models/post_list.js
@@ -1,7 +1,6 @@
'use strict';
const settings = require('../models/settings.js');
-const config = require('../config.js');
const api = require('../api.js');
const uri = require('../util/uri.js');
const AbstractList = require('./abstract_list.js');

© 2015 - 2026 Jakob L. Kreuze