diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..a07635f --- /dev/null +++ b/Dockerfile @@ -0,0 +1,2 @@ +ARG NEXTCLOUD_VERSION=20.0.0 +FROM rootlogin/nextcloud diff --git a/img/play.png b/img/play.png new file mode 100644 index 0000000..6e5905d Binary files /dev/null and b/img/play.png differ diff --git a/package-lock.json b/package-lock.json index 079c53f..00794d4 100644 --- a/package-lock.json +++ b/package-lock.json @@ -5842,6 +5842,64 @@ "flat-cache": "^2.0.1" } }, + "file-loader": { + "version": "6.1.1", + "resolved": "https://registry.npmjs.org/file-loader/-/file-loader-6.1.1.tgz", + "integrity": "sha512-Klt8C4BjWSXYQAfhpYYkG4qHNTna4toMHEbWrI5IuVoxbU6uiDKeKAP99R8mmbJi3lvewn/jQBOgU4+NS3tDQw==", + "dev": true, + "requires": { + "loader-utils": "^2.0.0", + "schema-utils": "^3.0.0" + }, + "dependencies": { + "@types/json-schema": { + "version": "7.0.6", + "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.6.tgz", + "integrity": "sha512-3c+yGKvVP5Y9TYBEibGNR+kLtijnj7mYrXRg+WpFb2X9xm04g/DXYkfg4hmzJQosc9snFNUPkbYIhu+KAm6jJw==", + "dev": true + }, + "ajv": { + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "dev": true, + "requires": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + } + }, + "ajv-keywords": { + "version": "3.5.2", + "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.5.2.tgz", + "integrity": "sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ==", + "dev": true + }, + "loader-utils": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.0.tgz", + "integrity": "sha512-rP4F0h2RaWSvPEkD7BLDFQnvSf+nK+wr3ESUjNTyAGobqrijmW92zc+SO6d4p4B1wh7+B/Jg1mkQe5NYUEHtHQ==", + "dev": true, + "requires": { + "big.js": "^5.2.2", + "emojis-list": "^3.0.0", + "json5": "^2.1.2" + } + }, + "schema-utils": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.0.0.tgz", + "integrity": "sha512-6D82/xSzO094ajanoOSbe4YvXWMfn2A//8Y1+MUqFAJul5Bs+yn36xbK9OtNDcRVSBJ9jjeoXftM6CfztsjOAA==", + "dev": true, + "requires": { + "@types/json-schema": "^7.0.6", + "ajv": "^6.12.5", + "ajv-keywords": "^3.5.2" + } + } + } + }, "file-uri-to-path": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz", diff --git a/package.json b/package.json index 9de44a8..556df9a 100644 --- a/package.json +++ b/package.json @@ -66,6 +66,7 @@ "eslint-plugin-promise": "^4.2.1", "eslint-plugin-standard": "^4.0.1", "eslint-plugin-vue": "^6.2.2", + "file-loader": "^6.1.1", "node-sass": "^4.14.1", "sass-loader": "^8.0.2", "stylelint": "^13.7.2", diff --git a/src/components/Main.vue b/src/components/Main.vue new file mode 100644 index 0000000..7c5ef64 --- /dev/null +++ b/src/components/Main.vue @@ -0,0 +1,86 @@ + + + + + diff --git a/src/components/Navigation.vue b/src/components/Navigation.vue new file mode 100644 index 0000000..b416199 --- /dev/null +++ b/src/components/Navigation.vue @@ -0,0 +1,41 @@ + + + diff --git a/src/components/Player.vue b/src/components/Player.vue new file mode 100644 index 0000000..a25943a --- /dev/null +++ b/src/components/Player.vue @@ -0,0 +1,88 @@ + + + + + diff --git a/src/components/Table.vue b/src/components/Table.vue new file mode 100644 index 0000000..525e14b --- /dev/null +++ b/src/components/Table.vue @@ -0,0 +1,136 @@ + + + + + diff --git a/src/router.js b/src/router.js new file mode 100644 index 0000000..1e03786 --- /dev/null +++ b/src/router.js @@ -0,0 +1,40 @@ +import Vue from 'vue' +import Router from 'vue-router' +import { generateUrl } from '@nextcloud/router' + +import Main from './components/Main' + +Vue.use(Router) + +export default new Router({ + mode: 'history', + base: generateUrl('/apps/radio'), + linkActiveClass: 'active', + routes: [ + { + path: '/', + component: Main, + name: 'TOP', + }, + { + path: '/top', + component: Main, + name: 'TOP', + }, + { + path: '/recent', + component: Main, + name: 'RECENT', + }, + { + path: '/favorites', + component: Main, + name: 'FAVORITES', + }, + { + path: '/categories', + component: Main, + name: 'CATEGORIES', + }, + ], +}) diff --git a/webpack.js b/webpack.js index e5daa92..1a3c590 100644 --- a/webpack.js +++ b/webpack.js @@ -1,3 +1,19 @@ +const { merge } = require('webpack-merge') const webpackConfig = require('@nextcloud/webpack-vue-config') -module.exports = webpackConfig +const config = { + module: { + rules: [ + { + test: /\.(png|jpg|gif)$/, loader: 'file-loader?name=./images/[name].[ext]', + }, + ], + }, +} + +const mergedConfigs = merge(config, webpackConfig) + +// Remove duplicate rules by the `test` key +mergedConfigs.module.rules = mergedConfigs.module.rules.filter((v, i, a) => a.findIndex(t => (t.test.toString() === v.test.toString())) === i) + +module.exports = mergedConfigs