Reorg views

This commit is contained in:
Pig Fang 2019-03-18 15:00:18 +08:00
parent b6668a8eeb
commit bf364c5f5f
45 changed files with 50 additions and 47 deletions

View File

@ -34,9 +34,9 @@
<script> <script>
import toastr from 'toastr' import toastr from 'toastr'
import { swal } from '../../js/notify' import { swal } from '../js/notify'
import setAsAvatar from '../mixins/setAsAvatar' import setAsAvatar from './mixins/setAsAvatar'
import removeClosetItem from '../mixins/removeClosetItem' import removeClosetItem from './mixins/removeClosetItem'
export default { export default {
name: 'ClosetItem', name: 'ClosetItem',

View File

@ -15,7 +15,7 @@
</template> </template>
<script> <script>
import { swal } from '../../js/notify' import { swal } from '../js/notify'
export default { export default {
name: 'EmailVerification', name: 'EmailVerification',

View File

@ -50,8 +50,8 @@
<script> <script>
import * as skinview3d from 'skinview3d' import * as skinview3d from 'skinview3d'
import { emit } from '../../js/event' import { emit } from '../js/event'
import SkinSteve from '../../images/textures/steve.png' import SkinSteve from '../images/textures/steve.png'
export default { export default {
name: 'Previewer', name: 'Previewer',

View File

@ -32,8 +32,8 @@
</template> </template>
<script> <script>
import addClosetItem from '../mixins/addClosetItem' import addClosetItem from './mixins/addClosetItem'
import removeClosetItem from '../mixins/removeClosetItem' import removeClosetItem from './mixins/removeClosetItem'
export default { export default {
name: 'SkinLibItem', name: 'SkinLibItem',

View File

@ -1,7 +1,7 @@
import Vue from 'vue' import Vue from 'vue'
import './js' import './js'
import * as emitter from './js/event' import * as emitter from './js/event'
import routes from './components/route' import routes from './views/route'
Vue.config.productionTip = false Vue.config.productionTip = false

View File

@ -156,7 +156,7 @@
<script> <script>
import Paginate from 'vuejs-paginate' import Paginate from 'vuejs-paginate'
import { queryString } from '../../js/utils' import { queryString } from '../../js/utils'
import SkinLibItem from './SkinLibItem' import SkinLibItem from '../../components/SkinLibItem.vue'
export default { export default {
name: 'SkinLibrary', name: 'SkinLibrary',

View File

@ -141,14 +141,14 @@
<script> <script>
import toastr from 'toastr' import toastr from 'toastr'
import { swal } from '../../js/notify' import { swal } from '../../js/notify'
import setAsAvatar from '../mixins/setAsAvatar' import setAsAvatar from '../../components/mixins/setAsAvatar'
import addClosetItem from '../mixins/addClosetItem' import addClosetItem from '../../components/mixins/addClosetItem'
import removeClosetItem from '../mixins/removeClosetItem' import removeClosetItem from '../../components/mixins/removeClosetItem'
export default { export default {
name: 'Show', name: 'Show',
components: { components: {
Previewer: () => import('../common/Previewer'), Previewer: () => import('../../components/Previewer.vue'),
}, },
mixins: [ mixins: [
addClosetItem, addClosetItem,

View File

@ -115,7 +115,7 @@ import { swal } from '../../js/notify'
export default { export default {
name: 'Upload', name: 'Upload',
components: { components: {
Previewer: () => import('../common/Previewer'), Previewer: () => import('../../components/Previewer.vue'),
FileUpload, FileUpload,
}, },
data() { data() {

View File

@ -195,15 +195,15 @@ import toastr from 'toastr'
import Paginate from 'vuejs-paginate' import Paginate from 'vuejs-paginate'
import { debounce, queryString } from '../../js/utils' import { debounce, queryString } from '../../js/utils'
import { swal } from '../../js/notify' import { swal } from '../../js/notify'
import ClosetItem from './ClosetItem' import ClosetItem from '../../components/ClosetItem.vue'
import EmailVerification from './EmailVerification' import EmailVerification from '../../components/EmailVerification.vue'
export default { export default {
name: 'Closet', name: 'Closet',
components: { components: {
Paginate, Paginate,
ClosetItem, ClosetItem,
Previewer: () => import('../common/Previewer'), Previewer: () => import('../../components/Previewer.vue'),
EmailVerification, EmailVerification,
}, },
data: () => ({ data: () => ({

View File

@ -67,7 +67,7 @@
<script> <script>
import toastr from 'toastr' import toastr from 'toastr'
import { swal } from '../../js/notify' import { swal } from '../../js/notify'
import EmailVerification from './EmailVerification' import EmailVerification from '../../components/EmailVerification.vue'
const ONE_DAY = 24 * 3600 * 1000 const ONE_DAY = 24 * 3600 * 1000

View File

@ -225,7 +225,7 @@ import { swal } from '../../js/notify'
export default { export default {
name: 'Players', name: 'Players',
components: { components: {
Previewer: () => import('../common/Previewer'), Previewer: () => import('../../components/Previewer.vue'),
}, },
props: { props: {
baseUrl: { baseUrl: {

View File

@ -203,7 +203,7 @@
<script> <script>
import toastr from 'toastr' import toastr from 'toastr'
import { swal } from '../../js/notify' import { swal } from '../../js/notify'
import EmailVerification from './EmailVerification' import EmailVerification from '../../components/EmailVerification.vue'
export default { export default {
name: 'Profile', name: 'Profile',

View File

@ -1,7 +1,7 @@
import Vue from 'vue' import Vue from 'vue'
import { mount } from '@vue/test-utils' import { mount } from '@vue/test-utils'
import { flushPromises } from '../../utils' import { flushPromises } from '../utils'
import ClosetItem from '@/components/user/ClosetItem.vue' import ClosetItem from '@/components/ClosetItem.vue'
import { swal } from '@/js/notify' import { swal } from '@/js/notify'
jest.mock('@/js/notify') jest.mock('@/js/notify')

View File

@ -1,6 +1,6 @@
import Vue from 'vue' import Vue from 'vue'
import { mount } from '@vue/test-utils' import { mount } from '@vue/test-utils'
import EmailVerification from '@/components/user/EmailVerification.vue' import EmailVerification from '@/components/EmailVerification.vue'
import { swal } from '@/js/notify' import { swal } from '@/js/notify'
jest.mock('@/js/notify') jest.mock('@/js/notify')

View File

@ -1,8 +1,8 @@
import Vue from 'vue' import Vue from 'vue'
import { mount } from '@vue/test-utils' import { mount } from '@vue/test-utils'
import Previewer from '@/components/common/Previewer.vue' import Previewer from '@/components/Previewer.vue'
import * as emitter from '@/js/event' import * as emitter from '@/js/event'
import * as mockedSkinview3d from '../../__mocks__/skinview3d' import * as mockedSkinview3d from '../__mocks__/skinview3d'
type Viewer = Vue & { viewer: mockedSkinview3d.SkinViewer } type Viewer = Vue & { viewer: mockedSkinview3d.SkinViewer }

View File

@ -1,8 +1,8 @@
import Vue from 'vue' import Vue from 'vue'
import { mount } from '@vue/test-utils' import { mount } from '@vue/test-utils'
import SkinLibItem from '@/components/skinlib/SkinLibItem.vue' import SkinLibItem from '@/components/SkinLibItem.vue'
import toastr from 'toastr' import toastr from 'toastr'
import { flushPromises } from '../../utils' import { flushPromises } from '../utils'
import { swal } from '@/js/notify' import { swal } from '@/js/notify'
jest.mock('@/js/notify') jest.mock('@/js/notify')

View File

@ -1,6 +1,6 @@
import Vue from 'vue' import Vue from 'vue'
import { mount } from '@vue/test-utils' import { mount } from '@vue/test-utils'
import Customization from '@/components/admin/Customization.vue' import Customization from '@/views/admin/Customization.vue'
window.blessing.extra = { currentSkin: 'skin-blue' } window.blessing.extra = { currentSkin: 'skin-blue' }

View File

@ -1,6 +1,6 @@
import Vue from 'vue' import Vue from 'vue'
import { mount } from '@vue/test-utils' import { mount } from '@vue/test-utils'
import Market from '@/components/admin/Market.vue' import Market from '@/views/admin/Market.vue'
import { flushPromises } from '../../utils' import { flushPromises } from '../../utils'
import { swal } from '@/js/notify' import { swal } from '@/js/notify'

View File

@ -1,7 +1,7 @@
import Vue from 'vue' import Vue from 'vue'
import { mount } from '@vue/test-utils' import { mount } from '@vue/test-utils'
import { flushPromises } from '../../utils' import { flushPromises } from '../../utils'
import Players from '@/components/admin/Players.vue' import Players from '@/views/admin/Players.vue'
import { swal } from '@/js/notify' import { swal } from '@/js/notify'
jest.mock('@/js/notify') jest.mock('@/js/notify')

View File

@ -1,6 +1,6 @@
import Vue from 'vue' import Vue from 'vue'
import { mount } from '@vue/test-utils' import { mount } from '@vue/test-utils'
import Plugins from '@/components/admin/Plugins.vue' import Plugins from '@/views/admin/Plugins.vue'
import toastr from 'toastr' import toastr from 'toastr'
import { flushPromises } from '../../utils' import { flushPromises } from '../../utils'
import { swal } from '@/js/notify' import { swal } from '@/js/notify'

View File

@ -1,7 +1,7 @@
import Vue from 'vue' import Vue from 'vue'
import { mount } from '@vue/test-utils' import { mount } from '@vue/test-utils'
import { flushPromises } from '../../utils' import { flushPromises } from '../../utils'
import Update from '@/components/admin/Update.vue' import Update from '@/views/admin/Update.vue'
import '@/js/notify' import '@/js/notify'
jest.mock('@/js/notify') jest.mock('@/js/notify')

View File

@ -1,6 +1,6 @@
import Vue from 'vue' import Vue from 'vue'
import { mount } from '@vue/test-utils' import { mount } from '@vue/test-utils'
import Users from '@/components/admin/Users.vue' import Users from '@/views/admin/Users.vue'
import toastr from 'toastr' import toastr from 'toastr'
import { swal } from '@/js/notify' import { swal } from '@/js/notify'
import '@/js/i18n' import '@/js/i18n'

View File

@ -1,6 +1,6 @@
import Vue from 'vue' import Vue from 'vue'
import { mount } from '@vue/test-utils' import { mount } from '@vue/test-utils'
import Forgot from '@/components/auth/Forgot.vue' import Forgot from '@/views/auth/Forgot.vue'
test('click to refresh captcha', () => { test('click to refresh captcha', () => {
jest.spyOn(Date, 'now') jest.spyOn(Date, 'now')

View File

@ -1,6 +1,6 @@
import Vue from 'vue' import Vue from 'vue'
import { mount } from '@vue/test-utils' import { mount } from '@vue/test-utils'
import Login from '@/components/auth/Login.vue' import Login from '@/views/auth/Login.vue'
import { swal } from '@/js/notify' import { swal } from '@/js/notify'
jest.mock('@/js/notify') jest.mock('@/js/notify')

View File

@ -1,6 +1,6 @@
import Vue from 'vue' import Vue from 'vue'
import { mount } from '@vue/test-utils' import { mount } from '@vue/test-utils'
import Register from '@/components/auth/Register.vue' import Register from '@/views/auth/Register.vue'
import { swal } from '@/js/notify' import { swal } from '@/js/notify'
jest.mock('@/js/notify') jest.mock('@/js/notify')

View File

@ -1,6 +1,6 @@
import Vue from 'vue' import Vue from 'vue'
import { mount } from '@vue/test-utils' import { mount } from '@vue/test-utils'
import Reset from '@/components/auth/Reset.vue' import Reset from '@/views/auth/Reset.vue'
import { swal } from '@/js/notify' import { swal } from '@/js/notify'
jest.mock('@/js/notify') jest.mock('@/js/notify')

View File

@ -1,6 +1,6 @@
import Vue from 'vue' import Vue from 'vue'
import { mount } from '@vue/test-utils' import { mount } from '@vue/test-utils'
import List from '@/components/skinlib/List.vue' import List from '@/views/skinlib/List.vue'
test('fetch data before mounting', () => { test('fetch data before mounting', () => {
Vue.prototype.$http.get.mockResolvedValue({ Vue.prototype.$http.get.mockResolvedValue({

View File

@ -1,6 +1,6 @@
import Vue from 'vue' import Vue from 'vue'
import { mount } from '@vue/test-utils' import { mount } from '@vue/test-utils'
import Show from '@/components/skinlib/Show.vue' import Show from '@/views/skinlib/Show.vue'
import toastr from 'toastr' import toastr from 'toastr'
import { flushPromises } from '../../utils' import { flushPromises } from '../../utils'
import { swal } from '@/js/notify' import { swal } from '@/js/notify'

View File

@ -1,7 +1,7 @@
/* eslint-disable accessor-pairs */ /* eslint-disable accessor-pairs */
import Vue from 'vue' import Vue from 'vue'
import { mount } from '@vue/test-utils' import { mount } from '@vue/test-utils'
import Upload from '@/components/skinlib/Upload.vue' import Upload from '@/views/skinlib/Upload.vue'
import { flushPromises } from '../../utils' import { flushPromises } from '../../utils'
import toastr from 'toastr' import toastr from 'toastr'
import { swal } from '@/js/notify' import { swal } from '@/js/notify'

View File

@ -1,8 +1,8 @@
import Vue from 'vue' import Vue from 'vue'
import { mount } from '@vue/test-utils' import { mount } from '@vue/test-utils'
import Closet from '@/components/user/Closet.vue' import Closet from '@/views/user/Closet.vue'
import ClosetItem from '@/components/user/ClosetItem.vue' import ClosetItem from '@/components/ClosetItem.vue'
import Previewer from '@/components/common/Previewer.vue' import Previewer from '@/components/Previewer.vue'
import toastr from 'toastr' import toastr from 'toastr'
import { swal } from '@/js/notify' import { swal } from '@/js/notify'

View File

@ -1,7 +1,7 @@
/* eslint-disable no-mixed-operators */ /* eslint-disable no-mixed-operators */
import Vue from 'vue' import Vue from 'vue'
import { mount } from '@vue/test-utils' import { mount } from '@vue/test-utils'
import Dashboard from '@/components/user/Dashboard.vue' import Dashboard from '@/views/user/Dashboard.vue'
import toastr from 'toastr' import toastr from 'toastr'
import { swal } from '@/js/notify' import { swal } from '@/js/notify'

View File

@ -1,7 +1,7 @@
import Vue from 'vue' import Vue from 'vue'
import { mount } from '@vue/test-utils' import { mount } from '@vue/test-utils'
import { flushPromises } from '../../utils' import { flushPromises } from '../../utils'
import Players from '@/components/user/Players.vue' import Players from '@/views/user/Players.vue'
import { swal } from '@/js/notify' import { swal } from '@/js/notify'
jest.mock('toastr') jest.mock('toastr')

View File

@ -1,7 +1,7 @@
import Vue from 'vue' import Vue from 'vue'
import { mount } from '@vue/test-utils' import { mount } from '@vue/test-utils'
import { flushPromises } from '../../utils' import { flushPromises } from '../../utils'
import Profile from '@/components/user/Profile.vue' import Profile from '@/views/user/Profile.vue'
import toastr from 'toastr' import toastr from 'toastr'
import { swal } from '@/js/notify' import { swal } from '@/js/notify'

View File

@ -15,6 +15,9 @@
], ],
"@/components/*": [ "@/components/*": [
"./resources/assets/src/components/*" "./resources/assets/src/components/*"
],
"@/views/*": [
"./resources/assets/src/views/*"
] ]
} }
}, },