Update copyright

This commit is contained in:
kPherox 2019-04-22 15:29:48 +09:00
parent 40a814e9d8
commit 367b9aa168
No known key found for this signature in database
GPG Key ID: C04751C2BFA2F62D
5 changed files with 46 additions and 19 deletions

View File

@ -1,6 +1,6 @@
{ {
"appId": "dev.kpherox.thedesk-vue", "appId": "dev.kpherox.thedesk-vue",
"copyright": "Copyright © 2018 TheDesk", "copyrightYear": "2018",
"codeName": "Pre Theater", "codeName": "Pre Theater",
"documentURL": "https://github.com/kPherox/TheDesk-Vue#readme" "documentURL": "https://github.com/kPherox/TheDesk-Vue#readme"
} }

View File

@ -4,7 +4,7 @@
"private": true, "private": true,
"description": "TheDesk is a Mastodon client for PC.", "description": "TheDesk is a Mastodon client for PC.",
"author": { "author": {
"name": "Cutls", "name": "Cutls P",
"url": "https://kirishima.clooud/@Cutls", "url": "https://kirishima.clooud/@Cutls",
"email": "web-pro@cutls.com" "email": "web-pro@cutls.com"
}, },

View File

@ -14,13 +14,14 @@ import Application from './main/Application'
import ApplicationMenu from "./main/ApplicationMenu"; import ApplicationMenu from "./main/ApplicationMenu";
export type PackageJson = typeof import('../package.json'); export type PackageJson = typeof import('../package.json');
import { homepage } from '../package.json' import { author, homepage } from '../package.json'
import TheDeskInfo from '../info.json' import TheDeskInfo from '../info.json'
export type TheDeskInfoObject = typeof TheDeskInfo; export type TheDeskInfoObject = typeof TheDeskInfo;
ipcMain.on('thedesk-info', (event: Event) => { ipcMain.on('thedesk-info', (event: Event) => {
event.returnValue = Object.assign({ event.returnValue = Object.assign({
productName: app.getName(), productName: app.getName(),
author: author,
homePage: homepage, homePage: homepage,
versions: Object.assign(pick(process.versions, ["chrome", "electron", "node"]), { internal: app.getVersion() }), versions: Object.assign(pick(process.versions, ["chrome", "electron", "node"]), { internal: app.getVersion() }),
}, TheDeskInfo) }, TheDeskInfo)

View File

@ -15,8 +15,13 @@
<dd :key="'ver-'+i">{{ version }}</dd> <dd :key="'ver-'+i">{{ version }}</dd>
</template> </template>
</dl> </dl>
<div id="copyright"> <div id="credits">
<small>{{ copyright }}</small> <p id="copyright">
<small>
Copyright &copy; {{ copyrightYear }}
<a :href="author.url">{{ author.name }}</a>
</small>
</p>
</div> </div>
</div> </div>
</template> </template>
@ -25,27 +30,43 @@
import { Component, Vue } from "vue-property-decorator" import { Component, Vue } from "vue-property-decorator"
import { ipcRenderer } from "electron" import { ipcRenderer } from "electron"
type Versions = {[key: string]: string} type Versions = { [key: string]: string }
interface Maintainer {
name: string
url: string
email: string
}
interface TheDeskInfo {
productName: string
author: Maintainer
homePage: string
copyrightYear: string
codeName: string
versions: Versions
}
@Component @Component
export default class About extends Vue { export default class About extends Vue {
public productName: string public productName: string
public author: Maintainer
public homePage: string public homePage: string
public copyright: string public copyrightYear: string
public versions: Versions public versions: Versions
constructor() { constructor() {
super() super()
let { productName, homePage, copyright, codeName, versions } = ipcRenderer.sendSync('thedesk-info') const thedeskInfo: TheDeskInfo = ipcRenderer.sendSync('thedesk-info')
this.productName = productName this.productName = thedeskInfo.productName
this.homePage = homePage this.author = thedeskInfo.author
this.copyright = copyright this.homePage = thedeskInfo.homePage
this.copyrightYear = thedeskInfo.copyrightYear
this.versions = { this.versions = {
"Code Name": codeName, "Code Name": thedeskInfo.codeName,
"Internal Version": versions.internal, "Internal Version": thedeskInfo.versions.internal,
"Chromium": versions.chrome, "Chromium": thedeskInfo.versions.chrome,
"Electron": versions.electron, "Electron": thedeskInfo.versions.electron,
"Node.js": versions.node, "Node.js": thedeskInfo.versions.node,
} }
} }
} }
@ -76,6 +97,11 @@ body {
-webkit-app-region: no-drag; -webkit-app-region: no-drag;
user-select: auto; user-select: auto;
} }
#credits {
p {
margin: 0;
}
}
dl.version { dl.version {
margin: 0; margin: 0;
display: grid; display: grid;

View File

@ -1,5 +1,5 @@
const { productName } = require("./package.json"); const { productName, author } = require("./package.json");
const { appId, copyright } = require("./info.json"); const { appId, copyrightYear } = require("./info.json");
module.exports = { module.exports = {
pages: { pages: {
@ -30,7 +30,7 @@ module.exports = {
mainProcessTypeChecking: true, mainProcessTypeChecking: true,
builderOptions: { builderOptions: {
appId: appId, appId: appId,
copyright: copyright, copyright: `Copyright © ${copyrightYear} ${author.name}`,
win: { win: {
"target": [ "target": [
"nsis", "nsis",