remove ASSET_SERVER config

This commit is contained in:
HF 2022-09-04 03:28:27 +02:00
parent cd195c9692
commit b4b82ea478
16 changed files with 20 additions and 30 deletions

View File

@ -81,7 +81,6 @@ Configuration takes place in the environment variables that are defined in ecosy
| Variable | Description | Example | | Variable | Description | Example |
|-------------------|:--------------------------------------|---------------------------| |-------------------|:--------------------------------------|---------------------------|
| ASSET_SERVER | URL for assets | "http://localhost" |
| USE_PROXYCHECK | Check users for Proxies | 0 | | USE_PROXYCHECK | Check users for Proxies | 0 |
| PROXYCHECK_KEY | Key for proxycheck.io | "asfas-xcsc-ewef-sdfsd" | | PROXYCHECK_KEY | Key for proxycheck.io | "asfas-xcsc-ewef-sdfsd" |
| APISOCKET_KEY | Key for API Socket for SpecialAccess™ | "SDfasife3" | | APISOCKET_KEY | Key for API Socket for SpecialAccess™ | "SDfasife3" |

View File

@ -50,11 +50,7 @@ function ChatMessage({
className="chatflag" className="chatflag"
alt="" alt=""
title={country} title={country}
src={`${window.ssv.assetserver}/cf/${country}.gif`} src={`/cf/${country}.gif`}
onError={(e) => {
e.target.onerror = null;
e.target.src = './cf/xx.gif';
}}
/> />
<span <span
className="chatname" className="chatname"

View File

@ -56,7 +56,7 @@ function LanguageSelect() {
<img <img
style={{ height: '1em', imageRendering: 'crisp-edges' }} style={{ height: '1em', imageRendering: 'crisp-edges' }}
alt="" alt=""
src={`${window.ssv.assetserver}/cf/${ccSel}.gif`} src={`/cf/${ccSel}.gif`}
/> />
</span> </span>
<button <button

View File

@ -32,7 +32,7 @@ const LogInArea = ({ windowId }) => {
<img <img
style={logoStyle} style={logoStyle}
width={32} width={32}
src={`${window.ssv.assetserver}/discordlogo.svg`} src="/discordlogo.svg"
alt="Discord" alt="Discord"
/> />
</a> </a>
@ -40,7 +40,7 @@ const LogInArea = ({ windowId }) => {
<img <img
style={logoStyle} style={logoStyle}
width={32} width={32}
src={`${window.ssv.assetserver}/googlelogo.svg`} src="/googlelogo.svg"
alt="Google" alt="Google"
/> />
</a> </a>
@ -48,7 +48,7 @@ const LogInArea = ({ windowId }) => {
<img <img
style={logoStyle} style={logoStyle}
width={32} width={32}
src={`${window.ssv.assetserver}/facebooklogo.svg`} src="/facebooklogo.svg"
alt="Facebook" alt="Facebook"
/> />
</a> </a>
@ -56,7 +56,7 @@ const LogInArea = ({ windowId }) => {
<img <img
style={logoStyle} style={logoStyle}
width={32} width={32}
src={`${window.ssv.assetserver}/vklogo.svg`} src="/vklogo.svg"
alt="VK" alt="VK"
/> />
</a> </a>
@ -64,7 +64,7 @@ const LogInArea = ({ windowId }) => {
<img <img
style={logoStyle} style={logoStyle}
width={32} width={32}
src={`${window.ssv.assetserver}/redditlogo.svg`} src="/redditlogo.svg"
alt="Reddit" alt="Reddit"
/> />
</a> </a>

View File

@ -339,7 +339,7 @@ function ModWatchtools() {
imageRendering: 'crisp-edges', imageRendering: 'crisp-edges',
}} }}
alt={val} alt={val}
src={`${window.ssv.assetserver}/cf/${flag}.gif`} src={`/cf/${flag}.gif`}
/></td> /></td>
); );
} }

View File

@ -48,5 +48,5 @@ export default [
return (videoExts.includes(ext) || imageExts.includes(ext)); return (videoExts.includes(ext) || imageExts.includes(ext));
}, },
null, null,
`${window.ssv.assetserver}/embico/direct.png`, '/embico/direct.png',
]; ];

View File

@ -29,5 +29,5 @@ export default [
React.memo(Matrix), React.memo(Matrix),
(url) => url.includes('?type=video') || url.includes('?type=image'), (url) => url.includes('?type=video') || url.includes('?type=image'),
null, null,
`${window.ssv.assetserver}/embico/matrix.png`, '/embico/matrix.png',
]; ];

View File

@ -94,5 +94,5 @@ export default [
urlPart = stripCol(stripQuery(urlPart)); urlPart = stripCol(stripQuery(urlPart));
return urlPart; return urlPart;
}, },
`${window.ssv.assetserver}/embico/odysee.png`, '/embico/odysee.png',
]; ];

View File

@ -71,5 +71,5 @@ export default [
title = title.substring(0, title.indexOf('/')); title = title.substring(0, title.indexOf('/'));
return title; return title;
}, },
`${window.ssv.assetserver}/embico/telegram.png`, '/embico/telegram.png',
]; ];

