Restructuring folders [ Broken ]
This commit is contained in:
1 parent
36b7b8629e
commit
776395520d
148 files changed
+238
-198
No files matched your search
@@ -1,20 +1,22 @@
|
|||||||
{
|
{
|
||||||
"presets": [
|
"presets": [
|
||||||
["env", {
|
[
|
||||||
"targets": {
|
"@babel/preset-env",
|
||||||
"node": "current",
|
{
|
||||||
"browsers": [
|
"targets": {
|
||||||
"Chrome >= 41",
|
"node": "current",
|
||||||
"FireFox >= 44",
|
"browsers": [
|
||||||
"Safari >= 7",
|
"Chrome >= 41",
|
||||||
"Explorer 11",
|
"FireFox >= 44",
|
||||||
"last 4 Edge versions"
|
"Safari >= 7",
|
||||||
]
|
"Explorer 11",
|
||||||
},
|
"last 4 Edge versions"
|
||||||
"useBuiltIns": false
|
]
|
||||||
}],
|
},
|
||||||
"react",
|
"useBuiltIns": false
|
||||||
"babel-polyfill"
|
}
|
||||||
|
],
|
||||||
|
"@babel/preset-react"
|
||||||
],
|
],
|
||||||
"ignore": [
|
"ignore": [
|
||||||
"node_modules"
|
"node_modules"
|
||||||
|
|||||||
+32
-30
@@ -26,45 +26,47 @@
|
|||||||
},
|
},
|
||||||
"homepage": "https://github.com/YourWishes/domsPlaceNew#readme",
|
"homepage": "https://github.com/YourWishes/domsPlaceNew#readme",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"babel-core": "^6.26.3",
|
"@babel/core": "^7.1.2",
|
||||||
"babel-loader": "^7.1.4",
|
"@babel/polyfill": "^7.0.0",
|
||||||
"babel-polyfill": "^6.26.0",
|
"@babel/preset-env": "^7.1.0",
|
||||||
"babel-preset-env": "^1.7.0",
|
"@babel/preset-react": "^7.0.0",
|
||||||
"babel-preset-react": "^6.24.1",
|
"babel-loader": "^8.0.4",
|
||||||
"body-parser": "^1.18.3",
|
"body-parser": "^1.18.3",
|
||||||
"compression-webpack-plugin": "^1.1.11",
|
"compression-webpack-plugin": "^2.0.0",
|
||||||
"css-loader": "^0.28.11",
|
"css-loader": "^1.0.0",
|
||||||
"express": "^4.16.3",
|
"express": "^4.16.4",
|
||||||
"file-loader": "^1.1.11",
|
"file-loader": "^2.0.0",
|
||||||
"html-webpack-plugin": "^3.2.0",
|
"html-webpack-plugin": "^3.2.0",
|
||||||
"jimp": "^0.2.28",
|
"jimp": "^0.5.4",
|
||||||
"mini-css-extract-plugin": "^0.4.1",
|
"mini-css-extract-plugin": "^0.4.4",
|
||||||
"node-sass": "^4.9.0",
|
"node-cache": "^4.2.0",
|
||||||
"nodemailer": "^4.6.7",
|
"node-sass": "^4.9.4",
|
||||||
"optimize-css-assets-webpack-plugin": "^4.0.3",
|
"nodemailer": "^4.6.8",
|
||||||
"pg-promise": "^8.4.4",
|
"optimize-css-assets-webpack-plugin": "^5.0.1",
|
||||||
"react": "^16.4.0",
|
"pg-promise": "^8.5.1",
|
||||||
"react-dom": "^16.4.0",
|
"react": "^16.5.2",
|
||||||
|
"react-dom": "^16.5.2",
|
||||||
"react-helmet": "^5.2.0",
|
"react-helmet": "^5.2.0",
|
||||||
"react-redux": "^5.0.7",
|
"react-redux": "^5.0.7",
|
||||||
"react-router": "^4.3.1",
|
"react-router": "^4.3.1",
|
||||||
"react-router-dom": "^4.3.1",
|
"react-router-dom": "^4.3.1",
|
||||||
"react-tap-event-plugin": "^3.0.3",
|
"react-tap-event-plugin": "^3.0.3",
|
||||||
"react-transition-group": "^2.3.1",
|
"react-transition-group": "^2.5.0",
|
||||||
"redux": "^4.0.0",
|
"redux": "^4.0.1",
|
||||||
|
"redux-logger": "^3.0.6",
|
||||||
"responsive-loader": "^1.1.0",
|
"responsive-loader": "^1.1.0",
|
||||||
"sanitize-html": "^1.18.2",
|
"sanitize-html": "^1.19.1",
|
||||||
"sass-loader": "^7.0.3",
|
"sass-loader": "^7.1.0",
|
||||||
"sharp": "^0.20.5",
|
"sharp": "^0.21.0",
|
||||||
"style-loader": "^0.21.0",
|
"style-loader": "^0.23.1",
|
||||||
"uglifyjs-webpack-plugin": "^1.2.7",
|
"uglifyjs-webpack-plugin": "^2.0.1",
|
||||||
"url-loader": "^1.0.1",
|
"url-loader": "^1.1.2",
|
||||||
"webpack": "^4.14.0"
|
"webpack": "^4.22.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"nodemon": "^1.17.5",
|
"nodemon": "^1.18.4",
|
||||||
"react-hot-loader": "^4.3.3",
|
"react-hot-loader": "^4.3.11",
|
||||||
"webpack-cli": "^3.0.8",
|
"webpack-cli": "^3.1.2",
|
||||||
"webpack-dev-server": "^3.1.4"
|
"webpack-dev-server": "^3.1.9"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
+33
-30
@@ -23,8 +23,7 @@
|
|||||||
|
|
||||||
//Imports
|
//Imports
|
||||||
const
|
const
|
||||||
path = require('path'),
|
Configuration = require('./../config/Configuration'),
|
||||||
ConfigurationManager = require('./../configuration/ConfigurationManager'),
|
|
||||||
DatabaseConnection = require('./../database/DatabaseConnection'),
|
DatabaseConnection = require('./../database/DatabaseConnection'),
|
||||||
Server = require('./../server/Server'),
|
Server = require('./../server/Server'),
|
||||||
Email = require('./../email/Email')
|
Email = require('./../email/Email')
|
||||||
@@ -35,45 +34,44 @@ const PUBLIC_PATH = path.join(__dirname, '..', '..', 'dist');
|
|||||||
|
|
||||||
class App {
|
class App {
|
||||||
constructor() {
|
constructor() {
|
||||||
|
this.config = new Configuration(this);
|
||||||
|
this.database = new DatabaseConnection(this);
|
||||||
|
this.server = new Server(this);
|
||||||
|
this.email = new Email(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
getConfig() { return this.config; }
|
getConfig() { return this.config; }
|
||||||
getDatabase() { return this.db; }
|
getDatabase() { return this.database; }
|
||||||
getPublicDirectory() { return PUBLIC_PATH; }
|
|
||||||
getServer() { return this.server; }
|
getServer() { return this.server; }
|
||||||
getAPI() { return this.getServer().getAPI(); }
|
|
||||||
getEmail() {return this.email;}
|
getEmail() {return this.email;}
|
||||||
|
|
||||||
//Primary Functions
|
//Primary Functions
|
||||||
async start() {
|
async init() {
|
||||||
//First, load our configuration.
|
this.log('Starting App...');
|
||||||
|
|
||||||
|
//Load configuration...
|
||||||
|
this.log('Reading Configuration...');
|
||||||
try {
|
try {
|
||||||
console.log("Loading Configuration...");
|
await this.config.loadConfig();
|
||||||
this.config = new ConfigurationManager(this);
|
|
||||||
this.config.loadConfig();
|
|
||||||
console.log("...Done!");
|
|
||||||
} catch(e) {
|
} catch(e) {
|
||||||
console.error("Failed to read config!");
|
this.error('Failed to load configuration!');
|
||||||
throw new Error(e);
|
this.error(e);
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
//Next, connect to the database.
|
//Connect to the Database
|
||||||
|
this.log('Connecting to the Database...');
|
||||||
try {
|
try {
|
||||||
console.log("Connecting to database...");
|
await this.database.connect();
|
||||||
this.db = new DatabaseConnection(this);
|
|
||||||
this.db.loadQueries();//Load our prepared queries
|
|
||||||
await this.db.connect();//Connect to the DB.
|
|
||||||
console.log("...Done!");
|
|
||||||
} catch(e) {
|
} catch(e) {
|
||||||
console.error("Failed to connect to the database!");
|
this.error('Failed to connect to database!');
|
||||||
throw new Error(e);
|
this.error(e);
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
//Connect to our SMTP Host (For sending mail)
|
//Connect to our SMTP Host (For sending mail)
|
||||||
try {
|
try {
|
||||||
console.log('Connecting to SMTP Server');
|
this.log('Connecting to SMTP Server');
|
||||||
this.email = new Email(this);
|
|
||||||
await this.email.connect();
|
await this.email.connect();
|
||||||
console.log('...Done');
|
console.log('...Done');
|
||||||
} catch(e) {
|
} catch(e) {
|
||||||
@@ -84,19 +82,24 @@ class App {
|
|||||||
//Now we need to start the server. This provides both a nice interface, as
|
//Now we need to start the server. This provides both a nice interface, as
|
||||||
//well as our API Handler (including 2auth callback urls)
|
//well as our API Handler (including 2auth callback urls)
|
||||||
try {
|
try {
|
||||||
console.log("Starting Server...");
|
this.log("Starting Server...");
|
||||||
this.server = new Server(this);
|
|
||||||
await this.server.start();
|
await this.server.start();
|
||||||
console.log("...Done!");
|
console.log("...Done!");
|
||||||
} catch(e) {
|
} catch(e) {
|
||||||
console.error("Failed to start the server!");
|
console.error("Failed to start the server!");
|
||||||
throw new Error(e);
|
throw new Error(e);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//Database Specific
|
// Logging Functions //
|
||||||
onDatabaseConnected(db) { }
|
log(e) {
|
||||||
|
//Will allow for extra logging
|
||||||
|
console.log(e)
|
||||||
|
}
|
||||||
|
|
||||||
|
error(e) {
|
||||||
|
console.error(e);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
module.exports = App;
|
module.exports = App;
|
||||||
+27
-20
@@ -21,52 +21,59 @@
|
|||||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
|
||||||
|
const fs = require('fs');
|
||||||
|
const CONFIG_PATH = './private/data/config.json';// TODO: Set this a... better way?
|
||||||
|
|
||||||
//Imports
|
class Configuration {
|
||||||
const fs = require('fs');//Used for file based configurations (local testing)
|
|
||||||
const CONFIG_PATH = './private/data/config.json';// TODO: Set this a different way?
|
|
||||||
|
|
||||||
//Constructor
|
|
||||||
class ConfigurationManager {
|
|
||||||
constructor(app) {
|
constructor(app) {
|
||||||
this.app = app;
|
this.app = app;
|
||||||
this.data = {};
|
this.data = {};
|
||||||
|
this.isHeroku = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
loadConfig() {
|
getApp() { return this.app; }
|
||||||
//Is this a Heroku Server? I need a nicer way of doing this in the future
|
|
||||||
let process_variables = process.env;
|
async loadConfig(path) {
|
||||||
|
//First we need to check if this is Heroku or not...
|
||||||
|
let processVariabels = process.env;
|
||||||
this.isHeroku = false;
|
this.isHeroku = false;
|
||||||
if(
|
if(
|
||||||
process_variables !== typeof undefined &&
|
processVariabels !== typeof undefined &&
|
||||||
typeof process_variables.NODE_HOME !== typeof undefined &&
|
typeof processVariabels.NODE_HOME !== typeof undefined &&
|
||||||
process_variables.NODE_HOME.indexOf("heroku") !== -1
|
processVariabels.NODE_HOME.indexOf("heroku") !== -1
|
||||||
) {
|
) {
|
||||||
this.isHeroku = true;
|
this.isHeroku = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
//Read config data
|
//Read config data
|
||||||
if(!this.isHeroku) {
|
if(this.isHeroku) {
|
||||||
|
this.data = processVariabels;
|
||||||
|
} else {
|
||||||
//TODO: Rather than use readSync, convert the whole function to async and use a library like fs-extra for async?
|
//TODO: Rather than use readSync, convert the whole function to async and use a library like fs-extra for async?
|
||||||
let dataRaw = fs.readFileSync(CONFIG_PATH, 'utf8');
|
let dataRaw = fs.readFileSync(CONFIG_PATH, 'utf8');
|
||||||
let data = JSON.parse(dataRaw);
|
let data = JSON.parse(dataRaw);
|
||||||
if(!data) throw new Error("Failed to parse Config JSON! Check for an error and try again.");
|
if(!data) throw new Error("Failed to parse Config JSON! Check for an error and try again.");
|
||||||
this.data = data;
|
this.data = data;
|
||||||
} else {
|
|
||||||
this.data = process_variables;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
getValueOf(key) {
|
has(key) {
|
||||||
|
let value = this.get(key);
|
||||||
|
if(typeof value === typeof undefined) return false;
|
||||||
|
if(!value) return false;
|
||||||
|
return value.length !== 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
get(key) {
|
||||||
if(this.isHeroku) {
|
if(this.isHeroku) {
|
||||||
key = key.replace(/\./g, '_').toUpperCase();
|
key = key.replace(/\./g, '_').toUpperCase();
|
||||||
if(typeof this.data[key] === typeof undefined) return null;
|
if(typeof this.data[key] === typeof undefined) return null;
|
||||||
return this.data[key];
|
return this.data[key];
|
||||||
}
|
}
|
||||||
return this.getValueOfRecursive(key.split("."));
|
return this.getRecursive(key.split("."));
|
||||||
}
|
}
|
||||||
|
|
||||||
getValueOfRecursive(key_array, data_obj) {
|
getRecursive(key_array, data_obj) {
|
||||||
if(typeof data_obj === typeof undefined) data_obj = this.data;
|
if(typeof data_obj === typeof undefined) data_obj = this.data;
|
||||||
if(typeof data_obj === typeof undefined) return null;
|
if(typeof data_obj === typeof undefined) return null;
|
||||||
|
|
||||||
@@ -78,10 +85,10 @@ class ConfigurationManager {
|
|||||||
if(key_array.length > 1) {
|
if(key_array.length > 1) {
|
||||||
if(typeof o !== typeof {}) return null;
|
if(typeof o !== typeof {}) return null;
|
||||||
key_array.shift();
|
key_array.shift();
|
||||||
return this.getValueOfRecursive(key_array, o);
|
return this.getRecursive(key_array, o);
|
||||||
}
|
}
|
||||||
return o;
|
return o;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
module.exports = ConfigurationManager;//Export
|
module.exports = Configuration;
|
||||||
@@ -21,71 +21,57 @@
|
|||||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
|
||||||
const
|
const pgp = require('pg-promise')();
|
||||||
pgp = require('pg-promise')(),
|
const fs = require('fs');
|
||||||
fs = require('fs'),
|
|
||||||
path = require('path')
|
|
||||||
;
|
|
||||||
|
|
||||||
const QUERIES_PATH = 'queries';
|
const QUERIES_DIRECTORY = "queries";
|
||||||
|
|
||||||
class DatabaseConnection {
|
class DatabaseConnection {
|
||||||
constructor(app) {
|
constructor(app) {
|
||||||
this.app = app;
|
this.app = app;
|
||||||
}
|
}
|
||||||
|
|
||||||
getConfig() {return this.app.getConfig();}//Short Hand Method
|
getApp() { return this.app; }
|
||||||
|
getConfig() {return this.getApp().getConfig();}
|
||||||
|
|
||||||
getQueriesPath() {
|
isConnnected() {
|
||||||
return path.join(__dirname, QUERIES_PATH);
|
|
||||||
}
|
|
||||||
|
|
||||||
loadQueries() {
|
|
||||||
//Load Queries
|
|
||||||
let queries = {};
|
|
||||||
|
|
||||||
if(fs.existsSync(this.getQueriesPath())) {
|
|
||||||
let queryFiles = fs.readdirSync(this.getQueriesPath());
|
|
||||||
for(var i = 0; i < queryFiles.length; i++) {
|
|
||||||
let file = queryFiles[i];
|
|
||||||
let x = fs.readFileSync(path.join(this.getQueriesPath(), file), 'utf8');
|
|
||||||
queries[file.replace(".sql", "")] = x;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
this.queries = queries;
|
|
||||||
return queries;
|
|
||||||
}
|
|
||||||
|
|
||||||
isConnected() {
|
|
||||||
return typeof this.db !== typeof undefined;
|
return typeof this.db !== typeof undefined;
|
||||||
}
|
}
|
||||||
|
|
||||||
async connect() {
|
async connect() {
|
||||||
await this.connectThen();
|
//Check Configuration
|
||||||
}
|
if(!this.getConfig().has("database.connection") && !this.getConfig().has("database.url")) throw new Error("Missing Database Connection URL!");
|
||||||
|
|
||||||
async connectThen() {
|
//Load queries into cache
|
||||||
if(this.isConnected()) return true;
|
let queries = {};
|
||||||
|
let types = fs.readdirSync(__dirname + '/' + QUERIES_DIRECTORY);
|
||||||
|
for(let i = 0; i < types.length; i++) {
|
||||||
|
//Now Scan each file in this directory
|
||||||
|
let dir = __dirname + '/' + QUERIES_DIRECTORY + '/' + types[i];
|
||||||
|
let dirContents = fs.readdirSync(dir);
|
||||||
|
for(let x = 0; x < dirContents.length; x++) {
|
||||||
|
//Now read each file within this dir..
|
||||||
|
let filePath = dir + '/' + dirContents[x];
|
||||||
|
console.log(filePath);
|
||||||
|
let query = fs.readFileSync(filePath, 'utf8');
|
||||||
|
|
||||||
if(
|
//Now Save our query as filename minus extension.
|
||||||
!this.getConfig().getValueOf("database.connection")
|
queries[dirContents[x].split('.')[0]] = query;
|
||||||
&& !this.getConfig().getValueOf("database.url")
|
}
|
||||||
) {
|
|
||||||
throw new Error("Missing DB Credentials.");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
this.db = pgp(
|
this.queries = queries;
|
||||||
this.getConfig().getValueOf("database.connection") ||
|
|
||||||
this.getConfig().getValueOf("database.url")
|
|
||||||
);
|
|
||||||
|
|
||||||
//Fire the event
|
//Connect to Database
|
||||||
if(typeof this.app.onDatabaseConnected === "function") {
|
this.db = await pgp( this.getConfig().get("database.connection") || this.getConfig().get("database.url") );
|
||||||
await this.app.onDatabaseConnected(this);
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
//Now run any "Create" queries
|
||||||
|
let keys = Object.keys(queries);
|
||||||
|
for(let i = 0; i < keys.length; i++) {
|
||||||
|
let k = keys[i];
|
||||||
|
if(!k.startsWith("Create")) return;
|
||||||
|
await this.none(k);
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
getQuery(name) {
|
getQuery(name) {
|
||||||
@@ -121,6 +107,6 @@ class DatabaseConnection {
|
|||||||
let x = await this.db.query(q, data);
|
let x = await this.db.query(q, data);
|
||||||
return x;
|
return x;
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
|
|
||||||
module.exports = DatabaseConnection;
|
module.exports = DatabaseConnection;
|
||||||
+16
-12
@@ -1,4 +1,3 @@
|
|||||||
'use strict';
|
|
||||||
// Copyright (c) 2018 Dominic Masters
|
// Copyright (c) 2018 Dominic Masters
|
||||||
//
|
//
|
||||||
// MIT License
|
// MIT License
|
||||||
@@ -22,19 +21,24 @@
|
|||||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
|
||||||
//Import
|
'use strict';
|
||||||
const
|
|
||||||
App = require('./app/App')
|
|
||||||
;
|
|
||||||
|
|
||||||
//Create
|
const App = require('./app/App');
|
||||||
|
|
||||||
|
//Attempt to make a global "Async Handler" for the app itself
|
||||||
const app = new App();
|
const app = new App();
|
||||||
|
|
||||||
//Create entire app wrapper for safe logging and exiting from crashes etc.
|
|
||||||
(async () => {
|
(async () => {
|
||||||
//Start the app
|
//Initialize the app
|
||||||
return await app.start();
|
await app.init();
|
||||||
})().then((e) => console.log).catch((e) => {
|
|
||||||
if(!e) return;
|
//Start the main thread
|
||||||
console.error(e);
|
|
||||||
|
//End the app
|
||||||
|
})().then((e) => {
|
||||||
|
//Should never occur
|
||||||
|
|
||||||
|
}).catch((e) => {
|
||||||
|
//On Error
|
||||||
|
if(e) console.error(e);
|
||||||
});
|
});
|
||||||
Whitespace-only changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -23,11 +23,11 @@
|
|||||||
|
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { connect } from 'react-redux';
|
import { connect } from 'react-redux';
|
||||||
|
import { HashRouter, BrowserRouter } from 'react-router-dom';
|
||||||
|
|
||||||
import Background from './background/Background';
|
import Background from './../objects/background/Background';
|
||||||
import Header from './header/Header';
|
import Header from './header/Header';
|
||||||
import Footer from './footer/Footer';
|
import Footer from './footer/Footer';
|
||||||
import { HashRouter, BrowserRouter } from 'react-router-dom';
|
|
||||||
import Routes from './page/Routes';
|
import Routes from './page/Routes';
|
||||||
import Favicon from './Favicon';
|
import Favicon from './Favicon';
|
||||||
|
|
||||||
@@ -28,27 +28,32 @@
|
|||||||
|
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import Helmet from 'react-helmet';
|
import Helmet from 'react-helmet';
|
||||||
|
const prefix = './../assets/images/favicon/';
|
||||||
|
|
||||||
export default (props) => {
|
export default (props) => {
|
||||||
return (
|
return (
|
||||||
<Helmet>
|
<Helmet>
|
||||||
<link rel="apple-touch-icon" sizes="57x57" href={ require('./images/favicon/apple-icon-57x57.png').src } />
|
<link rel="apple-touch-icon" sizes="57x57" href={ require(prefix+'apple-icon-57x57.png').src } />
|
||||||
<link rel="apple-touch-icon" sizes="60x60" href={ require('./images/favicon/apple-icon-60x60.png').src } />
|
<link rel="apple-touch-icon" sizes="60x60" href={ require(prefix+'apple-icon-60x60.png').src } />
|
||||||
<link rel="apple-touch-icon" sizes="72x72" href={ require('./images/favicon/apple-icon-72x72.png').src } />
|
<link rel="apple-touch-icon" sizes="72x72" href={ require(prefix+'apple-icon-72x72.png').src } />
|
||||||
<link rel="apple-touch-icon" sizes="76x76" href={ require('./images/favicon/apple-icon-76x76.png').src } />
|
<link rel="apple-touch-icon" sizes="76x76" href={ require(prefix+'apple-icon-76x76.png').src } />
|
||||||
<link rel="apple-touch-icon" sizes="114x114" href={ require('./images/favicon/apple-icon-114x114.png').src } />
|
<link rel="apple-touch-icon" sizes="114x114" href={ require(prefix+'apple-icon-114x114.png').src } />
|
||||||
<link rel="apple-touch-icon" sizes="120x120" href={ require('./images/favicon/apple-icon-120x120.png').src } />
|
<link rel="apple-touch-icon" sizes="120x120" href={ require(prefix+'apple-icon-120x120.png').src } />
|
||||||
<link rel="apple-touch-icon" sizes="144x144" href={ require('./images/favicon/apple-icon-144x144.png').src } />
|
<link rel="apple-touch-icon" sizes="144x144" href={ require(prefix+'apple-icon-144x144.png').src } />
|
||||||
<link rel="apple-touch-icon" sizes="152x152" href={ require('./images/favicon/apple-icon-152x152.png').src } />
|
<link rel="apple-touch-icon" sizes="152x152" href={ require(prefix+'apple-icon-152x152.png').src } />
|
||||||
<link rel="apple-touch-icon" sizes="180x180" href={ require('./images/favicon/apple-icon-180x180.png').src } />
|
<link rel="apple-touch-icon" sizes="180x180" href={ require(prefix+'apple-icon-180x180.png').src } />
|
||||||
<link rel="icon" type="image/png" sizes="192x192" href={ require('./images/favicon/android-icon-192x192.png').src } />
|
|
||||||
<link rel="icon" type="image/png" sizes="32x32" href={ require('./images/favicon/favicon-32x32.png').src } />
|
<link rel="icon" type="image/png" sizes="192x192" href={ require(prefix+'android-icon-192x192.png').src } />
|
||||||
<link rel="icon" type="image/png" sizes="96x96" href={ require('./images/favicon/favicon-96x96.png').src } />
|
<link rel="icon" type="image/png" sizes="32x32" href={ require(prefix+'favicon-32x32.png').src } />
|
||||||
<link rel="icon" type="image/png" sizes="16x16" href={ require('./images/favicon/favicon-16x16.png').src } />
|
<link rel="icon" type="image/png" sizes="96x96" href={ require(prefix+'favicon-96x96.png').src } />
|
||||||
<link rel="manifest" href={ require('./images/favicon/favicon-16x16.png').src } />
|
<link rel="icon" type="image/png" sizes="16x16" href={ require(prefix+'favicon-16x16.png').src } />
|
||||||
|
|
||||||
|
<link rel="manifest" href={ require(prefix+'favicon-16x16.png').src } />
|
||||||
|
|
||||||
<meta name="msapplication-TileColor" content="#ffffff" />
|
<meta name="msapplication-TileColor" content="#ffffff" />
|
||||||
<meta name="msapplication-TileImage" content={ require('./images/favicon/ms-icon-144x144.png').src } />
|
<meta name="msapplication-TileImage" content={ require(prefix+'ms-icon-144x144.png').src } />
|
||||||
<meta name="theme-color" content="#ffffff" />
|
|
||||||
|
<meta name="theme-color" content="#ffffff" />*/}
|
||||||
</Helmet>
|
</Helmet>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
@@ -23,7 +23,7 @@
|
|||||||
|
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { connect } from 'react-redux';
|
import { connect } from 'react-redux';
|
||||||
import Language from './../language/Language';
|
import Language from './../../language/Language';
|
||||||
import { NavLink } from 'react-router-dom'
|
import { NavLink } from 'react-router-dom'
|
||||||
import { PageBoundary } from './../page/Page';
|
import { PageBoundary } from './../page/Page';
|
||||||
|
|
||||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -25,7 +25,7 @@ import React from 'react';
|
|||||||
import { connect } from 'react-redux';
|
import { connect } from 'react-redux';
|
||||||
import { Helmet } from "react-helmet";
|
import { Helmet } from "react-helmet";
|
||||||
import PageBoundary from './PageBoundary';
|
import PageBoundary from './PageBoundary';
|
||||||
import Language from './../language/Language';
|
import Language from './../../language/Language';
|
||||||
|
|
||||||
class Page extends React.Component {
|
class Page extends React.Component {
|
||||||
constructor(props) {
|
constructor(props) {
|
||||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loaded 100 of 148 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user