Commit d4d05479 authored by Libbna Mathew's avatar Libbna Mathew Committed by Tim Plunkett
Browse files

Issue #3293424 by Libbna, tim.plunkett, narendraR, omkar-pd: Be consistent in...

Issue #3293424 by Libbna, tim.plunkett, narendraR, omkar-pd: Be consistent in using origin_url (and consider making it easier to include)
parent 70fb0ba7
Loading
Loading
Loading
Loading
+0 −0

File changed.

Preview suppressed by a .gitattributes entry or the file's encoding is unsupported.

+0 −0

File changed.

Preview suppressed by a .gitattributes entry or the file's encoding is unsupported.

+2 −2
Original line number Diff line number Diff line
@@ -3,12 +3,12 @@
  import ModulePage from './ModulePage.svelte';
  import Loading from './Loading.svelte';
  import { searchString } from './stores';
  import { ORIGIN_URL } from './constants';

  const matches = window.location.pathname.match(
    /\/admin\/modules\/browse\/([^/]+)/,
  );
  const moduleName = matches ? matches[1] : null;
  const { drupalSettings } = window;

  let loading = true;
  let data;
@@ -36,7 +36,7 @@
{#if !moduleName || !project}
  <ProjectBrowser />
{:else}
  {#await load(`${drupalSettings.project_browser.origin_url}/drupal-org-proxy/project?machine_name=${moduleName}`)}
  {#await load(`${ORIGIN_URL}/drupal-org-proxy/project?machine_name=${moduleName}`)}
    {#if loading}
      <Loading />
    {/if}
+3 −4
Original line number Diff line number Diff line
@@ -3,8 +3,9 @@
  import { moduleCategoryFilter, moduleCategoryVocabularies } from './stores';
  import MediaQuery from './MediaQuery.svelte';
  import { normalizeOptions, shallowCompare } from './util';
  import { ORIGIN_URL } from './constants';

  const { drupalSettings, Drupal } = window;
  const { Drupal } = window;
  const dispatch = createEventDispatcher();
  const stateContext = getContext('state');

@@ -24,9 +25,7 @@
  }

  async function fetchAllCategories() {
    const response = await fetch(
      `${drupalSettings.project_browser.origin_url}/drupal-org-proxy/categories`,
    );
    const response = await fetch(`${ORIGIN_URL}/drupal-org-proxy/categories`);
    if (response.ok) {
      return response.json();
    }
+3 −7
Original line number Diff line number Diff line
<script>
  import { ALL_VALUES_ID } from './constants';
  import { ALL_VALUES_ID, FULL_MODULE_PATH } from './constants';

  export let id;
  export let label;
  export let clickHandler;

  const { drupalSettings, Drupal } = window;
  const { Drupal } = window;
</script>

{#if id !== ALL_VALUES_ID}
@@ -17,11 +17,7 @@
          >{Drupal.t('Remove @filter', { '@filter': label })}</span
        >
      {/if}
      <img
        src="/{drupalSettings.project_browser
          .module_path}/images/white-close-icon.svg"
        alt=""
      />
      <img src="{FULL_MODULE_PATH}/images/white-close-icon.svg" alt="" />
    </button>
  </p>
{/if}
Loading