Merge pull request #270 from Retrospring/bugfix/mute-rules

This commit is contained in:
Karina Kwiatek 2022-01-04 15:09:34 +01:00 committed by GitHub
commit 6bf465c8c8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -1,7 +1,7 @@
class UserController < ApplicationController
include ThemeHelper
before_action :authenticate_user!, only: %w(edit update edit_privacy update_privacy edit_theme update_theme preview_theme delete_theme data export begin_export edit_security update_2fa destroy_2fa reset_user_recovery_codes)
before_action :authenticate_user!, only: %w(edit update edit_privacy update_privacy edit_theme update_theme preview_theme delete_theme data export begin_export edit_security update_2fa destroy_2fa reset_user_recovery_codes edit_mute)
def show
@user = User.where('LOWER(screen_name) = ?', params[:username].downcase).includes(:profile).first!

View File

@ -2,7 +2,7 @@ import {createDeleteEvent, createSubmitEvent} from "retrospring/features/setting
export default (): void => {
const submit: HTMLButtonElement = document.getElementById('new-rule-submit') as HTMLButtonElement;
if (submit.classList.contains('js-initialized')) return;
if (!submit || submit.classList.contains('js-initialized')) return;
const rulesList = document.querySelector<HTMLDivElement>('.js-rules-list');
rulesList.querySelectorAll<HTMLDivElement>('.form-group:not(.js-initalized)').forEach(entry => {