Quellcode durchsuchen

initial commit, with working template app

master
Romain Kerguelen vor 5 Jahren
Commit
80a677e0e4
Signiert von: rigelk GPG-Schlüssel-ID: EA12971B0E438F36
24 geänderte Dateien mit 10896 neuen und 0 gelöschten Zeilen
  1. +24
    -0
      .eslintrc.js
  2. +14
    -0
      .gitignore
  3. +18
    -0
      README.md
  4. +8
    -0
      assets/README.md
  5. +4
    -0
      assets/css/color.css
  6. +38
    -0
      assets/css/global.css
  7. BIN
      assets/img/logo.png
  8. +4
    -0
      assets/scss/color.scss
  9. +38
    -0
      assets/scss/global.scss
  10. +6
    -0
      components/README.md
  11. +8
    -0
      layouts/README.md
  12. +5
    -0
      layouts/default.vue
  13. +57
    -0
      main.js
  14. +9
    -0
      middleware/README.md
  15. +24
    -0
      nuxt.config.js
  16. +10530
    -0
      package-lock.json
  17. +41
    -0
      package.json
  18. +7
    -0
      pages/README.md
  19. +32
    -0
      pages/index.vue
  20. +8
    -0
      plugins/README.md
  21. +11
    -0
      static/README.md
  22. BIN
      static/icon.png
  23. BIN
      static/icons/512x512.png
  24. +10
    -0
      store/README.md

+ 24
- 0
.eslintrc.js Datei anzeigen

@ -0,0 +1,24 @@
module.exports = {
root: true,
env: {
browser: true,
node: true
},
parserOptions: {
parser: 'babel-eslint'
},
extends: [
// https://github.com/vuejs/eslint-plugin-vue#priority-a-essential-error-prevention
// consider switching to `plugin:vue/strongly-recommended` or `plugin:vue/recommended` for stricter rules.
'plugin:vue/essential'
],
// required to lint *.vue files
plugins: [
'vue'
],
// add your custom rules here
rules: {
"indent": ["error", "tab"],
"no-tabs": 0
}
}

+ 14
- 0
.gitignore Datei anzeigen

@ -0,0 +1,14 @@
# dependencies
node_modules
# logs
npm-debug.log
# Nuxt build
.nuxt
# Nuxt generate
dist
# Mac OS
.DS_Store

+ 18
- 0
README.md Datei anzeigen

