TagSpaces is an offline, open source, document manager with tagging support
chore: remove loading extconfig.js from the app folder
Ilian Sapundshiev6ffadeab23e5
diff --git a/src/renderer/index.ejs b/src/renderer/index.ejsindex 5b2da83c5..8811741ff 100644--- a/src/renderer/index.ejs+++ b/src/renderer/index.ejs@@ -11,7 +11,6 @@content="width=device-width,initial-scale=1,maximum-scale=1,minimum-scale=1,user-scalable=no"/><script type="text/javascript" src="./extconfig.js"></script>- <script type="text/javascript" src="../../../../extconfig.js"></script></head><body style="overflow: hidden; margin: 0; padding: 0"><div id="root">diff --git a/src/renderer/reducers/index.ts b/src/renderer/reducers/index.tsindex c0d1b5204..13431bb40 100644--- a/src/renderer/reducers/index.ts+++ b/src/renderer/reducers/index.ts@@ -15,19 +15,29 @@* along with this program. If not, see <https://www.gnu.org/licenses/>.**/+import AppConfig from '-/AppConfig';import { persistCombineReducers, PersistConfig } from 'redux-persist';import getStoredStateMigrateV4 from 'redux-persist/lib/integration/getStoredStateMigrateV4';-// import autoMergeLevel2 from 'redux-persist/lib/stateReconciler/autoMergeLevel2';import storage from 'redux-persist/lib/storage';-import AppConfig from '-/AppConfig';-import settings from './settings';import app from './app';import locations from './locations';-//import taglibrary from './taglibrary';import searches from './searches';+import settings from './settings';++// const xhr = new XMLHttpRequest();+// xhr.open('GET', 'extconfig.json', true); // ../../../../extconfig.js+// xhr.onreadystatechange = function () {+// if (xhr.readyState === 4 && xhr.status === 200) {+// const data = JSON.parse(xhr.responseText);+// console.log(data);+// window.ExtAuthor = data.ExtAuthor;+// AppConfig.showTSVersion = false;+// window.ExtLocations = data.ExtLocations;+// }+// };+// xhr.send();const externalLocations = window.ExtLocations || false;-// const externalTagLibrary = window.ExtTagLibrary || false;const externalSearches = window.ExtSearches || false;const blacklist = ['app'];@@ -41,51 +51,6 @@ if (externalSearches) {blacklist.push('searches');}-// const migrations = {-// 2: (state) => { // migration to add geo and date tags in state-// const tagGroups = [...state.taglibrary];-// for (const tagGroup of tagGroups) {-// if (tagGroup.title === 'Smart Tags') {-// let haveGeoTagging = false;-// let haveDateTagging = false;-// for (const tag of tagGroup.children) {-// if (tag.functionality === 'geoTagging') haveGeoTagging = true;-// else if (tag.functionality === 'dateTagging') haveDateTagging = true;-// }-// if (!haveGeoTagging) {-// tagGroup.children.push({-// id: 'e1f0760e-471c-4418-a404-6cb09e6f6c24',-// type: 'plain',-// title: 'geo-tag',-// functionality: 'geoTagging',-// description: 'Add geo coordinates as a tag',-// color: '#4986e7',-// textcolor: '#ffffff',-// icon: '',-// });-// }-// if (!haveDateTagging) {-// tagGroup.children.push({-// id: 'e1f0760e-471c-4418-a404-6cb09e6f6c34',-// type: 'plain',-// title: 'date-tag',-// functionality: 'dateTagging',-// description: 'Add custom date as a tag',-// color: '#4986e7',-// textcolor: '#ffffff',-// icon: '',-// });-// }-// break;-// }-// }-// return {-// ...state,-// tagGroups-// };-// }-// };-const rootPersistConfig: PersistConfig = {key: 'root',getStoredState: getStoredStateMigrateV4({ blacklist }),@@ -93,24 +58,12 @@ const rootPersistConfig: PersistConfig = {version: 2,blacklist,debug: false,- // migrate: createMigrate(migrations, { debug: true }),- // https://github.com/rt2zz/redux-persist/blob/b6a60bd653d59c4fe462e2e0ea827fd76eb190e1/README.md#state-reconciler- // stateReconciler: autoMergeLevel2,};const rootReducer = persistCombineReducers(rootPersistConfig, {- /* settings: persistReducer(- {- key: 'settings',- getStoredState: getStoredStateMigrateV4({ keyPrefix: 'reduxPersist' }),- storage- },- settings,- ), */settings,app,locations: externalLocations ? () => externalLocations : locations,- // taglibrary, // externalTagLibrary ? () => externalTagLibrary : taglibrary,searches: externalSearches ? () => externalSearches : searches,});