Changed path to be cross-platform (should be).

Latest relaease no longer limited to 9 elements.
This commit is contained in:
Kylart 2016-11-25 10:02:36 +09:00
parent 272e0def4d
commit e87cdff20d
7 changed files with 21 additions and 16 deletions

View File

@ -6,7 +6,7 @@
<link rel="stylesheet" href="style.css">
<link rel="stylesheet" href="https://code.getmdl.io/1.2.1/material.blue_grey-red.min.css"/>
<link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons">
<script src="../../node_modules/material-design-lite/material.min.js"></script>
<script defer src="https://code.getmdl.io/1.2.1/material.min.js"></script>
</head>
<body>
<script src="https://unpkg.com/vue/dist/vue.js"></script>

View File

@ -16,7 +16,6 @@ body
{
margin-top: 30%;
}
/* --------------------------------------- */
#container

View File

@ -2,7 +2,7 @@
<html xmlns:v-bind="http://www.w3.org/1999/xhtml" xmlns:v-on="http://www.w3.org/1999/xhtml">
<head>
<meta charset="UTF-8">
<title>Hello World!</title>
<title>KawAnime</title>
<link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons">
<link rel="stylesheet" href="https://code.getmdl.io/1.2.1/material.indigo-pink.min.css">
<link rel="stylesheet" href="app/style.css">
@ -21,7 +21,9 @@
mdl-layout--fixed-header">
<header class="mdl-layout__header">
<div class="mdl-layout__header-row">
<div class="mdl-layout-spacer"></div>
<div
class="mdl-layout-spacer"><h4 class="greetings">Welcome {{ username }} ! Here are some of the
latest anime episodes.</h4></div>
<div class="mdl-textfield mdl-js-textfield mdl-textfield--expandable
mdl-textfield--floating-label mdl-textfield--align-right">
<label class="mdl-button mdl-js-button mdl-button--icon"
@ -51,7 +53,7 @@
<div class="mdl-cell mdl-cell--4-col mdl-cell--4-col-tablet">
<div class="elem">
<h6>{{ release.title }}</h6>
<div class="picture"><!--v-bind:style="{ content: 'url(' + release.picture + ')' }" -->
<div class="picture">
<img v-bind:src="release.picture" height="180">
</div>
<div class="text-container">
@ -66,7 +68,7 @@
</button>
<!-- Flat button with ripple -->
<button class="link-more mdl-button mdl-js-button mdl-js-ripple-effect">
More
<a href="#">more</a>
</button>
</div>
</div>

View File

@ -64,7 +64,7 @@ exports.openDownloader = () => {
})
downloaderWindow.loadURL(url.format({
pathname: path.join(__dirname, 'app/Downloader/index.html'),
pathname: path.join(__dirname, 'app', 'Downloader', 'index.html'),
protocol: 'file:',
slashes: true
}))
@ -79,7 +79,7 @@ exports.openDownloader = () => {
exports.getInfoPage = () => {
mainWindow.loadURL(url.format({
pathname: path.join(__dirname, 'app/InformationPage/index.html'),
pathname: path.join(__dirname, 'app', 'InformationPage', 'index.html'),
protocol: 'file:',
slashes: true
}))

View File

@ -21,7 +21,7 @@
"dependencies": {
"is-online": "^5.2.0",
"malapi": "0.0.3",
"maljs": "^0.1.0",
"node-nyaa-api": "latest"
"node-nyaa-api": "latest",
"progressbar.js": "^1.0.1"
}
}

View File

@ -4,6 +4,7 @@
const remote = require('electron').remote
const main = remote.require('./main.js')
const os = require('os')
// Mal API
const mal = require('malapi').Anime
@ -66,12 +67,7 @@ let releases = new Vue({
},
watch: {
releases: function () { // Whenever releases changes, this function will run
if (this.releases.length > 9) // I want only the 12 latest releases
{
let tmp = this.releases
tmp.pop()
this.releases = tmp
}
// Code
}
}
})
@ -88,3 +84,11 @@ new Vue({
}
}
})
// For the greeting's message
new Vue({
el: '.greetings',
data: {
username: os.userInfo().username
}
})

Binary file not shown.

After

Width:  |  Height:  |  Size: 372 KiB