mirror of https://github.com/zulip/zulip.git
web: Replace `realm_uri` with `realm_url` in frontend files.
Replaces `realm_uri` with `realm_url` in some frontend files and a js test.
This commit is contained in:
parent
4430ab9cbe
commit
88df01bee5
|
@ -30,7 +30,7 @@ export function handle_demo_organization_conversion() {
|
|||
}
|
||||
|
||||
const email_set = !settings_data.user_email_not_configured();
|
||||
const parts = new URL(realm.realm_uri).hostname.split(".");
|
||||
const parts = new URL(realm.realm_url).hostname.split(".");
|
||||
parts.shift();
|
||||
const domain = parts.join(".");
|
||||
const html_body = render_convert_demo_organization_form({
|
||||
|
@ -74,7 +74,7 @@ export function handle_demo_organization_conversion() {
|
|||
};
|
||||
const opts = {
|
||||
success_continuation(data) {
|
||||
window.location.href = data.realm_uri;
|
||||
window.location.href = data.realm_url;
|
||||
},
|
||||
};
|
||||
dialog_widget.submit_api_request(channel.patch, "/json/realm", data, opts);
|
||||
|
|
|
@ -138,7 +138,7 @@ export function show_generate_integration_url_modal(api_key: string): void {
|
|||
}
|
||||
const selected_events = set_events_param(params);
|
||||
|
||||
const realm_url = realm.realm_uri;
|
||||
const realm_url = realm.realm_url;
|
||||
const base_url = `${realm_url}/api/v1/external/`;
|
||||
$integration_url.text(`${base_url}${selected_integration}?${params.toString()}`);
|
||||
$dialog_submit_button.prop("disabled", false);
|
||||
|
|
|
@ -202,7 +202,7 @@ export function get_gear_menu_content_context() {
|
|||
const is_org_on_paid_plan = is_plan_standard || is_plan_plus;
|
||||
return {
|
||||
realm_name: realm.realm_name,
|
||||
realm_url: new URL(realm.realm_uri).hostname,
|
||||
realm_url: new URL(realm.realm_url).hostname,
|
||||
is_owner: current_user.is_owner,
|
||||
is_admin: current_user.is_admin,
|
||||
is_spectator: page_params.is_spectator,
|
||||
|
|
|
@ -100,7 +100,7 @@ export function generate_zuliprc_content(bot) {
|
|||
"\nkey=" +
|
||||
bot.api_key +
|
||||
"\nsite=" +
|
||||
realm.realm_uri +
|
||||
realm.realm_url +
|
||||
(token === undefined ? "" : "\ntoken=" + token) +
|
||||
// Some tools would not work in files without a trailing new line.
|
||||
"\n"
|
||||
|
@ -115,7 +115,7 @@ export function generate_botserverrc_content(email, api_key, token) {
|
|||
"\nkey=" +
|
||||
api_key +
|
||||
"\nsite=" +
|
||||
realm.realm_uri +
|
||||
realm.realm_url +
|
||||
"\ntoken=" +
|
||||
token +
|
||||
"\n"
|
||||
|
|
|
@ -163,7 +163,7 @@ export const realm_schema = z.object({
|
|||
realm_require_unique_names: z.boolean(),
|
||||
realm_signup_announcements_stream_id: z.number(),
|
||||
realm_upload_quota_mib: z.nullable(z.number()),
|
||||
realm_uri: z.string(),
|
||||
realm_url: z.string(),
|
||||
realm_user_group_edit_policy: z.number(),
|
||||
realm_video_chat_provider: z.number(),
|
||||
realm_waiting_period_threshold: z.number(),
|
||||
|
|
|
@ -34,7 +34,7 @@ export function initialize() {
|
|||
const $elt = $(instance.reference);
|
||||
stream_id = Number.parseInt($elt.attr("data-stream-id"), 10);
|
||||
topic_name = $elt.attr("data-topic-name");
|
||||
url = new URL($elt.attr("data-topic-url"), realm.realm_uri);
|
||||
url = new URL($elt.attr("data-topic-url"), realm.realm_url);
|
||||
} else {
|
||||
const $elt = $(instance.reference)
|
||||
.closest(".topic-sidebar-menu-icon")
|
||||
|
|
|
@ -620,7 +620,7 @@ export function initialize_everything(state_data) {
|
|||
"realm_send_welcome_emails",
|
||||
"realm_signup_announcements_stream_id",
|
||||
"realm_upload_quota_mib",
|
||||
"realm_uri",
|
||||
"realm_url",
|
||||
"realm_user_group_edit_policy",
|
||||
"realm_video_chat_provider",
|
||||
"realm_waiting_period_threshold",
|
||||
|
|
|
@ -38,7 +38,7 @@ export function confirm_deactivation(
|
|||
|
||||
const bots_owned_by_user = bot_data.get_all_bots_owned_by_user(user_id);
|
||||
const user = people.get_by_user_id(user_id);
|
||||
const realm_url = realm.realm_uri;
|
||||
const realm_url = realm.realm_url;
|
||||
const realm_name = realm.realm_name;
|
||||
const opts = {
|
||||
username: user.full_name,
|
||||
|
|
|
@ -34,7 +34,7 @@ bot_data.initialize(bot_data_params);
|
|||
|
||||
function test(label, f) {
|
||||
run_test(label, ({override}) => {
|
||||
realm.realm_uri = "https://chat.example.com";
|
||||
realm.realm_url = "https://chat.example.com";
|
||||
realm.realm_embedded_bots = [
|
||||
{name: "converter", config: {}},
|
||||
{name: "giphy", config: {key: "12345678"}},
|
||||
|
|
Loading…
Reference in New Issue