Skip to content

Commit

Permalink
0906 #24 繼續
Browse files Browse the repository at this point in the history
  • Loading branch information
Pulipuli Chen committed Sep 5, 2019
1 parent 4d2ad79 commit 9ae12b1
Show file tree
Hide file tree
Showing 8 changed files with 32 additions and 18 deletions.
2 changes: 1 addition & 1 deletion app/index.html
Expand Up @@ -22,7 +22,7 @@
<body>

<div id="app"
v-bind:data-theme="config.theme">
v-bind:style="{'backgroundColor': status.theme }">
<menu-bar v-bind:lib="lib"
v-bind:status="status"
v-bind:config="config"
Expand Down
20 changes: 12 additions & 8 deletions app/webpack/dist/bundle.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion app/webpack/dist/bundle.js.map

Large diffs are not rendered by default.

13 changes: 9 additions & 4 deletions app/webpack/src/VueController.js
Expand Up @@ -28,6 +28,7 @@ let VueController = {
fileType: 'plain-text', // default
fontSizeAdjustIsEnlarge: null,
mainComponent: null,
theme: null
},
lib: {},
},
Expand Down Expand Up @@ -79,8 +80,10 @@ let VueController = {
this.setupFile()

this.$refs.MenuBar.resetNoteHeader()
this.initTheme()
//console.log('OK')
this.status.isReady = true
this.lib.win.show()
},
setupFile: function () {
// -------------------------------------
Expand All @@ -105,7 +108,8 @@ let VueController = {
}
if (this.config.debug.useTestImageViewerFile === true) {
//this.status.filePath = this.lib.ElectronFileHelper.resolve('demo/dog 1280.webp')
this.status.filePath = this.lib.ElectronFileHelper.resolve('demo/rstudio-ball.ico')
//this.status.filePath = this.lib.ElectronFileHelper.resolve('demo/rstudio-ball.ico')
this.status.filePath = this.lib.ElectronFileHelper.resolve('demo/git.png')
//this.status.filePath = this.lib.ElectronFileHelper.resolve('demo/dog.jpg')
//console.log(this.status.filePath)
//console.log(this.lib.ElectronImageFileHelper.isImageFile(this.status.filePath))
Expand Down Expand Up @@ -161,9 +165,10 @@ let VueController = {

return this
},
a: function () {
// for test
return 'AAA'
initTheme: function () {
console.log('initTheme')
this.status.theme = this.config.themes[0]
return this
}
} // methods: {
}
Expand Down
Expand Up @@ -3,10 +3,14 @@
left: 0;
width: 100vw;
height: calc(100vh - 40px);
background-color: black;
//background-color: black;

.openseadragon-container {
width: 100vw;
height: calc(100vh - 40px);

.navigator {
background-color: rgba(0,0,0,0.5) !important;
}
}
}
5 changes: 2 additions & 3 deletions app/webpack/src/config.js
@@ -1,6 +1,5 @@
module.exports = {
locale: 'zh-TW',
theme: 'yellow',
maxHeightRatio: 0.7,
minHeightPx: 250,
maxWidthRatio: 0.5,
Expand All @@ -18,10 +17,10 @@ module.exports = {
],

debug: {
useTestContentText: true,
useTestContentText: false,
useTestCodeFile: false,
useTestImageStaticFile: false,
useTestImageViewerFile: false,
useTestImageViewerFile: true,
useTestPlainTextFile: false,
}
}
Binary file added demo/git.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions electron-shell/CreateWindow.js
Expand Up @@ -124,6 +124,8 @@ module.exports = function (filePath, callback) {
}
})

win.hide()

IPCEventManager(win)
return win
}

0 comments on commit 9ae12b1

Please sign in to comment.