├── .circleci └── config.yml ├── .eslintignore ├── .eslintrc ├── .github ├── .codecov.yml ├── FUNDING.yml ├── ISSUE_TEMPLATE │ ├── bug-feature-via-meta.md │ ├── bug_report.md │ └── feature_request.md └── workflows │ ├── codeql-analysis.yml │ ├── mirror.yml │ └── typescript.yml ├── .gitignore ├── .npmrc ├── .rubocop.yml ├── .sample.irbrc ├── CODE-STANDARDS.md ├── CONTRIBUTING.md ├── Gemfile ├── Gemfile.lock ├── INSTALLATION.md ├── LICENSE ├── README.md ├── Rakefile ├── SECURITY.md ├── app ├── assets │ ├── config │ │ └── manifest.js │ ├── images │ │ ├── .keep │ │ ├── codidact.png │ │ ├── codidactyl.png │ │ ├── favicon.ico │ │ ├── fbm.ico │ │ ├── logo.png │ │ ├── scoring_3d.png │ │ ├── scoring_distribution.png │ │ ├── scoring_formula.png │ │ ├── scoring_table.png │ │ ├── scoring_table.svg │ │ ├── square.ico │ │ ├── stripe.png │ │ └── voting.png │ ├── imgfonts │ │ ├── LICENSE.txt │ │ ├── Roboto-Black-FRLHebrew.ttf │ │ ├── Roboto-Black.ttf │ │ ├── Roboto-BlackItalic.ttf │ │ ├── Roboto-Bold.ttf │ │ ├── Roboto-BoldItalic.ttf │ │ ├── Roboto-Italic.ttf │ │ ├── Roboto-Light.ttf │ │ ├── Roboto-LightItalic.ttf │ │ ├── Roboto-Medium.ttf │ │ ├── Roboto-MediumItalic.ttf │ │ ├── Roboto-Regular.ttf │ │ ├── Roboto-Thin.ttf │ │ ├── Roboto-ThinItalic.ttf │ │ └── Roboto.ttf │ ├── javascripts │ │ ├── admin.js │ │ ├── application.js │ │ ├── caret.js │ │ ├── categories.js │ │ ├── character_count.js │ │ ├── closure.js │ │ ├── codeblocks.js │ │ ├── comments.js │ │ ├── donations.js │ │ ├── embed.js │ │ ├── filters.js │ │ ├── flags.js │ │ ├── keyboard_tools.js │ │ ├── latex_escape.js │ │ ├── licenses.js │ │ ├── livestamp.min.js │ │ ├── markdown.js │ │ ├── micro_auth │ │ │ └── apps.js │ │ ├── mod_warning.js │ │ ├── modals.js │ │ ├── moderator.js │ │ ├── notifications.js │ │ ├── post_histories.js │ │ ├── posts.js │ │ ├── preferences.js │ │ ├── privileges.js │ │ ├── qpixel_api.js │ │ ├── qpixel_dom.js │ │ ├── reactions.js │ │ ├── search.js │ │ ├── site_settings.js │ │ ├── subscriptions.js │ │ ├── suggested_edit.js │ │ ├── tag_sets.js │ │ ├── tags.js │ │ ├── textarea_popup.js │ │ ├── tour.js │ │ ├── two_factor.js │ │ ├── users.js │ │ └── votes.js │ └── stylesheets │ │ ├── _variables.scss │ │ ├── abilities.scss │ │ ├── advertisement.scss │ │ ├── application.scss │ │ ├── articles.scss │ │ ├── categories.scss │ │ ├── close_reasons.scss │ │ ├── comment_threads.scss │ │ ├── comments.scss │ │ ├── donations.scss │ │ ├── errors.scss │ │ ├── fake_community.scss │ │ ├── forms.scss │ │ ├── keyboard_tools.scss │ │ ├── licenses.scss │ │ ├── markdown_tools.scss │ │ ├── micro_auth │ │ ├── apps.scss │ │ └── authentication.scss │ │ ├── mod_warning.scss │ │ ├── notifications.scss │ │ ├── pinned_links.scss │ │ ├── post_history.scss │ │ ├── post_types.scss │ │ ├── posts.scss │ │ ├── reactions.scss │ │ ├── reports.scss │ │ ├── site_settings.scss │ │ ├── subscriptions.scss │ │ ├── suggested_edit.scss │ │ ├── tables.scss │ │ ├── tabs.scss │ │ ├── tag_sets.scss │ │ ├── tags.scss │ │ ├── textarea_popup.scss │ │ ├── topbar.scss │ │ ├── tour.scss │ │ ├── two_factor.scss │ │ ├── users.scss │ │ └── utilities.scss ├── controllers │ ├── abilities_controller.rb │ ├── active_storage │ │ └── base_controller.rb │ ├── admin_controller.rb │ ├── advertisement_controller.rb │ ├── answers_controller.rb │ ├── application_controller.rb │ ├── categories_controller.rb │ ├── close_reasons_controller.rb │ ├── comments_controller.rb │ ├── concerns │ │ ├── .keep │ │ └── stripe_event_processor.rb │ ├── donations_controller.rb │ ├── email_logs_controller.rb │ ├── errors_controller.rb │ ├── fake_community_controller.rb │ ├── flags_controller.rb │ ├── licenses_controller.rb │ ├── micro_auth │ │ ├── apps_controller.rb │ │ └── authentication_controller.rb │ ├── mod_warning_controller.rb │ ├── moderator_controller.rb │ ├── notifications_controller.rb │ ├── pinned_links_controller.rb │ ├── post_history_controller.rb │ ├── post_types_controller.rb │ ├── posts_controller.rb │ ├── questions_controller.rb │ ├── reactions_controller.rb │ ├── reports_controller.rb │ ├── search_controller.rb │ ├── site_settings_controller.rb │ ├── subscriptions_controller.rb │ ├── suggested_edit_controller.rb │ ├── tag_sets_controller.rb │ ├── tags_controller.rb │ ├── tasks_controller.rb │ ├── tour_controller.rb │ ├── two_factor_controller.rb │ ├── users │ │ ├── registrations_controller.rb │ │ ├── saml_sessions_controller.rb │ │ └── sessions_controller.rb │ ├── users_controller.rb │ └── votes_controller.rb ├── helpers │ ├── abilities_helper.rb │ ├── admin_helper.rb │ ├── advertisement_helper.rb │ ├── advertisements │ │ ├── article_helper.rb │ │ ├── codidact_helper.rb │ │ ├── community_helper.rb │ │ └── question_helper.rb │ ├── answers_helper.rb │ ├── application_helper.rb │ ├── articles_helper.rb │ ├── categories_helper.rb │ ├── close_reasons_helper.rb │ ├── comments_helper.rb │ ├── donations_helper.rb │ ├── edit_helper.rb │ ├── email_logs_helper.rb │ ├── errors_helper.rb │ ├── fake_community_helper.rb │ ├── flags_helper.rb │ ├── licenses_helper.rb │ ├── markdown_tools_helper.rb │ ├── micro_auth │ │ ├── apps_helper.rb │ │ └── authentication_helper.rb │ ├── mod_warning_helper.rb │ ├── moderator_helper.rb │ ├── notifications_helper.rb │ ├── pinned_links_helper.rb │ ├── post_types_helper.rb │ ├── posts_helper.rb │ ├── questions_helper.rb │ ├── reactions_helper.rb │ ├── reports_helper.rb │ ├── search_helper.rb │ ├── seeds_helper.rb │ ├── site_settings_helper.rb │ ├── subscriptions_helper.rb │ ├── suggested_edit_helper.rb │ ├── tabs_helper.rb │ ├── tag_sets_helper.rb │ ├── tags_helper.rb │ ├── tour_helper.rb │ ├── two_factor_helper.rb │ ├── uploads_helper.rb │ ├── users │ │ └── avatar_helper.rb │ ├── users_helper.rb │ └── votes_helper.rb ├── jobs │ ├── application_job.rb │ ├── clean_up_spammy_users_job.rb │ └── cleanup_votes_job.rb ├── mailers │ ├── .keep │ ├── admin_mailer.rb │ ├── application_mailer.rb │ ├── donation_mailer.rb │ ├── flag_mailer.rb │ ├── subscription_mailer.rb │ └── two_factor_mailer.rb ├── models │ ├── .keep │ ├── ability.rb │ ├── ability_queue.rb │ ├── answer.rb │ ├── application_record.rb │ ├── article.rb │ ├── audit_log.rb │ ├── blocked_item.rb │ ├── category.rb │ ├── category_filter_default.rb │ ├── category_post_type.rb │ ├── close_reason.rb │ ├── comment.rb │ ├── comment_thread.rb │ ├── community.rb │ ├── community_user.rb │ ├── concerns │ │ ├── .keep │ │ ├── community_related.rb │ │ ├── edits_validations.rb │ │ ├── maybe_community_related.rb │ │ ├── post_related.rb │ │ ├── post_validations.rb │ │ ├── saml_init.rb │ │ └── user_merge.rb │ ├── email_log.rb │ ├── error_log.rb │ ├── filter.rb │ ├── flag.rb │ ├── help_doc.rb │ ├── license.rb │ ├── micro_auth.rb │ ├── micro_auth │ │ ├── app.rb │ │ └── token.rb │ ├── mod_warning.rb │ ├── notification.rb │ ├── pinned_link.rb │ ├── policy_doc.rb │ ├── post.rb │ ├── post_flag_type.rb │ ├── post_history.rb │ ├── post_history_tag.rb │ ├── post_history_type.rb │ ├── post_type.rb │ ├── posts_tag.rb │ ├── question.rb │ ├── reaction.rb │ ├── reaction_type.rb │ ├── request_context.rb │ ├── site_setting.rb │ ├── sso_profile.rb │ ├── subscription.rb │ ├── suggested_edit.rb │ ├── tag.rb │ ├── tag_set.rb │ ├── tag_synonym.rb │ ├── tag_with_path.rb │ ├── thread_follower.rb │ ├── user.rb │ ├── user_ability.rb │ ├── user_website.rb │ ├── vote.rb │ └── warning_template.rb ├── tasks │ └── maintenance │ │ └── initialize_user_websites_task.rb └── views │ ├── abilities │ ├── index.html.erb │ └── show.html.erb │ ├── admin │ ├── _error_report.html.erb │ ├── _log_table.html.erb │ ├── admin_email.html.erb │ ├── all_email.html.erb │ ├── audit_log.html.erb │ ├── change_back.html.erb │ ├── create_site.html.erb │ ├── error_reports.html.erb │ ├── impersonate.html.erb │ ├── index.html.erb │ ├── new_site.html.erb │ ├── privileges.html.erb │ ├── setup.html.erb │ └── setup_save.html.erb │ ├── admin_mailer │ ├── to_all_users.html.erb │ ├── to_all_users.text.erb │ ├── to_moderators.html.erb │ └── to_moderators.text.erb │ ├── advertisement │ └── index.html.erb │ ├── application │ ├── dashboard.html.erb │ ├── keyboard_tools.html.erb │ └── osd.xml.erb │ ├── categories │ ├── _category_post_type_edit.html.erb │ ├── _form.html.erb │ ├── category_post_types.html.erb │ ├── edit.html.erb │ ├── index.html.erb │ ├── new.html.erb │ ├── post_types.html.erb │ ├── rss_feed.rss.builder │ └── show.html.erb │ ├── close_reasons │ ├── _form.html.erb │ ├── edit.html.erb │ ├── index.html.erb │ └── new.html.erb │ ├── comments │ ├── _comment.html.erb │ ├── _new_thread_modal.html.erb │ ├── _post.html.erb │ ├── _skip_deleted.erb │ ├── post.html.erb │ ├── thread.html.erb │ └── thread_followers.html.erb │ ├── devise │ ├── confirmations │ │ └── new.html.erb │ ├── mailer │ │ ├── _friendly_footer.html.erb │ │ ├── confirmation_instructions.html.erb │ │ ├── email_changed.html.erb │ │ ├── password_change.html.erb │ │ ├── reset_password_instructions.html.erb │ │ └── unlock_instructions.html.erb │ ├── passwords │ │ ├── edit.html.erb │ │ └── new.html.erb │ ├── registrations │ │ ├── edit.html.erb │ │ └── new.html.erb │ ├── sessions │ │ └── new.html.erb │ ├── shared │ │ ├── _error_messages.html.erb │ │ └── _links.html.erb │ └── unlocks │ │ └── new.html.erb │ ├── donation_mailer │ ├── donation_successful.html.erb │ ├── donation_successful.text.erb │ ├── donation_uncaptured.html.erb │ └── donation_uncaptured.text.erb │ ├── donations │ ├── index.html.erb │ ├── intent.html.erb │ └── success.html.erb │ ├── errors │ ├── conflict.html.erb │ ├── error.html.erb │ ├── forbidden.html.erb │ ├── internal_server_error.html.erb │ ├── locked.html.erb │ ├── not_found.html.erb │ ├── read_only.html.erb │ ├── restricted_content.html.erb │ ├── stat.html.erb │ └── unprocessable_entity.html.erb │ ├── fake_community │ └── communities.html.erb │ ├── flag_mailer │ └── flag_escalated.html.erb │ ├── flags │ ├── _flag.html.erb │ ├── _handled.html.erb │ ├── handled.html.erb │ ├── history.html.erb │ └── queue.html.erb │ ├── layouts │ ├── _footer.html.erb │ ├── _head.html.erb │ ├── _header.html.erb │ ├── _matomo.html.erb │ ├── _sidebar.html.erb │ ├── application.html.erb │ ├── devise_mailer.html.erb │ ├── mailer.html.erb │ ├── mailer.text.erb │ ├── stripe.html.erb │ └── without_sidebar.html.erb │ ├── licenses │ ├── _form.html.erb │ ├── _license.html.erb │ ├── edit.html.erb │ ├── index.html.erb │ └── new.html.erb │ ├── micro_auth │ ├── apps │ │ ├── _form.html.erb │ │ ├── edit.html.erb │ │ ├── index.html.erb │ │ ├── new.html.erb │ │ └── show.html.erb │ └── authentication │ │ ├── approval_redirect_error.html.erb │ │ ├── approved.html.erb │ │ ├── initiate.html.erb │ │ └── reject.html.erb │ ├── mod_warning │ ├── current.html.erb │ ├── log.html.erb │ └── new.html.erb │ ├── moderator │ ├── index.html.erb │ ├── promotions.html.erb │ ├── recent_comments.html.erb │ ├── recently_deleted_posts.html.erb │ └── user_vote_summary.html.erb │ ├── notifications │ └── index.html.erb │ ├── pinned_links │ ├── _form.html.erb │ ├── edit.html.erb │ ├── index.html.erb │ └── new.html.erb │ ├── post_history │ ├── _diff.html.erb │ └── post.html.erb │ ├── post_types │ ├── _form.html.erb │ ├── _type.html.erb │ ├── edit.html.erb │ ├── index.html.erb │ └── new.html.erb │ ├── posts │ ├── _article_list.html.erb │ ├── _edit_comment.html.erb │ ├── _edit_link.html.erb │ ├── _expanded.html.erb │ ├── _feed.rss.builder │ ├── _form.html.erb │ ├── _help_center_posts.html.erb │ ├── _image_upload.html.erb │ ├── _list.html.erb │ ├── _markdown_script.html.erb │ ├── _mdhint.html.erb │ ├── _post_tools.html.erb │ ├── _review_edit_link.html.erb │ ├── _toc_entry.html.erb │ ├── _type_agnostic.html.erb │ ├── document.html.erb │ ├── edit.html.erb │ ├── help_center.html.erb │ ├── new.html.erb │ └── show.html.erb │ ├── questions │ ├── _list.html.erb │ └── lottery.html.erb │ ├── reactions │ ├── _dialog.html.erb │ ├── _form.html.erb │ ├── _list.html.erb │ ├── edit.html.erb │ ├── index.html.erb │ └── new.html.erb │ ├── reports │ ├── _tabs.html.erb │ ├── posts.html.erb │ ├── reactions.html.erb │ ├── subscriptions.html.erb │ └── users.html.erb │ ├── search │ ├── _filters.html.erb │ ├── _widget.html.erb │ └── search.html.erb │ ├── shared │ ├── _body_field.html.erb │ ├── _char_count.html.erb │ ├── _copy_link.html.erb │ ├── _lock_notice.html.erb │ ├── _markdown_tools.html.erb │ └── _rss_link.html.erb │ ├── site_settings │ ├── edit.html.erb │ └── index.html.erb │ ├── subscription_mailer │ ├── subscription.html.erb │ └── subscription.text.erb │ ├── subscriptions │ ├── error.html.erb │ ├── index.html.erb │ └── new.html.erb │ ├── suggested_edit │ ├── category_index.html.erb │ └── show.html.erb │ ├── tag_sets │ └── index.html.erb │ ├── tags │ ├── _form.html.erb │ ├── _list.html.erb │ ├── _tag.html.erb │ ├── category.html.erb │ ├── children.html.erb │ ├── edit.html.erb │ ├── new.html.erb │ ├── nuke_warning.html.erb │ ├── select_merge.html.erb │ ├── show.html.erb │ └── show.rss.builder │ ├── tour │ ├── end.html.erb │ ├── index.html.erb │ ├── more.html.erb │ ├── question1.html.erb │ ├── question2.html.erb │ └── question3.html.erb │ ├── two_factor │ ├── disable_code.html.erb │ ├── disable_link.html.erb │ ├── enable_2fa.html.erb │ ├── enable_code.html.erb │ └── tf_status.html.erb │ ├── two_factor_mailer │ ├── backup_code.html.erb │ ├── backup_code.text.erb │ ├── disable_email.html.erb │ ├── disable_email.text.erb │ ├── login_email.html.erb │ └── login_email.text.erb │ └── users │ ├── _activity_items.html.erb │ ├── _common_card.html.erb │ ├── _deleted.html.erb │ ├── _network.html.erb │ ├── _post_usercard.html.erb │ ├── _prefs.html.erb │ ├── _tabs.html.erb │ ├── _user.html.erb │ ├── activity.html.erb │ ├── annotations.html.erb │ ├── deleted_user.html.erb │ ├── disconnect_sso.html.erb │ ├── edit_profile.html.erb │ ├── filters.html.erb │ ├── full_log.html.erb │ ├── index.html.erb │ ├── mod.html.erb │ ├── mod_privileges.html.erb │ ├── network.html.erb │ ├── posts.html.erb │ ├── preferences.html.erb │ ├── qr_login_code.html.erb │ ├── sessions │ └── verify_2fa.html.erb │ ├── show.html.erb │ └── vote_summary.html.erb ├── bin ├── bundle ├── rails ├── rake ├── setup └── spring ├── config.ru ├── config ├── application.rb ├── attribute-map.yml ├── boot.rb ├── cable.yml ├── config │ └── preferences.yml ├── credentials.yml.enc ├── database.docker.yml ├── database.sample.yml ├── environment.rb ├── environments │ ├── development.rb │ ├── production.rb │ └── test.rb ├── initializers │ ├── activerecord_relation.rb │ ├── amazon_ses.rb │ ├── application_controller_renderer.rb │ ├── assets.rb │ ├── backtrace_silencers.rb │ ├── config.rb │ ├── content_security_policy.rb │ ├── cookie_rotator.rb │ ├── cookies_serializer.rb │ ├── devise.rb │ ├── devise_example.rb │ ├── filter_parameter_logging.rb │ ├── inflections.rb │ ├── maintenance_tasks.rb │ ├── mime_types.rb │ ├── permissions_policy.rb │ ├── session_store.rb │ ├── stripe.rb │ ├── will_paginate_added_also_on_arrays.rb │ ├── wrap_parameters.rb │ ├── zz_cache_setup.rb │ └── zz_codidact_sites.rb ├── locales │ ├── devise.en.yml │ ├── en.yml │ ├── es.yml │ ├── strings │ │ ├── en.admin.yml │ │ ├── en.ads.yml │ │ ├── en.edits.yml │ │ ├── en.g.yml │ │ ├── en.posts.yml │ │ ├── en.rate_limit.yml │ │ ├── en.search.yml │ │ ├── en.votes.yml │ │ ├── es.admin.yml │ │ ├── es.ads.yml │ │ ├── es.g.yml │ │ ├── es.posts.yml │ │ └── es.rate_limit.yml │ ├── time.en_abbrev.yml │ └── time.es_abbrev.yml ├── puma.rb ├── routes.rb ├── schedule.rb ├── secrets.yml ├── spring.rb ├── storage.docker.yml └── storage.sample.yml ├── db ├── migrate │ ├── 20160424111225_devise_create_users.rb │ ├── 20160424111446_add_user_levels_to_users.rb │ ├── 20160424113217_create_site_settings.rb │ ├── 20160424143518_create_questions.rb │ ├── 20160424143813_add_user_to_questions.rb │ ├── 20160424162234_add_rep_and_name_to_users.rb │ ├── 20160424172308_create_answers.rb │ ├── 20160424172323_add_question_to_answer.rb │ ├── 20160424172807_add_user_to_answers.rb │ ├── 20160424183802_create_votes.rb │ ├── 20160424183824_add_user_and_post_to_votes.rb │ ├── 20160424191151_remove_post_from_votes.rb │ ├── 20160424191405_add_polymorphic_post_to_votes.rb │ ├── 20160424193831_rename_votes_type_to_votes_vote_type.rb │ ├── 20160428151443_add_user_to_privileges.rb │ ├── 20160428151900_add_name_to_privileges.rb │ ├── 20160428152011_add_threshold_to_privileges.rb │ ├── 20160428202611_add_is_deleted_to_questions.rb │ ├── 20160429150239_add_is_deleted_to_answers.rb │ ├── 20160429160133_add_deleted_at_to_questions.rb │ ├── 20160429160144_add_deleted_at_to_answers.rb │ ├── 20160430085505_create_notifications.rb │ ├── 20160430085520_add_user_to_notifications.rb │ ├── 20160430092324_add_default_false_value_to_notifications.rb │ ├── 20160501095155_create_comments.rb │ ├── 20160501095354_add_post_to_comments.rb │ ├── 20160501101156_add_content_to_comments.rb │ ├── 20160501103643_add_is_deleted_to_comments.rb │ ├── 20160501105740_add_user_to_comments.rb │ ├── 20160501150244_create_flags.rb │ ├── 20160501150316_create_flag_statuses.rb │ ├── 20160501150344_add_user_to_flags.rb │ ├── 20160501150355_add_polymorphic_post_to_flags.rb │ ├── 20160501150425_add_flag_to_flag_statuses.rb │ ├── 20160501203952_add_default_to_is_deleted.rb │ ├── 20160507112321_create_post_history_types.rb │ ├── 20160507112635_create_post_histories.rb │ ├── 20160507112646_add_post_to_post_history.rb │ ├── 20160507135329_remove_post_fields_from_post_history.rb │ ├── 20160615175537_add_defaults_to_deleted.rb │ ├── 20160619161305_add_receiving_user_to_votes.rb │ ├── 20160619162714_create_suspicious_votes.rb │ ├── 20160621093334_rename_user_attributes.rb │ ├── 20160621102440_create_join_table_privilege_user.rb │ ├── 20160621145835_add_close_fields_to_questions.rb │ ├── 20160621174102_rename_closed_by_to_closed_by_id.rb │ ├── 20191109211244_change_site_settings_value_type.rb │ ├── 20191110173829_move_to_single_post_model.rb │ ├── 20191110193734_remove_polymorphic_assoc_fields.rb │ ├── 20191110205100_rename_comments_is_deleted.rb │ ├── 20191110212601_add_post_defaults.rb │ ├── 20191120165535_remove_action_name_from_post_history_types.rb │ ├── 20191120170439_remove_user_id_from_privileges.rb │ ├── 20191122124913_change_recv_user_field_name_on_votes.rb │ ├── 20191124214828_add_value_type_to_site_settings.rb │ ├── 20191125135227_add_description_to_site_settings.rb │ ├── 20191125145708_add_name_indexes.rb │ ├── 20191127121809_add_body_markdown_to_posts.rb │ ├── 20191202195956_add_profile_attributes_to_user.rb │ ├── 20191202215751_add_profile_markdown_to_users.rb │ ├── 20191204172132_create_tags.rb │ ├── 20191204172148_create_post_tags_link_table.rb │ ├── 20191204172543_rename_posts_tags.rb │ ├── 20191205115827_add_answer_count_to_posts.rb │ ├── 20191205122016_add_default_to_answer_count.rb │ ├── 20191205122434_add_last_activity_to_posts.rb │ ├── 20191205123038_rework_flag_system_tables.rb │ ├── 20191205123408_add_handled_at_to_flags.rb │ ├── 20191205135001_create_active_storage_tables.active_storage.rb │ ├── 20191205155835_add_state_fields_to_post_history.rb │ ├── 20191205212204_add_attribution_fields_to_post.rb │ ├── 20191205225500_add_se_acct_id_to_users.rb │ ├── 20191206213515_add_transferred_content_to_users.rb │ ├── 20191207001359_add_search_fulltext_index_to_posts.rb │ ├── 20191207011614_add_is_meta_to_posts.rb │ ├── 20191208231830_add_doc_slug_to_posts.rb │ ├── 20191215183139_add_last_activity_by_to_posts.rb │ ├── 20191215211744_change_comments_content_field_type.rb │ ├── 20191216161051_add_users_username_index.rb │ ├── 20191217000359_add_comment_to_post_history.rb │ ├── 20191225135200_add_category_to_site_settings.rb │ ├── 20191225141700_add_setting_categories.rb │ ├── 20200109205444_change_settings_to_text_type.rb │ ├── 20200115221655_create_subscriptions.rb │ ├── 20200116005738_add_name_to_subscriptions.rb │ ├── 20200116132702_add_default_to_subscriptions_enabled.rb │ ├── 20200116132808_allow_null_subscriptions_last_sent.rb │ ├── 20200122151548_add_category_to_posts.rb │ ├── 20200128123353_move_is_meta_to_category.rb │ ├── 20200202052500_create_communities_table.rb │ ├── 20200317173232_close_reasons.rb │ ├── 20200318161617_add_comunity_scope_to_close_reasons.rb │ ├── 20200318164203_add_index_to_flags_status.rb │ ├── 20200321135935_create_tag_sets.rb │ ├── 20200321135945_add_tag_set_reference_to_tags.rb │ ├── 20200323131708_add_indexes_to_posts.rb │ ├── 20200411195247_create_categories.rb │ ├── 20200411195809_move_posts_to_category_reference.rb │ ├── 20200411210022_create_categories_post_types.rb │ ├── 20200412121936_correct_close_reasons_reference_attribute_name.rb │ ├── 20200412122236_add_display_post_types_to_categories.rb │ ├── 20200413144332_add_is_homepage_to_categories.rb │ ├── 20200413174714_add_tag_set_reference_to_categories.rb │ ├── 20200420151217_add_trust_level_to_users.rb │ ├── 20200420151720_add_min_trust_level_to_categories.rb │ ├── 20200422152359_add_button_text_to_categories.rb │ ├── 20200428172814_create_licenses.rb │ ├── 20200428173033_add_license_reference_to_posts.rb │ ├── 20200428181938_add_customization_fields_to_category.rb │ ├── 20200430123008_add_posting_tips_overrides_to_category.rb │ ├── 20200430220415_create_error_logs.rb │ ├── 20200430220944_add_uuid_to_error_logs.rb │ ├── 20200501215447_add_min_view_trust_level_to_categories.rb │ ├── 20200502001225_add_license_reference_to_categories.rb │ ├── 20200502152723_add_enabled_to_licenses.rb │ ├── 20200503110754_add_qr_login_attributes_to_user.rb │ ├── 20200504213143_add_two_factor_token_to_users.rb │ ├── 20200507235849_add_user_agent_to_error_logs.rb │ ├── 20200508112958_add_sequence_to_categories.rb │ ├── 20200508115752_add_category_tag_join_tables.rb │ ├── 20200512115318_create_suggested_edits.rb │ ├── 20200515212247_add_post_indexes.rb │ ├── 20200516162625_update_answer_count_column.rb │ ├── 20200517105207_add_confirmable_to_devise.rb │ ├── 20200528145307_add_two_factor_method_to_users.rb │ ├── 20200601113238_add_index_to_last_activity.rb │ ├── 20200610150214_add_help_attributes_to_posts.rb │ ├── 20200610152505_allow_post_community_id_null.rb │ ├── 20200610152647_allow_post_history_community_id_null.rb │ ├── 20200612154828_add_unique_index_to_posts_tags.rb │ ├── 20200616224440_change_to_wilson_scores.rb │ ├── 20200617140007_change_post_score_column_type.rb │ ├── 20200618094826_add_suspensions_and_warnings.rb │ ├── 20200618124645_add_warning_templates.rb │ ├── 20200625115618_add_mod_tags_join_table.rb │ ├── 20200629131408_update_tag_model.rb │ ├── 20200630001048_remove_excerpt_markdown.rb │ ├── 20200630105117_allow_tag_parents.rb │ ├── 20200701132522_add_index_to_post_score.rb │ ├── 20200701132654_add_indexes_to_vote_counts.rb │ ├── 20200709204628_create_audit_logs.rb │ ├── 20200709204728_add_audit_indexes.rb │ ├── 20200711121645_add_community_to_audit_logs.rb │ ├── 20200716081538_create_blocked_items.rb │ ├── 20200716191141_add_comments_disabled_to_posts.rb │ ├── 20200718163608_rename_type_column_of_blocked_items.rb │ ├── 20200721185048_add_title_and_tags_to_post_history.rb │ ├── 20200721185230_create_post_history_tags.rb │ ├── 20200727183756_create_pinned_links.rb │ ├── 20200728093322_add_eligible_for_hot_post_to_category.rb │ ├── 20200806103121_add_staff_to_users.rb │ ├── 20200810153141_create_trust_levels.rb │ ├── 20200810153831_create_user_privileges.rb │ ├── 20200813125349_rename_ability_tables.rb │ ├── 20200813132829_enforce_concurrence_of_is_moderator_and_mod_ability.rb │ ├── 20200813141412_have_two_descriptions_on_abilities.rb │ ├── 20200814203051_create_post_flag_types.rb │ ├── 20200815103111_add_post_flag_type_id_to_flags.rb │ ├── 20200815191909_add_locked_to_posts.rb │ ├── 20200815193704_add_locked_until_to_posts.rb │ ├── 20200829235149_add_edit_fields_to_post.rb │ ├── 20200910103140_add_before_columns_to_suggested_edit.rb │ ├── 20201001085031_add_read_to_mod_warning.rb │ ├── 20201112021641_add_cid_to_users.rb │ ├── 20201118222120_create_ability_queues.rb │ ├── 20201123132854_add_lockable_omniauthable.rb │ ├── 20201204170746_add_columns_to_post_type.rb │ ├── 20201212235514_move_trust_level_to_community_user.rb │ ├── 20201216202459_add_fake_community_option.rb │ ├── 20201216225353_add_is_freely_editable_to_post_types.rb │ ├── 20201217025220_add_icon_name_to_post_types.rb │ ├── 20201231124614_create_comment_threads.rb │ ├── 20201231130344_add_community_id_to_comment_threads.rb │ ├── 20201231192529_remove_archived_until.rb │ ├── 20210102143426_add_description_to_licenses.rb │ ├── 20210102162706_create_thread_followers.rb │ ├── 20210106230120_add_rep_attributes_to_post_types.rb │ ├── 20210107163304_add_developer_flag_to_users.rb │ ├── 20210112225651_add_hidden_flag_to_communities.rb │ ├── 20210422090732_change_flags_reason_field_type.rb │ ├── 20210609233417_add_defaults.rb │ ├── 20210609235441_add_requires_details_to_post_flag_types.rb │ ├── 20210627152246_make_flags_polymorphic.rb │ ├── 20210710203352_create_reaction_types.rb │ ├── 20210710203801_create_reactions.rb │ ├── 20210710204812_add_has_reactions_to_post_types.rb │ ├── 20210711210342_add_is_active_to_reaction_types.rb │ ├── 20210711230618_move_reputation_to_category_post_type.rb │ ├── 20210712144301_move_category_post_types_to_id_primary_key.rb │ ├── 20210723221136_add_answer_type_to_post_types.rb │ ├── 20210724224957_add_discord_link_to_users.rb │ ├── 20210728161257_add_deleted_to_users.rb │ ├── 20210729174224_remove_suspicious_votes.rb │ ├── 20210821080736_change_notifications_content_field_type.rb │ ├── 20210827143124_post_type_specific_reactions.rb │ ├── 20210827203013_normalize_keys_in_reactions.rb │ ├── 20211113223347_add_escalated_to_flags.rb │ ├── 20211121194612_create_micro_auth_apps.rb │ ├── 20211121195100_create_micro_auth_tokens.rb │ ├── 20220811131155_create_sso_profile.rb │ ├── 20220815130313_add_foreign_key_constraint_to_active_storage_attachments_for_blob_id.active_storage.rb │ ├── 20220901194344_add_service_name_to_active_storage_blobs.active_storage.rb │ ├── 20220901194345_create_active_storage_variant_records.active_storage.rb │ ├── 20220903174045_remove_not_null_on_active_storage_blobs_checksum.active_storage.rb │ ├── 20220913183826_add_post_to_thread_followers.rb │ ├── 20220915181608_create_tag_synonyms.rb │ ├── 20220916075849_create_filters.rb │ ├── 20221002043021_create_category_filter_defaults.rb │ ├── 20230613205236_add_min_title_length_to_categories.rb │ ├── 20230627035349_add_default_filter_to_category.rb │ ├── 20230726143348_add_hidden_to_post_history.rb │ ├── 20230803191600_add_backup_2fa_code_to_users.rb │ ├── 20230817213150_rename_site_setting_category_email_subscriptions.rb │ ├── 202309141441_disable_needs_author_attention_flag.rb │ ├── 20240405113618_create_email_logs.rb │ ├── 20241020193053_add_post_count_to_community_users.rb │ ├── 20250123141400_create_user_websites.rb │ ├── 20250128030354_create_maintenance_tasks_runs.maintenance_tasks.rb │ ├── 20250128030355_change_cursor_to_string.maintenance_tasks.rb │ ├── 20250128030356_remove_index_on_task_name.maintenance_tasks.rb │ ├── 20250128030357_add_arguments_to_maintenance_tasks_runs.maintenance_tasks.rb │ ├── 20250128030358_add_lock_version_to_maintenance_tasks_runs.maintenance_tasks.rb │ ├── 20250128030359_change_runs_tick_columns_to_bigints.maintenance_tasks.rb │ ├── 20250128030360_add_index_on_task_name_and_status_to_runs.maintenance_tasks.rb │ └── 20250128030361_add_metadata_to_runs.maintenance_tasks.rb ├── schema.rb ├── scripts │ ├── create_tags_path_view.rb │ ├── create_tags_path_view.sql │ ├── recalc_post_scores.sql │ ├── remove_exact_duplicates.sql │ ├── rep_recalc_community.sql │ ├── rep_recalc_user.sql │ ├── reset_answer_counts.sql │ ├── reset_collations.rb │ ├── reset_thread_reply_counts.sql │ └── tag_children.sql ├── seeds.rb └── seeds │ ├── abilities.yml │ ├── abilities │ ├── edit_posts.html │ ├── edit_tags.html │ ├── everyone.html │ ├── flag_close.html │ ├── flag_curate.html │ ├── mod.html │ └── unrestricted.html │ ├── categories.yml │ ├── close_reasons.yml │ ├── community_users.yml │ ├── filters.yml │ ├── licenses.yml │ ├── post_flag_types.yml │ ├── post_history_types.yml │ ├── post_types.yml │ ├── posts.yml │ ├── posts │ ├── abilities.html │ ├── accessibility-policy.html │ ├── accessibility.html │ ├── advanced-formatting.html │ ├── alt-text.html │ ├── articles.html │ ├── category-permissions.html │ ├── coc.html │ ├── deleted.html │ ├── formatting.html │ ├── global_faq.html │ ├── how-to-ask.html │ ├── licenses.html │ ├── local_faq.html │ ├── moderator.html │ ├── privacy-policy.html │ ├── referencing.html │ ├── scoring.html │ ├── search.html │ ├── spam.html │ ├── tos.html │ ├── voting.html │ └── warnings.html │ ├── reaction_types.yml │ ├── site_settings.yml │ ├── site_settings │ ├── asking_guidance.html │ ├── tour_meta_description.html │ ├── tour_more_information.html │ └── widgets_network_pitch.html │ ├── tag_sets.yml │ ├── users.yml │ ├── warning_templates.yml │ └── warning_templates │ ├── off-topic.md │ ├── rudeness.md │ └── spam.md ├── docker-compose.yml ├── docker ├── Dockerfile ├── Dockerfile.arm ├── Dockerfile.db ├── Dockerfile.dev ├── README.md ├── compose-env ├── create_admin_and_community.rb ├── dummy.env ├── entrypoint.sh ├── local-setup.sh └── mysql-init.sql ├── global.d.ts ├── img ├── categories.png ├── create-post.png ├── edit-category.png ├── example_screenshot_codidact.jpg ├── interface.png ├── logged-in.png ├── meta-tags.png ├── post.png ├── qpixel-dev.png ├── required-tags.png ├── tagset-selected.png └── tagset.png ├── lib ├── assets │ └── .keep ├── console_extension.rb ├── namespaced_env_cache.rb ├── rubocop │ └── path_in_helpers.rb └── tasks │ └── .keep ├── package-lock.json ├── package.json ├── public ├── 404.html ├── 422.html ├── 500.html ├── assets │ ├── ability-help │ │ ├── close-dialog.png │ │ ├── edit-link.png │ │ ├── flag-dialog.png │ │ ├── flag-inline-handling.png │ │ └── voting.png │ ├── codidact-org.png │ ├── codidactyl.png │ ├── community │ │ ├── codegolf.css │ │ ├── codegolf.js │ │ ├── judaism.css │ │ └── judaism.js │ ├── down-clear.png │ ├── down-fill.png │ ├── favicon.png │ ├── logo-writing.png │ ├── logo.png │ ├── scoring_3d.png │ ├── scoring_distribution.png │ ├── scoring_formula.png │ ├── scoring_table.png │ ├── scoring_table.svg │ ├── tour-clippy.png │ ├── tour-evil.png │ ├── up-clear.png │ └── up-fill.png ├── favicon.ico └── robots.txt ├── scripts ├── change_to_wilson_scores.rb ├── cleanup_drafts.rb ├── cleanup_votes.rb ├── clear_cache.rb ├── create_backup_2fa_codes.rb ├── create_general_thread_for_old_comments.rb ├── create_initial_tags.rb ├── import │ ├── api_import.rb │ ├── database_import.rb │ ├── dump_import.rb │ └── stack_import.rb ├── mail_uncaptured_donations.rb ├── prune_email_logs.rb ├── recalc_abilities.rb ├── recalc_abilities_upon_first_migration.rb ├── run_spam_cleanup.rb ├── send_subscription_emails.rb └── wipe_everything.rb ├── test ├── .rubocop.yml ├── application_system_test_case.rb ├── controllers │ ├── .keep │ ├── abilities_controller_test.rb │ ├── admin_controller_test.rb │ ├── advertisement_controller_test.rb │ ├── answers_controller_test.rb │ ├── articles_controller_test.rb │ ├── categories_controller_test.rb │ ├── close_reasons_controller_test.rb │ ├── comments_controller_test.rb │ ├── donations_controller_test.rb │ ├── email_logs_controller_test.rb │ ├── fake_community_controller_test.rb │ ├── flags_controller_test.rb │ ├── licenses_controller_test.rb │ ├── micro_auth │ │ ├── apps_controller_test.rb │ │ └── authentication_controller_test.rb │ ├── mod_warning_controller_test.rb │ ├── moderator_controller_test.rb │ ├── notifications_controller_test.rb │ ├── pinned_links_controller_test.rb │ ├── post_history_controller_test.rb │ ├── post_types_controller_test.rb │ ├── posts │ │ ├── change_category_test.rb │ │ ├── close_test.rb │ │ ├── create_test.rb │ │ ├── delete_test.rb │ │ ├── drafts_test.rb │ │ ├── edit_test.rb │ │ ├── feature_test.rb │ │ ├── help_test.rb │ │ ├── lock_test.rb │ │ ├── new_test.rb │ │ ├── reopen_test.rb │ │ ├── restore_test.rb │ │ ├── show_test.rb │ │ ├── toggle_comments_test.rb │ │ ├── unlock_test.rb │ │ └── update_test.rb │ ├── questions_controller_test.rb │ ├── reactions_controller_test.rb │ ├── reports_controller_test.rb │ ├── search_controller_test.rb │ ├── site_settings_controller_test.rb │ ├── subscriptions_controller_test.rb │ ├── suggested_edit_controller_test.rb │ ├── tag_sets_controller_test.rb │ ├── tags_controller_test.rb │ ├── tour_controller_test.rb │ ├── two_factor_controller_test.rb │ ├── users │ │ └── sessions_controller_test.rb │ ├── users_controller_test.rb │ └── votes_controller_test.rb ├── fixtures │ ├── .keep │ ├── abilities.yml │ ├── ability_queues.yml │ ├── audit_logs.yml │ ├── blocked_items.yml │ ├── categories.yml │ ├── category_filter_defaults.yml │ ├── category_post_types.yml │ ├── close_reasons.yml │ ├── comment_threads.yml │ ├── comments.yml │ ├── communities.yml │ ├── community_users.yml │ ├── email_logs.yml │ ├── error_logs.yml │ ├── filters.yml │ ├── flags.yml │ ├── licenses.yml │ ├── micro_auth │ │ ├── apps.yml │ │ └── tokens.yml │ ├── mod_warnings.yml │ ├── notifications.yml │ ├── pinned_links.yml │ ├── post_flag_types.yml │ ├── post_histories.yml │ ├── post_history_tags.yml │ ├── post_history_types.yml │ ├── post_types.yml │ ├── posts.yml │ ├── reaction_types.yml │ ├── reactions.yml │ ├── site_settings.yml │ ├── subscriptions.yml │ ├── suggested_edits.yml │ ├── tag_sets.yml │ ├── tag_synonyms.yml │ ├── tags.yml │ ├── thread_followers.yml │ ├── user_abilities.yml │ ├── users.yml │ ├── votes.yml │ └── warning_templates.yml ├── helpers │ ├── .keep │ ├── abilities_helper_test.rb │ ├── comments_helper_test.rb │ ├── search_helper_test.rb │ ├── seeds_helper_test.rb │ └── users_helper_test.rb ├── integration │ ├── .keep │ └── tasks_integration_test.rb ├── jobs │ └── clean_up_spammy_users_job_test.rb ├── mailers │ ├── .keep │ ├── admin_mailer_test.rb │ ├── donation_mailer_test.rb │ ├── flag_mailer_test.rb │ ├── previews │ │ ├── admin_mailer_preview.rb │ │ ├── devise_mailer_preview.rb │ │ ├── donation_mailer_preview.rb │ │ ├── flag_mailer_preview.rb │ │ ├── subscription_mailer_preview.rb │ │ └── two_factor_mailer_preview.rb │ ├── subscription_mailer_test.rb │ └── two_factor_mailer_test.rb ├── models │ ├── .keep │ ├── ability_queue_test.rb │ ├── ability_test.rb │ ├── audit_log_test.rb │ ├── blocked_item_test.rb │ ├── category_filter_default_test.rb │ ├── category_test.rb │ ├── comment_test.rb │ ├── comment_thread_test.rb │ ├── email_log_test.rb │ ├── error_log_test.rb │ ├── filter_test.rb │ ├── flag_status_test.rb │ ├── flag_test.rb │ ├── license_test.rb │ ├── micro_auth │ │ ├── app_test.rb │ │ └── token_test.rb │ ├── mod_warning_test.rb │ ├── notification_test.rb │ ├── pinned_link_test.rb │ ├── post_flag_type_test.rb │ ├── post_history_tag_test.rb │ ├── post_history_test.rb │ ├── post_history_type_test.rb │ ├── post_test.rb │ ├── reaction_test.rb │ ├── reaction_type_test.rb │ ├── request_context_test.rb │ ├── site_setting_test.rb │ ├── subscription_test.rb │ ├── suggested_edit_test.rb │ ├── tag_set_test.rb │ ├── tag_synonym_test.rb │ ├── tag_test.rb │ ├── thread_follower_test.rb │ ├── user_ability_test.rb │ ├── user_test.rb │ ├── vote_test.rb │ └── warning_template_test.rb ├── support │ ├── application_test_helper.rb │ └── community_related_helper.rb ├── system │ ├── login_test.rb │ └── post_test.rb └── test_helper.rb ├── tsconfig.json └── vendor └── assets ├── javascripts └── .keep └── stylesheets └── .keep /.eslintignore: -------------------------------------------------------------------------------- 1 | **/*{.,-}min.js 2 | -------------------------------------------------------------------------------- /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | github: codidact 2 | custom: https://meta.codidact.com/donate 3 | -------------------------------------------------------------------------------- /.github/workflows/mirror.yml: -------------------------------------------------------------------------------- 1 | name: Mirror to Codeberg 2 | 3 | on: 4 | push: 5 | branches: 6 | - develop 7 | 8 | jobs: 9 | mirror: 10 | name: Mirror 11 | runs-on: ubuntu-latest 12 | 13 | steps: 14 | - name: Checkout repo 15 | uses: actions/checkout@v3 16 | with: 17 | fetch-depth: 0 18 | 19 | - name: Mirror 20 | uses: yesolutions/mirror-action@master 21 | with: 22 | REMOTE: 'git@codeberg.org:codidact/qpixel' 23 | GIT_SSH_PRIVATE_KEY: ${{ secrets.GIT_SSH_PRIVATE_KEY }} 24 | GIT_SSH_NO_VERIFY_HOST: "true" 25 | -------------------------------------------------------------------------------- /.github/workflows/typescript.yml: -------------------------------------------------------------------------------- 1 | name: TypeScript check 2 | 3 | on: 4 | push: 5 | branches: 6 | - develop 7 | pull_request: 8 | branches: 9 | - develop 10 | 11 | jobs: 12 | typescript: 13 | name: TypeScript type checking 14 | runs-on: ubuntu-latest 15 | 16 | steps: 17 | - name: Checkout repo 18 | uses: actions/checkout@v3 19 | - name: Install Node 20 | uses: actions/setup-node@v1 21 | with: 22 | node-version: 22 23 | - name: npm install 24 | run: npm install 25 | - name: tsc 26 | run: tsc 27 | -------------------------------------------------------------------------------- /.npmrc: -------------------------------------------------------------------------------- 1 | save-exact = true -------------------------------------------------------------------------------- /.sample.irbrc: -------------------------------------------------------------------------------- 1 | Qpixel.irb! if defined?(Qpixel) 2 | -------------------------------------------------------------------------------- /Rakefile: -------------------------------------------------------------------------------- 1 | # Add your own tasks in files placed in lib/tasks ending in .rake, 2 | # for example lib/tasks/capistrano.rake, and they will automatically be available to Rake. 3 | 4 | require File.expand_path('config/application', __dir__) 5 | 6 | Rails.application.load_tasks 7 | -------------------------------------------------------------------------------- /app/assets/config/manifest.js: -------------------------------------------------------------------------------- 1 | //= link_tree ../images 2 | //= link_directory ../javascripts .js 3 | //= link_directory ../stylesheets .css 4 | -------------------------------------------------------------------------------- /app/assets/images/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codidact/qpixel/e29966742561401c32d7c914113cc09a7737c6ed/app/assets/images/.keep -------------------------------------------------------------------------------- /app/assets/images/codidact.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codidact/qpixel/e29966742561401c32d7c914113cc09a7737c6ed/app/assets/images/codidact.png -------------------------------------------------------------------------------- /app/assets/images/codidactyl.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codidact/qpixel/e29966742561401c32d7c914113cc09a7737c6ed/app/assets/images/codidactyl.png -------------------------------------------------------------------------------- /app/assets/images/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codidact/qpixel/e29966742561401c32d7c914113cc09a7737c6ed/app/assets/images/favicon.ico -------------------------------------------------------------------------------- /app/assets/images/fbm.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codidact/qpixel/e29966742561401c32d7c914113cc09a7737c6ed/app/assets/images/fbm.ico -------------------------------------------------------------------------------- /app/assets/images/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codidact/qpixel/e29966742561401c32d7c914113cc09a7737c6ed/app/assets/images/logo.png -------------------------------------------------------------------------------- /app/assets/images/scoring_3d.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codidact/qpixel/e29966742561401c32d7c914113cc09a7737c6ed/app/assets/images/scoring_3d.png -------------------------------------------------------------------------------- /app/assets/images/scoring_distribution.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codidact/qpixel/e29966742561401c32d7c914113cc09a7737c6ed/app/assets/images/scoring_distribution.png -------------------------------------------------------------------------------- /app/assets/images/scoring_formula.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codidact/qpixel/e29966742561401c32d7c914113cc09a7737c6ed/app/assets/images/scoring_formula.png -------------------------------------------------------------------------------- /app/assets/images/scoring_table.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codidact/qpixel/e29966742561401c32d7c914113cc09a7737c6ed/app/assets/images/scoring_table.png -------------------------------------------------------------------------------- /app/assets/images/square.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codidact/qpixel/e29966742561401c32d7c914113cc09a7737c6ed/app/assets/images/square.ico -------------------------------------------------------------------------------- /app/assets/images/stripe.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codidact/qpixel/e29966742561401c32d7c914113cc09a7737c6ed/app/assets/images/stripe.png -------------------------------------------------------------------------------- /app/assets/images/voting.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codidact/qpixel/e29966742561401c32d7c914113cc09a7737c6ed/app/assets/images/voting.png -------------------------------------------------------------------------------- /app/assets/imgfonts/Roboto-Black-FRLHebrew.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codidact/qpixel/e29966742561401c32d7c914113cc09a7737c6ed/app/assets/imgfonts/Roboto-Black-FRLHebrew.ttf -------------------------------------------------------------------------------- /app/assets/imgfonts/Roboto-Black.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codidact/qpixel/e29966742561401c32d7c914113cc09a7737c6ed/app/assets/imgfonts/Roboto-Black.ttf -------------------------------------------------------------------------------- /app/assets/imgfonts/Roboto-BlackItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codidact/qpixel/e29966742561401c32d7c914113cc09a7737c6ed/app/assets/imgfonts/Roboto-BlackItalic.ttf -------------------------------------------------------------------------------- /app/assets/imgfonts/Roboto-Bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codidact/qpixel/e29966742561401c32d7c914113cc09a7737c6ed/app/assets/imgfonts/Roboto-Bold.ttf -------------------------------------------------------------------------------- /app/assets/imgfonts/Roboto-BoldItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codidact/qpixel/e29966742561401c32d7c914113cc09a7737c6ed/app/assets/imgfonts/Roboto-BoldItalic.ttf -------------------------------------------------------------------------------- /app/assets/imgfonts/Roboto-Italic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codidact/qpixel/e29966742561401c32d7c914113cc09a7737c6ed/app/assets/imgfonts/Roboto-Italic.ttf -------------------------------------------------------------------------------- /app/assets/imgfonts/Roboto-Light.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codidact/qpixel/e29966742561401c32d7c914113cc09a7737c6ed/app/assets/imgfonts/Roboto-Light.ttf -------------------------------------------------------------------------------- /app/assets/imgfonts/Roboto-LightItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codidact/qpixel/e29966742561401c32d7c914113cc09a7737c6ed/app/assets/imgfonts/Roboto-LightItalic.ttf -------------------------------------------------------------------------------- /app/assets/imgfonts/Roboto-Medium.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codidact/qpixel/e29966742561401c32d7c914113cc09a7737c6ed/app/assets/imgfonts/Roboto-Medium.ttf -------------------------------------------------------------------------------- /app/assets/imgfonts/Roboto-MediumItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codidact/qpixel/e29966742561401c32d7c914113cc09a7737c6ed/app/assets/imgfonts/Roboto-MediumItalic.ttf -------------------------------------------------------------------------------- /app/assets/imgfonts/Roboto-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codidact/qpixel/e29966742561401c32d7c914113cc09a7737c6ed/app/assets/imgfonts/Roboto-Regular.ttf -------------------------------------------------------------------------------- /app/assets/imgfonts/Roboto-Thin.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codidact/qpixel/e29966742561401c32d7c914113cc09a7737c6ed/app/assets/imgfonts/Roboto-Thin.ttf -------------------------------------------------------------------------------- /app/assets/imgfonts/Roboto-ThinItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codidact/qpixel/e29966742561401c32d7c914113cc09a7737c6ed/app/assets/imgfonts/Roboto-ThinItalic.ttf -------------------------------------------------------------------------------- /app/assets/imgfonts/Roboto.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codidact/qpixel/e29966742561401c32d7c914113cc09a7737c6ed/app/assets/imgfonts/Roboto.ttf -------------------------------------------------------------------------------- /app/assets/javascripts/micro_auth/apps.js: -------------------------------------------------------------------------------- 1 | document.addEventListener('DOMContentLoaded', () => { 2 | QPixel.DOM.addSelectorListener('click', '.js-copy-key', (ev) => { 3 | const label = /** @type {HTMLElement} */ (ev.target).closest('label'); 4 | const field = /** @type {HTMLInputElement} */ (document.querySelector(`#${label.getAttribute('for')}`)); 5 | navigator.clipboard.writeText(field.value); 6 | field.focus(); 7 | field.setSelectionRange(0, field.value.length); 8 | }); 9 | }); 10 | -------------------------------------------------------------------------------- /app/assets/javascripts/mod_warning.js: -------------------------------------------------------------------------------- 1 | document.addEventListener('DOMContentLoaded', () => { 2 | QPixel.DOM.addSelectorListener('input', '.js--warning-template-selection', (ev) => { 3 | const tgt = /** @type {HTMLInputElement} */ (ev.target); 4 | const input = /** @type {HTMLInputElement} */ (document.querySelector('.js--warning-template-target textarea')); 5 | input.value = atob(tgt.value); 6 | }); 7 | }); 8 | -------------------------------------------------------------------------------- /app/assets/javascripts/modals.js: -------------------------------------------------------------------------------- 1 | document.addEventListener('DOMContentLoaded', () => { 2 | document.addEventListener('keypress', (ev) => { 3 | if (ev.code === 'Escape') { 4 | document.querySelectorAll('.modal').forEach((el) => el.classList.remove('is-active')); 5 | } 6 | }); 7 | }); 8 | -------------------------------------------------------------------------------- /app/assets/javascripts/post_histories.js: -------------------------------------------------------------------------------- 1 | $(() => { 2 | const openRelevantEditOnly = () => { 3 | $("details.history-event").prop('open', false); 4 | $(location.hash).prop('open', true); 5 | } 6 | 7 | window.addEventListener("hashchange", openRelevantEditOnly); 8 | openRelevantEditOnly(); 9 | }); 10 | -------------------------------------------------------------------------------- /app/assets/stylesheets/abilities.scss: -------------------------------------------------------------------------------- 1 | // Place all the styles related to the abilities controller here. 2 | // They will automatically be included in application.css. 3 | // You can use Sass (SCSS) here: http://sass-lang.com/ 4 | -------------------------------------------------------------------------------- /app/assets/stylesheets/advertisement.scss: -------------------------------------------------------------------------------- 1 | // Place all the styles related to the Advertisement controller here. 2 | // They will automatically be included in application.css. 3 | // You can use Sass (SCSS) here: http://sass-lang.com/ 4 | -------------------------------------------------------------------------------- /app/assets/stylesheets/articles.scss: -------------------------------------------------------------------------------- 1 | // Place all the styles related to the Articles controller here. 2 | // They will automatically be included in application.css. 3 | // You can use Sass (SCSS) here: http://sass-lang.com/ 4 | -------------------------------------------------------------------------------- /app/assets/stylesheets/close_reasons.scss: -------------------------------------------------------------------------------- 1 | // Place all the styles related to the CloseReasons controller here. 2 | // They will automatically be included in application.css. 3 | // You can use Sass (SCSS) here: http://sass-lang.com/ 4 | -------------------------------------------------------------------------------- /app/assets/stylesheets/comment_threads.scss: -------------------------------------------------------------------------------- 1 | .post--comments-thread-wrapper { 2 | .post--comments-thread { 3 | .widget--body { 4 | padding: 0; 5 | 6 | .comment { 7 | margin: 0; 8 | } 9 | } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /app/assets/stylesheets/errors.scss: -------------------------------------------------------------------------------- 1 | .error-code { 2 | font-size: 8rem; 3 | padding: 0; 4 | margin: -0.3em 0; 5 | } 6 | 7 | .error-name { 8 | font-variant: small-caps; 9 | letter-spacing: 10px; 10 | font-weight: bold; 11 | padding: 0; 12 | margin: 0; 13 | } 14 | 15 | .error-trace { 16 | background: #EEE; 17 | height: unset; 18 | max-height: unset; 19 | white-space: pre-wrap; 20 | word-wrap: break-word; 21 | } 22 | 23 | .error-report-summary { 24 | display: flex; 25 | align-items: center; 26 | 27 | .details { 28 | flex: 1; 29 | } 30 | } -------------------------------------------------------------------------------- /app/assets/stylesheets/fake_community.scss: -------------------------------------------------------------------------------- 1 | // Place all the styles related to the fake_community controller here. 2 | // They will automatically be included in application.css. 3 | // You can use Sass (SCSS) here: http://sass-lang.com/ 4 | -------------------------------------------------------------------------------- /app/assets/stylesheets/licenses.scss: -------------------------------------------------------------------------------- 1 | // Place all the styles related to the Licenses controller here. 2 | // They will automatically be included in application.css. 3 | // You can use Sass (SCSS) here: http://sass-lang.com/ 4 | 5 | .select2-results__option--highlighted .has-color-tertiary-600 { 6 | color: #DDD !important; 7 | } 8 | -------------------------------------------------------------------------------- /app/assets/stylesheets/markdown_tools.scss: -------------------------------------------------------------------------------- 1 | @import './variables'; 2 | 3 | .markdown-tools { 4 | display: flex; 5 | flex-direction: row; 6 | flex-wrap: wrap; 7 | align-items: flex-start; 8 | 9 | .button-list { 10 | margin: 0 0.3em 0.3em 0; 11 | } 12 | } -------------------------------------------------------------------------------- /app/assets/stylesheets/micro_auth/apps.scss: -------------------------------------------------------------------------------- 1 | // Place all the styles related to the MicroAuth/Apps controller here. 2 | // They will automatically be included in application.css. 3 | // You can use Sass (SCSS) here: http://sass-lang.com/ 4 | 5 | @import '../variables'; 6 | 7 | .app-security { 8 | input[type="text"] { 9 | font-family: $font-stack-code; 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /app/assets/stylesheets/micro_auth/authentication.scss: -------------------------------------------------------------------------------- 1 | // Place all the styles related to the MicroAuth/Authentication controller here. 2 | // They will automatically be included in application.css. 3 | // You can use Sass (SCSS) here: http://sass-lang.com/ 4 | 5 | .auth-code { 6 | text-align: center; 7 | font-size: 40px; 8 | letter-spacing: 0.25em; 9 | font-weight: bold; 10 | } 11 | -------------------------------------------------------------------------------- /app/assets/stylesheets/mod_warning.scss: -------------------------------------------------------------------------------- 1 | // Place all the styles related to the ModWarning controller here. 2 | // They will automatically be included in application.css. 3 | // You can use Sass (SCSS) here: http://sass-lang.com/ 4 | -------------------------------------------------------------------------------- /app/assets/stylesheets/notifications.scss: -------------------------------------------------------------------------------- 1 | @import 'variables'; 2 | 3 | .notification { 4 | border-top: 1px solid $muted-graphic; 5 | padding: 0.5em; 6 | 7 | @media screen and (min-width: $screen-md) { 8 | flex-direction: row; 9 | } 10 | 11 | & > * { 12 | margin: 0 0.2em; 13 | } 14 | 15 | &:last-of-type { 16 | border-bottom: 1px solid $muted-graphic; 17 | } 18 | 19 | .notification--timestamp { 20 | line-break: strict; 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /app/assets/stylesheets/pinned_links.scss: -------------------------------------------------------------------------------- 1 | // Place all the styles related to the PinnedLinks controller here. 2 | // They will automatically be included in application.css. 3 | // You can use Sass (SCSS) here: http://sass-lang.com/ 4 | -------------------------------------------------------------------------------- /app/assets/stylesheets/post_types.scss: -------------------------------------------------------------------------------- 1 | @import 'variables'; 2 | 3 | .checkbox-setting { 4 | border: 1px solid $muted-graphic; 5 | border-radius: 0.3em; 6 | display: flex; 7 | flex-direction: row; 8 | align-items: center; 9 | justify-content: space-between; 10 | padding: 0.5em 1em; 11 | margin: 0.5em 0; 12 | 13 | .checkbox-setting--desc label.form-element { 14 | margin: 0.1em 0; 15 | } 16 | 17 | .checkbox-setting--desc .desc { 18 | color: $muted-text; 19 | font-size: 0.8em; 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /app/assets/stylesheets/reports.scss: -------------------------------------------------------------------------------- 1 | // Place all the styles related to the Reports controller here. 2 | // They will automatically be included in application.css. 3 | // You can use Sass (SCSS) here: http://sass-lang.com/ 4 | -------------------------------------------------------------------------------- /app/assets/stylesheets/site_settings.scss: -------------------------------------------------------------------------------- 1 | .site-setting--value { 2 | min-height: 1em; 3 | min-width: 2em; 4 | overflow-wrap: anywhere; 5 | } 6 | -------------------------------------------------------------------------------- /app/assets/stylesheets/subscriptions.scss: -------------------------------------------------------------------------------- 1 | // Place all the styles related to the Subscriptions controller here. 2 | // They will automatically be included in application.css. 3 | // You can use Sass (SCSS) here: http://sass-lang.com/ 4 | -------------------------------------------------------------------------------- /app/assets/stylesheets/suggested_edit.scss: -------------------------------------------------------------------------------- 1 | .js-suggested-edit-reject-dialog.is-hidden { 2 | display: none; 3 | } -------------------------------------------------------------------------------- /app/assets/stylesheets/tables.scss: -------------------------------------------------------------------------------- 1 | .table { 2 | &.fixed { 3 | table-layout: fixed; 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /app/assets/stylesheets/tabs.scss: -------------------------------------------------------------------------------- 1 | @import 'variables'; 2 | 3 | .tabs { 4 | margin-bottom: 1em; 5 | } -------------------------------------------------------------------------------- /app/assets/stylesheets/tag_sets.scss: -------------------------------------------------------------------------------- 1 | // Place all the styles related to the TagSets controller here. 2 | // They will automatically be included in application.css. 3 | // You can use Sass (SCSS) here: http://sass-lang.com/ 4 | 5 | .item-list.is-flex-centered .item-list--text-value { 6 | display: flex; 7 | flex-direction: column; 8 | align-items: center; 9 | justify-content: center; 10 | 11 | &.is-primary { 12 | align-items: flex-start; 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /app/assets/stylesheets/tags.scss: -------------------------------------------------------------------------------- 1 | .tag-cell { 2 | margin: 0.5em 0; 3 | 4 | &:hover { 5 | background: #f0f2ff; 6 | transition: all 0.3s ease; 7 | border-radius: 0.2em; 8 | } 9 | 10 | p { 11 | margin: 0; 12 | } 13 | } -------------------------------------------------------------------------------- /app/assets/stylesheets/tour.scss: -------------------------------------------------------------------------------- 1 | .codidactyl { 2 | width: 80px; 3 | padding: 2rem; 4 | margin-top: 1rem; 5 | } 6 | .codidactyl + .is-flexible { width: 0; } 7 | 8 | .codidactyl-sticky { 9 | position: sticky; 10 | top: 0.5rem; 11 | padding: 1rem; 12 | } 13 | 14 | .codidactyl-small { 15 | max-height: 1em; 16 | } -------------------------------------------------------------------------------- /app/assets/stylesheets/two_factor.scss: -------------------------------------------------------------------------------- 1 | // Place all the styles related to the two_factor controller here. 2 | // They will automatically be included in application.css. 3 | // You can use Sass (SCSS) here: http://sass-lang.com/ 4 | -------------------------------------------------------------------------------- /app/controllers/concerns/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codidact/qpixel/e29966742561401c32d7c914113cc09a7737c6ed/app/controllers/concerns/.keep -------------------------------------------------------------------------------- /app/controllers/fake_community_controller.rb: -------------------------------------------------------------------------------- 1 | class FakeCommunityController < ApplicationController 2 | def communities 3 | @communities = Community.all 4 | render layout: 'without_sidebar' 5 | end 6 | end 7 | -------------------------------------------------------------------------------- /app/controllers/search_controller.rb: -------------------------------------------------------------------------------- 1 | class SearchController < ApplicationController 2 | def search 3 | @posts, @qualifiers = helpers.search_posts 4 | 5 | @signed_out_me = @qualifiers.any? { |q| q[:param] == :user && q[:user_id].nil? } 6 | 7 | @active_filter = helpers.active_filter 8 | 9 | @count = begin 10 | @posts&.count 11 | rescue 12 | @posts = nil 13 | flash[:danger] = 'Your search syntax is incorrect.' 14 | end 15 | end 16 | end 17 | -------------------------------------------------------------------------------- /app/controllers/tasks_controller.rb: -------------------------------------------------------------------------------- 1 | class TasksController < ApplicationController 2 | before_action :check_permissions 3 | 4 | private 5 | 6 | def check_permissions 7 | # We can't use ApplicationController#verify_developer because it tries to render not_found with 8 | # layout: 'without_sidebar', which breaks because routing doesn't work under mounted applications. Bleugh. 9 | if !helpers.user_signed_in? || !helpers.current_user.developer? 10 | render plain: '403 Forbidden', status: :forbidden 11 | end 12 | end 13 | end 14 | -------------------------------------------------------------------------------- /app/controllers/tour_controller.rb: -------------------------------------------------------------------------------- 1 | class TourController < ApplicationController 2 | layout 'without_sidebar' 3 | 4 | def index; end 5 | 6 | def question1; end 7 | 8 | def question2 9 | @tagset_id = TagSet.find_by(name: 'Tour')&.id || -1 10 | end 11 | 12 | def question3; end 13 | 14 | def more 15 | @communities = Community.all 16 | end 17 | 18 | def end; end 19 | end 20 | -------------------------------------------------------------------------------- /app/helpers/admin_helper.rb: -------------------------------------------------------------------------------- 1 | # Provides helper methods for use by views under AdminController. 2 | module AdminHelper 3 | end 4 | -------------------------------------------------------------------------------- /app/helpers/answers_helper.rb: -------------------------------------------------------------------------------- 1 | # Provides helper methods for use by views under AnswersController. 2 | module AnswersHelper 3 | ## 4 | # Returns the current user's vote for the specified post, or nil if no user is signed in. 5 | # @param answer [Post] The post for which to find a vote. 6 | # @return [Vote, nil] 7 | def my_vote(answer) 8 | user_signed_in? ? answer.votes.where(user: current_user).first : nil 9 | end 10 | end 11 | -------------------------------------------------------------------------------- /app/helpers/articles_helper.rb: -------------------------------------------------------------------------------- 1 | module ArticlesHelper 2 | end 3 | -------------------------------------------------------------------------------- /app/helpers/close_reasons_helper.rb: -------------------------------------------------------------------------------- 1 | module CloseReasonsHelper 2 | end 3 | -------------------------------------------------------------------------------- /app/helpers/donations_helper.rb: -------------------------------------------------------------------------------- 1 | module DonationsHelper 2 | end 3 | -------------------------------------------------------------------------------- /app/helpers/edit_helper.rb: -------------------------------------------------------------------------------- 1 | module EditHelper 2 | ## 3 | # Get the maximum edit comment length for the current community, with a maximum of 255. 4 | # @return [Integer] 5 | def max_edit_comment_length 6 | [SiteSetting['MaxEditCommentLength'] || 255, 255].min 7 | end 8 | end 9 | -------------------------------------------------------------------------------- /app/helpers/email_logs_helper.rb: -------------------------------------------------------------------------------- 1 | module EmailLogsHelper 2 | end 3 | -------------------------------------------------------------------------------- /app/helpers/errors_helper.rb: -------------------------------------------------------------------------------- 1 | module ErrorsHelper 2 | end 3 | -------------------------------------------------------------------------------- /app/helpers/fake_community_helper.rb: -------------------------------------------------------------------------------- 1 | module FakeCommunityHelper 2 | end 3 | -------------------------------------------------------------------------------- /app/helpers/flags_helper.rb: -------------------------------------------------------------------------------- 1 | module FlagsHelper 2 | end 3 | -------------------------------------------------------------------------------- /app/helpers/licenses_helper.rb: -------------------------------------------------------------------------------- 1 | module LicensesHelper 2 | end 3 | -------------------------------------------------------------------------------- /app/helpers/micro_auth/apps_helper.rb: -------------------------------------------------------------------------------- 1 | module MicroAuth::AppsHelper 2 | ## 3 | # Builds & returns a tag-style badge indicating whether a specified app is active for use or not. 4 | # @param app [MicroAuth::App] The app for which to build a badge. 5 | # @return [ActiveSupport::SafeBuffer] A badge; the result of a TagBuilder. 6 | def app_active_badge(app) 7 | tag.span app.active? ? 'active' : 'inactive', 8 | class: "badge is-tag #{app.active? ? 'is-green' : 'is-red'}" 9 | end 10 | end 11 | -------------------------------------------------------------------------------- /app/helpers/mod_warning_helper.rb: -------------------------------------------------------------------------------- 1 | module ModWarningHelper 2 | end 3 | -------------------------------------------------------------------------------- /app/helpers/notifications_helper.rb: -------------------------------------------------------------------------------- 1 | module NotificationsHelper 2 | end 3 | -------------------------------------------------------------------------------- /app/helpers/pinned_links_helper.rb: -------------------------------------------------------------------------------- 1 | module PinnedLinksHelper 2 | end 3 | -------------------------------------------------------------------------------- /app/helpers/questions_helper.rb: -------------------------------------------------------------------------------- 1 | # Provides helper methods for use by views under QuestionsController. 2 | module QuestionsHelper 3 | ## 4 | # Returns the current user's vote for the specified post, or nil if no user is signed in. 5 | # @param question [Post] The post for which to find a vote. 6 | # @return [Vote, nil] 7 | def my_vote(question) 8 | user_signed_in? ? question.votes.where(user: current_user).first : nil 9 | end 10 | end 11 | -------------------------------------------------------------------------------- /app/helpers/reactions_helper.rb: -------------------------------------------------------------------------------- 1 | module ReactionsHelper 2 | end 3 | -------------------------------------------------------------------------------- /app/helpers/reports_helper.rb: -------------------------------------------------------------------------------- 1 | module ReportsHelper 2 | end 3 | -------------------------------------------------------------------------------- /app/helpers/site_settings_helper.rb: -------------------------------------------------------------------------------- 1 | # Provides helper methods for use by views under SiteSettingsController. 2 | module SiteSettingsHelper 3 | end 4 | -------------------------------------------------------------------------------- /app/helpers/subscriptions_helper.rb: -------------------------------------------------------------------------------- 1 | module SubscriptionsHelper 2 | end 3 | -------------------------------------------------------------------------------- /app/helpers/suggested_edit_helper.rb: -------------------------------------------------------------------------------- 1 | module SuggestedEditHelper 2 | end 3 | -------------------------------------------------------------------------------- /app/helpers/tag_sets_helper.rb: -------------------------------------------------------------------------------- 1 | module TagSetsHelper 2 | end 3 | -------------------------------------------------------------------------------- /app/helpers/tour_helper.rb: -------------------------------------------------------------------------------- 1 | module TourHelper 2 | end 3 | -------------------------------------------------------------------------------- /app/helpers/two_factor_helper.rb: -------------------------------------------------------------------------------- 1 | module TwoFactorHelper 2 | end 3 | -------------------------------------------------------------------------------- /app/helpers/votes_helper.rb: -------------------------------------------------------------------------------- 1 | # Provides helper methods for use by views under VotesController. 2 | module VotesHelper 3 | end 4 | -------------------------------------------------------------------------------- /app/jobs/application_job.rb: -------------------------------------------------------------------------------- 1 | class ApplicationJob < ActiveJob::Base 2 | # Automatically retry jobs that encountered a deadlock 3 | # retry_on ActiveRecord::Deadlocked 4 | 5 | # Most jobs are safe to ignore if the underlying records are no longer available 6 | # discard_on ActiveJob::DeserializationError 7 | end 8 | -------------------------------------------------------------------------------- /app/mailers/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codidact/qpixel/e29966742561401c32d7c914113cc09a7737c6ed/app/mailers/.keep -------------------------------------------------------------------------------- /app/mailers/application_mailer.rb: -------------------------------------------------------------------------------- 1 | class ApplicationMailer < ActionMailer::Base 2 | default from: -> { "#{SiteSetting['NoReplySenderName']} <#{SiteSetting['NoReplySenderEmail']}>" } 3 | layout 'mailer' 4 | end 5 | -------------------------------------------------------------------------------- /app/models/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codidact/qpixel/e29966742561401c32d7c914113cc09a7737c6ed/app/models/.keep -------------------------------------------------------------------------------- /app/models/ability_queue.rb: -------------------------------------------------------------------------------- 1 | class AbilityQueue < ApplicationRecord 2 | belongs_to :community_user 3 | scope :pending, -> { where(completed: false) } 4 | 5 | def self.add(user, comment) 6 | unless AbilityQueue.pending.where(community_user: user.community_user).any? 7 | AbilityQueue.create(community_user: user.community_user, comment: comment, completed: false) 8 | end 9 | end 10 | end 11 | -------------------------------------------------------------------------------- /app/models/answer.rb: -------------------------------------------------------------------------------- 1 | class Answer < Post 2 | default_scope { where(post_type_id: Answer.post_type_id) } 3 | 4 | def self.post_type_id 5 | PostType.mapping['Answer'] 6 | end 7 | end 8 | -------------------------------------------------------------------------------- /app/models/article.rb: -------------------------------------------------------------------------------- 1 | class Article < Post 2 | default_scope { where(post_type_id: Article.post_type_id) } 3 | 4 | def self.post_type_id 5 | PostType.mapping['Article'] 6 | end 7 | end 8 | -------------------------------------------------------------------------------- /app/models/audit_log.rb: -------------------------------------------------------------------------------- 1 | class AuditLog < ApplicationRecord 2 | include CommunityRelated 3 | 4 | belongs_to :related, polymorphic: true, optional: true 5 | belongs_to :user, optional: true 6 | 7 | class << self 8 | [:admin_audit, :moderator_audit, :action_audit, :user_annotation, :user_history, :pii_history, :block_log, 9 | :rate_limit_log].each do |log_type| 10 | define_method(log_type) do |**values| 11 | create(values.merge(log_type: log_type.to_s, community_id: RequestContext.community_id)) 12 | end 13 | end 14 | end 15 | end 16 | -------------------------------------------------------------------------------- /app/models/blocked_item.rb: -------------------------------------------------------------------------------- 1 | class BlockedItem < ApplicationRecord 2 | scope :active, -> { where('expires IS NULL OR expires > NOW()') } 3 | 4 | # Allow for easy checking of type 5 | ['ip', 'email', 'email_host'].each do |bt| 6 | define_method "#{bt.underscore}?" do 7 | item_type == bt 8 | end 9 | scope "#{bt}s".to_sym, -> { active.where(item_type: bt) } 10 | end 11 | end 12 | -------------------------------------------------------------------------------- /app/models/category_filter_default.rb: -------------------------------------------------------------------------------- 1 | class CategoryFilterDefault < ApplicationRecord 2 | belongs_to :user 3 | belongs_to :filter 4 | belongs_to :category 5 | end 6 | -------------------------------------------------------------------------------- /app/models/category_post_type.rb: -------------------------------------------------------------------------------- 1 | class CategoryPostType < ApplicationRecord 2 | self.table_name = 'categories_post_types' 3 | 4 | belongs_to :category 5 | belongs_to :post_type 6 | 7 | def self.rep_changes 8 | Rails.cache.fetch 'network/category_post_types/rep_changes', include_community: false do 9 | all.to_h { |cpt| [[cpt.category_id, cpt.post_type_id], { 1 => cpt.upvote_rep, -1 => cpt.downvote_rep }] } 10 | end 11 | end 12 | end 13 | -------------------------------------------------------------------------------- /app/models/close_reason.rb: -------------------------------------------------------------------------------- 1 | class CloseReason < ApplicationRecord 2 | include MaybeCommunityRelated 3 | 4 | scope :active, -> { where(active: true) } 5 | 6 | validates :name, uniqueness: { scope: [:community_id], case_sensitive: false } 7 | end 8 | -------------------------------------------------------------------------------- /app/models/community.rb: -------------------------------------------------------------------------------- 1 | class Community < ApplicationRecord 2 | has_many :community_users 3 | has_many :site_settings 4 | 5 | default_scope { where(is_fake: false) } 6 | 7 | validates :host, uniqueness: { case_sensitive: false } 8 | end 9 | -------------------------------------------------------------------------------- /app/models/concerns/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codidact/qpixel/e29966742561401c32d7c914113cc09a7737c6ed/app/models/concerns/.keep -------------------------------------------------------------------------------- /app/models/concerns/community_related.rb: -------------------------------------------------------------------------------- 1 | module CommunityRelated 2 | extend ActiveSupport::Concern 3 | 4 | included do 5 | belongs_to :community 6 | default_scope { where(community_id: RequestContext.community_id) } 7 | end 8 | end 9 | -------------------------------------------------------------------------------- /app/models/concerns/maybe_community_related.rb: -------------------------------------------------------------------------------- 1 | module MaybeCommunityRelated 2 | extend ActiveSupport::Concern 3 | 4 | included do 5 | belongs_to :community, optional: true 6 | default_scope { where(community_id: RequestContext.community_id).or(where(community_id: nil)) } 7 | end 8 | end 9 | -------------------------------------------------------------------------------- /app/models/concerns/post_related.rb: -------------------------------------------------------------------------------- 1 | module PostRelated 2 | extend ActiveSupport::Concern 3 | include CommunityRelated 4 | 5 | included do 6 | belongs_to :post 7 | end 8 | end 9 | -------------------------------------------------------------------------------- /app/models/email_log.rb: -------------------------------------------------------------------------------- 1 | class EmailLog < ApplicationRecord 2 | end 3 | -------------------------------------------------------------------------------- /app/models/error_log.rb: -------------------------------------------------------------------------------- 1 | class ErrorLog < ApplicationRecord 2 | belongs_to :community, optional: true 3 | belongs_to :user, optional: true 4 | end 5 | -------------------------------------------------------------------------------- /app/models/filter.rb: -------------------------------------------------------------------------------- 1 | class Filter < ApplicationRecord 2 | belongs_to :user 3 | has_many :category_filter_defaults, dependent: :destroy 4 | validates :name, uniqueness: { scope: :user } 5 | serialize :include_tags, Array 6 | serialize :exclude_tags, Array 7 | end 8 | -------------------------------------------------------------------------------- /app/models/help_doc.rb: -------------------------------------------------------------------------------- 1 | class HelpDoc < Post 2 | def self.post_type_id 3 | PostType.mapping['HelpDoc'] 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /app/models/micro_auth.rb: -------------------------------------------------------------------------------- 1 | module MicroAuth 2 | def self.table_name_prefix 3 | 'micro_auth_' 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /app/models/micro_auth/token.rb: -------------------------------------------------------------------------------- 1 | class MicroAuth::Token < ApplicationRecord 2 | belongs_to :app, class_name: 'MicroAuth::App' 3 | belongs_to :user 4 | 5 | serialize :scope, JSON 6 | 7 | scope :active, -> { where('expires_at > ?', DateTime.now) } 8 | 9 | def active? 10 | expires_at.nil? || expires_at.future? 11 | end 12 | end 13 | -------------------------------------------------------------------------------- /app/models/notification.rb: -------------------------------------------------------------------------------- 1 | class Notification < ApplicationRecord 2 | include CommunityRelated 3 | belongs_to :user 4 | 5 | delegate :name, to: :community, prefix: true 6 | end 7 | -------------------------------------------------------------------------------- /app/models/pinned_link.rb: -------------------------------------------------------------------------------- 1 | class PinnedLink < ApplicationRecord 2 | include MaybeCommunityRelated 3 | belongs_to :post 4 | end 5 | -------------------------------------------------------------------------------- /app/models/policy_doc.rb: -------------------------------------------------------------------------------- 1 | class PolicyDoc < Post 2 | def self.post_type_id 3 | PostType.mapping['PolicyDoc'] 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /app/models/post_flag_type.rb: -------------------------------------------------------------------------------- 1 | class PostFlagType < ApplicationRecord 2 | include CommunityRelated 3 | 4 | belongs_to :post_type, optional: true 5 | 6 | validates :name, uniqueness: { scope: [:community_id], case_sensitive: false } 7 | 8 | scope :not_confidential, -> { where(confidential: false) } 9 | scope :confidential, -> { where(confidential: true) } 10 | end 11 | -------------------------------------------------------------------------------- /app/models/post_history_tag.rb: -------------------------------------------------------------------------------- 1 | class PostHistoryTag < ApplicationRecord 2 | belongs_to :post_history 3 | belongs_to :tag 4 | 5 | validates :relationship, uniqueness: { scope: [:tag_id, :post_history_id], case_sensitive: false } 6 | end 7 | -------------------------------------------------------------------------------- /app/models/post_history_type.rb: -------------------------------------------------------------------------------- 1 | class PostHistoryType < ApplicationRecord 2 | has_many :post_histories 3 | 4 | validates :name, uniqueness: { case_sensitive: false } 5 | end 6 | -------------------------------------------------------------------------------- /app/models/posts_tag.rb: -------------------------------------------------------------------------------- 1 | class PostsTag < ApplicationRecord 2 | belongs_to :tag 3 | belongs_to :post 4 | end 5 | -------------------------------------------------------------------------------- /app/models/question.rb: -------------------------------------------------------------------------------- 1 | class Question < Post 2 | default_scope { where(post_type_id: Question.post_type_id) } 3 | 4 | scope :meta, -> { joins(:category).where(categories: { name: 'Meta' }) } 5 | scope :main, -> { joins(:category).where(categories: { name: 'Main' }) } 6 | 7 | def self.post_type_id 8 | PostType.mapping['Question'] 9 | end 10 | 11 | def answers 12 | Answer.where(parent: self) 13 | end 14 | end 15 | -------------------------------------------------------------------------------- /app/models/reaction.rb: -------------------------------------------------------------------------------- 1 | class Reaction < ApplicationRecord 2 | belongs_to :reaction_type 3 | belongs_to :user 4 | belongs_to :post 5 | belongs_to :comment, optional: true 6 | 7 | default_scope { joins(:reaction_type).where(reaction_types: { community_id: RequestContext.community_id }) } 8 | end 9 | -------------------------------------------------------------------------------- /app/models/reaction_type.rb: -------------------------------------------------------------------------------- 1 | class ReactionType < ApplicationRecord 2 | include CommunityRelated 3 | belongs_to :post_type, class_name: 'PostType', optional: true 4 | 5 | validates :name, uniqueness: { scope: [:community_id], case_sensitive: false } 6 | 7 | scope :active, -> { where(active: true) } 8 | end 9 | -------------------------------------------------------------------------------- /app/models/sso_profile.rb: -------------------------------------------------------------------------------- 1 | class SsoProfile < ApplicationRecord 2 | belongs_to :user, inverse_of: :sso_profile 3 | 4 | validates :saml_identifier, uniqueness: true, presence: true 5 | end 6 | -------------------------------------------------------------------------------- /app/models/tag_with_path.rb: -------------------------------------------------------------------------------- 1 | class TagWithPath < Tag 2 | self.table_name = 'tags_paths' 3 | end 4 | -------------------------------------------------------------------------------- /app/models/thread_follower.rb: -------------------------------------------------------------------------------- 1 | class ThreadFollower < ApplicationRecord 2 | belongs_to :comment_thread, optional: true 3 | belongs_to :post, optional: true 4 | belongs_to :user 5 | 6 | validate :thread_or_post 7 | 8 | private 9 | 10 | def thread_or_post 11 | if comment_thread.nil? && post.nil? 12 | errors.add(:base, 'Must refer to either a comment thread or a post.') 13 | end 14 | end 15 | end 16 | -------------------------------------------------------------------------------- /app/models/user_ability.rb: -------------------------------------------------------------------------------- 1 | class UserAbility < ApplicationRecord 2 | belongs_to :community_user 3 | belongs_to :ability 4 | 5 | def suspended? 6 | return true if is_suspended && suspension_end.nil? # permanent suspension 7 | return true if is_suspended && !suspension_end.past? 8 | 9 | if is_suspended 10 | update(is_suspended: false, suspension_message: nil, suspension_end: nil) 11 | end 12 | 13 | false 14 | end 15 | end 16 | -------------------------------------------------------------------------------- /app/models/user_website.rb: -------------------------------------------------------------------------------- 1 | class UserWebsite < ApplicationRecord 2 | belongs_to :user 3 | default_scope { order(:position) } 4 | 5 | MAX_ROWS = 3 6 | end 7 | -------------------------------------------------------------------------------- /app/views/admin_mailer/to_all_users.html.erb: -------------------------------------------------------------------------------- 1 | <%= raw(sanitize(ApplicationController.helpers.render_markdown(@body_markdown), 2 | scrubber: ApplicationController.helpers.scrubber)) %> 3 | -------------------------------------------------------------------------------- /app/views/admin_mailer/to_all_users.text.erb: -------------------------------------------------------------------------------- 1 | <%= ApplicationController.helpers.strip_markdown @body_markdown %> 2 | -------------------------------------------------------------------------------- /app/views/admin_mailer/to_moderators.html.erb: -------------------------------------------------------------------------------- 1 | <%= raw(sanitize(ApplicationController.helpers.render_markdown(@body_markdown), 2 | scrubber: ApplicationController.helpers.scrubber)) %> -------------------------------------------------------------------------------- /app/views/admin_mailer/to_moderators.text.erb: -------------------------------------------------------------------------------- 1 | <%= ApplicationController.helpers.strip_markdown @body_markdown %> -------------------------------------------------------------------------------- /app/views/application/keyboard_tools.html.erb: -------------------------------------------------------------------------------- 1 |
Codidact supports keyboard tools to enhance user accessibility. You can activate (and then later deactivate) them here on this page:
3 |You'll need JavaScript to be enabled for the tools to work.
4 | 5 |Keyboard tools are currently unknown. 6 | 7 |
8 | 9 |This setting is stored in your browser and not your user account, so you can set it as you want it on any device.
-------------------------------------------------------------------------------- /app/views/categories/edit.html.erb: -------------------------------------------------------------------------------- 1 |3 | If you need to change something about one of your site's categories, this is the place to do it. 4 |
5 | 6 | <%= render 'form', submit_path: update_category_path(@category) %> -------------------------------------------------------------------------------- /app/views/categories/new.html.erb: -------------------------------------------------------------------------------- 1 |3 | If the standard two Q&A categories aren't enough for your site, you can add a new category here. 4 |
5 | 6 | <%= render 'form', submit_path: create_category_path %> 7 | -------------------------------------------------------------------------------- /app/views/categories/post_types.html.erb: -------------------------------------------------------------------------------- 1 |3 | This category has more than one type of post available. Pick a post type to get started. 4 |
5 | 6 | <% @post_types.each do |pt| %> 7 |<%= pt.description %>
9 |Thanks!
3 |Your Friendly Neighbourhood Codidactyl
-------------------------------------------------------------------------------- /app/views/devise/mailer/password_change.html.erb: -------------------------------------------------------------------------------- 1 |Hello <%= @resource.username %>!
2 | 3 |4 | This email is just to let you know that your password has been changed. 5 |
6 |7 | If this was you, you can safely ignore this email. If it wasn't, please 8 | <%= link_to 'change your password now', new_password_url(@resource) %> to protect your account. 9 |
10 | 11 | <%= render 'devise/mailer/friendly_footer' %> 12 | -------------------------------------------------------------------------------- /app/views/devise/mailer/unlock_instructions.html.erb: -------------------------------------------------------------------------------- 1 |Hello <%= @resource.username %>!
2 | 3 |Your account has been locked due to an excessive number of unsuccessful sign in attempts.
4 | 5 |Click the link below to unlock your account:
6 | 7 |<%= link_to 'Unlock my account', unlock_url(@resource, unlock_token: @token), class: 'button is-filled' %>
8 | 9 | <%= render 'devise/mailer/friendly_footer' %> 10 | -------------------------------------------------------------------------------- /app/views/devise/shared/_error_messages.html.erb: -------------------------------------------------------------------------------- 1 | <% if resource.errors.any? %> 2 |4 | <%= I18n.t("errors.messages.not_saved", 5 | count: resource.errors.count, 6 | resource: resource.class.model_name.human.downcase) 7 | %> 8 |
9 |Your request conflicted with another request.
7 | 8 |Any changes you were trying to make are unlikely to have been saved - go back and try again.
9 | 10 | 11 |12 | <%= link_to 'Go back', :back, class: 'button is-outlined' %> 13 | <%= link_to 'Go home', root_path, class: 'button is-outlined' %> 14 |
-------------------------------------------------------------------------------- /app/views/errors/error.html.erb: -------------------------------------------------------------------------------- 1 |You don't have the necessary permissions to do that.
7 | 8 |You might have tried to access or change something you don't have access to.
9 | 10 | 11 |12 | <%= link_to 'Go back', :back, class: 'button is-outlined' %> 13 | <%= link_to 'Go home', root_path, class: 'button is-outlined' %> 14 |
-------------------------------------------------------------------------------- /app/views/errors/locked.html.erb: -------------------------------------------------------------------------------- 1 | <% content_for :title, 'Locked' %> 2 | 3 |The post has been locked and cannot be edited, commented or voted on.
7 | 8 |9 | <%= link_to 'Go back', :back, class: 'button is-outlined' %> 10 | <%= link_to 'Go home', root_path, class: 'button is-outlined' %> 11 |
-------------------------------------------------------------------------------- /app/views/errors/not_found.html.erb: -------------------------------------------------------------------------------- 1 | <% content_for :title, 'Not Found' %> 2 | 3 |The page you're looking for couldn't be found.
7 | 8 |You might have followed an old link, or a post might have been deleted.
9 | 10 | 11 |12 | <%= link_to 'Go back', :back, class: 'button is-outlined' %> 13 | <%= link_to 'Go home', root_path, class: 'button is-outlined' %> 14 |
-------------------------------------------------------------------------------- /app/views/errors/read_only.html.erb: -------------------------------------------------------------------------------- 1 | <% content_for :title, 'Read Only' %> 2 | 3 |This resource is locked because the site is in read-only mode.
7 |8 | Any changes you were making have not been saved. Please retry this request once 9 | the site has been taken out of read only mode. 10 |
11 | 12 |13 | <%= link_to 'Go back', :back, class: 'button is-outlined' %> 14 | <%= link_to 'Go home', root_path, class: 'button is-outlined' %> 15 |
-------------------------------------------------------------------------------- /app/views/errors/stat.html.erb: -------------------------------------------------------------------------------- 1 | <% content_for :title, 'Stat Error' %> 2 | 3 |<%= ApplicationRecord.useful_err_msg.sample %>
-------------------------------------------------------------------------------- /app/views/flag_mailer/flag_escalated.html.erb: -------------------------------------------------------------------------------- 1 |3 | Below is a list of all the flags you have cast and the outcome of each of them. Moderators handling your flags may also 4 | have left you feedback. 5 |
6 | 7 |If you've made a mistake or something's changed, you can update license details here.
3 | 4 | <%= render 'form', submit_path: update_license_path(@license) %> -------------------------------------------------------------------------------- /app/views/licenses/new.html.erb: -------------------------------------------------------------------------------- 1 |You can add a new license for users to pick from here.
3 | 4 | <%= render 'form', submit_path: new_license_path %> -------------------------------------------------------------------------------- /app/views/micro_auth/apps/edit.html.erb: -------------------------------------------------------------------------------- 1 | <% content_for :title, 'Edit OAuth App' %> 2 | 3 |6 | You have successfully approved the app <%= @app.name %> to access your account. Please return to the 7 | app to continue where you left off. 8 |
9 | 10 |Your code to complete authentication is:
11 | 12 |<%= @token.code %>
This request for access to your account has been rejected. No further action is necessary.
6 | -------------------------------------------------------------------------------- /app/views/moderator/recently_deleted_posts.html.erb: -------------------------------------------------------------------------------- 1 | <% content_for :title, "Recently Deleted Posts" %> 2 | <%= link_to moderator_path, class: 'has-font-size-small' do %> 3 | « Return to moderator tools 4 | <% end %> 5 | 6 |You're editing the <%= post_type_badge(@type) %> post type.
3 | 4 | <% if @type.errors.any? %> 5 |You're creating a new post type.
3 | 4 | <%= render 'form', submit_path: create_post_type_path %> 5 | -------------------------------------------------------------------------------- /app/views/posts/_edit_link.html.erb: -------------------------------------------------------------------------------- 1 | <%# 2 | Helper for rendering post edit link buttons 3 | 4 | Variables: 5 | post : Post to create the link for 6 | %> 7 | 8 | <%= link_to edit_post_path(post), class: 'tools--item', 'aria-label': 'Edit this post' do %> 9 | 10 | Edit 11 | <% end %> 12 | -------------------------------------------------------------------------------- /app/views/posts/_feed.rss.builder: -------------------------------------------------------------------------------- 1 | posts.each do |post| 2 | builder.entry do 3 | builder.id generic_show_link(post) 4 | builder.title post.title 5 | builder.author do 6 | builder.name rtl_safe_username(post.user) 7 | builder.uri deleted_user?(post.user) ? '#' : user_url(post.user) 8 | end 9 | builder.published post.created_at&.iso8601 10 | builder.updated post.last_activity&.iso8601 11 | builder.link href: generic_show_link(post) 12 | builder.summary post.body.truncate(200), type: 'html' 13 | end 14 | end 15 | -------------------------------------------------------------------------------- /app/views/posts/_markdown_script.html.erb: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /app/views/posts/_review_edit_link.html.erb: -------------------------------------------------------------------------------- 1 | <%# 2 | Helper for rendering suggested edit review link buttons 3 | 4 | Variables: 5 | post : Post to create the link for 6 | %> 7 | 8 | <%= link_to suggested_edit_url(post.pending_suggested_edit.id), class: 'tools--item is-danger is-filled' do %> 9 | 10 | Review suggested edit 11 | <% end %> 12 | -------------------------------------------------------------------------------- /app/views/questions/lottery.html.erb: -------------------------------------------------------------------------------- 1 | <% content_for :title, 'Questions Lottery' %> 2 | 3 |15 | <%= sanitize(text) %> 16 |
-------------------------------------------------------------------------------- /app/views/shared/_rss_link.html.erb: -------------------------------------------------------------------------------- 1 | <%# 2 | 'Adds an RSS link. 3 | Variables: 4 | url : [String] URL to the feed 5 | text : [String, Nil] text to visibly show 6 | tooltip : [String, Nil] text to show in the tooltip 7 | ' 8 | %> 9 | 10 | <% 11 | # Defaults 12 | text = defined?(text) ? text : 'RSS' 13 | tooltip = defined?(tooltip) ? tooltip : 'RSS Feed' 14 | %> 15 | 16 | 17 | <%= link_to url, class: 'has-display-inline-block' do %> 18 | RSS 19 | <% end %> 20 | -------------------------------------------------------------------------------- /app/views/subscriptions/error.html.erb: -------------------------------------------------------------------------------- 1 |4 | There was a problem saving your subscription: 5 | 6 |
If you came here from a link and had filled in the requested details, this may be a bug. Please let us know on 14 | <%= link_to 'Meta', 'https://meta.codidact.com/' %>.
15 |Please click the button below to confirm you want to disable two-factor authentication on your account.
4 | 5 |<%= link_to 'Disable 2FA', two_factor_confirm_disable_link_path, method: :post, class: 'button is-filled is-danger', role: 'button' %>
-------------------------------------------------------------------------------- /app/views/two_factor_mailer/disable_email.html.erb: -------------------------------------------------------------------------------- 1 |3 | Someone recently requested a link to turn off two-factor authentication on your Codidact account. 4 | If that was you, great! <%= link_to 'Use this link to disable 2FA', two_factor_disable_link_url(@token, host: @host) %> 5 |
6 | 7 |If this wasn't you, you should <%= link_to 'change your password', edit_user_registration_url(host: @host) %>
-------------------------------------------------------------------------------- /app/views/two_factor_mailer/disable_email.text.erb: -------------------------------------------------------------------------------- 1 | ### Disable two-factor authentication ### 2 | 3 | Someone recently requested a link to turn off two-factor authentication on your Codidact account. 4 | If that was you, great! Use this link to disable 2FA: <%= two_factor_disable_link_url(@token, host: @host) %> 5 | 6 | If this wasn't you, you should change your password: <%= edit_user_registration_url(host: @host) %> -------------------------------------------------------------------------------- /app/views/two_factor_mailer/login_email.html.erb: -------------------------------------------------------------------------------- 1 |<%= link_to 'Use this link to sign in', qr_login_url(@token, host: @host) %>
3 |We'll see you soon!
-------------------------------------------------------------------------------- /app/views/two_factor_mailer/login_email.text.erb: -------------------------------------------------------------------------------- 1 | ### Welcome back to Codidact! ### 2 | 3 | Use this link to sign in: <%= qr_login_url(@token, host: @host) %> 4 | 5 | We'll see you soon! -------------------------------------------------------------------------------- /app/views/users/_post_usercard.html.erb: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /app/views/users/_user.html.erb: -------------------------------------------------------------------------------- 1 |5 | Manage your filters here 6 |
7 | 8 | <%# Just a nominal form so that stuff like validation works %> 9 |
3 | Skipping <%= pluralize(skipped_deleted, 'deleted comment') %>. 4 | <% if current_user&.at_least_moderator? %> 5 | 6 | Show <%= skipped_deleted > 1 ? 'them' : 'it' %> anyway. 7 | 8 | <% end %> 9 |
10 |