@ -0,0 +1,18 @@
# prismediatoid
> a GUI for prismedia, using Electron.
## Build Setup
```bash
# install dependencies
$ npm install
# development with vue devtools
$ npm run dev
# build for production (might take some time)
$ npm run build
```
For detailed explanation on how things work, checkout [Nuxt.js](https://github.com/nuxt/nuxt.js), [Electron.js](https://electronjs.org/), and [electron-builder](https://www.electron.build/).

+ 8
- 0
assets/README.md Datei anzeigen

@ -0,0 +1,8 @@
# ASSETS
This directory contains your un-compiled assets such as LESS, SASS, or JavaScript.
More information about the usage of this directory in the documentation:
https://nuxtjs.org/guide/assets#webpacked
**This directory is not required, you can delete it if you don't want to use it.**

+ 4
- 0
assets/css/color.css Datei anzeigen

@ -0,0 +1,4 @@
:root {
--primary: #00b786;
--secondary: #8ceaf6;
}

+ 38
- 0
assets/css/global.css Datei anzeigen

@ -0,0 +1,38 @@
@import './color.css';
html {
font-size: 16px;
word-spacing: 1px;
-ms-text-size-adjust: 100%;
-webkit-text-size-adjust: 100%;
-moz-osx-font-smoothing: grayscale;
-webkit-font-smoothing: antialiased;
box-sizing: border-box;
}
body {
font-family: "Source Sans Pro", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
*, *:before, *:after {
box-sizing: border-box;
margin: 0;
}
a.btn-primary {
text-decoration: none;
background: none;
}
.btn, .pointer {
cursor: pointer;
}
.primary {
color: var(--primary);
}
.secondary {
color: var(--secondary);
}
.btn-primary {
background-color: var(--primary);
color: #fff;
}
.btn-secondary {
background-color: var(--secondary);
color: #000;
}

BIN
assets/img/logo.png Datei anzeigen

Vorher Nachher
Breite: 512  |  Höhe: 512  |  Größe: 47 KiB

+ 4
- 0
assets/scss/color.scss Datei anzeigen

@ -0,0 +1,4 @@
:root {
--primary: orange;
--secondary: #8ceaf6;
}

+ 38
- 0
assets/scss/global.scss Datei anzeigen

@ -0,0 +1,38 @@
@import './color.scss';
html {
font-size: 16px;
word-spacing: 1px;
-ms-text-size-adjust: 100%;
-webkit-text-size-adjust: 100%;
-moz-osx-font-smoothing: grayscale;
-webkit-font-smoothing: antialiased;
box-sizing: border-box;
}
body {
font-family: "Source Sans Pro", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
*, *:before, *:after {
box-sizing: border-box;
margin: 0;
}
a.btn-primary {
text-decoration: none;
background: none;
}
.btn, .pointer {
cursor: pointer;
}
.primary {
color: var(--primary);
}
.secondary {
color: var(--secondary);
}
.btn-primary {
background-color: var(--primary);
color: #fff;
}
.btn-secondary {
background-color: var(--secondary);
color: #000;
}

+ 6
- 0
components/README.md Datei anzeigen

@ -0,0 +1,6 @@
# COMPONENTS
The components directory contains your Vue.js Components.
Nuxt.js doesn't supercharge these components.
**This directory is not required, you can delete it if you don't want to use it.**

+ 8
- 0
layouts/README.md Datei anzeigen

@ -0,0 +1,8 @@
# LAYOUTS
This directory contains your Application Layouts.
More information about the usage of this directory in the documentation:
https://nuxtjs.org/guide/views#layouts
**This directory is not required, you can delete it if you don't want to use it.**

+ 5
- 0
layouts/default.vue Datei anzeigen

@ -0,0 +1,5 @@
<template>
<div>
<nuxt/>
</div>
</template>

+ 57
- 0
main.js Datei anzeigen

@ -0,0 +1,57 @@
/*
** Nuxt
*/
const http = require('http')
const { Nuxt, Builder } = require('nuxt')
let config = require('./nuxt.config.js')
config.rootDir = __dirname // for electron-builder
// Init Nuxt.js
const nuxt = new Nuxt(config)
const builder = new Builder(nuxt)
const server = http.createServer(nuxt.render)
// Build only in dev mode
if (config.dev) {
builder.build().catch(err => {
console.error(err) // eslint-disable-line no-console
process.exit(1)
})
}
// Listen the server
server.listen()
const _NUXT_URL_ = `http://localhost:${server.address().port}`
console.log(`Nuxt working on ${_NUXT_URL_}`)
/*
** Electron
*/
let win = null // Current window
const electron = require('electron')
const path = require('path')
const app = electron.app
const newWin = () => {
win = new electron.BrowserWindow({
icon: path.join(__dirname, 'static/icon.png'),
center: true,
width: 1024,
height: 565,
minWidth: 1024,
minHeight: 565,
frame: false
})
win.on('closed', () => win = null)
if (config.dev) {
// Install vue dev tool and open chrome dev tools
const { default: installExtension, VUEJS_DEVTOOLS } = require('electron-devtools-installer')
installExtension(VUEJS_DEVTOOLS.id).then(name => {
console.log(`Added Extension: ${name}`)
win.webContents.openDevTools({ detach: true })
}).catch(err => console.log('An error occurred: ', err))
// Wait for nuxt to build
nuxt.hook('build:done', () => {
win.loadURL(_NUXT_URL_)
})
} else { return win.loadURL(_NUXT_URL_) }
}
app.on('ready', newWin)
app.on('window-all-closed', () => app.quit())
app.on('activate', () => win === null && newWin())

+ 9
- 0
middleware/README.md Datei anzeigen

@ -0,0 +1,9 @@
# MIDDLEWARE
This directory contains your Application Middleware.
The middleware lets you define custom function to be ran before rendering a page or a group of pages (layouts).
More information about the usage of this directory in the documentation:
https://nuxtjs.org/guide/routing#middleware
**This directory is not required, you can delete it if you don't want to use it.**

+ 24
- 0
nuxt.config.js Datei anzeigen

@ -0,0 +1,24 @@
module.exports = {
mode: 'spa',
head: {title: 'prismediatoid'}, // Headers of the page
loading: false, // Disable default loading bar
build: {
extend (config, { isDev, isClient }) {
if (isDev && isClient) {
// Run ESLint on save
config.module.rules.push({
enforce: 'pre',
test: /\.(js|vue)$/,
loader: 'eslint-loader',
exclude: /(node_modules)/
})
}
// Extend only webpack config for client-bundle
if (isClient) { config.target = 'electron-renderer' }
}
},
dev: process.env.NODE_ENV === 'DEV',
css: [
'@/assets/css/global.css'
]
}

+ 10530
- 0
package-lock.json
Datei-Diff unterdrückt, da er zu groß ist
Datei anzeigen


+ 41
- 0
package.json Datei anzeigen

@ -0,0 +1,41 @@
{
"name": "prismediatoid",
"version": "0.6.2",
"description": "a GUI for prismedia, using Electron.",
"homepage": "https://git.lecygnenoir.info/rigelk/prismediatoid",
"author": "Rigel Kent <sendmemail@rigelk.eu>",
"private": true,
"main": "main.js",
"build": {
"appId": "org.framasoft.org",
"directories": {
"buildResources": "static"
},
"linux": {
"target": [
"deb",
"AppImage"
],
"category": "Network"
}
},
"scripts": {
"dev": "cross-env NODE_ENV=DEV electron .",
"build": "nuxt build && electron-builder"
},
"dependencies": {
"nuxt": "^2.4.3"
},
"devDependencies": {
"babel-eslint": "^10.0.1",
"cross-env": "^5.1.4",
"electron": "^4.0.5",
"electron-builder": "^20.38.5",
"electron-devtools-installer": "^2.2.3",
"eslint": "^5.14.0",
"eslint-friendly-formatter": "^4.0.1",
"eslint-loader": "^2.1.2",
"eslint-plugin-vue": "^5.2.2",
"vue-loader": "^15.6.2"
}
}

+ 7
- 0
pages/README.md Datei anzeigen

@ -0,0 +1,7 @@
# PAGES
This directory contains your Application Views and Routes.
The framework reads all the .vue files inside this directory and creates the router of your application.
More information about the usage of this directory in the documentation:
https://nuxtjs.org/guide/routing

+ 32
- 0
pages/index.vue Datei anzeigen

@ -0,0 +1,32 @@
<template>
<section class="container">
<div>
<h2>Your friendly uploader to PeerTube and other platforms.</h2>
login on your instance or <a href="https://instances.joinpeertube.org/" target="_blank" class="btn btn-primary">register on one first</a>.
</div>
</section>
</template>
<script>
export default {
}
</script>
<style scoped>
:root {
color: white;
}
a {
color: orange;
}
.container {
min-height: 100vh;
display: flex;
justify-content: center;
align-items: center;
text-align: center;
}
.btn {
margin: 0 8px;
}
</style>

+ 8
- 0
plugins/README.md Datei anzeigen

@ -0,0 +1,8 @@
# PLUGINS
This directory contains your Javascript plugins that you want to run before instantiating the root vue.js application.
More information about the usage of this directory in the documentation:
https://nuxtjs.org/guide/plugins
**This directory is not required, you can delete it if you don't want to use it.**

+ 11
- 0
static/README.md Datei anzeigen

@ -0,0 +1,11 @@
# STATIC
This directory contains your static files.
Each file inside this directory is mapped to /.
Example: /static/robots.txt is mapped as /robots.txt.
More information about the usage of this directory in the documentation:
https://nuxtjs.org/guide/assets#static
**This directory is not required, you can delete it if you don't want to use it.**

BIN
static/icon.png Datei anzeigen

Vorher Nachher
Breite: 512  |  Höhe: 512  |  Größe: 47 KiB

BIN
static/icons/512x512.png Datei anzeigen

Vorher Nachher
Breite: 512  |  Höhe: 512  |  Größe: 47 KiB

+ 10
- 0
store/README.md Datei anzeigen

@ -0,0 +1,10 @@
# STORE
This directory contains your Vuex Store files.
Vuex Store option is implemented in the Nuxt.js framework.
Creating a index.js file in this directory activate the option in the framework automatically.
More information about the usage of this directory in the documentation:
https://nuxtjs.org/guide/vuex-store
**This directory is not required, you can delete it if you don't want to use it.**

Laden…
Abbrechen
Speichern