Переход на Vue 3, в процессе
This commit is contained in:
@@ -17,6 +17,7 @@ import vueComponent from './vueComponent.js';
|
|||||||
|
|
||||||
import Notify from './share/Notify.vue';
|
import Notify from './share/Notify.vue';
|
||||||
import StdDialog from './share/StdDialog.vue';
|
import StdDialog from './share/StdDialog.vue';
|
||||||
|
import sanitizeHtml from 'sanitize-html';
|
||||||
|
|
||||||
import miscApi from '../api/misc';
|
import miscApi from '../api/misc';
|
||||||
import * as utils from '../share/utils';
|
import * as utils from '../share/utils';
|
||||||
@@ -79,6 +80,9 @@ class App {
|
|||||||
// setAppTitle
|
// setAppTitle
|
||||||
this.$root.setAppTitle = this.setAppTitle;
|
this.$root.setAppTitle = this.setAppTitle;
|
||||||
|
|
||||||
|
//sanitize
|
||||||
|
this.$root.sanitize = sanitizeHtml;
|
||||||
|
|
||||||
//global keyHooks
|
//global keyHooks
|
||||||
this.keyHooks = [];
|
this.keyHooks = [];
|
||||||
this.keyHook = (event) => {
|
this.keyHook = (event) => {
|
||||||
|
|||||||
@@ -6,15 +6,14 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
import Vue from 'vue';
|
import vueComponent from '../../vueComponent.js';
|
||||||
import Component from 'vue-class-component';
|
|
||||||
|
|
||||||
export default @Component({
|
class Book {
|
||||||
})
|
|
||||||
class Book extends Vue {
|
|
||||||
created() {
|
created() {
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export default vueComponent(Book);
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -6,15 +6,14 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
import Vue from 'vue';
|
import vueComponent from '../../vueComponent.js';
|
||||||
import Component from 'vue-class-component';
|
|
||||||
|
|
||||||
export default @Component({
|
class Card {
|
||||||
})
|
|
||||||
class Card extends Vue {
|
|
||||||
created() {
|
created() {
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export default vueComponent(Card);
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -6,15 +6,14 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
import Vue from 'vue';
|
import vueComponent from '../../vueComponent.js';
|
||||||
import Component from 'vue-class-component';
|
|
||||||
|
|
||||||
export default @Component({
|
class History {
|
||||||
})
|
|
||||||
class History extends Vue {
|
|
||||||
created() {
|
created() {
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export default vueComponent(History);
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -6,15 +6,14 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
import Vue from 'vue';
|
import vueComponent from '../../vueComponent.js';
|
||||||
import Component from 'vue-class-component';
|
|
||||||
|
|
||||||
export default @Component({
|
class Search {
|
||||||
})
|
|
||||||
class Search extends Vue {
|
|
||||||
created() {
|
created() {
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export default vueComponent(Search);
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -704,7 +704,7 @@ class ExternalLibs extends Vue {
|
|||||||
this.commitLibs(libs);
|
this.commitLibs(libs);
|
||||||
} else if (item.c != this.bookmarkDesc) {
|
} else if (item.c != this.bookmarkDesc) {
|
||||||
if (await this.$root.stdDialog.confirm(`Такая закладка уже существует с другим описанием.<br>` +
|
if (await this.$root.stdDialog.confirm(`Такая закладка уже существует с другим описанием.<br>` +
|
||||||
`Заменить '${this.$sanitize(item.c)}' на '${this.$sanitize(this.bookmarkDesc)}'?`, ' ')) {
|
`Заменить '${this.$root.sanitize(item.c)}' на '${this.$root.sanitize(this.bookmarkDesc)}'?`, ' ')) {
|
||||||
item.c = this.bookmarkDesc;
|
item.c = this.bookmarkDesc;
|
||||||
this.commitLibs(libs);
|
this.commitLibs(libs);
|
||||||
} else
|
} else
|
||||||
|
|||||||
@@ -6,15 +6,14 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
import Vue from 'vue';
|
import vueComponent from '../vueComponent.js';
|
||||||
import Component from 'vue-class-component';
|
|
||||||
|
|
||||||
export default @Component({
|
class Help {
|
||||||
})
|
|
||||||
class Help extends Vue {
|
|
||||||
created() {
|
created() {
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export default vueComponent(Help);
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -6,15 +6,14 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
import Vue from 'vue';
|
import vueComponent from '../vueComponent.js';
|
||||||
import Component from 'vue-class-component';
|
|
||||||
|
|
||||||
export default @Component({
|
class Income {
|
||||||
})
|
|
||||||
class Income extends Vue {
|
|
||||||
created() {
|
created() {
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export default vueComponent(Income);
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -6,15 +6,14 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
import Vue from 'vue';
|
import vueComponent from '../vueComponent.js';
|
||||||
import Component from 'vue-class-component';
|
|
||||||
|
|
||||||
export default @Component({
|
class NotFound404 {
|
||||||
})
|
|
||||||
class NotFound404 extends Vue {
|
|
||||||
created() {
|
created() {
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export default vueComponent(NotFound404);
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -457,7 +457,7 @@ class SettingsPage extends Vue {
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const result = await this.$root.stdDialog.prompt(`<b>Предупреждение!</b> Удаление профиля '${this.$sanitize(this.currentProfile)}' необратимо.` +
|
const result = await this.$root.stdDialog.prompt(`<b>Предупреждение!</b> Удаление профиля '${this.$root.sanitize(this.currentProfile)}' необратимо.` +
|
||||||
`<br>Все настройки профиля будут потеряны, однако список читаемых книг сохранится.` +
|
`<br>Все настройки профиля будут потеряны, однако список читаемых книг сохранится.` +
|
||||||
`<br><br>Введите 'да' для подтверждения удаления:`, ' ', {
|
`<br><br>Введите 'да' для подтверждения удаления:`, ' ', {
|
||||||
inputValidator: (str) => { if (str && str.toLowerCase() === 'да') return true; else return 'Удаление не подтверждено'; },
|
inputValidator: (str) => { if (str && str.toLowerCase() === 'да') return true; else return 'Удаление не подтверждено'; },
|
||||||
|
|||||||
@@ -6,15 +6,14 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
import Vue from 'vue';
|
import vueComponent from '../vueComponent.js';
|
||||||
import Component from 'vue-class-component';
|
|
||||||
|
|
||||||
export default @Component({
|
class Settings {
|
||||||
})
|
|
||||||
class Settings extends Vue {
|
|
||||||
created() {
|
created() {
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export default vueComponent(Settings);
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -6,15 +6,14 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
import Vue from 'vue';
|
import vueComponent from '../vueComponent.js';
|
||||||
import Component from 'vue-class-component';
|
|
||||||
|
|
||||||
export default @Component({
|
class Sources {
|
||||||
})
|
|
||||||
class Sources extends Vue {
|
|
||||||
created() {
|
created() {
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export default vueComponent(Sources);
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -2,39 +2,39 @@ import { createRouter, createWebHashHistory } from 'vue-router';
|
|||||||
import _ from 'lodash';
|
import _ from 'lodash';
|
||||||
|
|
||||||
const CardIndex = () => import('./components/CardIndex/CardIndex.vue');
|
const CardIndex = () => import('./components/CardIndex/CardIndex.vue');
|
||||||
/*const Search = () => import('./components/CardIndex/Search/Search.vue');
|
const Search = () => import('./components/CardIndex/Search/Search.vue');
|
||||||
const Card = () => import('./components/CardIndex/Card/Card.vue');
|
const Card = () => import('./components/CardIndex/Card/Card.vue');
|
||||||
const Book = () => import('./components/CardIndex/Book/Book.vue');
|
const Book = () => import('./components/CardIndex/Book/Book.vue');
|
||||||
const History = () => import('./components/CardIndex/History/History.vue');*/
|
const History = () => import('./components/CardIndex/History/History.vue');
|
||||||
|
|
||||||
//немедленная загрузка
|
//немедленная загрузка
|
||||||
//import Reader from './components/Reader/Reader.vue';
|
//import Reader from './components/Reader/Reader.vue';
|
||||||
const Reader = () => import('./components/Reader/Reader1.vue');
|
const Reader = () => import('./components/Reader/Reader1.vue');
|
||||||
//const ExternalLibs = () => import('./components/ExternalLibs/ExternalLibs.vue');
|
//const ExternalLibs = () => import('./components/ExternalLibs/ExternalLibs.vue');
|
||||||
|
|
||||||
/*const Income = () => import('./components/Income/Income.vue');
|
const Income = () => import('./components/Income/Income.vue');
|
||||||
const Sources = () => import('./components/Sources/Sources.vue');
|
const Sources = () => import('./components/Sources/Sources.vue');
|
||||||
const Settings = () => import('./components/Settings/Settings.vue');
|
const Settings = () => import('./components/Settings/Settings.vue');
|
||||||
const Help = () => import('./components/Help/Help.vue');
|
const Help = () => import('./components/Help/Help.vue');
|
||||||
const NotFound404 = () => import('./components/NotFound404/NotFound404.vue');*/
|
const NotFound404 = () => import('./components/NotFound404/NotFound404.vue');
|
||||||
|
|
||||||
const myRoutes = [
|
const myRoutes = [
|
||||||
['/', null, null, '/cardindex'],
|
['/', null, null, '/cardindex'],
|
||||||
['/cardindex', CardIndex],
|
['/cardindex', CardIndex],
|
||||||
/*['/cardindex~search', Search],
|
['/cardindex~search', Search],
|
||||||
['/cardindex~card', Card],
|
['/cardindex~card', Card],
|
||||||
['/cardindex~card/:authorId', Card],
|
['/cardindex~card/:authorId', Card],
|
||||||
['/cardindex~book', Book],
|
['/cardindex~book', Book],
|
||||||
['/cardindex~book/:bookId', Book],
|
['/cardindex~book/:bookId', Book],
|
||||||
['/cardindex~history', History],*/
|
['/cardindex~history', History],
|
||||||
|
|
||||||
['/reader', Reader],
|
['/reader', Reader],
|
||||||
//['/external-libs', ExternalLibs],
|
//['/external-libs', ExternalLibs],
|
||||||
/*['/income', Income],
|
['/income', Income],
|
||||||
['/sources', Sources],
|
['/sources', Sources],
|
||||||
['/settings', Settings],
|
['/settings', Settings],
|
||||||
['/help', Help],
|
['/help', Help],
|
||||||
['/404', NotFound404],*/
|
['/404', NotFound404],
|
||||||
['/(.*)', null, null, '/cardindex'],
|
['/(.*)', null, null, '/cardindex'],
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|||||||
20
package-lock.json
generated
20
package-lock.json
generated
@@ -4921,9 +4921,9 @@
|
|||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"klona": {
|
"klona": {
|
||||||
"version": "2.0.4",
|
"version": "2.0.5",
|
||||||
"resolved": "https://registry.npmjs.org/klona/-/klona-2.0.4.tgz",
|
"resolved": "https://registry.npmjs.org/klona/-/klona-2.0.5.tgz",
|
||||||
"integrity": "sha512-ZRbnvdg/NxqzC7L9Uyqzf4psi1OM4Cuc+sJAkQPjO6XkQIJTNbfK2Rsmbw8fx1p2mkZdp2FZYo2+LwXYY/uwIA=="
|
"integrity": "sha512-pJiBpiXMbt7dkzXe8Ghj/u4FfXOOa98fPW+bihOJ4SjnoijweJrNThJfd3ifXpXhREjpoF2mZVH1GfS9LV3kHQ=="
|
||||||
},
|
},
|
||||||
"layerr": {
|
"layerr": {
|
||||||
"version": "0.1.2",
|
"version": "0.1.2",
|
||||||
@@ -7701,12 +7701,6 @@
|
|||||||
"@vue/shared": "3.2.20"
|
"@vue/shared": "3.2.20"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"vue-class-component": {
|
|
||||||
"version": "7.2.6",
|
|
||||||
"resolved": "https://registry.npmjs.org/vue-class-component/-/vue-class-component-7.2.6.tgz",
|
|
||||||
"integrity": "sha512-+eaQXVrAm/LldalI272PpDe3+i4mPis0ORiMYxF6Ae4hyuCh15W8Idet7wPUEs4N4YptgFHGys4UrgNQOMyO6w==",
|
|
||||||
"dev": true
|
|
||||||
},
|
|
||||||
"vue-eslint-parser": {
|
"vue-eslint-parser": {
|
||||||
"version": "8.0.0",
|
"version": "8.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/vue-eslint-parser/-/vue-eslint-parser-8.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/vue-eslint-parser/-/vue-eslint-parser-8.0.0.tgz",
|
||||||
@@ -7818,14 +7812,6 @@
|
|||||||
"@vue/devtools-api": "^6.0.0-beta.18"
|
"@vue/devtools-api": "^6.0.0-beta.18"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"vue-sanitize": {
|
|
||||||
"version": "0.2.1",
|
|
||||||
"resolved": "https://registry.npmjs.org/vue-sanitize/-/vue-sanitize-0.2.1.tgz",
|
|
||||||
"integrity": "sha512-MhrfAaAqIQ8JXWfdlhK6f+H2WnZ7KQwkOgLNeUyfACI2bq/3HPZ2zeUQDathnLdsXMXAa8pJehOgPYtlaG9Jew==",
|
|
||||||
"requires": {
|
|
||||||
"sanitize-html": "^2.1.1"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"vue-style-loader": {
|
"vue-style-loader": {
|
||||||
"version": "4.1.3",
|
"version": "4.1.3",
|
||||||
"resolved": "https://registry.npmjs.org/vue-style-loader/-/vue-style-loader-4.1.3.tgz",
|
"resolved": "https://registry.npmjs.org/vue-style-loader/-/vue-style-loader-4.1.3.tgz",
|
||||||
|
|||||||
@@ -36,7 +36,6 @@
|
|||||||
"html-webpack-plugin": "^5.5.0",
|
"html-webpack-plugin": "^5.5.0",
|
||||||
"mini-css-extract-plugin": "^2.4.3",
|
"mini-css-extract-plugin": "^2.4.3",
|
||||||
"terser-webpack-plugin": "^5.2.4",
|
"terser-webpack-plugin": "^5.2.4",
|
||||||
"vue-class-component": "^7.2.6",
|
|
||||||
"vue-eslint-parser": "^8.0.0",
|
"vue-eslint-parser": "^8.0.0",
|
||||||
"vue-loader": "^16.0.0",
|
"vue-loader": "^16.0.0",
|
||||||
"vue-style-loader": "^4.1.3",
|
"vue-style-loader": "^4.1.3",
|
||||||
@@ -70,6 +69,7 @@
|
|||||||
"pkg": "^4.4.9",
|
"pkg": "^4.4.9",
|
||||||
"quasar": "^2.2.1",
|
"quasar": "^2.2.1",
|
||||||
"safe-buffer": "^5.2.1",
|
"safe-buffer": "^5.2.1",
|
||||||
|
"sanitize-html": "^2.5.2",
|
||||||
"sjcl": "^1.0.8",
|
"sjcl": "^1.0.8",
|
||||||
"sql-template-strings": "^2.2.2",
|
"sql-template-strings": "^2.2.2",
|
||||||
"sqlite": "^4.0.23",
|
"sqlite": "^4.0.23",
|
||||||
@@ -78,7 +78,6 @@
|
|||||||
"unbzip2-stream": "^1.4.3",
|
"unbzip2-stream": "^1.4.3",
|
||||||
"vue": "^3.1.0",
|
"vue": "^3.1.0",
|
||||||
"vue-router": "^4.0.12",
|
"vue-router": "^4.0.12",
|
||||||
"vue-sanitize": "^0.2.1",
|
|
||||||
"vuex": "^4.0.2",
|
"vuex": "^4.0.2",
|
||||||
"vuex-persistedstate": "^2.7.1",
|
"vuex-persistedstate": "^2.7.1",
|
||||||
"webdav": "^4.7.0",
|
"webdav": "^4.7.0",
|
||||||
|
|||||||
Reference in New Issue
Block a user