From 10070394780ac79e9ee1e8548500586a1f78f65b Mon Sep 17 00:00:00 2001 From: Sergey Suprunenko Date: Sun, 10 May 2020 12:54:55 +0200 Subject: Autocomplete domain mutes from list of known instances --- .../settings_modal/tabs/mutes_and_blocks_tab.js | 28 +++++++++++++++------- .../settings_modal/tabs/mutes_and_blocks_tab.vue | 21 +++++++--------- 2 files changed, 28 insertions(+), 21 deletions(-) (limited to 'src/components/settings_modal') diff --git a/src/components/settings_modal/tabs/mutes_and_blocks_tab.js b/src/components/settings_modal/tabs/mutes_and_blocks_tab.js index b0043dbb..40a87b81 100644 --- a/src/components/settings_modal/tabs/mutes_and_blocks_tab.js +++ b/src/components/settings_modal/tabs/mutes_and_blocks_tab.js @@ -32,12 +32,12 @@ const DomainMuteList = withSubscription({ const MutesAndBlocks = { data () { return { - activeTab: 'profile', - newDomainToMute: '' + activeTab: 'profile' } }, created () { this.$store.dispatch('fetchTokens') + this.$store.dispatch('getKnownDomains') }, components: { TabSwitcher, @@ -51,6 +51,14 @@ const MutesAndBlocks = { Autosuggest, Checkbox }, + computed: { + knownDomains () { + return this.$store.state.instance.knownDomains + }, + user () { + return this.$store.state.users.currentUser + } + }, methods: { importFollows (file) { return this.$store.state.api.backendInteractor.importFollows({ file }) @@ -86,13 +94,13 @@ const MutesAndBlocks = { filterUnblockedUsers (userIds) { return reject(userIds, (userId) => { const relationship = this.$store.getters.relationship(this.userId) - return relationship.blocking || userId === this.$store.state.users.currentUser.id + return relationship.blocking || userId === this.user.id }) }, filterUnMutedUsers (userIds) { return reject(userIds, (userId) => { const relationship = this.$store.getters.relationship(this.userId) - return relationship.muting || userId === this.$store.state.users.currentUser.id + return relationship.muting || userId === this.user.id }) }, queryUserIds (query) { @@ -111,12 +119,16 @@ const MutesAndBlocks = { unmuteUsers (ids) { return this.$store.dispatch('unmuteUsers', ids) }, + filterUnMutedDomains (urls) { + return urls.filter(url => !this.user.domainMutes.includes(url)) + }, + queryKnownDomains (query) { + return new Promise((resolve, reject) => { + resolve(this.knownDomains.filter(url => url.toLowerCase().includes(query))) + }) + }, unmuteDomains (domains) { return this.$store.dispatch('unmuteDomains', domains) - }, - muteDomain () { - return this.$store.dispatch('muteDomain', this.newDomainToMute) - .then(() => { this.newDomainToMute = '' }) } } } diff --git a/src/components/settings_modal/tabs/mutes_and_blocks_tab.vue b/src/components/settings_modal/tabs/mutes_and_blocks_tab.vue index 6884b7be..5a1cf2c0 100644 --- a/src/components/settings_modal/tabs/mutes_and_blocks_tab.vue +++ b/src/components/settings_modal/tabs/mutes_and_blocks_tab.vue @@ -119,21 +119,16 @@
- - - {{ $t('domain_mute_card.mute') }} - - + +
Date: Sat, 13 Jun 2020 13:23:54 +0300 Subject: add support for defining the greentext --- src/components/settings_modal/tabs/theme_tab/theme_tab.vue | 7 +++++++ src/components/status_content/status_content.vue | 2 +- src/services/theme_data/pleromafe.js | 6 ++++++ 3 files changed, 14 insertions(+), 1 deletion(-) (limited to 'src/components/settings_modal') diff --git a/src/components/settings_modal/tabs/theme_tab/theme_tab.vue b/src/components/settings_modal/tabs/theme_tab/theme_tab.vue index fcfad23b..d14f854c 100644 --- a/src/components/settings_modal/tabs/theme_tab/theme_tab.vue +++ b/src/components/settings_modal/tabs/theme_tab/theme_tab.vue @@ -256,6 +256,13 @@ :label="$t('settings.links')" /> + +

{{ $t('settings.style.advanced_colors.alert') }}

{ diff --git a/src/services/theme_data/pleromafe.js b/src/services/theme_data/pleromafe.js index 0c1fe543..b577cfab 100644 --- a/src/services/theme_data/pleromafe.js +++ b/src/services/theme_data/pleromafe.js @@ -356,6 +356,12 @@ export const SLOT_INHERITANCE = { textColor: 'preserve' }, + postGreentext: { + depends: ['cGreen'], + layer: 'bg', + textColor: 'preserve' + }, + border: { depends: ['fg'], opacity: 'border', -- cgit v1.2.3-70-g09d2 From 2451956d838d132a14a3089546ceac59c07e1b3a Mon Sep 17 00:00:00 2001 From: Sergey Suprunenko Date: Sun, 21 Jun 2020 14:59:05 +0200 Subject: Add 'bot' flag to Profile settings --- src/components/settings_modal/tabs/profile_tab.js | 2 ++ src/components/settings_modal/tabs/profile_tab.vue | 5 +++++ src/i18n/en.json | 1 + src/i18n/ru.json | 1 + 4 files changed, 9 insertions(+) (limited to 'src/components/settings_modal') diff --git a/src/components/settings_modal/tabs/profile_tab.js b/src/components/settings_modal/tabs/profile_tab.js index 8658b097..56e956cd 100644 --- a/src/components/settings_modal/tabs/profile_tab.js +++ b/src/components/settings_modal/tabs/profile_tab.js @@ -23,6 +23,7 @@ const ProfileTab = { showRole: this.$store.state.users.currentUser.show_role, role: this.$store.state.users.currentUser.role, discoverable: this.$store.state.users.currentUser.discoverable, + bot: this.$store.state.users.currentUser.bot, allowFollowingMove: this.$store.state.users.currentUser.allow_following_move, pickAvatarBtnVisible: true, bannerUploading: false, @@ -79,6 +80,7 @@ const ProfileTab = { hide_follows: this.hideFollows, hide_followers: this.hideFollowers, discoverable: this.discoverable, + bot: this.bot, allow_following_move: this.allowFollowingMove, hide_follows_count: this.hideFollowsCount, hide_followers_count: this.hideFollowersCount, diff --git a/src/components/settings_modal/tabs/profile_tab.vue b/src/components/settings_modal/tabs/profile_tab.vue index fff4f970..decdb389 100644 --- a/src/components/settings_modal/tabs/profile_tab.vue +++ b/src/components/settings_modal/tabs/profile_tab.vue @@ -95,6 +95,11 @@ {{ $t('settings.discoverable') }}

+

+ + {{ $t('settings.bot') }} + +