fix: add version info

This commit is contained in:
qier222 2021-03-18 17:40:56 +08:00
parent 4cbe9f98ce
commit 387917e3ee
No known key found for this signature in database
GPG Key ID: 9C85007ED905F14D

View File

@ -265,6 +265,14 @@
</div> </div>
</div> </div>
</div> </div>
<div class="footer">
<p class="author"
>MADE BY
<a href="http://github.com/qier222" target="_blank">QIER222</a></p
>
<p class="version">v{{ version }}</p>
</div>
</div> </div>
</div> </div>
</template> </template>
@ -274,6 +282,7 @@ import { mapState } from "vuex";
import { doLogout } from "@/utils/auth"; import { doLogout } from "@/utils/auth";
import { changeAppearance, bytesToSize } from "@/utils/common"; import { changeAppearance, bytesToSize } from "@/utils/common";
import { countDBSize, clearDB } from "@/utils/db"; import { countDBSize, clearDB } from "@/utils/db";
import pkg from "../../package.json";
export default { export default {
name: "settings", name: "settings",
@ -300,6 +309,9 @@ export default {
isMac() { isMac() {
return /macintosh|mac os x/i.test(navigator.userAgent); return /macintosh|mac os x/i.test(navigator.userAgent);
}, },
version() {
return pkg.version;
},
lang: { lang: {
get() { get() {
return this.settings.lang; return this.settings.lang;
@ -646,6 +658,21 @@ h2 {
} }
} }
.footer {
text-align: center;
margin-top: 6rem;
color: var(--color-text);
font-weight: 600;
.author {
font-size: 0.9rem;
}
.version {
font-size: 0.88rem;
opacity: 0.58;
margin-top: -10px;
}
}
.beforeAnimation { .beforeAnimation {
-webkit-transition: 0.2s cubic-bezier(0.24, 0, 0.5, 1); -webkit-transition: 0.2s cubic-bezier(0.24, 0, 0.5, 1);
transition: 0.2s cubic-bezier(0.24, 0, 0.5, 1); transition: 0.2s cubic-bezier(0.24, 0, 0.5, 1);