LibsPage.vue 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. <template>
  2. <div></div>
  3. </template>
  4. <script>
  5. //-----------------------------------------------------------------------------
  6. import Vue from 'vue';
  7. import Component from 'vue-class-component';
  8. import Window from '../../share/Window.vue';
  9. //import rstore from '../../../store/modules/reader';
  10. export default @Component({
  11. components: {
  12. Window
  13. },
  14. watch: {
  15. libs: function() {
  16. this.loadLibs();
  17. },
  18. }
  19. })
  20. class LibsPage extends Vue {
  21. created() {
  22. this.popupWindow = null;
  23. this.commit = this.$store.commit;
  24. //this.commit('reader/setLibs', rstore.libsDefaults);
  25. }
  26. init() {
  27. this.popupWindow = window.open(`http://${window.location.host}/?p=external-libs#/external-libs`);
  28. this.loadLibs();
  29. }
  30. done() {
  31. if (this.popupWindow) {
  32. this.popupWindow.close();
  33. this.popupWindow = null;
  34. }
  35. }
  36. get libs() {
  37. return this.$store.state.reader.libs;
  38. }
  39. loadLibs() {
  40. }
  41. /* submitUrl() {
  42. if (this.bookUrl) {
  43. this.$emit('load-book', {url: this.addProtocol(this.bookUrl), force: true});
  44. this.bookUrl = '';
  45. }
  46. }*/
  47. close() {
  48. this.$emit('do-action', {action: 'libs'});
  49. }
  50. }
  51. //-----------------------------------------------------------------------------
  52. </script>
  53. <style scoped>
  54. .separator {
  55. height: 1px;
  56. background-color: #A0A0A0;
  57. }
  58. </style>