Skip to content

Commit

Permalink
fix paths
Browse files Browse the repository at this point in the history
  • Loading branch information
KoalaSat committed Sep 18, 2024
1 parent 8b329b9 commit 4964992
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 25 deletions.
11 changes: 5 additions & 6 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -642,21 +642,20 @@ frontend/static/import_export*
frontend/static/drf_spectacular_sidecar/
frontend/src/components/PaymentMethods/Icons/code*
frontend/src/components/PaymentMethods/Icons/webp*
frontend/static/frontend/**
frontend/static/frontend
docs/.jekyll-cache*
docs/_site*
node
desktopApp/release-builds

# frontend statics
frontend/templates/frontend/*.html
mobile/html/Web.bundle/static/*
mobile/html/Web.bundle/*.html
desktopApp/static/*
mobile/html/Web.bundle
desktopApp/static
desktopApp/*.html
web/static/*
web/static
web/*.html
nodeapp/static/*
nodeapp/static
nodeapp/*.html

# Protocol Buffers
Expand Down
22 changes: 11 additions & 11 deletions frontend/templates/frontend/index.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -2,29 +2,29 @@
<html>
<head>
<meta http-equiv="onion-location" content="{{ ONION_LOCATION }}" />
<link rel="shortcut icon" href="./static/assets/images/favicon-96x96.png" />
<link rel="icon" type="image/png" href="./static/assets/images/favicon-32x32.png" sizes="32x32">
<link rel="icon" type="image/png" href="./static/assets/images/favicon-96x96.png" sizes="96x96">
<link rel="icon" type="image/png" href="./static/assets/images/favicon-192x192.png" sizes="192x192">
<link rel="shortcut icon" href="<%= htmlWebpackPlugin.options.basePath %>static/assets/images/favicon-96x96.png" />
<link rel="icon" type="image/png" href="<%= htmlWebpackPlugin.options.basePath %>static/assets/images/favicon-32x32.png" sizes="32x32">
<link rel="icon" type="image/png" href="<%= htmlWebpackPlugin.options.basePath %>static/assets/images/favicon-96x96.png" sizes="96x96">
<link rel="icon" type="image/png" href="<%= htmlWebpackPlugin.options.basePath %>static/assets/images/favicon-192x192.png" sizes="192x192">

<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="description" content="A simple and private way to exchange bitcoin for national currencies. Robosats simplifies the peer-to-peer user experience and uses lightning hold invoices to minimize custody and trust requirements. No user registration required.">
<% if (pro) { %>
<title>RoboSats PRO - Simple and Private Bitcoin Exchange</title>
<link rel="stylesheet" href="./static/css_pro/fonts.css"/>
<link rel="stylesheet" type="text/css" href="./static/css_pro/react-grid-layout.css"/>
<link rel="stylesheet" type="text/css" href="./static/css_pro/react-resizable.css"/>
<link rel="stylesheet" href="<%= htmlWebpackPlugin.options.basePath %>static/css_pro/fonts.css"/>
<link rel="stylesheet" type="text/css" href="<%= htmlWebpackPlugin.options.basePath %>static/css_pro/react-grid-layout.css"/>
<link rel="stylesheet" type="text/css" href="<%= htmlWebpackPlugin.options.basePath %>static/css_pro/react-resizable.css"/>
<% } else { %>
<title>RoboSats - Simple and Private Bitcoin Exchange</title>
<link rel="stylesheet" href="./static/css/fonts.css"/>
<link rel="stylesheet" href="<%= htmlWebpackPlugin.options.basePath %>static/css/fonts.css"/>
<% } %>

<link rel="stylesheet" type="text/css" href="./static/css/loader.css"/>
<link rel="stylesheet" type="text/css" href="./static/css/index.css"/>
<link rel="stylesheet" type="text/css" href="./static/css/leaflet.css"/>
<link rel="stylesheet" type="text/css" href="<%= htmlWebpackPlugin.options.basePath %>static/css/loader.css"/>
<link rel="stylesheet" type="text/css" href="<%= htmlWebpackPlugin.options.basePath %>static/css/index.css"/>
<link rel="stylesheet" type="text/css" href="<%= htmlWebpackPlugin.options.basePath %>static/css/leaflet.css"/>
</head>
<body>
<noscript>
Expand Down
32 changes: 24 additions & 8 deletions frontend/webpack.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ const configNode: Configuration = {
path: path.resolve(__dirname, 'static/frontend'),
filename: `main.v${version}.[contenthash].js`,
clean: true,
publicPath: './static/frontend/',
publicPath: '/static/frontend/',
},
plugins: [
// Django
Expand All @@ -44,6 +44,7 @@ const configNode: Configuration = {
filename: path.resolve(__dirname, 'templates/frontend/basic.html'),
inject: 'body',
robosatsSettings: 'web-basic',
basePath: '/',
}),
new HtmlWebpackPlugin({
template: path.resolve(__dirname, 'templates/frontend/index.ejs'),
Expand All @@ -53,6 +54,7 @@ const configNode: Configuration = {
filename: path.resolve(__dirname, 'templates/frontend/pro.html'),
inject: 'body',
robosatsSettings: 'web-pro',
basePath: '/',
}),
// Node App
new HtmlWebpackPlugin({
Expand All @@ -63,6 +65,7 @@ const configNode: Configuration = {
filename: path.resolve(__dirname, '../nodeapp/basic.html'),
inject: 'body',
robosatsSettings: 'selfhosted-basic',
basePath: '/',
}),
new HtmlWebpackPlugin({
template: path.resolve(__dirname, 'templates/frontend/index.ejs'),
Expand All @@ -72,6 +75,7 @@ const configNode: Configuration = {
filename: path.resolve(__dirname, '../nodeapp/pro.html'),
inject: 'body',
robosatsSettings: 'selfhosted-pro',
basePath: '/',
}),
new FileManagerPlugin({
events: {
Expand All @@ -94,6 +98,7 @@ const configNode: Configuration = {
filename: path.resolve(__dirname, '../desktopApp/index.html'),
inject: 'body',
robosatsSettings: 'desktop-basic',
basePath: '/',
}),
new FileManagerPlugin({
events: {
Expand All @@ -116,6 +121,7 @@ const configNode: Configuration = {
filename: path.resolve(__dirname, '../web/basic.html'),
inject: 'body',
robosatsSettings: 'web-basic',
basePath: '/',
}),
new HtmlWebpackPlugin({
template: path.resolve(__dirname, 'templates/frontend/index.ejs'),
Expand All @@ -125,6 +131,7 @@ const configNode: Configuration = {
filename: path.resolve(__dirname, '../web/pro.html'),
inject: 'body',
robosatsSettings: 'web-pro',
basePath: '/',
}),
new FileManagerPlugin({
events: {
Expand Down Expand Up @@ -188,6 +195,12 @@ const configMobile: Configuration = {
},
],
},
output: {
path: path.resolve(__dirname, '../mobile/html/Web.bundle/static/frontend'),
filename: `main.v${version}.[contenthash].js`,
clean: true,
publicPath: './static/frontend/',
},
plugins: [
new HtmlWebpackPlugin({
template: path.resolve(__dirname, 'templates/frontend/index.ejs'),
Expand All @@ -197,26 +210,29 @@ const configMobile: Configuration = {
filename: path.resolve(__dirname, '../mobile/html/Web.bundle/index.html'),
inject: 'body',
robosatsSettings: 'mobile-basic',
basePath: './',
}),
new FileManagerPlugin({
events: {
onEnd: {
copy: [
{
source: path.resolve(__dirname, 'static/css'),
destination: path.resolve(__dirname, '../mobile/html/Web.bundle/static'),
destination: path.resolve(__dirname, '../mobile/html/Web.bundle/static/css'),
},
{
source: path.resolve(__dirname, 'static/assets/sounds'),
destination: path.resolve(__dirname, '../mobile/html/Web.bundle/assets/sounds'),
},
{
source: path.resolve(__dirname, 'static/federation'),
destination: path.resolve(__dirname, '../mobile/html/Web.bundle/assets/federation'),
},
],
},
},
}),
],
output: {
path: path.resolve(__dirname, '../mobile/html/Web.bundle/static/frontend'),
filename: `main.v${version}.[contenthash].js`,
clean: true,
publicPath: './static/frontend/',
},
};

export default [configNode, configMobile];

0 comments on commit 4964992

Please sign in to comment.