first commit
This commit is contained in:
commit
257aa8d9ac
|
|
@ -0,0 +1,9 @@
|
|||
root = true
|
||||
|
||||
[*]
|
||||
charset = utf-8
|
||||
indent_style = tab
|
||||
indent_size = 4
|
||||
end_of_line = lf
|
||||
insert_final_newline = true
|
||||
trim_trailing_whitespace = true
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
module.exports = {
|
||||
extends: [
|
||||
'@nextcloud'
|
||||
],
|
||||
rules: {
|
||||
'no-console': 'off',
|
||||
},
|
||||
};
|
||||
|
|
@ -0,0 +1,52 @@
|
|||
all: dev-setup lint build-js-production test
|
||||
|
||||
# Dev env management
|
||||
dev-setup: clean clean-dev npm-init
|
||||
|
||||
npm-init:
|
||||
npm ci
|
||||
|
||||
npm-update:
|
||||
npm update
|
||||
|
||||
# Building
|
||||
build-js:
|
||||
npm run dev
|
||||
|
||||
build-js-production:
|
||||
npm run build
|
||||
|
||||
watch-js:
|
||||
npm run watch
|
||||
|
||||
# Testing
|
||||
test:
|
||||
npm run test
|
||||
|
||||
test-watch:
|
||||
npm run test:watch
|
||||
|
||||
test-coverage:
|
||||
npm run test:coverage
|
||||
|
||||
# Linting
|
||||
lint:
|
||||
npm run lint
|
||||
|
||||
lint-fix:
|
||||
npm run lint:fix
|
||||
|
||||
# Style linting
|
||||
stylelint:
|
||||
npm run stylelint
|
||||
|
||||
stylelint-fix:
|
||||
npm run stylelint:fix
|
||||
|
||||
# Cleaning
|
||||
clean:
|
||||
rm -f js/*
|
||||
|
||||
clean-dev:
|
||||
rm -rf node_modules
|
||||
|
||||
|
|
@ -0,0 +1,43 @@
|
|||
# Module Agency
|
||||
|
||||
## Was zu ändern ist
|
||||
|
||||
Änderungen bei einem neuen Modul
|
||||
|
||||
appinfo ->
|
||||
info.xml
|
||||
- id, name, summary, namespace, category, navigation (name, route, icon)
|
||||
routes.php
|
||||
- Eventuell hier anpassen, aber das erstmal so lassen
|
||||
|
||||
js ->
|
||||
Dieser Ordner sollte LEER sein
|
||||
|
||||
lib -> Controller ->
|
||||
PageController.php
|
||||
- namespace (Zeile 4),
|
||||
- Zeile 25 bei main den neuen Modulnamen davorschreiben
|
||||
src ->
|
||||
App.vue
|
||||
- bei Content den app-name ändern, NICHT aber weiter unten bei export default usw.
|
||||
|
||||
README.md
|
||||
Hier einmal als Kommentar den Modulnamen anpassen fürs Git
|
||||
composer.json
|
||||
bei name anpassen auf da/NAMEDESMODULS
|
||||
description anpassen
|
||||
package.json
|
||||
name und desc anpassen sowie version und author
|
||||
|
||||
Befehl für den Docker und die Bash, um die Befehle beim Docker abzusetzen
|
||||
docker exec -it nextcloud bash
|
||||
|
||||
hier dann ins Verzeichnis, dann:
|
||||
npm install
|
||||
|
||||
Das dauert dann kurz, weil ja alle node_modules installiert und eingerichtet werden.
|
||||
|
||||
dann für HOT REALOAD: make watch-js
|
||||
oder für BUILD: make build-js
|
||||
-> Die Skripte sind in der package.json verlinkt
|
||||
|
||||
|
|
@ -0,0 +1,22 @@
|
|||
<?xml version="1.0"?>
|
||||
<info xmlns:xsi= "http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:noNamespaceSchemaLocation="https://apps.nextcloud.com/schema/apps/info.xsd">
|
||||
<id>agency</id>
|
||||
<name>Agency</name>
|
||||
<summary>App for managing Agency of DA</summary>
|
||||
<description><![CDATA[test]]></description>
|
||||
<version>0.0.1</version>
|
||||
<licence></licence>
|
||||
<namespace>Agency</namespace>
|
||||
<category>tools</category>
|
||||
<dependencies>
|
||||
<nextcloud min-version="16"/>
|
||||
</dependencies>
|
||||
<navigations>
|
||||
<navigation>
|
||||
<name>Agenturverwaltung</name>
|
||||
<route>agency.page.index</route>
|
||||
<icon>app.svg</icon>
|
||||
</navigation>
|
||||
</navigations>
|
||||
</info>
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
<?php
|
||||
return [
|
||||
'routes' => [
|
||||
['name' => 'page#index', 'url' => '/', 'verb' => 'GET'],
|
||||
]
|
||||
];
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
module.exports = {
|
||||
plugins: ['@babel/plugin-syntax-dynamic-import'],
|
||||
presets: [
|
||||
[
|
||||
'@babel/preset-env',
|
||||
{
|
||||
modules: false
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
{
|
||||
"name": "da/agency",
|
||||
"description": "App for managing the Agency of DA",
|
||||
"license": "",
|
||||
"config": {
|
||||
"optimize-autoloader": true,
|
||||
"classmap-authoritative": true
|
||||
},
|
||||
"scripts": {
|
||||
"lint": "find . -name \\*.php -not -path './vendor/*' -exec php -l \"{}\" \\;"
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
|
||||
@include icon-black-white('standard', 'app', 1);
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" fill="#fff" viewBox="0 0 32 32">
|
||||
<path d="M23.2 22.8a1 1 0 0 1-.7-1.7l5-5.1-5-5A1 1 0 0 1 24 9.4l5.8 5.8a1 1 0 0 1 0 1.4L24 22.5a1 1 0 0 1-.7.3zm-13.7-.3a1 1 0 0 0 0-1.4l-5-5.1 5-5A1 1 0 0 0 8 9.4l-5.8 5.8a1 1 0 0 0 0 1.4L8 22.5a1 1 0 0 0 .7.3 1 1 0 0 0 .7-.3zm4.5-.3l5.8-11.5a1 1 0 0 0-.5-1.4 1 1 0 0 0-1.3.5l-5.8 11.5a1 1 0 0 0 .5 1.4 1 1 0 0 0 .4 0 1 1 0 0 0 .9-.5z"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 421 B |
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
|
@ -0,0 +1,31 @@
|
|||
<?php
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace OCA\Agency\Controller;
|
||||
|
||||
use OCP\IRequest;
|
||||
use OCP\AppFramework\Http\TemplateResponse;
|
||||
use OCP\AppFramework\Controller;
|
||||
use OCP\Util;
|
||||
|
||||
class PageController extends Controller {
|
||||
|
||||
protected $appName;
|
||||
|
||||
public function __construct($appName, IRequest $request) {
|
||||
parent::__construct($appName, $request);
|
||||
$this->appName = $appName;
|
||||
}
|
||||
|
||||
/**
|
||||
* @NoAdminRequired
|
||||
* @NoCSRFRequired
|
||||
*/
|
||||
public function index() {
|
||||
Util::addScript($this->appName, 'agency-main');
|
||||
Util::addStyle($this->appName, 'icons');
|
||||
|
||||
$response = new TemplateResponse($this->appName, 'main');
|
||||
return $response;
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
|
|
@ -0,0 +1,63 @@
|
|||
{
|
||||
"name": "agency",
|
||||
"description": "App for managing Agency of DA",
|
||||
"version": "0.0.1",
|
||||
"author": "Holger Trampe",
|
||||
"license": "",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"build": "NODE_ENV=production webpack --progress --hide-modules --config webpack.js",
|
||||
"dev": "NODE_ENV=development webpack --progress --config webpack.js",
|
||||
"watch": "NODE_ENV=development webpack --progress --watch --config webpack.js",
|
||||
"lint": "eslint --ext .js,.vue src",
|
||||
"lint:fix": "eslint --ext .js,.vue src --fix",
|
||||
"stylelint": "stylelint src",
|
||||
"stylelint:fix": "stylelint src --fix"
|
||||
},
|
||||
"dependencies": {
|
||||
"@nextcloud/l10n": "^1.4.1",
|
||||
"@nextcloud/router": "^2.0.0",
|
||||
"@nextcloud/vue": "^3.7.0",
|
||||
"vue": "^2.6.12",
|
||||
"vue-router": "^3.5.1"
|
||||
},
|
||||
"browserslist": [
|
||||
"extends @nextcloud/browserslist-config"
|
||||
],
|
||||
"engines": {
|
||||
"node": ">=10.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/core": "^7.13.8",
|
||||
"@babel/plugin-syntax-dynamic-import": "^7.8.3",
|
||||
"@babel/preset-env": "^7.13.9",
|
||||
"@nextcloud/browserslist-config": "^2.1.0",
|
||||
"@nextcloud/eslint-config": "^2.2.0",
|
||||
"@nextcloud/eslint-plugin": "^1.5.0",
|
||||
"@nextcloud/webpack-vue-config": "^1.1.0",
|
||||
"@vue/test-utils": "^1.1.3",
|
||||
"babel-eslint": "^10.1.0",
|
||||
"babel-loader": "^8.2.2",
|
||||
"css-loader": "^3.6.0",
|
||||
"eslint": "^6.8.0",
|
||||
"eslint-config-standard": "^14.1.1",
|
||||
"eslint-import-resolver-webpack": "^0.13.0",
|
||||
"eslint-loader": "^4.0.2",
|
||||
"eslint-plugin-import": "^2.22.1",
|
||||
"eslint-plugin-node": "^11.1.0",
|
||||
"eslint-plugin-promise": "^4.3.1",
|
||||
"eslint-plugin-standard": "^4.1.0",
|
||||
"eslint-plugin-vue": "^6.2.2",
|
||||
"node-sass": "^4.14.1",
|
||||
"sass-loader": "^8.0.2",
|
||||
"stylelint": "^13.12.0",
|
||||
"stylelint-config-recommended-scss": "^4.2.0",
|
||||
"stylelint-scss": "^3.19.0",
|
||||
"stylelint-webpack-plugin": "^2.1.1",
|
||||
"vue-loader": "^15.9.6",
|
||||
"vue-template-compiler": "^2.6.12",
|
||||
"webpack": "^4.46.0",
|
||||
"webpack-cli": "^3.3.12",
|
||||
"webpack-merge": "^5.7.3"
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,23 @@
|
|||
<template>
|
||||
<Content app-name="app">
|
||||
<AppNavigation />
|
||||
<AppContent>
|
||||
<router-view />
|
||||
</AppContent>
|
||||
</Content>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import Content from '@nextcloud/vue/dist/Components/Content'
|
||||
import AppNavigation from './components/Navigation'
|
||||
import AppContent from '@nextcloud/vue/dist/Components/AppContent'
|
||||
|
||||
export default {
|
||||
name: 'App',
|
||||
components: {
|
||||
Content,
|
||||
AppNavigation,
|
||||
AppContent,
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
|
@ -0,0 +1,28 @@
|
|||
<template>
|
||||
<AppNavigation>
|
||||
<template #list>
|
||||
<AppNavigationItem to="/"
|
||||
title="Übersicht"
|
||||
icon="icon-category-dashboard" />
|
||||
</template>
|
||||
</AppNavigation>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import AppNavigation from '@nextcloud/vue/dist/Components/AppNavigation'
|
||||
import AppNavigationItem from '@nextcloud/vue/dist/Components/AppNavigationItem'
|
||||
|
||||
export default {
|
||||
name: 'Navigation',
|
||||
components: {
|
||||
AppNavigation,
|
||||
AppNavigationItem,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
import Vue from 'vue'
|
||||
import App from './App'
|
||||
import VueRouter from 'vue-router'
|
||||
import Routes from './router/routes'
|
||||
|
||||
Vue.use(VueRouter)
|
||||
|
||||
const router = new VueRouter({
|
||||
routes: Routes,
|
||||
})
|
||||
|
||||
export default new Vue({
|
||||
el: '#content',
|
||||
router,
|
||||
render: h => h(App),
|
||||
})
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
import Dashboard from '../views/Dashboard'
|
||||
|
||||
export default [
|
||||
{
|
||||
path: '/',
|
||||
name: 'dashboard',
|
||||
component: Dashboard,
|
||||
},
|
||||
]
|
||||
|
|
@ -0,0 +1,15 @@
|
|||
<template>
|
||||
<Content app-name="Dashboard">
|
||||
<h1>Dashboard - als erste Seite!</h1>
|
||||
</Content>
|
||||
</template>
|
||||
<script>
|
||||
import Content from '@nextcloud/vue/dist/Components/Content'
|
||||
|
||||
export default ({
|
||||
name: 'Dashboard',
|
||||
components: {
|
||||
Content,
|
||||
},
|
||||
})
|
||||
</script>
|
||||
|
|
@ -0,0 +1,32 @@
|
|||
module.exports = {
|
||||
extends: 'stylelint-config-recommended-scss',
|
||||
rules: {
|
||||
indentation: 'tab',
|
||||
'selector-type-no-unknown': null,
|
||||
'number-leading-zero': null,
|
||||
'rule-empty-line-before': [
|
||||
'always',
|
||||
{
|
||||
ignore: ['after-comment', 'inside-block'],
|
||||
}
|
||||
],
|
||||
'declaration-empty-line-before': [
|
||||
'never',
|
||||
{
|
||||
ignore: ['after-declaration'],
|
||||
},
|
||||
],
|
||||
'comment-empty-line-before': null,
|
||||
'selector-type-case': null,
|
||||
'selector-list-comma-newline-after': null,
|
||||
'no-descending-specificity': null,
|
||||
'string-quotes': 'single',
|
||||
'selector-pseudo-element-no-unknown': [
|
||||
true,
|
||||
{
|
||||
ignorePseudoElements: ['v-deep'],
|
||||
},
|
||||
],
|
||||
},
|
||||
plugins: ['stylelint-scss'],
|
||||
}
|
||||
|
|
@ -0,0 +1 @@
|
|||
<div id="vue-content"></div>
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
const webpackConfig = require('@nextcloud/webpack-vue-config')
|
||||
|
||||
module.exports = webpackConfig
|
||||
Loading…
Reference in New Issue