diff --git a/src/components/modals/main/scss/marketplace/_main.scss b/src/components/modals/main/scss/marketplace/_main.scss
index e6e75ff8..e5d21bd4 100644
--- a/src/components/modals/main/scss/marketplace/_main.scss
+++ b/src/components/modals/main/scss/marketplace/_main.scss
@@ -28,6 +28,9 @@
box-shadow: 0 0 0 1px t($modal-sidebarActive);
&:hover {
background: t($modal-sidebarActive);
+ img {
+ background: t($modal-sidebarActive);
+ }
}
}
@@ -39,6 +42,7 @@
height: 80% !important;
width: auto !important;
border-radius: 12px;
+ transition: 0.5s;
@include themed() {
background: t($modal-sidebar);
diff --git a/src/components/modals/main/scss/settings/modules/tabs/_changelog.scss b/src/components/modals/main/scss/settings/modules/tabs/_changelog.scss
index 15e79e7e..1366f541 100644
--- a/src/components/modals/main/scss/settings/modules/tabs/_changelog.scss
+++ b/src/components/modals/main/scss/settings/modules/tabs/_changelog.scss
@@ -1,5 +1,6 @@
.updateChangelog {
max-width: 75%;
+ white-space: pre-wrap;
li {
cursor: initial;
diff --git a/src/components/modals/main/settings/FileUpload.jsx b/src/components/modals/main/settings/FileUpload.jsx
index 444fb386..602c57ad 100644
--- a/src/components/modals/main/settings/FileUpload.jsx
+++ b/src/components/modals/main/settings/FileUpload.jsx
@@ -1,6 +1,7 @@
import variables from 'modules/variables';
import { PureComponent } from 'react';
import { toast } from 'react-toastify';
+import { compressAccurately, filetoDataURL } from 'image-conversion';
export default class FileUpload extends PureComponent {
getMessage = (text) => variables.language.getMessage(variables.languagecode, text);
@@ -14,16 +15,27 @@ export default class FileUpload extends PureComponent {
reader.readAsText(file, 'UTF-8');
} else {
// background upload
- if (file.size > 2000000) {
- return toast(this.getMessage('modals.main.file_upload_error'));
- }
+ const settings = {};
- reader.readAsDataURL(file);
+ Object.keys(localStorage).forEach((key) => {
+ settings[key] = localStorage.getItem(key);
+ });
+
+ // todo: check for video and ignore (very easy)
+ // also look into changing the number
+ const settingsSize = new TextEncoder().encode(JSON.stringify(settings)).length;
+ compressAccurately(file, 200).then(async (res) => {
+ if (settingsSize + res.size > 4850000) {
+ return toast('Not enough storage!');
+ }
+
+ this.props.loadFunction({
+ target: {
+ result: await filetoDataURL(res),
+ },
+ });
+ });
}
-
- reader.addEventListener('load', (e) => {
- this.props.loadFunction(e);
- });
};
}
diff --git a/src/components/modals/main/settings/Header.jsx b/src/components/modals/main/settings/Header.jsx
index 60bce433..2b084b66 100644
--- a/src/components/modals/main/settings/Header.jsx
+++ b/src/components/modals/main/settings/Header.jsx
@@ -17,7 +17,11 @@ export default class Header extends PureComponent {
<>
{this.props.title}
-
+
+ window.open(
+ variables.constants.KNOWLEDGEBASE + '/' + this.props.setting.toLowerCase().replace('enabled', ''),
+ '_blank',
+ )}>
More Info
-
-
- {getMessage('modals.main.settings.sections.appearance.accessibility.widget_zoom')}
-
- eeeh course
-
-
-
-
- */
-}
diff --git a/src/components/modals/main/settings/sections/Changelog.jsx b/src/components/modals/main/settings/sections/Changelog.jsx
index 8abd3d6e..c3e4f4bc 100644
--- a/src/components/modals/main/settings/sections/Changelog.jsx
+++ b/src/components/modals/main/settings/sections/Changelog.jsx
@@ -47,7 +47,7 @@ export default class Changelog extends PureComponent {
author: data.authors.join(', '),
},
),
- html: data.html,
+ content: data.markdown,
});
// lightbox etc
@@ -128,7 +128,9 @@ export default class Changelog extends PureComponent {
className="updateImage"
/>
) : null}
-
+
+ {this.state.content}
+
this.setState({ showLightbox: false })}
diff --git a/src/components/widgets/navbar/Navbar.jsx b/src/components/widgets/navbar/Navbar.jsx
index 5612f83c..96f31b52 100644
--- a/src/components/widgets/navbar/Navbar.jsx
+++ b/src/components/widgets/navbar/Navbar.jsx
@@ -90,7 +90,9 @@ export default class Navbar extends PureComponent {
- {this.state.todo.map((_value, index) => (
-
- this.updateTodo('done', index)}
- />
- this.updateTodo('set', index, data)}
- readOnly={this.state.todo[index].done}
- />
- this.updateTodo('remove', index)} />
-
- ))}
+
+ {this.state.todo.map((_value, index) => (
+
+
+ this.updateTodo('done', index)}
+ />
+ this.updateTodo('set', index, data)}
+ readOnly={this.state.todo[index].done}
+ />
+ this.updateTodo('remove', index)} />
+ >
+ }
+ />
+
+ ))}
+