Skip to content

Commit

Permalink
refactor: rename "pages" to "views" ICIJ/datashare#1552
Browse files Browse the repository at this point in the history
  • Loading branch information
pirhoo committed Sep 10, 2024
1 parent 6daa7e2 commit fd7c0bf
Show file tree
Hide file tree
Showing 48 changed files with 49 additions and 49 deletions.
2 changes: 1 addition & 1 deletion src/components/DocumentInModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
import { mapGetters, mapState } from 'vuex'
import DocumentNavbar from '@/components/Document/DocumentNavbar'
import DocumentView from '@/pages/DocumentView'
import DocumentView from '@/views/DocumentView'
import QuickItemNav from '@/components/QuickItemNav'
import settings from '@/utils/settings'
Expand Down
62 changes: 31 additions & 31 deletions src/router/index.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
export const routes = [
{
path: '/',
component: () => import('@/pages/App'),
component: () => import('@/views/App'),
children: [
{
name: 'landing',
path: '',
component: () => import('@/pages/Landing'),
component: () => import('@/views/Landing'),
meta: {
docs: [
{
Expand Down Expand Up @@ -53,15 +53,15 @@ export const routes = [
]
},
components: {
default: () => import('@/pages/Search'),
default: () => import('@/views/Search'),
sidebar: () => import('@/components/FiltersPanel/FiltersPanel')
},
children: [
{
name: 'document',
path: 'd/:index/:id/:routing?',
alias: 'e/:index/:id/:routing?',
component: () => import('@/pages/DocumentView'),
component: () => import('@/views/DocumentView'),
props: true,
meta: {
title: ({ i18n }) => i18n.global.t('document.title'),
Expand Down Expand Up @@ -98,7 +98,7 @@ export const routes = [
{
name: 'tasks',
path: 'tasks',
component: () => import('@/pages/Tasks'),
component: () => import('@/views/Tasks'),
redirect: {
name: 'task.batch-search.list'
},
Expand All @@ -115,7 +115,7 @@ export const routes = [
{
name: 'task.analysis',
path: 'analysis',
component: () => import('@/pages/TaskAnalysis'),
component: () => import('@/views/TaskAnalysis'),
meta: {
title: ({ i18n }) => i18n.global.t('indexing.title'),
allowedModes: ['LOCAL', 'EMBEDDED']
Expand All @@ -124,7 +124,7 @@ export const routes = [
{
name: 'task.analysis.list',
path: '',
component: () => import('@/pages/TaskAnalysisList'),
component: () => import('@/views/TaskAnalysisList'),
meta: {
title: ({ i18n }) => i18n.global.t('indexing.title'),
allowedModes: ['LOCAL', 'EMBEDDED'],
Expand All @@ -145,12 +145,12 @@ export const routes = [
{
name: 'task.batch-download',
path: 'batch-download',
component: () => import('@/pages/TaskBatchDownload'),
component: () => import('@/views/TaskBatchDownload'),
children: [
{
name: 'task.batch-download.list',
path: '',
component: () => import('@/pages/TaskBatchDownloadList'),
component: () => import('@/views/TaskBatchDownloadList'),
meta: {
title: ({ i18n }) => i18n.global.t('batchDownload.title'),
docs: [
Expand All @@ -172,14 +172,14 @@ export const routes = [
name: 'task.batch-search',
path: 'batch-search',
components: {
default: () => import('@/pages/TaskBatchSearch')
default: () => import('@/views/TaskBatchSearch')
},
children: [
{
path: '',
name: 'task.batch-search.list',
components: {
default: () => import('@/pages/TaskBatchSearchList')
default: () => import('@/views/TaskBatchSearchList')
},
meta: {
title: ({ i18n }) => i18n.global.t('batchSearch.title'),
Expand All @@ -195,7 +195,7 @@ export const routes = [
name: 'task.batch-search.new',
path: 'new',
components: {
default: () => import('@/pages/TaskBatchSearchNew')
default: () => import('@/views/TaskBatchSearchNew')
},
meta: {
title: ({ i18n }) => i18n.global.t('newBatchSearch.title'),
Expand All @@ -211,15 +211,15 @@ export const routes = [
name: 'task.batch-search.view',
path: ':indices/:uuid',
components: {
default: () => import('@/pages/TaskBatchSearchView')
default: () => import('@/views/TaskBatchSearchView')
},
props: true,
children: [
{
name: 'task.batch-search.view.results',
path: '',
props: true,
component: () => import('@/pages/TaskBatchSearchViewResults')
component: () => import('@/views/TaskBatchSearchViewResults')
}
],
meta: {
Expand All @@ -238,15 +238,15 @@ export const routes = [
title: 'Projects'
},
components: {
default: () => import('@/pages/Project'),
settings: () => import('@/pages/ProjectListSettings')
default: () => import('@/views/Project'),
settings: () => import('@/views/ProjectListSettings')
},
children: [
{
path: '',
name: 'project.list',
components: {
default: () => import('@/pages/ProjectList')
default: () => import('@/views/ProjectList')
},
meta: {
icon: 'dots-nine',
Expand All @@ -257,7 +257,7 @@ export const routes = [
name: 'project.new',
path: 'new',
components: {
default: () => import('@/pages/ProjectNew')
default: () => import('@/views/ProjectNew')
},
meta: {
icon: 'plus',
Expand All @@ -269,7 +269,7 @@ export const routes = [
name: 'project.view',
path: ':name',
props: true,
component: () => import('@/pages/ProjectView'),
component: () => import('@/views/ProjectView'),
meta: {
icon: null,
title({ route, core }) {
Expand All @@ -281,7 +281,7 @@ export const routes = [
name: 'project.view.insights',
path: '',
props: true,
component: () => import('@/pages/ProjectViewInsights'),
component: () => import('@/views/ProjectViewInsights'),
meta: {
icon: 'chart-bar',
title() {
Expand All @@ -293,7 +293,7 @@ export const routes = [
name: 'project.view.edit',
path: 'edit',
props: true,
component: () => import('@/pages/ProjectViewEdit'),
component: () => import('@/views/ProjectViewEdit'),
meta: {
icon: 'pen',
title: 'Edit project',
Expand All @@ -312,7 +312,7 @@ export const routes = [
name: 'project.view.add-documents',
path: 'add-documents',
components: {
default: () => import('@/pages/ProjectViewAddDocuments')
default: () => import('@/views/ProjectViewAddDocuments')
},
meta: {
allowedModes: ['LOCAL', 'EMBEDDED']
Expand All @@ -322,7 +322,7 @@ export const routes = [
name: 'project.view.find-named-entities',
path: 'find-named-entities',
components: {
default: () => import('@/pages/ProjectViewFindNamedEntities')
default: () => import('@/views/ProjectViewFindNamedEntities')
},
meta: {
allowedModes: ['LOCAL', 'EMBEDDED']
Expand All @@ -335,7 +335,7 @@ export const routes = [
{
name: 'user-history',
path: 'user-history',
component: () => import('@/pages/UserHistory'),
component: () => import('@/views/UserHistory'),
redirect: {
name: 'user-history.document.list'
},
Expand All @@ -346,7 +346,7 @@ export const routes = [
{
name: 'user-history.document.list',
path: 'document',
component: () => import('@/pages/UserHistoryDocumentList'),
component: () => import('@/views/UserHistoryDocumentList'),
meta: {
title: ({ i18n }) => i18n.global.t('userHistory.heading')
}
Expand All @@ -360,7 +360,7 @@ export const routes = [
{
name: 'user-history.saved-search.list',
path: 'saved-search',
component: () => import('@/pages/UserHistorySavedSearchList'),
component: () => import('@/views/UserHistorySavedSearchList'),
meta: {
title: ({ i18n }) => i18n.global.t('userHistory.heading')
}
Expand All @@ -373,7 +373,7 @@ export const routes = [
meta: {
title: ({ i18n }) => i18n.global.t('server.title')
},
component: () => import('@/pages/Settings')
component: () => import('@/views/Settings')
},
{
name: 'document-standalone',
Expand All @@ -384,7 +384,7 @@ export const routes = [
props(route) {
return { ...route.params, ...route.query }
},
component: () => import('@/pages/DocumentStandalone')
component: () => import('@/views/DocumentStandalone')
}
]
},
Expand All @@ -397,12 +397,12 @@ export const routes = [
props(route) {
return { ...route.params, ...route.query }
},
component: () => import('@/pages/DocumentModal')
component: () => import('@/views/DocumentModal')
},
{
path: '/login',
name: 'login',
component: () => import('@/pages/Login'),
component: () => import('@/views/Login'),
meta: {
skipsAuth: true,
title: 'Login'
Expand All @@ -411,7 +411,7 @@ export const routes = [
{
name: 'error',
path: '/:pathMatch(.*)*',
component: () => import('@/pages/Error'),
component: () => import('@/views/Error'),
props: true,
meta: {
skipsAuth: true,
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

<script>
import DocumentNavbar from '@/components/Document/DocumentNavbar'
import DocumentView from '@/pages/DocumentView'
import DocumentView from '@/views/DocumentView'
export default {
name: 'DocumentModal',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

<script>
import DocumentNavbar from '@/components/Document/DocumentNavbar'
import DocumentView from '@/pages/DocumentView'
import DocumentView from '@/views/DocumentView'
export default {
name: 'DocumentStandalone',
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { IndexedDocument, letData } from '~tests/unit/es_utils'
import esConnectionHelper from '~tests/unit/specs/utils/esConnectionHelper'
import CoreSetup from '~tests/unit/CoreSetup'
import { flushPromises } from '~tests/unit/tests_utils'
import DocumentView from '@/pages/DocumentView'
import DocumentView from '@/views/DocumentView'

describe('DocumentView.vue', () => {
const { index: project, es } = esConnectionHelper.build()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { setCookie, removeCookie } from 'tiny-cookie'
import Auth from '@/api/resources/Auth'
import CoreSetup from '~tests/unit/CoreSetup'
import { getMode } from '@/mode'
import Error from '@/pages/Error'
import Error from '@/views/Error'

describe('Error.vue local mode', () => {
let wrapper
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { shallowMount } from '@vue/test-utils'

import CoreSetup from '~tests/unit/CoreSetup'
import Landing from '@/pages/Landing'
import Landing from '@/views/Landing'

describe('Landing.vue', () => {
const { config, plugins } = CoreSetup.init().useAll()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { shallowMount } from '@vue/test-utils'

import CoreSetup from '~tests/unit/CoreSetup'
import Login from '@/pages/Login'
import Login from '@/views/Login'

describe('Login.vue', () => {
let wrapper
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { shallowMount, mount } from '@vue/test-utils'

import { flushPromises } from '~tests/unit/tests_utils'
import CoreSetup from '~tests/unit/CoreSetup'
import ProjectViewEdit from '@/pages/ProjectViewEdit'
import ProjectViewEdit from '@/views/ProjectViewEdit'

describe('ProjectViewEdit.vue', () => {
let api, core
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { errors as esErrors } from 'elasticsearch-browser'

import { flushPromises } from '~tests/unit/tests_utils'
import CoreSetup from '~tests/unit/CoreSetup'
import Search from '@/pages/Search'
import Search from '@/views/Search'
import { state, getters, mutations } from '@/store/modules/search'

describe('Search.vue', () => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { shallowMount } from '@vue/test-utils'

import CoreSetup from '~tests/unit/CoreSetup'
import Settings from '@/pages/Settings'
import Settings from '@/views/Settings'

describe('Settings.vue', () => {
const { plugins } = CoreSetup.init().useAll()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { mount } from '@vue/test-utils'

import CoreSetup from '~tests/unit/CoreSetup'
import TaskAnalysisList from '@/pages/TaskAnalysisList'
import TaskAnalysisList from '@/views/TaskAnalysisList'

const flushPromisesAndPendingTimers = async ({ vm }) => {
await vm.$nextTick()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { mount } from '@vue/test-utils'

import { flushPromises } from '~tests/unit/tests_utils'
import CoreSetup from '~tests/unit/CoreSetup'
import TaskBatchDownloadList from '@/pages/TaskBatchDownloadList'
import TaskBatchDownloadList from '@/views/TaskBatchDownloadList'
import { getMode, MODE_NAME } from '@/mode'

describe('TaskBatchDownloadList.vue', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { removeCookie, setCookie } from 'tiny-cookie'

import { flushPromises } from '~tests/unit/tests_utils'
import CoreSetup from '~tests/unit/CoreSetup'
import TaskBatchSearchList from '@/pages/TaskBatchSearchList'
import TaskBatchSearchList from '@/views/TaskBatchSearchList'

describe('TaskBatchSearchList.vue', () => {
const mockedBatchSearches = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { removeCookie } from 'tiny-cookie'
import { IndexedDocument, letData } from '~tests/unit/es_utils'
import esConnectionHelper from '~tests/unit/specs/utils/esConnectionHelper'
import CoreSetup from '~tests/unit/CoreSetup'
import TaskBatchSearchViewResults from '@/pages/TaskBatchSearchViewResults'
import TaskBatchSearchViewResults from '@/views/TaskBatchSearchViewResults'

describe('TaskBatchSearchViewResults.vue', () => {
const routes = [
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { shallowMount } from '@vue/test-utils'

import CoreSetup from '~tests/unit/CoreSetup'
import Tasks from '@/pages/Tasks'
import Tasks from '@/views/Tasks'

describe('Tasks.vue', () => {
const routes = [
Expand Down
Loading

0 comments on commit fd7c0bf

Please sign in to comment.