Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Switch to GitLab Next
Sign in / Register
Toggle navigation
Open sidebar
staltz
manyverse
Commits
efe3589d
Commit
efe3589d
authored
Feb 02, 2021
by
Jacob Karlsson
Browse files
Make icons load
parent
0a054daa
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
26 additions
and
13 deletions
+26
-13
desktop/index.html
desktop/index.html
+1
-12
desktop/webpack.config.js
desktop/webpack.config.js
+16
-1
src/desktop/index.ts
src/desktop/index.ts
+9
-0
No files found.
desktop/index.html
View file @
efe3589d
<!DOCTYPE html>
<html>
<head>
<title>
Getting Started
</title>
<title>
Manyverse
</title>
</head>
<body>
<!--<h1>Hello World!</h1>
We are using node
<script>
document.write(process.versions.node);</script
>, Chrome
<script>
document.write(process.versions.chrome);</script
>, and Electron
<script>
document.write(process.versions.electron);</script
>.-->
<div
id=
"app"
></div>
<script
src=
"./dist/main.js"
></script>
</body>
...
...
desktop/webpack.config.js
View file @
efe3589d
...
...
@@ -53,6 +53,7 @@ module.exports = {
},
module
:
{
rules
:
[
babelLoaderConfiguration
,
{
test
:
/
\.(
png|jpe
?
g|gif
)
$/i
,
use
:
[
...
...
@@ -61,7 +62,21 @@ module.exports = {
},
],
},
babelLoaderConfiguration
,
{
test
:
/
\.
ttf$/
,
use
:
[
{
loader
:
'
file-loader
'
,
options
:
{
esModule
:
false
,
},
},
],
include
:
path
.
resolve
(
__dirname
,
'
../node_modules/react-native-vector-icons
'
,
),
},
],
},
plugins
:
[
...
...
src/desktop/index.ts
View file @
efe3589d
...
...
@@ -17,6 +17,15 @@ import {makeEventBusDriver} from '../frontend/drivers/eventbus';
import
{
makeLocalizationDriver
}
from
'
../frontend/drivers/localization
'
;
import
{
global
}
from
'
../frontend/screens/global
'
;
import
{
thread
}
from
'
../frontend/screens/thread
'
;
const
iconFont
=
require
(
'
react-native-vector-icons/Fonts/MaterialCommunityIcons.ttf
'
);
const
iconFontStyles
=
`@font-face {
src: url(dist/
${
iconFont
}
);
font-family: MaterialCommunityIcons;
}`
;
const
style
=
document
.
createElement
(
'
style
'
);
style
.
appendChild
(
document
.
createTextNode
(
iconFontStyles
));
document
.
head
.
appendChild
(
style
);
const
engine
=
setupReusable
({
asyncstorage
:
asyncStorageDriver
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment