Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dashboard v2 #44

Merged
merged 12 commits into from
Jan 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 1 addition & 5 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,7 @@ jobs:
run: echo "RELEASE_VERSION=0.0.1" >> $GITHUB_ENV
- name: Apply new version
run: node worker/config/preparePublish.js
- name: Install dashboard modules
run: cd packages/dashboard && npm install
- name: Build dashboard
run: cd packages/dashboard && npm run build
- name: Install worker modules
run: cd worker && npm install
run: make build-dashboard
- name: Build worker
run: cd worker && npm run build
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ spa
# local env files
.env.local
.env.*.local
**/.env

# Log files
npm-debug.log*
Expand Down Expand Up @@ -33,3 +34,6 @@ worker/dev/.wrangler

packages/github-action/wrangler.toml
packages/github-action/src

packages/dashboard-v2/.env
.dev.vars
15 changes: 15 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
build-dashboard:
rm -rf packages/dashboard/dist/
rm -rf packages/dashboard-v2/dist/
rm -rf dist/

cd packages/dashboard/ && \
npm install && \
npm run build

cd packages/dashboard-v2/ && \
npm install && \
npm run build

cp -r packages/dashboard/dist/ dist/
cp -r packages/dashboard-v2/dist/spa/ dist/v2.0/
9 changes: 9 additions & 0 deletions packages/dashboard-v2/.editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
root = true

[*]
charset = utf-8
indent_style = space
indent_size = 2
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
1 change: 1 addition & 0 deletions packages/dashboard-v2/.env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
VUE_APP_SERVER_URL=http://localhost:8787
7 changes: 7 additions & 0 deletions packages/dashboard-v2/.eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
/dist
/src-capacitor
/src-cordova
/.quasar
/node_modules
.eslintrc.js
/quasar.config.*.temporary.compiled*
66 changes: 66 additions & 0 deletions packages/dashboard-v2/.eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
module.exports = {
// https://eslint.org/docs/user-guide/configuring#configuration-cascading-and-hierarchy
// This option interrupts the configuration hierarchy at this file
// Remove this if you have an higher level ESLint config file (it usually happens into a monorepos)
root: true,

parserOptions: {
ecmaVersion: 2021, // Allows for the parsing of modern ECMAScript features
},

env: {
node: true,
browser: true,
'vue/setup-compiler-macros': true
},

// Rules order is important, please avoid shuffling them
extends: [
// Base ESLint recommended rules
// 'eslint:recommended',

// Uncomment any of the lines below to choose desired strictness,
// but leave only one uncommented!
// See https://eslint.vuejs.org/rules/#available-rules
'plugin:vue/vue3-essential', // Priority A: Essential (Error Prevention)
// 'plugin:vue/vue3-strongly-recommended', // Priority B: Strongly Recommended (Improving Readability)
// 'plugin:vue/vue3-recommended', // Priority C: Recommended (Minimizing Arbitrary Choices and Cognitive Overhead)

// https://github.com/prettier/eslint-config-prettier#installation
// usage with Prettier, provided by 'eslint-config-prettier'.
'prettier'
],

plugins: [
// https://eslint.vuejs.org/user-guide/#why-doesn-t-it-work-on-vue-files
// required to lint *.vue files
'vue',

// https://github.com/typescript-eslint/typescript-eslint/issues/389#issuecomment-509292674
// Prettier has not been included as plugin to avoid performance impact
// add it as an extension for your IDE

],

globals: {
ga: 'readonly', // Google Analytics
cordova: 'readonly',
__statics: 'readonly',
__QUASAR_SSR__: 'readonly',
__QUASAR_SSR_SERVER__: 'readonly',
__QUASAR_SSR_CLIENT__: 'readonly',
__QUASAR_SSR_PWA__: 'readonly',
process: 'readonly',
Capacitor: 'readonly',
chrome: 'readonly'
},

// add your custom rules here
rules: {

'prefer-promise-reject-errors': 'off',

// allow debugger during development only
'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off'
}
}
33 changes: 33 additions & 0 deletions packages/dashboard-v2/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
.DS_Store
.thumbs.db
node_modules

# Quasar core related directories
.quasar
/dist
/quasar.config.*.temporary.compiled*

# Cordova related directories and files
/src-cordova/node_modules
/src-cordova/platforms
/src-cordova/plugins
/src-cordova/www

# Capacitor related directories and files
/src-capacitor/www
/src-capacitor/node_modules

# Log files
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# Editor directories and files
.idea
*.suo
*.ntvs*
*.njsproj
*.sln

# local .env files
.env.local*
3 changes: 3 additions & 0 deletions packages/dashboard-v2/.npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# pnpm-related options
shamefully-hoist=true
strict-peer-dependencies=false
41 changes: 41 additions & 0 deletions packages/dashboard-v2/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# r2-explorer (r2-explorer-dashboard)

R2-Explorer

## Install the dependencies
```bash
yarn
# or
npm install
```

### Start the app in development mode (hot-code reloading, error reporting, etc.)
```bash
quasar dev
```


### Lint the files
```bash
yarn lint
# or
npm run lint
```


### Format the files
```bash
yarn format
# or
npm run format
```



### Build the app for production
```bash
quasar build
```

### Customize the configuration
See [Configuring quasar.config.js](https://v2.quasar.dev/quasar-cli-vite/quasar-config-js).
24 changes: 24 additions & 0 deletions packages/dashboard-v2/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<!DOCTYPE html>
<html lang="en">
<head>
<title><%= productName %></title>

<meta charset="utf-8">
<meta name="description" content="<%= productDescription %>">
<meta name="format-detection" content="telephone=no">
<meta name="msapplication-tap-highlight" content="no">
<meta name="viewport" content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width<% if (ctx.mode.cordova || ctx.mode.capacitor) { %>, viewport-fit=cover<% } %>">

<meta name="robots" content="noindex">
<meta name="googlebot" content="noindex">

<link rel="icon" type="image/png" sizes="128x128" href="icons/favicon-128x128.png">
<link rel="icon" type="image/png" sizes="96x96" href="icons/favicon-96x96.png">
<link rel="icon" type="image/png" sizes="32x32" href="icons/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="icons/favicon-16x16.png">
<link rel="icon" type="image/ico" href="favicon.ico">
</head>
<body>
<!-- quasar:entry-point -->
</body>
</html>
39 changes: 39 additions & 0 deletions packages/dashboard-v2/jsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
{
"compilerOptions": {
"baseUrl": ".",
"paths": {
"src/*": [
"src/*"
],
"app/*": [
"*"
],
"components/*": [
"src/components/*"
],
"layouts/*": [
"src/layouts/*"
],
"pages/*": [
"src/pages/*"
],
"assets/*": [
"src/assets/*"
],
"boot/*": [
"src/boot/*"
],
"stores/*": [
"src/stores/*"
],
"vue$": [
"node_modules/vue/dist/vue.runtime.esm-bundler.js"
]
}
},
"exclude": [
"dist",
".quasar",
"node_modules"
]
}
Loading
Loading