@@ -85,20 +85,22 @@ module.exports = React.createClass({
|
||||
var postFiles = [];
|
||||
var images = [];
|
||||
if (filenames) {
|
||||
for (var i = 0; i < filenames.length && i < Constants.MAX_DISPLAY_FILES; i++) {
|
||||
for (var i = 0; i < filenames.length; i++) {
|
||||
var fileInfo = utils.splitFileLocation(filenames[i]);
|
||||
if (Object.keys(fileInfo).length === 0) continue;
|
||||
|
||||
var type = utils.getFileType(fileInfo.ext);
|
||||
|
||||
if (type === "image") {
|
||||
postFiles.push(
|
||||
<div className="post-image__column" key={filenames[i]}>
|
||||
<a href="#" onClick={this.handleImageClick} data-img-id={images.length.toString()} data-toggle="modal" data-target={"#" + postImageModalId }><div ref={filenames[i]} className="post__load" style={{backgroundImage: 'url(/static/images/load.gif)'}}></div></a>
|
||||
</div>
|
||||
);
|
||||
if (i < Constants.MAX_DISPLAY_FILES) {
|
||||
postFiles.push(
|
||||
<div className="post-image__column" key={filenames[i]}>
|
||||
<a href="#" onClick={this.handleImageClick} data-img-id={images.length.toString()} data-toggle="modal" data-target={"#" + postImageModalId }><div ref={filenames[i]} className="post__load" style={{backgroundImage: 'url(/static/images/load.gif)'}}></div></a>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
images.push(filenames[i]);
|
||||
} else {
|
||||
} else if (i < Constants.MAX_DISPLAY_FILES) {
|
||||
postFiles.push(
|
||||
<div className="post-image__column custom-file" key={fileInfo.name}>
|
||||
<a href={fileInfo.path+"."+fileInfo.ext} download={fileInfo.name+"."+fileInfo.ext}>
|
||||
|
||||
@@ -1056,7 +1056,7 @@ var AppearanceTab = React.createClass({
|
||||
|
||||
themeSection = (
|
||||
<SettingItemMax
|
||||
title="Theme"
|
||||
title="Theme Color"
|
||||
inputs={inputs}
|
||||
submit={this.submitTheme}
|
||||
server_error={server_error}
|
||||
@@ -1066,7 +1066,7 @@ var AppearanceTab = React.createClass({
|
||||
} else {
|
||||
themeSection = (
|
||||
<SettingItemMin
|
||||
title="Theme"
|
||||
title="Theme Color"
|
||||
describe={this.state.theme}
|
||||
updateSection={function(){self.props.updateSection("theme");}}
|
||||
/>
|
||||
|
||||
@@ -61,6 +61,7 @@ module.exports = {
|
||||
"channel",
|
||||
"internal",
|
||||
"localhost",
|
||||
"dockerhost",
|
||||
"stag",
|
||||
"post",
|
||||
"cluster",
|
||||
|
||||
@@ -28,6 +28,9 @@ module.exports.isTestDomain = function() {
|
||||
if ((/^localhost/).test(window.location.hostname))
|
||||
return true;
|
||||
|
||||
if ((/^dockerhost/).test(window.location.hostname))
|
||||
return true;
|
||||
|
||||
if ((/^test/).test(window.location.hostname))
|
||||
return true;
|
||||
|
||||
@@ -75,8 +78,14 @@ module.exports.getDomainWithOutSub = function() {
|
||||
|
||||
var parts = window.location.host.split(".");
|
||||
|
||||
if (parts.length == 1)
|
||||
return "localhost:8065";
|
||||
if (parts.length == 1) {
|
||||
if (parts[0].indexOf("dockerhost") > -1) {
|
||||
return "dockerhost:8065";
|
||||
}
|
||||
else {
|
||||
return "localhost:8065";
|
||||
}
|
||||
}
|
||||
|
||||
return parts[1] + "." + parts[2];
|
||||
}
|
||||
|
||||
Ссылка в новой задаче
Block a user