2020-09-02 18:34:50 +00:00
|
|
|
import type { NuxtConfig } from '@nuxt/types';
|
|
|
|
|
|
|
|
const config: NuxtConfig = {
|
|
|
|
/*
|
|
|
|
** Nuxt rendering mode
|
|
|
|
** See https://nuxtjs.org/api/configuration-mode
|
|
|
|
*/
|
2020-09-03 05:39:00 +00:00
|
|
|
mode: 'spa',
|
2020-09-02 18:34:50 +00:00
|
|
|
/*
|
|
|
|
** Nuxt target
|
|
|
|
** See https://nuxtjs.org/api/configuration-target
|
|
|
|
*/
|
2020-09-03 05:57:42 +00:00
|
|
|
target: 'server',
|
2020-09-02 18:34:50 +00:00
|
|
|
/*
|
|
|
|
** Headers of the page
|
|
|
|
** See https://nuxtjs.org/api/configuration-head
|
|
|
|
*/
|
|
|
|
head: {
|
|
|
|
titleTemplate: '%s - ' + process.env.npm_package_name,
|
|
|
|
title: process.env.npm_package_name || '',
|
|
|
|
meta: [
|
|
|
|
{ charset: 'utf-8' },
|
|
|
|
{ name: 'viewport', content: 'width=device-width, initial-scale=1' },
|
|
|
|
{
|
|
|
|
hid: 'description',
|
|
|
|
name: 'description',
|
|
|
|
content: process.env.npm_package_description || ''
|
|
|
|
}
|
|
|
|
],
|
|
|
|
link: [{ rel: 'icon', type: 'image/x-icon', href: '/favicon.ico' }]
|
|
|
|
},
|
|
|
|
/*
|
|
|
|
** Global CSS
|
|
|
|
*/
|
2020-09-03 15:24:56 +00:00
|
|
|
css: ['@mdi/font/css/materialdesignicons.css'],
|
2020-09-02 18:34:50 +00:00
|
|
|
/*
|
|
|
|
** Plugins to load before mounting the App
|
|
|
|
** https://nuxtjs.org/guide/plugins
|
|
|
|
*/
|
|
|
|
plugins: [],
|
|
|
|
/*
|
|
|
|
** Auto import components
|
|
|
|
** See https://nuxtjs.org/api/configuration-components
|
|
|
|
*/
|
|
|
|
components: true,
|
|
|
|
/*
|
|
|
|
** Nuxt.js dev-modules
|
|
|
|
*/
|
|
|
|
buildModules: [
|
|
|
|
'@nuxt/typescript-build',
|
|
|
|
// Doc: https://github.com/nuxt-community/stylelint-module
|
|
|
|
'@nuxtjs/stylelint-module',
|
|
|
|
'@nuxtjs/vuetify'
|
|
|
|
],
|
|
|
|
/*
|
|
|
|
** Nuxt.js modules
|
|
|
|
*/
|
|
|
|
modules: [
|
|
|
|
// Doc: https://axios.nuxtjs.org/usage
|
|
|
|
'@nuxtjs/axios',
|
2020-09-02 22:05:48 +00:00
|
|
|
'@nuxtjs/auth-next',
|
2020-09-02 18:34:50 +00:00
|
|
|
'@nuxtjs/pwa'
|
|
|
|
],
|
2020-09-02 22:05:48 +00:00
|
|
|
/*
|
|
|
|
** Router configuration
|
|
|
|
*/
|
|
|
|
router: {
|
|
|
|
middleware: ['auth']
|
|
|
|
},
|
2020-09-02 18:34:50 +00:00
|
|
|
/*
|
|
|
|
** Axios module configuration
|
|
|
|
** See https://axios.nuxtjs.org/options
|
|
|
|
*/
|
|
|
|
axios: {},
|
2020-09-02 22:05:48 +00:00
|
|
|
/*
|
|
|
|
** Axios-based Authentication
|
|
|
|
** See https://auth.nuxtjs.org/schemes/local.html#options
|
|
|
|
*/
|
|
|
|
auth: {
|
2020-09-03 14:50:23 +00:00
|
|
|
redirect: {
|
|
|
|
login: '/login',
|
|
|
|
logout: '/login',
|
|
|
|
callback: false,
|
|
|
|
home: '/'
|
|
|
|
},
|
2020-09-02 22:05:48 +00:00
|
|
|
strategies: {
|
|
|
|
local: {
|
2020-09-03 14:50:23 +00:00
|
|
|
scheme: 'local',
|
2020-09-02 22:05:48 +00:00
|
|
|
endpoints: {
|
|
|
|
login: {
|
|
|
|
url: '/Users/authenticatebyname',
|
|
|
|
method: 'post',
|
|
|
|
propertyName: false,
|
|
|
|
headers: {
|
|
|
|
Accept: 'application/json;profile="CamelCase"',
|
|
|
|
'Content-Type': 'application/json',
|
|
|
|
'X-Emby-Authorization':
|
|
|
|
'MediaBrowser Client="Jellyfin Web", Device="Firefox", DeviceId="TW96aWxsYS81LjAgKFgxMTsgTGludXggeDg2XzY0OyBydjo3Ny4wKSBHZWNrby8yMDEwMDEwMSBGaXJlZm94Lzc3LjB8MTU5NTQ1MTYzMzE4OQ11", Version="10.7.0"'
|
|
|
|
}
|
|
|
|
},
|
2020-09-03 14:50:23 +00:00
|
|
|
logout: {
|
|
|
|
url: '/Sessions/Logout',
|
|
|
|
method: 'post',
|
|
|
|
propertyName: false,
|
|
|
|
headers: {
|
|
|
|
Accept: 'application/json;profile="CamelCase"',
|
|
|
|
'Content-Type': 'application/json'
|
|
|
|
}
|
|
|
|
},
|
2020-09-02 22:05:48 +00:00
|
|
|
user: false
|
|
|
|
},
|
2020-09-03 14:50:23 +00:00
|
|
|
// TODO: Figure out which token settings are REALLY needed
|
|
|
|
// FIXME: Duplicate authorization header: "Authorization" and "X-Emby-Authorization"
|
2020-09-02 22:05:48 +00:00
|
|
|
tokenName: 'X-Emby-Authorization',
|
2020-09-03 14:50:23 +00:00
|
|
|
tokenType: '',
|
|
|
|
tokenRequired: true,
|
|
|
|
globalToken: true,
|
2020-09-02 22:05:48 +00:00
|
|
|
changeOrigin: true,
|
2020-09-03 14:50:23 +00:00
|
|
|
autoFetchUser: false,
|
|
|
|
token: {
|
|
|
|
type: false
|
|
|
|
},
|
|
|
|
refreshToken: {
|
|
|
|
type: false
|
|
|
|
}
|
2020-09-02 22:05:48 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
2020-09-02 18:34:50 +00:00
|
|
|
/*
|
|
|
|
** vuetify module configuration
|
|
|
|
** https://github.com/nuxt-community/vuetify-module
|
|
|
|
*/
|
|
|
|
vuetify: {
|
|
|
|
customVariables: ['~/assets/variables.scss'],
|
2020-09-03 15:24:56 +00:00
|
|
|
defaultAssets: false,
|
2020-09-02 18:34:50 +00:00
|
|
|
theme: {
|
|
|
|
dark: true
|
|
|
|
}
|
|
|
|
},
|
|
|
|
/*
|
|
|
|
** Build configuration
|
|
|
|
** See https://nuxtjs.org/api/configuration-build/
|
|
|
|
*/
|
|
|
|
build: {}
|
|
|
|
};
|
|
|
|
|
|
|
|
export default config;
|