aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorHenry Jameson <me@hjkos.com>2022-04-07 10:33:20 +0300
committerHenry Jameson <me@hjkos.com>2022-04-07 10:33:20 +0300
commitab7490e49b275425176aec66405fd20a4e6f958d (patch)
treeb07534e2cb9867456978a2bc9477c3948d401efd /src
parent6a319154d94c51f0464e0de31c6f88fbe20defea (diff)
parentd8324dd80b2beeb96b81b4bc05df12550bbda407 (diff)
Merge remote-tracking branch 'origin/develop' into threecolumn
* origin/develop: Fix active popover style Use panel text instead of text for shoutbox icon Fix dropdown menu style inside panel header Fix phoenix sockets in dev mode Fix no reactivity on vuex 4 values fix tegulu heck fix i18n for good?? force runtime build of i18n fix CSP by compiling the i18n templates as well
Diffstat (limited to 'src')
-rw-r--r--src/App.js2
-rw-r--r--src/components/popover/popover.vue25
-rw-r--r--src/components/shout_panel/shout_panel.vue2
-rw-r--r--src/components/side_drawer/side_drawer.js2
-rw-r--r--src/i18n/messages.js4
-rw-r--r--src/i18n/te.json2
-rw-r--r--src/modules/shout.js15
7 files changed, 45 insertions, 7 deletions
diff --git a/src/App.js b/src/App.js
index 827692a6..26a188f4 100644
--- a/src/App.js
+++ b/src/App.js
@@ -65,7 +65,7 @@ export default {
}
}
},
- shout () { return this.$store.state.shout.channel.state === 'joined' },
+ shout () { return this.$store.state.shout.joined },
suggestionsEnabled () { return this.$store.state.instance.suggestionsEnabled },
showInstanceSpecificPanel () {
return this.$store.state.instance.showInstanceSpecificPanel &&
diff --git a/src/components/popover/popover.vue b/src/components/popover/popover.vue
index 8588b351..332a0398 100644
--- a/src/components/popover/popover.vue
+++ b/src/components/popover/popover.vue
@@ -149,5 +149,30 @@
}
}
+
+ .button-default.dropdown-item {
+ &,
+ i[class*=icon-] {
+ color: $fallback--text;
+ color: var(--btnText, $fallback--text);
+ }
+
+ &:active {
+ background-color: $fallback--lightBg;
+ background-color: var(--selectedMenuPopover, $fallback--lightBg);
+ color: $fallback--link;
+ color: var(--selectedMenuPopoverText, $fallback--link);
+ }
+
+ &:disabled {
+ color: $fallback--text;
+ color: var(--btnDisabledText, $fallback--text);
+ }
+
+ &.toggled {
+ color: $fallback--text;
+ color: var(--btnToggledText, $fallback--text);
+ }
+ }
}
</style>
diff --git a/src/components/shout_panel/shout_panel.vue b/src/components/shout_panel/shout_panel.vue
index c88797d1..f3e9ff96 100644
--- a/src/components/shout_panel/shout_panel.vue
+++ b/src/components/shout_panel/shout_panel.vue
@@ -98,7 +98,7 @@
.icon {
color: $fallback--text;
- color: var(--text, $fallback--text);
+ color: var(--panelText, $fallback--text);
margin-right: 0.5em;
}
diff --git a/src/components/side_drawer/side_drawer.js b/src/components/side_drawer/side_drawer.js
index 89719df3..bad1806b 100644
--- a/src/components/side_drawer/side_drawer.js
+++ b/src/components/side_drawer/side_drawer.js
@@ -49,7 +49,7 @@ const SideDrawer = {
currentUser () {
return this.$store.state.users.currentUser
},
- shout () { return this.$store.state.shout.channel.state === 'joined' },
+ shout () { return this.$store.state.shout.joined },
unseenNotifications () {
return unseenNotificationsFromStore(this.$store)
},
diff --git a/src/i18n/messages.js b/src/i18n/messages.js
index 2a1161be..977b8eb3 100644
--- a/src/i18n/messages.js
+++ b/src/i18n/messages.js
@@ -41,12 +41,12 @@ const loaders = {
const messages = {
languages: ['en', ...Object.keys(loaders)],
default: {
- en: require('./en.json')
+ en: require('./en.json').default
},
setLanguage: async (i18n, language) => {
if (loaders[language]) {
let messages = await loaders[language]()
- i18n.setLocaleMessage(language, messages)
+ i18n.setLocaleMessage(language, messages.default)
}
i18n.locale = language
}
diff --git a/src/i18n/te.json b/src/i18n/te.json
index 1216de59..4f255505 100644
--- a/src/i18n/te.json
+++ b/src/i18n/te.json
@@ -49,7 +49,7 @@
"notifications.repeated_you": "మీ స్థితిని పునరావృతం చేసారు",
"notifications.no_more_notifications": "ఇక నోటిఫికేషన్లు లేవు",
"post_status.new_status": "క్రొత్త స్థితిని పోస్ట్ చేయండి",
- "post_status.account_not_locked_warning": "మీ ఖాతా {౦} కాదు. ఎవరైనా మిమ్మల్ని అనుసరించి అనుచరులకు మాత్రమే ఉద్దేశించిన పోస్టులను చూడవచ్చు.",
+ "post_status.account_not_locked_warning": "మీ ఖాతా {0} కాదు. ఎవరైనా మిమ్మల్ని అనుసరించి అనుచరులకు మాత్రమే ఉద్దేశించిన పోస్టులను చూడవచ్చు.",
"post_status.account_not_locked_warning_link": "తాళం వేయబడినది",
"post_status.attachments_sensitive": "జోడింపులను సున్నితమైనవిగా గుర్తించండి",
"post_status.content_type.text/plain": "సాధారణ అక్షరాలు",
diff --git a/src/modules/shout.js b/src/modules/shout.js
index 507a4d83..88aefbfe 100644
--- a/src/modules/shout.js
+++ b/src/modules/shout.js
@@ -1,7 +1,8 @@
const shout = {
state: {
messages: [],
- channel: { state: '' }
+ channel: { state: '' },
+ joined: false
},
mutations: {
setChannel (state, channel) {
@@ -13,11 +14,23 @@ const shout = {
},
setMessages (state, messages) {
state.messages = messages.slice(-19, 20)
+ },
+ setJoined (state, joined) {
+ state.joined = joined
}
},
actions: {
initializeShout (store, socket) {
const channel = socket.channel('chat:public')
+ channel.joinPush.receive('ok', () => {
+ store.commit('setJoined', true)
+ })
+ channel.onClose(() => {
+ store.commit('setJoined', false)
+ })
+ channel.onError(() => {
+ store.commit('setJoined', false)
+ })
channel.on('new_msg', (msg) => {
store.commit('addMessage', msg)
})