thedesk/src/about/About.vue

86 lines
1.8 KiB
Vue
Raw Normal View History

2019-04-08 01:14:32 +09:00
<template>
<div id="about">
<div id="brand">
<div id="logo">
<img :alt="productName+' logo'" src="@/assets/logo.png" width="194" draggable="false">
</div>
<p id="app-name">{{ productName }}</p>
2019-04-08 05:00:05 +09:00
<p id="web-site">
<a :href="homePage">
Web site
</a>
</p>
2019-04-08 01:14:32 +09:00
</div>
<dl class="version">
<template v-for="(name, idx) in versionInfo">
<dt :key="'title-'+idx">{{ versionName[name] }}</dt>
<dd :key="'desc-'+idx">{{ name !== "codeName" ? versions[name] : codeName }}</dd>
</template>
</dl>
<div id="copyright">
<small>{{ copyright }}</small>
</div>
</div>
</template>
<style lang="postcss">
body {
margin: 0;
font-family: 'Avenir', Helvetica, Arial, sans-serif;
-webkit-font-smoothing: antialiased;
-webkit-app-region: drag;
user-select: none;
}
#about {
padding: .5em;
text-align: center;
}
#brand {
2019-04-08 05:00:05 +09:00
margin-top: .5em;
2019-04-08 01:14:32 +09:00
& > p {
2019-04-08 05:00:05 +09:00
margin: 0;
2019-04-08 01:14:32 +09:00
}
}
#app-name {
font-weight: bold;
}
2019-04-08 05:00:05 +09:00
#web-site {
-webkit-app-region: no-drag;
user-select: auto;
}
2019-04-08 01:14:32 +09:00
dl.version {
margin: 0;
display: grid;
grid-template-columns: repeat(2, 1fr);
grid-auto-rows: 1.5em;
text-align: left;
-webkit-app-region: no-drag;
user-select: all;
padding: .5em;
dt, dd {
margin-left: 0;
line-height: 1.5em;
}
}
</style>
<script>
import { remote } from 'electron'
export default {
name: 'about',
data() {
2019-04-08 05:00:05 +09:00
return Object.assign({
2019-04-08 01:14:32 +09:00
versionName: {
codeName: "Code Name",
internal: "Internal Version",
chrome: "Chromium",
electron: "Electron",
node: "Node.js",
},
versionInfo: [ "codeName", "internal", "chrome", "electron", "node" ]
2019-04-08 05:00:05 +09:00
}, JSON.parse(remote.getGlobal('TheDeskInfo')))
2019-04-08 01:14:32 +09:00
},
}
</script>