Welcome to mirror list, hosted at ThFree Co, Russian Federation.

404.js « 404 « frontend « content - gitlab.com/gitlab-org/gitlab-docs.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 69ef99565101e80a4530b041719c82c37ee5c14a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
import Vue from 'vue';
import ErrorMessage from './components/error_message.vue';

document.addEventListener('DOMContentLoaded', () => {
  const { environment, offlineVersions, archivesPath } = document.getElementById(
    'offline-versions',
  ).dataset;
  const location = window.location.href;
  const isOffline = offlineVersions.split(',').find(version => location.includes(version));

  return new Vue({
    el: '#js-error-message',
    components: {
      ErrorMessage,
    },
    render(createElement) {
      return createElement(ErrorMessage, {
        provide: {
          archivesPath,
        },
        props: {
          isOffline: Boolean(isOffline),
          isProduction: environment === 'production',
        },
      });
    },
  });
});