chore: remove data dir and move images to assets dir, update image paths

This commit is contained in:
zelfroster 2023-08-22 10:40:19 +05:30
parent b7f4d96694
commit 078baef18d
11 changed files with 13 additions and 26 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 21 KiB

View File

@ -7,7 +7,7 @@ const logo = () => {
view() {
return m('.logo', [
m('img', {
src: '../data/retroshare.svg',
src: 'images/retroshare.svg',
alt: 'retroshare_icon',
}),
m('.retroshareText', [

View File

@ -39,7 +39,7 @@ function loginComponent() {
let withOptions = false;
const logo = () =>
m('img.logo[width=30%]', { src: '../data/retroshare.svg', alt: 'retroshare_icon' });
m('img.logo[width=30%]', { src: 'images/retroshare.svg', alt: 'retroshare_icon' });
const inputName = () =>
m('input', {

View File

@ -37,7 +37,7 @@ const navbar = () => {
[
m('.nav-menu__logo', [
m('img', {
src: '../data/retroshare.svg',
src: 'images/retroshare.svg',
alt: 'retroshare_icon',
}),
m('h5', 'Retroshare'),

View File

Before

Width:  |  Height:  |  Size: 67 KiB

After

Width:  |  Height:  |  Size: 67 KiB

View File

Before

Width:  |  Height:  |  Size: 435 B

After

Width:  |  Height:  |  Size: 435 B

View File

@ -5,7 +5,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>RetroShare</title>
<link rel="stylesheet" href="styles.css" />
<link href="/data/retroshare.svg" rel="icon" data-n-head="true" type="image/svg" />
<link href="images/retroshare.svg" rel="icon" data-n-head="true" type="image/svg" />
<script src="app.js"></script>
</head>

View File

@ -42,9 +42,6 @@ popd
echo copying assets folder
xcopy /s %src%\assets\ %publicdest%
echo copying data folder
xcopy /s %src%\..\data %publicdest%\data\
echo "### WebUI build complete ###"
goto :EOF

View File

@ -13,7 +13,6 @@ else
fi
if [ "$2" = "" ]; then
if [ -d "$publicdest" ]; then
echo removing existing $publicdest
rm $publicdest -R
@ -30,7 +29,7 @@ shopt -s globstar
if [ "$2" = "" ]||[ "$2" = "index.html" ]; then
echo copying html file
cp -r $src/index.html $publicdest/
cp -r $src/index.html $publicdest/
fi
if [ "$2" = "" ]||[ "$2" = "styles.css" ]; then
@ -55,16 +54,8 @@ if [ "$2" = "" ]||[ "$2" = "app.js" ]; then
done
fi
if [ "$2" = "" ]||[ "$2" = "../data" ]; then
echo copying assets folder
cp -r $src/assets/* $publicdest/
fi
if [ "$2" = "" ]||[ "$2" = "../data" ]; then # only for development to restore data folder
echo copying data folder
mkdir $publicdest/data
cp -r $src/../data $publicdest/
fi
echo copying assets folder
cp -r $src/assets/* $publicdest/
if [ "$2" != "" ]&&[ "$3" != "" ]; then
if [ ! -d "$3/webui" ]; then

View File

@ -21,7 +21,7 @@ TEMPLATE = subdirs
SUBDIRS= # don't build anything
CONFIG -= qt
WEBUI_SRC_HTML += $$PWD/webui-src/index.html
WEBUI_SRC_HTML = $$PWD/webui-src/index.html
WEBUI_SRC_JS = $$PWD/webui-src/app/rswebui.js
WEBUI_SRC_JS += $$PWD/webui-src/app/mithril.js
@ -29,9 +29,9 @@ WEBUI_SRC_JS += $$PWD/webui-src/app/login.js
WEBUI_SRC_JS += $$PWD/webui-src/app/main.js
WEBUI_SRC_JS += $$PWD/webui-src/app/home.js
WEBUI_SRC_CSS += $$PWD/webui-src/styles.css
WEBUI_SRC_CSS = $$PWD/webui-src/styles.css
WEBUI_SRC_DATA += $$PWD/data/retroshare.svg
WEBUI_SRC_IMAGE = $$PWD/data/retroshare.svg
win32-g++ {
isEmpty(QMAKE_SH) {
@ -103,9 +103,8 @@ win32-g++ {
webui/styles.css \
webui/app.js
webui_data_files.path = "$${RS_DATA_DIR}/webui/data/"
webui_data_files.files = webui/data/retroshare.svg \
webui/data/streaming.png
webui_image_files.path = "$${RS_DATA_DIR}/webui/images/"
webui_image_files.files = webui/images/retroshare.svg
webui_font_files.path = "$${RS_DATA_DIR}/webui/webfonts/"
webui_font_files.files = webui/webfonts/fa-solid-900.eot \
@ -114,5 +113,5 @@ win32-g++ {
webui/webfonts/fa-solid-900.woff \
webui/webfonts/fa-solid-900.woff2
INSTALLS += webui_base_files webui_font_files webui_data_files
INSTALLS += webui_base_files webui_font_files webui_image_files
}