View File

@ -56,5 +56,5 @@ export default [
React.memo(TikTok), React.memo(TikTok),
(url) => url.includes('/video/'), (url) => url.includes('/video/'),
(url) => getUserFromUrl(url), (url) => getUserFromUrl(url),
`${window.ssv.assetserver}/embico/tiktok.png`, '/embico/tiktok.png',
]; ];

View File

@ -70,5 +70,5 @@ export default [
title = title.substring(title.lastIndexOf('/') + 1); title = title.substring(title.lastIndexOf('/') + 1);
return title; return title;
}, },
`${window.ssv.assetserver}/embico/twitter.png`, '/embico/twitter.png',
]; ];

View File

@ -45,5 +45,5 @@ export default [
React.memo(YouTube), React.memo(YouTube),
getIdFromURL, getIdFromURL,
(url) => getIdFromURL(url), (url) => getIdFromURL(url),
`${window.ssv.assetserver}/embico/youtube.png`, '/embico/youtube.png',
]; ];

View File

@ -20,8 +20,6 @@ export const MAIL_ADDRESS = process.env.MAIL_ADDRESS
const TILE_FOLDER_REL = process.env.TILE_FOLDER || 'tiles'; const TILE_FOLDER_REL = process.env.TILE_FOLDER || 'tiles';
export const TILE_FOLDER = path.join(__dirname, `./${TILE_FOLDER_REL}`); export const TILE_FOLDER = path.join(__dirname, `./${TILE_FOLDER_REL}`);
export const ASSET_SERVER = process.env.ASSET_SERVER || '.';
export const USE_XREALIP = process.env.USE_XREALIP || false; export const USE_XREALIP = process.env.USE_XREALIP || false;
export const BACKUP_URL = process.env.BACKUP_URL || null; export const BACKUP_URL = process.env.BACKUP_URL || null;

View File

@ -9,7 +9,6 @@ import { getTTag } from '../core/ttag';
/* this will be set by webpack */ /* this will be set by webpack */
import { assets } from '../core/assets'; import { assets } from '../core/assets';
import { ASSET_SERVER } from '../core/config';
import globeCss from '../styles/globe.css'; import globeCss from '../styles/globe.css';
@ -46,7 +45,7 @@ function generateGlobePage(lang) {
<div id="coorbox">(0, 0)</div> <div id="coorbox">(0, 0)</div>
<div id="info">${t`Double click on globe to go back.`}</div> <div id="info">${t`Double click on globe to go back.`}</div>
<div id="loading">${t`Loading...`}</div> <div id="loading">${t`Loading...`}</div>
${scripts.map((script) => `<script src="${ASSET_SERVER + script}"></script>`).join('')} ${scripts.map((script) => `<script src="${script}"></script>`).join('')}
</body> </body>
</html> </html>
`; `;

View File

@ -9,7 +9,7 @@ import { langCodeToCC } from '../utils/location';
import ttags, { getTTag } from '../core/ttag'; import ttags, { getTTag } from '../core/ttag';
import { styleassets, assets } from '../core/assets'; import { styleassets, assets } from '../core/assets';
import { ASSET_SERVER, BACKUP_URL } from '../core/config'; import { BACKUP_URL } from '../core/config';
/* /*
* generate language list * generate language list
@ -22,7 +22,6 @@ const langs = Object.keys(ttags)
* values that we pass to client scripts * values that we pass to client scripts
*/ */
const ssv = { const ssv = {
assetserver: ASSET_SERVER,
availableStyles: styleassets, availableStyles: styleassets,
langs, langs,
}; };
@ -66,7 +65,7 @@ function generateMainPage(lang) {
<body> <body>
<div id="app"> <div id="app">
</div> </div>
${scripts.map((script) => `<script src="${ASSET_SERVER + script}"></script>`).join('')} ${scripts.map((script) => `<script src="${script}"></script>`).join('')}
</body> </body>
</html> </html>
`; `;

View File

@ -10,7 +10,7 @@ import ttags, { getTTag } from '../core/ttag';
/* this will be set by webpack */ /* this will be set by webpack */
import { styleassets, assets } from '../core/assets'; import { styleassets, assets } from '../core/assets';
import { ASSET_SERVER, BACKUP_URL } from '../core/config'; import { BACKUP_URL } from '../core/config';
/* /*
* generate language list * generate language list
@ -23,7 +23,6 @@ const langs = Object.keys(ttags)
* values that we pass to client scripts * values that we pass to client scripts
*/ */
const ssv = { const ssv = {
assetserver: ASSET_SERVER,
availableStyles: styleassets, availableStyles: styleassets,
langs, langs,
}; };
@ -67,7 +66,7 @@ function generatePopUpPage(lang) {
<body> <body>
<div id="app"> <div id="app">
</div> </div>
<script src="${ASSET_SERVER + script}"></script> <script src="${script}"></script>
</body> </body>
</html> </html>
`; `;