-
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
216 additions
and
229 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
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,71 +1,74 @@ | ||
{ | ||
"name": "gcrypt", | ||
"version": "2.0.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", | ||
"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", | ||
"lodash": "^4.17.21", | ||
"mitt": "^3.0.0", | ||
"pinia": "^2.1.3", | ||
"roboto-fontface": "*", | ||
"vue": "^3.3.4", | ||
"vue-router": "^4.0.3", | ||
"vuetify": "^3.3.11", | ||
"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.0.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.11", | ||
"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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
<template> | ||
<div :id="'AceEditor' + guid" style="position: relative;width: 100%;height: 100%;"> | ||
<v-ace-editor v-model:value="content" @init="onEditorInit" :lang="getExtName(file.filename) ?? 'text'" | ||
:theme="settingsStore.getSetting('is_dark') ? 'twilight' : 'chrome'" style="height: 100%" /> | ||
</div> | ||
</template> | ||
|
||
<script setup lang="ts"> | ||
import { ref, onMounted, watch } from "vue" | ||
import sharedUtils from "@/utils/sharedUtils" | ||
import { VAceEditor } from 'vue3-ace-editor'; | ||
import File from "@/api/File"; | ||
import getExtName from "@/utils/getExtName"; | ||
import { useSettingsStore } from "@/store/settings" | ||
const settingsStore = useSettingsStore() | ||
const guid = sharedUtils.getHash(10) | ||
const content = ref("") | ||
const props = defineProps<{ | ||
file: File | ||
}>() | ||
onMounted(async () => { | ||
content.value = (await props.file.read()).toString() | ||
watch(content, (newVal) => { | ||
props.file.write(newVal) | ||
}) | ||
}) | ||
const onEditorInit = () => { | ||
console.log("inited") | ||
} | ||
</script> | ||
|
||
<!-- Add "scoped" attribute to limit CSS to this component only --> | ||
<style scoped lang="less"></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.