Ver código fonte

Удалены неиспользуемые компоненты

Book Pauk 2 anos atrás
pai
commit
4fc32eafd7

+ 1 - 11
client/components/App.vue

@@ -39,16 +39,6 @@ class App {
     _options = componentOptions;
     showPage = false;
 
-    itemRuText = {
-        '/cardindex': 'Картотека',
-        '/reader': 'Читалка',
-        '/forum': 'Форум-чат',
-        '/income': 'Поступления',
-        '/sources': 'Источники',
-        '/settings': 'Параметры',
-        '/help': 'Справка',
-    };
-
     created() {
         this.commit = this.$store.commit;
         this.state = this.$store.state;
@@ -202,7 +192,7 @@ class App {
             } else if (this.mode == 'omnireader') {
                 document.title = `Omni Reader - всегда с вами`;
             } else if (this.config && this.mode !== null) {
-                document.title = `${this.config.name} - ${this.itemRuText[this.rootRoute]}`;
+                document.title = `Универсальная читалка книг и ресурсов интернета`;
             }
         } else {
             document.title = title;

+ 0 - 19
client/components/CardIndex/Book/Book.vue

@@ -1,19 +0,0 @@
-<template>
-    <div>
-        Раздел Book в разработке
-    </div>
-</template>
-
-<script>
-//-----------------------------------------------------------------------------
-import vueComponent from '../../vueComponent.js';
-
-class Book {
-    created() {
-    }
-
-}
-
-export default vueComponent(Book);
-//-----------------------------------------------------------------------------
-</script>

+ 0 - 19
client/components/CardIndex/Card/Card.vue

@@ -1,19 +0,0 @@
-<template>
-    <div>
-        Раздел Card в разработке
-    </div>
-</template>
-
-<script>
-//-----------------------------------------------------------------------------
-import vueComponent from '../../vueComponent.js';
-
-class Card {
-    created() {
-    }
-
-}
-
-export default vueComponent(Card);
-//-----------------------------------------------------------------------------
-</script>

+ 0 - 93
client/components/CardIndex/CardIndex.vue

@@ -1,93 +0,0 @@
-<template>
-    <div>
-        <router-view v-slot="{ Component }">
-            <keep-alive>
-                <component :is="Component" />
-            </keep-alive>
-        </router-view>        
-    </div>
-</template>
-
-<script>
-//-----------------------------------------------------------------------------
-import vueComponent from '../vueComponent.js';
-import _ from 'lodash';
-
-const selfRoute = '/cardindex';
-const tab2Route = [
-    '/cardindex/search',
-    '/cardindex/card',
-    '/cardindex/book',
-    '/cardindex/history',
-];
-let lastActiveTab = null;
-
-const componentOptions = {
-    watch: {
-        selectedTab: function(newValue) {
-            lastActiveTab = newValue;
-            this.setRouteByTab(newValue);
-        },
-        curRoute: function(newValue) {
-            this.setTabByRoute(newValue);
-        },
-    },
-};
-class CardIndex {
-    _options = componentOptions;
-    selectedTab = null;
-
-    created() {
-        this.$watch(
-            () => this.$route.path,
-            (newValue) => {
-                if (newValue == '/cardindex' && this.isReader) {
-                    this.$router.replace({ path: '/reader' });
-                }
-            }
-        )
-    }
-
-    mounted() {
-        this.setTabByRoute(this.curRoute);
-    }
-
-    setTabByRoute(route) {
-        const t = _.indexOf(tab2Route, route);
-        if (t >= 0) {
-            if (t !== this.selectedTab)
-                this.selectedTab = t.toString();
-        } else {
-            if (route == selfRoute && lastActiveTab !== null)
-                this.setRouteByTab(lastActiveTab);
-        }
-    }
-
-    setRouteByTab(tab) {
-        const t = Number(tab);
-        if (tab2Route[t] !== this.curRoute) {
-            this.$router.replace(tab2Route[t]);
-        }
-    }
-
-    get mode() {
-        return this.$store.state.config.mode;
-    }
-
-    get curRoute() {
-        const m = this.$route.path.match(/^(\/[^/]*\/[^/]*).*$/i);
-        return (m ? m[1] : this.$route.path);
-    }
-
-    get isReader() {
-        return (this.mode !== null && (this.mode == 'reader' || this.mode == 'omnireader' || this.mode == 'liberama'));
-    }
-
-}
-
-export default vueComponent(CardIndex);
-//-----------------------------------------------------------------------------
-</script>
-
-<style scoped>
-</style>

+ 0 - 19
client/components/CardIndex/History/History.vue

@@ -1,19 +0,0 @@
-<template>
-    <div>
-        Раздел History в разработке
-    </div>
-</template>
-
-<script>
-//-----------------------------------------------------------------------------
-import vueComponent from '../../vueComponent.js';
-
-class History {
-    created() {
-    }
-
-}
-
-export default vueComponent(History);
-//-----------------------------------------------------------------------------
-</script>

+ 0 - 19
client/components/CardIndex/Search/Search.vue

@@ -1,19 +0,0 @@
-<template>
-    <div>
-        Раздел Search в разработке
-    </div>
-</template>
-
-<script>
-//-----------------------------------------------------------------------------
-import vueComponent from '../../vueComponent.js';
-
-class Search {
-    created() {
-    }
-
-}
-
-export default vueComponent(Search);
-//-----------------------------------------------------------------------------
-</script>

+ 0 - 19
client/components/Help/Help.vue

@@ -1,19 +0,0 @@
-<template>
-    <div>
-        Раздел Help в разработке
-    </div>
-</template>
-
-<script>
-//-----------------------------------------------------------------------------
-import vueComponent from '../vueComponent.js';
-
-class Help {
-    created() {
-    }
-
-}
-
-export default vueComponent(Help);
-//-----------------------------------------------------------------------------
-</script>

+ 0 - 19
client/components/Income/Income.vue

@@ -1,19 +0,0 @@
-<template>
-    <div>
-        Раздел Income в разработке
-    </div>
-</template>
-
-<script>
-//-----------------------------------------------------------------------------
-import vueComponent from '../vueComponent.js';
-
-class Income {
-    created() {
-    }
-
-}
-
-export default vueComponent(Income);
-//-----------------------------------------------------------------------------
-</script>

+ 0 - 19
client/components/NotFound404/NotFound404.vue

@@ -1,19 +0,0 @@
-<template>
-    <div>
-        Страница не найдена
-    </div>
-</template>
-
-<script>
-//-----------------------------------------------------------------------------
-import vueComponent from '../vueComponent.js';
-
-class NotFound404 {
-    created() {
-    }
-
-}
-
-export default vueComponent(NotFound404);
-//-----------------------------------------------------------------------------
-</script>

+ 0 - 19
client/components/Settings/Settings.vue

@@ -1,19 +0,0 @@
-<template>
-    <div>
-        Раздел Settings в разработке
-    </div>
-</template>
-
-<script>
-//-----------------------------------------------------------------------------
-import vueComponent from '../vueComponent.js';
-
-class Settings {
-    created() {
-    }
-
-}
-
-export default vueComponent(Settings);
-//-----------------------------------------------------------------------------
-</script>

+ 0 - 19
client/components/Sources/Sources.vue

@@ -1,19 +0,0 @@
-<template>
-    <div>
-        Раздел Sources в разработке
-    </div>
-</template>
-
-<script>
-//-----------------------------------------------------------------------------
-import vueComponent from '../vueComponent.js';
-
-class Sources {
-    created() {
-    }
-
-}
-
-export default vueComponent(Sources);
-//-----------------------------------------------------------------------------
-</script>

+ 2 - 27
client/router.js

@@ -1,41 +1,16 @@
 import { createRouter, createWebHashHistory } from 'vue-router';
 import _ from 'lodash';
 
-const CardIndex = () => import('./components/CardIndex/CardIndex.vue');
-const Search = () => import('./components/CardIndex/Search/Search.vue');
-const Card = () => import('./components/CardIndex/Card/Card.vue');
-const Book = () => import('./components/CardIndex/Book/Book.vue');
-const History = () => import('./components/CardIndex/History/History.vue');
-
 //немедленная загрузка
 //import Reader from './components/Reader/Reader.vue';
 const Reader = () => import('./components/Reader/Reader.vue');
 const ExternalLibs = () => import('./components/ExternalLibs/ExternalLibs.vue');
 
-const Income = () => import('./components/Income/Income.vue');
-const Sources = () => import('./components/Sources/Sources.vue');
-const Settings = () => import('./components/Settings/Settings.vue');
-const Help = () => import('./components/Help/Help.vue');
-const NotFound404 = () => import('./components/NotFound404/NotFound404.vue');
-
 const myRoutes = [
-    ['/', null, null, '/cardindex'],
-    ['/cardindex', CardIndex],
-    ['/cardindex~search', Search],
-    ['/cardindex~card', Card],
-    ['/cardindex~card/:authorId', Card],
-    ['/cardindex~book', Book],
-    ['/cardindex~book/:bookId', Book],
-    ['/cardindex~history', History],
-
+    ['/', null, null, '/reader'],
     ['/reader', Reader],
     ['/external-libs', ExternalLibs],
-    ['/income', Income],
-    ['/sources', Sources],
-    ['/settings', Settings],
-    ['/help', Help],
-    ['/404', NotFound404],
-    ['/:pathMatch(.*)*', null, null, '/cardindex'],
+    ['/:pathMatch(.*)*', null, null, '/reader'],
 ];
 
 let routes = {};