aboutsummaryrefslogtreecommitdiff
path: root/src/services
diff options
context:
space:
mode:
Diffstat (limited to 'src/services')
-rw-r--r--src/services/api/api.service.js7
-rw-r--r--src/services/entity_normalizer/entity_normalizer.service.js2
-rw-r--r--src/services/theme_data/pleromafe.js4
3 files changed, 11 insertions, 2 deletions
diff --git a/src/services/api/api.service.js b/src/services/api/api.service.js
index 8da933c4..f4483149 100644
--- a/src/services/api/api.service.js
+++ b/src/services/api/api.service.js
@@ -162,7 +162,12 @@ const updateProfileImages = ({ credentials, avatar = null, banner = null, backgr
body: form
})
.then((data) => data.json())
- .then((data) => parseUser(data))
+ .then((data) => {
+ if (data.error) {
+ throw new Error(data.error)
+ }
+ return parseUser(data)
+ })
}
const updateProfile = ({ credentials, params }) => {
diff --git a/src/services/entity_normalizer/entity_normalizer.service.js b/src/services/entity_normalizer/entity_normalizer.service.js
index e3a52489..b1e68df5 100644
--- a/src/services/entity_normalizer/entity_normalizer.service.js
+++ b/src/services/entity_normalizer/entity_normalizer.service.js
@@ -280,7 +280,7 @@ export const parseStatus = (data) => {
if (output.poll) {
output.poll.options = (output.poll.options || []).map(field => ({
...field,
- title_html: addEmojis(field.title, data.emojis)
+ title_html: addEmojis(escape(field.title), data.emojis)
}))
}
output.pinned = data.pinned
diff --git a/src/services/theme_data/pleromafe.js b/src/services/theme_data/pleromafe.js
index 7ed85797..bec1eebd 100644
--- a/src/services/theme_data/pleromafe.js
+++ b/src/services/theme_data/pleromafe.js
@@ -84,6 +84,10 @@ export const SLOT_INHERITANCE = {
opacity: 'bg',
priority: 1
},
+ wallpaper: {
+ depends: ['bg'],
+ color: (mod, bg) => brightness(-2 * mod, bg).rgb
+ },
fg: {
depends: [],
priority: 1