@cpany/app
Advanced tools
Comparing version 0.1.10 to 0.1.11
{ | ||
"name": "@cpany/app", | ||
"version": "0.1.10", | ||
"version": "0.1.11", | ||
"description": "CPany web app", | ||
@@ -16,4 +16,4 @@ "keywords": [ | ||
"dependencies": { | ||
"@cpany/compress": "0.1.10", | ||
"@cpany/types": "0.1.10", | ||
"@cpany/compress": "0.1.11", | ||
"@cpany/types": "0.1.11", | ||
"tippy.js": "^6.3.1", | ||
@@ -20,0 +20,0 @@ "vue": "^3.2.12", |
@@ -67,2 +67,10 @@ import { createRouter, createWebHistory } from 'vue-router'; | ||
{ | ||
path: '/history', | ||
name: 'History', | ||
component: () => import('./pages/History/index.vue'), | ||
meta: { | ||
title: '历史 - CPany' | ||
} | ||
}, | ||
{ | ||
path: '/about', | ||
@@ -69,0 +77,0 @@ name: 'About', |
@@ -22,1 +22,7 @@ declare module '*.vue' { | ||
} | ||
declare module '~cpany/log' { | ||
import { DiffLog } from '@cpany/types'; | ||
const history: DiffLog; | ||
} |
@@ -51,2 +51,10 @@ import { Ref, ref, unref } from 'vue'; | ||
export function toDay(seconds: number | Ref<number>) { | ||
const utc = toUTC(new Date(unref(seconds) * 1000)); | ||
const date = utcToZonedTime(utc, 'Asia/Shanghai'); | ||
return ref( | ||
`${date.getFullYear()}-${alignNumber(date.getMonth() + 1)}-${alignNumber(date.getDate())} ` | ||
); | ||
} | ||
export function toNumDuration(duration: number | Ref<number>) { | ||
@@ -53,0 +61,0 @@ const seconds = unref(duration); |
@@ -20,2 +20,12 @@ import { resolve } from 'path'; | ||
} | ||
}, | ||
{ | ||
name: 'cpany:log', | ||
enforce: 'pre', | ||
resolveId(id) { | ||
return id === '~cpany/log' ? '~cpany/log.json' : null; | ||
}, | ||
load(id) { | ||
return id === '~cpany/log.json' ? '{ "history": {} }' : null; | ||
} | ||
} | ||
@@ -22,0 +32,0 @@ ]; |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
9925588
104
1893
4
+ Added@cpany/compress@0.1.11(transitive)
+ Added@cpany/types@0.1.11(transitive)
- Removed@cpany/compress@0.1.10(transitive)
- Removed@cpany/types@0.1.10(transitive)
Updated@cpany/compress@0.1.11
Updated@cpany/types@0.1.11