From 367b9aa168662010949a3b73602a246c2130ab90 Mon Sep 17 00:00:00 2001 From: kPherox Date: Mon, 22 Apr 2019 15:29:48 +0900 Subject: [PATCH] Update copyright --- info.json | 2 +- package.json | 2 +- src/background.ts | 3 ++- src/views/About.vue | 52 +++++++++++++++++++++++++++++++++------------ vue.config.js | 6 +++--- 5 files changed, 46 insertions(+), 19 deletions(-) diff --git a/info.json b/info.json index f45d9665..9aa934c1 100644 --- a/info.json +++ b/info.json @@ -1,6 +1,6 @@ { "appId": "dev.kpherox.thedesk-vue", - "copyright": "Copyright © 2018 TheDesk", + "copyrightYear": "2018", "codeName": "Pre Theater", "documentURL": "https://github.com/kPherox/TheDesk-Vue#readme" } \ No newline at end of file diff --git a/package.json b/package.json index 6be0b0d3..ec8c66ec 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,7 @@ "private": true, "description": "TheDesk is a Mastodon client for PC.", "author": { - "name": "Cutls", + "name": "Cutls P", "url": "https://kirishima.clooud/@Cutls", "email": "web-pro@cutls.com" }, diff --git a/src/background.ts b/src/background.ts index 5cf60c67..3f3028c3 100644 --- a/src/background.ts +++ b/src/background.ts @@ -14,13 +14,14 @@ import Application from './main/Application' import ApplicationMenu from "./main/ApplicationMenu"; export type PackageJson = typeof import('../package.json'); -import { homepage } from '../package.json' +import { author, homepage } from '../package.json' import TheDeskInfo from '../info.json' export type TheDeskInfoObject = typeof TheDeskInfo; ipcMain.on('thedesk-info', (event: Event) => { event.returnValue = Object.assign({ productName: app.getName(), + author: author, homePage: homepage, versions: Object.assign(pick(process.versions, ["chrome", "electron", "node"]), { internal: app.getVersion() }), }, TheDeskInfo) diff --git a/src/views/About.vue b/src/views/About.vue index 4bae1b5b..cf994b50 100644 --- a/src/views/About.vue +++ b/src/views/About.vue @@ -15,8 +15,13 @@
{{ version }}
- @@ -25,27 +30,43 @@ import { Component, Vue } from "vue-property-decorator" 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 export default class About extends Vue { public productName: string + public author: Maintainer public homePage: string - public copyright: string + public copyrightYear: string public versions: Versions constructor() { super() - let { productName, homePage, copyright, codeName, versions } = ipcRenderer.sendSync('thedesk-info') - this.productName = productName - this.homePage = homePage - this.copyright = copyright + const thedeskInfo: TheDeskInfo = ipcRenderer.sendSync('thedesk-info') + this.productName = thedeskInfo.productName + this.author = thedeskInfo.author + this.homePage = thedeskInfo.homePage + this.copyrightYear = thedeskInfo.copyrightYear this.versions = { - "Code Name": codeName, - "Internal Version": versions.internal, - "Chromium": versions.chrome, - "Electron": versions.electron, - "Node.js": versions.node, + "Code Name": thedeskInfo.codeName, + "Internal Version": thedeskInfo.versions.internal, + "Chromium": thedeskInfo.versions.chrome, + "Electron": thedeskInfo.versions.electron, + "Node.js": thedeskInfo.versions.node, } } } @@ -76,6 +97,11 @@ body { -webkit-app-region: no-drag; user-select: auto; } +#credits { + p { + margin: 0; + } +} dl.version { margin: 0; display: grid; diff --git a/vue.config.js b/vue.config.js index 2934b04d..c6dca302 100644 --- a/vue.config.js +++ b/vue.config.js @@ -1,5 +1,5 @@ -const { productName } = require("./package.json"); -const { appId, copyright } = require("./info.json"); +const { productName, author } = require("./package.json"); +const { appId, copyrightYear } = require("./info.json"); module.exports = { pages: { @@ -30,7 +30,7 @@ module.exports = { mainProcessTypeChecking: true, builderOptions: { appId: appId, - copyright: copyright, + copyright: `Copyright © ${copyrightYear} ${author.name}`, win: { "target": [ "nsis",