-
Notifications
You must be signed in to change notification settings - Fork 1
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
Introduce VueJS, make not-grocy a SPA. #25
Draft
hackathi
wants to merge
17
commits into
master
Choose a base branch
from
vuejs
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from 2 commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
4e1f6e9
Moved legacy JavaScript to its own folder
hackathi e95d86d
Setup typescript, vue3, primeVue
hackathi cb57a49
Remove build artifact
hackathi ba9dd1f
Basic grocy template
hackathi b24aa1b
Merge branch 'master' into vuejs
hackathi 0e31f4d
i18n: Begin move to vue-i18n.
hackathi 503e933
Fix bwip + broken legacy localizationservice
hackathi 2f79e1b
API Endpoints for frontend config
hackathi 407b524
Fix Migrations
hackathi 6e1c39c
Fix missing Import
hackathi f585961
Basic vuex store, API, wire up QuickSettings
hackathi 2a5ff20
Basic Stockoverview page
hackathi 560cc23
Locale fallbacking now works
hackathi f5ceed5
Stockoverview: Stock table
hackathi ddc2dad
Recipes View
hackathi 9038804
Make desired servings do what it should
hackathi 1367396
Product picker
hackathi File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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,3 +1,6 @@ | ||
{ | ||
"recommendations": [] | ||
"recommendations": [ | ||
"octref.vetur", | ||
"dbaeumer.vscode-eslint" | ||
] | ||
} |
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,14 @@ | ||
<template> | ||
<p> lol</p> | ||
</template> | ||
|
||
<script lang="ts"> | ||
import { defineComponent } from 'vue'; | ||
|
||
export default defineComponent({ | ||
data() | ||
{ | ||
return {}; | ||
} | ||
}); | ||
</script> |
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
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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,14 @@ | ||
import { createApp } from 'vue'; | ||
import router from './router'; | ||
import App from './App.vue'; | ||
|
||
// PrimeVue components | ||
import PrimeVue from 'primevue/config'; | ||
|
||
const app = createApp(App); | ||
|
||
app.use(PrimeVue); | ||
app.use(router); | ||
|
||
|
||
app.mount("#app"); |
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,11 @@ | ||
<template> | ||
<p> Hi! </p> | ||
</template> | ||
|
||
<script lang="ts"> | ||
import { defineComponent } from 'vue'; | ||
|
||
export default defineComponent({ | ||
// type inference enabled | ||
}); | ||
</script> |
6 changes: 6 additions & 0 deletions
6
js/pages/Stock/Overview.vue?vue&type=template&id=31afdab6&lang.js
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,6 @@ | ||
import { openBlock as _openBlock, createBlock as _createBlock } from "vue"; | ||
|
||
export function render(_ctx, _cache, $props, $setup, $data, $options) | ||
{ | ||
return (_openBlock(), _createBlock("p", null, " Hi! ")); | ||
} |
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,19 @@ | ||
import { createRouter, createWebHashHistory } from 'vue-router'; | ||
import StockOverview from './pages/Stock/Overview.vue'; | ||
const routes = [ | ||
{ | ||
path: '/', | ||
name: 'Home', | ||
component: StockOverview | ||
}, | ||
]; | ||
const router = createRouter({ | ||
history: createWebHashHistory(), | ||
routes | ||
}); | ||
export default router; | ||
//# sourceMappingURL=router.js.map | ||
//# sourceMappingURL=router.js.map | ||
//# sourceMappingURL=router.js.map | ||
//# sourceMappingURL=router.js.map | ||
//# sourceMappingURL=router.js.map |
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,7 @@ | ||
/* eslint-disable @typescript-eslint/no-explicit-any */ | ||
/* eslint-disable @typescript-eslint/ban-types */ | ||
declare module '*.vue' { | ||
import type { DefineComponent } from 'vue'; | ||
const component: DefineComponent<{}, {}, any>; | ||
export default component; | ||
} |
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,38 @@ | ||
<!DOCTYPE html> | ||
<html lang="{{ GROCY_LOCALE }}" | ||
dir="{{ $dir }}"> | ||
|
||
<head> | ||
<meta charset="utf-8"> | ||
<meta http-equiv="x-ua-compatible" content="ie=edge"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> | ||
|
||
<meta name="robots" content="noindex,nofollow"> | ||
<meta name="format-detection" content="telephone=no"> | ||
|
||
<link rel="apple-touch-icon" sizes="180x180" href="{{ $U('/img/appicons/apple-touch-icon.png?v=', true) }}{{ $version }}"> | ||
<link rel="icon" type="image/png" sizes="32x32" href="{{ $U('/img/appicons/favicon-32x32.png?v=', true) }}{{ $version }}"> | ||
<link rel="icon" type="image/png" sizes="16x16" href="{{ $U('/img/appicons/favicon-16x16.png?v=', true) }}{{ $version }}"> | ||
|
||
<link rel="manifest" href="{{ $U('/img/appicons/site.webmanifest?v=', true) }}{{ $version }}"> | ||
<link rel="mask-icon" href="{{ $U('/img/appicons/safari-pinned-tab.svg?v=', true) }}{{ $version }}" color="#0b024c"> | ||
<link rel="shortcut icon" href="{{ $U('/img/appicons/favicon.ico?v=', true) }}{{ $version }}"> | ||
<meta name="apple-mobile-web-app-title" content="grocy"> | ||
<meta name="application-name" content="grocy"> | ||
<meta name="msapplication-TileColor" content="#e5e5e5"> | ||
<meta name="msapplication-config" content="{{ $U('/img/appicons/browserconfig.xml?v=', true) }}{{ $version }}"> | ||
<meta name="theme-color" content="#ffffff"> | ||
|
||
<title>grocy</title> | ||
|
||
<link href="{{ $U('/components_unmanaged/noto-sans-v11-latin/noto-sans-v11-latin.min.css?v=', true) }}{{ $version }}" rel="stylesheet"> | ||
<link href="{{ $U('/dist/grocy.css?v=', true) }}{{ $version }}" rel="stylesheet"> | ||
</head> | ||
|
||
<body> | ||
<div id="app"></div> | ||
|
||
<script src="{{ $U('/dist/main.js?v=', true) }}{{ $version }}"></script> | ||
</body> | ||
|
||
</html> |
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,45 @@ | ||
/* eslint-disable no-undef */ | ||
import vue from 'rollup-plugin-vue'; | ||
import commonjs from '@rollup/plugin-commonjs'; | ||
import resolve from '@rollup/plugin-node-resolve'; | ||
import babel from '@rollup/plugin-babel'; | ||
import postcss from 'rollup-plugin-postcss'; | ||
import replace from '@rollup/plugin-replace'; | ||
import typescript from 'rollup-plugin-typescript2'; | ||
|
||
import path from 'path'; | ||
|
||
|
||
const env = process.env.NODE_ENV || 'development'; | ||
|
||
export default { | ||
input: [ | ||
'js/main.ts' | ||
], | ||
output: { | ||
dir: 'public/dist', | ||
format: 'umd', | ||
name: 'VueGrocy', | ||
sourcemap: true, | ||
}, | ||
plugins: [ | ||
resolve({ browser: true, preferBuiltins: true }), | ||
vue({ | ||
target: "browser" | ||
}), | ||
typescript(), | ||
commonjs(), | ||
babel({ | ||
babelHelpers: 'bundled', | ||
exclude: 'node_modules/**' | ||
}), | ||
postcss({ // will load postcss.config.js | ||
extract: path.resolve('public/dist/app.css'), | ||
minimize: env !== 'development', | ||
}), | ||
replace({ | ||
'process.env.NODE_ENV': JSON.stringify(env), | ||
preventAssignment: true, | ||
}) | ||
] | ||
}; |
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.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems like a build artifact.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes. At some point I completely messed up the rollup config, and that's that. Also, eslint breaks in the vue-rollup config. I have no idea why. Linting in VS Code or with the command line works, so I am not concerned.