Added initial vite/vue/ts files.

This commit is contained in:
Andrew Lalis 2023-10-25 15:59:35 -04:00
parent 597c79eb7c
commit 9f64a6c404
29 changed files with 3445 additions and 0 deletions

View File

@ -0,0 +1,14 @@
/* eslint-env node */
require('@rushstack/eslint-patch/modern-module-resolution')
module.exports = {
root: true,
'extends': [
'plugin:vue/vue3-essential',
'eslint:recommended',
'@vue/eslint-config-typescript'
],
parserOptions: {
ecmaVersion: 'latest'
}
}

28
onyx-web-app/.gitignore vendored Normal file
View File

@ -0,0 +1,28 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*
node_modules
.DS_Store
dist
dist-ssr
coverage
*.local
/cypress/videos/
/cypress/screenshots/
# Editor directories and files
.vscode/*
!.vscode/extensions.json
.idea
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?

31
onyx-web-app/README.md Normal file
View File

@ -0,0 +1,31 @@
# onyx-web-app
A Vue3/Typescript web application for interacting with an Onyx node. Its
purpose is to let users:
- Login or register an account with the node, if the owner allows it.
- View the hierarchical content tree of the node.
- Edit individual content, and change access permissions where allowed.
## Project Setup
```sh
npm install
```
### Compile and Hot-Reload for Development
```sh
npm run dev
```
### Type-Check, Compile and Minify for Production
```sh
npm run build
```
### Lint with [ESLint](https://eslint.org/)
```sh
npm run lint
```

1
onyx-web-app/env.d.ts vendored Normal file
View File

@ -0,0 +1 @@
/// <reference types="vite/client" />

20
onyx-web-app/index.html Normal file
View File

@ -0,0 +1,20 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Onyx</title>
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png">
<link rel="manifest" href="/site.webmanifest">
<link rel="mask-icon" href="/safari-pinned-tab.svg" color="#5bbad5">
<meta name="msapplication-TileColor" content="#da532c">
<meta name="theme-color" content="#ffffff">
</head>
<body>
<div id="app"></div>
<script type="module" src="/src/main.ts"></script>
</body>
</html>

3128
onyx-web-app/package-lock.json generated Normal file

File diff suppressed because it is too large Load Diff

32
onyx-web-app/package.json Normal file
View File

@ -0,0 +1,32 @@
{
"name": "onyx-web-app",
"version": "0.0.0",
"private": true,
"scripts": {
"dev": "vite",
"build": "run-p type-check \"build-only {@}\" --",
"preview": "vite preview",
"build-only": "vite build",
"type-check": "vue-tsc --noEmit -p tsconfig.app.json --composite false",
"lint": "eslint . --ext .vue,.js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts --fix --ignore-path .gitignore"
},
"dependencies": {
"pinia": "^2.1.7",
"vue": "^3.3.4",
"vue-router": "^4.2.5"
},
"devDependencies": {
"@rushstack/eslint-patch": "^1.3.3",
"@tsconfig/node18": "^18.2.2",
"@types/node": "^18.18.5",
"@vitejs/plugin-vue": "^4.4.0",
"@vue/eslint-config-typescript": "^12.0.0",
"@vue/tsconfig": "^0.4.0",
"eslint": "^8.49.0",
"eslint-plugin-vue": "^9.17.0",
"npm-run-all2": "^6.1.1",
"typescript": "~5.2.0",
"vite": "^4.4.11",
"vue-tsc": "^1.8.19"
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.3 KiB

View File

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<browserconfig>
<msapplication>
<tile>
<square150x150logo src="/mstile-150x150.png"/>
<TileColor>#da532c</TileColor>
</tile>
</msapplication>
</browserconfig>

Binary file not shown.

After

Width:  |  Height:  |  Size: 910 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB

View File

@ -0,0 +1,50 @@
<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20010904//EN"
"http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
<svg version="1.0" xmlns="http://www.w3.org/2000/svg"
width="700.000000pt" height="700.000000pt" viewBox="0 0 700.000000 700.000000"
preserveAspectRatio="xMidYMid meet">
<metadata>
Created by potrace 1.14, written by Peter Selinger 2001-2017
</metadata>
<g transform="translate(0.000000,700.000000) scale(0.100000,-0.100000)"
fill="#000000" stroke="none">
<path d="M2739 6719 c-30 -34 -62 -71 -72 -83 -17 -19 -135 -151 -182 -202
-11 -12 -38 -41 -59 -65 -22 -24 -60 -67 -85 -94 -25 -28 -82 -91 -126 -140
-138 -153 -149 -164 -180 -168 -16 -3 -52 -10 -80 -17 -27 -6 -61 -14 -74 -16
-13 -3 -162 -34 -330 -70 -168 -36 -315 -67 -326 -70 -20 -4 -125 -27 -135
-29 -3 -1 -24 -5 -47 -9 -38 -7 -43 -11 -44 -34 0 -15 -2 -36 -3 -47 -2 -11
-6 -51 -10 -90 -4 -38 -9 -86 -11 -105 -2 -19 -7 -62 -10 -95 -3 -33 -8 -76
-10 -95 -17 -158 -18 -168 -30 -288 -3 -41 -8 -81 -9 -90 -2 -9 -7 -53 -12
-97 -4 -44 -8 -88 -10 -97 -1 -10 -2 -26 -3 -36 0 -10 -9 -27 -19 -38 -127
-142 -198 -222 -211 -234 -9 -8 -31 -33 -50 -55 -19 -22 -70 -80 -115 -129
-44 -49 -89 -98 -99 -110 -10 -11 -51 -57 -90 -100 -40 -44 -76 -84 -82 -91
-5 -6 -23 -25 -39 -42 l-28 -31 18 -34 c11 -18 22 -35 26 -38 4 -3 12 -17 17
-30 6 -14 21 -41 32 -60 12 -19 109 -188 216 -375 108 -187 204 -353 215 -369
18 -25 19 -38 13 -120 -4 -50 -9 -99 -10 -109 -2 -9 -6 -50 -10 -90 -3 -39 -8
-83 -10 -97 -2 -14 -6 -54 -10 -90 -3 -36 -8 -81 -11 -100 -2 -20 -6 -60 -9
-89 -5 -56 -13 -132 -20 -191 -2 -19 -7 -64 -10 -100 -3 -36 -8 -82 -11 -102
-5 -42 -25 -28 166 -113 47 -21 113 -51 148 -66 34 -16 64 -29 66 -29 2 0 46
-20 97 -43 52 -24 189 -86 305 -137 l211 -93 139 -240 c77 -133 141 -246 143
-251 2 -6 9 -18 16 -26 7 -8 29 -46 50 -85 21 -38 45 -81 55 -95 9 -14 42 -70
73 -125 31 -55 60 -105 65 -112 6 -9 23 -9 77 3 39 8 81 17 95 20 30 6 91 19
350 74 107 23 204 43 215 46 11 2 31 6 45 9 14 4 36 8 50 11 14 2 57 11 95 20
39 9 81 18 95 20 14 3 31 7 37 9 7 2 230 -93 495 -211 266 -119 491 -219 501
-221 20 -6 16 -10 157 147 46 52 99 111 116 130 18 19 42 46 54 59 27 32 157
176 192 214 15 16 58 63 95 105 130 145 137 151 173 157 19 3 107 21 195 40
88 19 175 37 194 40 19 3 37 8 41 10 4 2 22 7 41 10 38 7 202 41 384 80 66 14
128 27 138 29 29 4 36 18 42 91 3 39 8 81 10 95 2 14 7 54 10 90 4 36 8 83 11
105 2 22 6 63 9 90 3 28 7 70 10 95 2 25 7 70 10 100 4 30 8 69 10 85 2 17 8
77 14 135 25 232 8 193 150 350 128 141 272 302 336 374 33 37 74 82 90 100
17 17 50 54 74 81 25 28 57 64 73 81 l29 31 -27 49 c-14 27 -39 69 -54 94 -15
25 -47 79 -70 120 -60 105 -64 114 -185 320 -59 102 -117 203 -130 225 -12 22
-36 65 -53 96 -18 31 -30 58 -28 60 2 2 7 33 11 69 3 36 8 85 11 110 2 25 6
61 9 80 2 19 7 64 10 100 3 36 8 81 10 100 4 32 7 58 20 180 14 146 18 177 20
191 4 19 18 185 19 217 1 26 30 11 -364 186 -260 116 -261 116 -320 143 -50
23 -180 80 -271 120 -32 14 -54 46 -215 325 -177 305 -222 384 -318 552 -41
72 -52 85 -70 81 -12 -3 -140 -30 -286 -61 -308 -65 -271 -57 -385 -83 -49
-11 -103 -22 -120 -25 -16 -3 -81 -17 -144 -30 l-113 -23 -347 154 c-190 85
-374 167 -409 183 -35 17 -65 30 -67 30 -3 0 -39 16 -81 35 -41 19 -81 35 -88
35 -7 0 -37 -28 -67 -61z"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 3.2 KiB

View File

@ -0,0 +1,19 @@
{
"name": "",
"short_name": "",
"icons": [
{
"src": "/android-chrome-192x192.png",
"sizes": "192x192",
"type": "image/png"
},
{
"src": "/android-chrome-512x512.png",
"sizes": "512x512",
"type": "image/png"
}
],
"theme_color": "#ffffff",
"background_color": "#ffffff",
"display": "standalone"
}

16
onyx-web-app/src/App.vue Normal file
View File

@ -0,0 +1,16 @@
<script setup lang="ts">
</script>
<template>
<header>
<h1>Onyx App</h1>
<hr>
</header>
<main>
<RouterView/>
</main>
</template>
<style scoped>
</style>

12
onyx-web-app/src/main.ts Normal file
View File

@ -0,0 +1,12 @@
import { createApp } from 'vue'
import { createPinia } from 'pinia'
import App from './App.vue'
import router from './router'
const app = createApp(App)
app.use(createPinia())
app.use(router)
app.mount('#app')

View File

@ -0,0 +1,15 @@
import {createRouter, createWebHistory} from 'vue-router'
import MainView from "@/views/MainView.vue";
const router = createRouter({
history: createWebHistory(import.meta.env.BASE_URL),
routes: [
{
path: '/',
name: 'home',
component: MainView
}
]
})
export default router

View File

@ -0,0 +1,15 @@
<!--
The main view for the application, which shows an overview of the onyx node
that the user is currently browsing.
-->
<script setup lang="ts">
</script>
<template>
<h1>Main View</h1>
</template>
<style scoped>
</style>

View File

@ -0,0 +1,12 @@
{
"extends": "@vue/tsconfig/tsconfig.dom.json",
"include": ["env.d.ts", "src/**/*", "src/**/*.vue"],
"exclude": ["src/**/__tests__/*"],
"compilerOptions": {
"composite": true,
"baseUrl": ".",
"paths": {
"@/*": ["./src/*"]
}
}
}

View File

@ -0,0 +1,11 @@
{
"files": [],
"references": [
{
"path": "./tsconfig.node.json"
},
{
"path": "./tsconfig.app.json"
}
]
}

View File

@ -0,0 +1,16 @@
{
"extends": "@tsconfig/node18/tsconfig.json",
"include": [
"vite.config.*",
"vitest.config.*",
"cypress.config.*",
"nightwatch.conf.*",
"playwright.config.*"
],
"compilerOptions": {
"composite": true,
"module": "ESNext",
"moduleResolution": "Bundler",
"types": ["node"]
}
}

View File

@ -0,0 +1,16 @@
import { fileURLToPath, URL } from 'node:url'
import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
// https://vitejs.dev/config/
export default defineConfig({
plugins: [
vue(),
],
resolve: {
alias: {
'@': fileURLToPath(new URL('./src', import.meta.url))
}
}
})