ソースを参照

initial commit, with working template app

master
コミット
80a677e0e4
署名者: rigelk GPGキーID: EA12971B0E438F36
24個のファイルの変更10896行の追加0行の削除
  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. バイナリ
      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. バイナリ
      static/icon.png
  23. バイナリ
      static/icons/512x512.png
  24. +10
    -0
      store/README.md

+ 24
- 0
.eslintrc.js ファイルの表示

@ -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 ファイルの表示

@ -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 ファイルの表示

@ -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 ファイルの表示

@ -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 ファイルの表示

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

+ 38
- 0
assets/css/global.css ファイルの表示

@ -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;
}

バイナリ
assets/img/logo.png ファイルの表示

変更前 変更後
幅: 512  |  高さ: 512  |  サイズ: 47 KiB

+ 4
- 0
assets/scss/color.scss ファイルの表示

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

+ 38
- 0
assets/scss/global.scss ファイルの表示

@ -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 ファイルの表示

@ -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 ファイルの表示

@ -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 ファイルの表示

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

+ 57
- 0
main.js ファイルの表示

@ -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 ファイルの表示

@ -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 ファイルの表示

@ -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
ファイル差分が大きすぎるため省略します
ファイルの表示


+ 41
- 0
package.json ファイルの表示

@ -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 ファイルの表示

@ -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 ファイルの表示

@ -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 ファイルの表示

@ -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 ファイルの表示

@ -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.**

バイナリ
static/icon.png ファイルの表示

変更前 変更後
幅: 512  |  高さ: 512  |  サイズ: 47 KiB

バイナリ
static/icons/512x512.png ファイルの表示

変更前 変更後
幅: 512  |  高さ: 512  |  サイズ: 47 KiB

+ 10
- 0
store/README.md ファイルの表示

@ -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.**

読み込み中…
キャンセル
保存