Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move apps and team page scripts out of landing-page.js #27137

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
sentry: Extract required params directly from #page-params.
  • Loading branch information
amanagr committed Oct 25, 2023
commit 737a571dcd565e6dddede0388e389a662bf75ef7
5 changes: 0 additions & 5 deletions web/src/page_params.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,6 @@ export const page_params: {
realm_plan_type: number;
realm_private_message_policy: number;
realm_push_notifications_enabled: boolean;
realm_sentry_key: string | undefined;
realm_enable_guest_user_indicator: boolean;
realm_upload_quota_mib: number | null;
realm_uri: string;
Expand All @@ -89,10 +88,6 @@ export const page_params: {
server_name_changes_disabled: boolean;
server_needs_upgrade: boolean;
server_presence_offline_threshold_seconds: number;
server_sentry_dsn: string | undefined;
server_sentry_environment: string | undefined;
server_sentry_sample_rate: number | undefined;
server_sentry_trace_rate: number | undefined;
server_web_public_streams_enabled: boolean;
show_billing: boolean;
show_plans: boolean;
Expand Down
17 changes: 16 additions & 1 deletion web/src/sentry.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,22 @@
import * as Sentry from "@sentry/browser";
import $ from "jquery";
import _ from "lodash";

import {page_params} from "./page_params";
const page_params: {
is_admin: boolean;
is_guest: boolean;
is_moderator: boolean;
is_owner: boolean;
is_spectator: boolean;
realm_sentry_key: string | undefined;
realm_uri: string;
server_sentry_dsn: string | undefined;
server_sentry_environment: string | undefined;
server_sentry_sample_rate: number | undefined;
server_sentry_trace_rate: number | undefined;
user_id: number | undefined;
zulip_version: string;
} = $("#page-params").data("params");

type UserInfo = {
id?: string;
Expand Down