-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
17 changed files
with
289 additions
and
106 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,74 +1,74 @@ | ||
{ | ||
"name": "gcrypt", | ||
"version": "2.1.1", | ||
"private": false, | ||
"author": "g122622", | ||
"repository": "https://github.com/g122622/gcrypt", | ||
"scripts": { | ||
"serve": "SET NODE_OPTIONS=--openssl-legacy-provider && react-scripts vue-cli-service serve", | ||
"build": "SET NODE_OPTIONS=--openssl-legacy-provider && react-scripts vue-cli-service build", | ||
"lint": "SET NODE_OPTIONS=--openssl-legacy-provider && react-scripts vue-cli-service lint", | ||
"electron:build": "vue-cli-service electron:build", | ||
"electron:serve": "vue-cli-service electron:serve", | ||
"postinstall": "electron-builder install-app-deps", | ||
"postuninstall": "electron-builder install-app-deps" | ||
}, | ||
"main": "background.js", | ||
"dependencies": { | ||
"@mdi/font": "5.9.55", | ||
"ace-builds": "^1.24.1", | ||
"axios": "^1.4.0", | ||
"chart.js": "^4.3.0", | ||
"core-js": "^3.8.3", | ||
"dayjs": "^1.11.7", | ||
"electron-store": "^8.1.0", | ||
"fs-extra": "^11.1.0", | ||
"get-windows-shortcut-properties": "^1.1.0", | ||
"lodash": "^4.17.21", | ||
"mitt": "^3.0.0", | ||
"pinia": "^2.1.3", | ||
"roboto-fontface": "*", | ||
"vue": "^3.3.4", | ||
"vue-router": "^4.0.3", | ||
"vue3-ace-editor": "^2.2.3", | ||
"vuetify": "^3.3.16", | ||
"webfontloader": "^1.0.0" | ||
}, | ||
"devDependencies": { | ||
"@types/electron-devtools-installer": "^2.2.0", | ||
"@types/webfontloader": "^1.0.0", | ||
"@typescript-eslint/eslint-plugin": "^5.4.0", | ||
"@typescript-eslint/parser": "^5.4.0", | ||
"@vue/cli-plugin-babel": "~5.0.0", | ||
"@vue/cli-plugin-eslint": "~5.0.0", | ||
"@vue/cli-plugin-router": "~5.0.0", | ||
"@vue/cli-plugin-typescript": "~5.0.0", | ||
"@vue/cli-service": "~5.0.0", | ||
"@vue/eslint-config-standard": "^6.1.0", | ||
"@vue/eslint-config-typescript": "^9.1.0", | ||
"electron": "21.0.0", | ||
"electron-devtools-installer": "^3.1.0", | ||
"eslint": "^7.32.0", | ||
"eslint-plugin-import": "^2.25.3", | ||
"eslint-plugin-node": "^11.1.0", | ||
"eslint-plugin-promise": "^5.1.0", | ||
"eslint-plugin-vue": "^8.0.3", | ||
"less": "^4.1.3", | ||
"less-loader": "^11.1.0", | ||
"typescript": "~4.5.5", | ||
"vue-cli-plugin-electron-builder": "^2.1.1", | ||
"vue-cli-plugin-vuetify": "~2.5.8", | ||
"webpack-plugin-vuetify": "^2.0.0-alpha.0" | ||
}, | ||
"binary": { | ||
"module_name": "node_sqlite3", | ||
"module_path": "./lib/binding/napi-v{napi_build_version}-{platform}-{libc}-{arch}", | ||
"host": "https://github.com/TryGhost/node-sqlite3/releases/download/", | ||
"remote_path": "v{version}", | ||
"package_name": "napi-v{napi_build_version}-{platform}-{libc}-{arch}.tar.gz", | ||
"napi_versions": [ | ||
3, | ||
6 | ||
] | ||
} | ||
} | ||
"name": "gcrypt", | ||
"version": "2.3.0", | ||
"private": false, | ||
"author": "g122622", | ||
"repository": "https://github.com/g122622/gcrypt", | ||
"scripts": { | ||
"serve": "SET NODE_OPTIONS=--openssl-legacy-provider && react-scripts vue-cli-service serve", | ||
"build": "SET NODE_OPTIONS=--openssl-legacy-provider && react-scripts vue-cli-service build", | ||
"lint": "SET NODE_OPTIONS=--openssl-legacy-provider && react-scripts vue-cli-service lint", | ||
"electron:build": "vue-cli-service electron:build", | ||
"electron:serve": "vue-cli-service electron:serve", | ||
"postinstall": "electron-builder install-app-deps", | ||
"postuninstall": "electron-builder install-app-deps" | ||
}, | ||
"main": "background.js", | ||
"dependencies": { | ||
"@mdi/font": "5.9.55", | ||
"ace-builds": "^1.24.1", | ||
"axios": "^1.4.0", | ||
"chart.js": "^4.3.0", | ||
"core-js": "^3.8.3", | ||
"dayjs": "^1.11.7", | ||
"electron-store": "^8.1.0", | ||
"fs-extra": "^11.1.0", | ||
"get-windows-shortcut-properties": "^1.1.0", | ||
"lodash": "^4.17.21", | ||
"mitt": "^3.0.0", | ||
"pinia": "^2.1.3", | ||
"roboto-fontface": "*", | ||
"vue": "^3.3.4", | ||
"vue-router": "^4.0.3", | ||
"vue3-ace-editor": "^2.2.3", | ||
"vuetify": "^3.3.16", | ||
"webfontloader": "^1.0.0" | ||
}, | ||
"devDependencies": { | ||
"@types/electron-devtools-installer": "^2.2.0", | ||
"@types/webfontloader": "^1.0.0", | ||
"@typescript-eslint/eslint-plugin": "^5.4.0", | ||
"@typescript-eslint/parser": "^5.4.0", | ||
"@vue/cli-plugin-babel": "~5.0.0", | ||
"@vue/cli-plugin-eslint": "~5.0.0", | ||
"@vue/cli-plugin-router": "~5.0.0", | ||
"@vue/cli-plugin-typescript": "~5.0.0", | ||
"@vue/cli-service": "~5.0.0", | ||
"@vue/eslint-config-standard": "^6.1.0", | ||
"@vue/eslint-config-typescript": "^9.1.0", | ||
"electron": "21.0.0", | ||
"electron-devtools-installer": "^3.1.0", | ||
"eslint": "^7.32.0", | ||
"eslint-plugin-import": "^2.25.3", | ||
"eslint-plugin-node": "^11.1.0", | ||
"eslint-plugin-promise": "^5.1.0", | ||
"eslint-plugin-vue": "^8.0.3", | ||
"less": "^4.1.3", | ||
"less-loader": "^11.1.0", | ||
"typescript": "~4.5.5", | ||
"vue-cli-plugin-electron-builder": "^2.1.1", | ||
"vue-cli-plugin-vuetify": "~2.5.8", | ||
"webpack-plugin-vuetify": "^2.0.0-alpha.0" | ||
}, | ||
"binary": { | ||
"module_name": "node_sqlite3", | ||
"module_path": "./lib/binding/napi-v{napi_build_version}-{platform}-{libc}-{arch}", | ||
"host": "https://github.com/TryGhost/node-sqlite3/releases/download/", | ||
"remote_path": "v{version}", | ||
"package_name": "napi-v{napi_build_version}-{platform}-{libc}-{arch}.tar.gz", | ||
"napi_versions": [ | ||
3, | ||
6 | ||
] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
<template> | ||
<DialogGenerator height="690px" width="470px" v-model:isDialogOpen="item.isDialogOpen" :title="'选择日期'" | ||
:isPersistent="true" useCompactContentOuterMargin v-for="item in datePickers" :key="item.taskId"> | ||
<template #mainContent> | ||
<!-- 时间选择器 --> | ||
<v-date-picker color="primary" show-adjacent-months show-week v-model="item.selectedDate" | ||
@click:save="item.confirmHandler(item.selectedDate)" @click:cancel="item.cancellHandler()"></v-date-picker> | ||
</template> | ||
</DialogGenerator> | ||
</template> | ||
|
||
<script setup lang="ts"> | ||
import { ref, onUnmounted } from 'vue'; | ||
import emitter from "@/eventBus" | ||
import notification from '@/api/notification'; | ||
const datePickers = ref<{ | ||
isDialogOpen: boolean, | ||
selectedDate: string[], // 实际上v-model的结果是单个Date对象,但是vuetify的类型声明文件有bug(标注的是any[]),所以只能写成string[]来通过类型检查 | ||
confirmHandler(selectedDate: string[]): void, | ||
cancellHandler(): void, | ||
taskId: string | ||
}[]>([]) | ||
emitter.on("Action::openDatePicker", async ({ taskId }) => { | ||
datePickers.value.push({ | ||
isDialogOpen: true, | ||
selectedDate: null, | ||
taskId, | ||
confirmHandler: (selectedDate) => { | ||
if (!selectedDate || selectedDate?.length === 0) { | ||
notification.error("你还没有选择日期") | ||
return | ||
} | ||
emitter.emit("Action::datePicked" + taskId, selectedDate) | ||
emitter.off("Action::datePicked" + taskId) | ||
datePickers.value.find(item => item.taskId === taskId).isDialogOpen = false | ||
}, | ||
cancellHandler: () => { | ||
emitter.emit("Action::datePickerCancelled" + taskId) | ||
emitter.off("Action::datePickerCancelled" + taskId) | ||
datePickers.value.find(item => item.taskId === taskId).isDialogOpen = false | ||
} | ||
}) | ||
}) | ||
onUnmounted(() => { | ||
emitter.off("Action::openDatePicker") | ||
}) | ||
</script> | ||
|
||
<style lang="less" scoped></style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.