mirror of
https://github.com/owntone/owntone-server.git
synced 2025-11-07 12:53:00 -05:00
Use relative paths in web interface to ease reolcation or proxying
This commit is contained in:
@@ -10,10 +10,10 @@
|
||||
<!-- <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bulma/0.7.1/css/bulma.min.css"> -->
|
||||
|
||||
<!-- Local libraries -->
|
||||
<link rel="stylesheet" href="/admin/vendor/fontawesome/css/all.min.css">
|
||||
<link rel="stylesheet" href="/admin/vendor/bulma/bulma.min.css">
|
||||
<link rel="stylesheet" href="admin/vendor/fontawesome/css/all.min.css">
|
||||
<link rel="stylesheet" href="admin/vendor/bulma/bulma.min.css">
|
||||
|
||||
<link rel="stylesheet" href="/admin/css/forked-daapd.css">
|
||||
<link rel="stylesheet" href="admin/css/forked-daapd.css">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
@@ -25,7 +25,7 @@
|
||||
-->
|
||||
<nav class="navbar">
|
||||
<div class="navbar-brand">
|
||||
<a class="navbar-item has-text-black" href="/">forked-daapd</a>
|
||||
<a class="navbar-item has-text-black" href="./">forked-daapd</a>
|
||||
<a class="navbar-item" href="https://github.com/ejurgensen/forked-daapd" title="GitHub"><i class="fab fa-github"></i></a>
|
||||
</div>
|
||||
</nav>
|
||||
@@ -281,9 +281,9 @@
|
||||
<!-- <script src="https://unpkg.com/axios@0.18.0/dist/axios.min.js"></script> -->
|
||||
|
||||
<!-- Local libraries -->
|
||||
<script src="/admin/vendor/vue/vue.min.js"></script>
|
||||
<script src="/admin/vendor/axios/axios.min.js"></script>
|
||||
<script src="/admin/js/forked-daapd.js"></script>
|
||||
<script src="admin/vendor/vue/vue.min.js"></script>
|
||||
<script src="admin/vendor/axios/axios.min.js"></script>
|
||||
<script src="admin/js/forked-daapd.js"></script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -35,43 +35,43 @@ var app = new Vue({
|
||||
|
||||
methods: {
|
||||
loadConfig: function() {
|
||||
axios.get('/api/config').then(response => {
|
||||
axios.get('./api/config').then(response => {
|
||||
this.config = response.data;
|
||||
this.connect()});
|
||||
},
|
||||
|
||||
loadLibrary: function() {
|
||||
axios.get('/api/library').then(response => this.library = response.data);
|
||||
axios.get('./api/library').then(response => this.library = response.data);
|
||||
},
|
||||
|
||||
loadOutputs: function() {
|
||||
axios.get('/api/outputs').then(response => this.outputs = response.data.outputs);
|
||||
axios.get('./api/outputs').then(response => this.outputs = response.data.outputs);
|
||||
},
|
||||
|
||||
loadSpotify: function() {
|
||||
axios.get('/api/spotify').then(response => this.spotify = response.data);
|
||||
axios.get('./api/spotify').then(response => this.spotify = response.data);
|
||||
},
|
||||
|
||||
loadPairing: function() {
|
||||
axios.get('/api/pairing').then(response => this.pairing = response.data);
|
||||
axios.get('./api/pairing').then(response => this.pairing = response.data);
|
||||
},
|
||||
|
||||
loadLastfm: function() {
|
||||
axios.get('/api/lastfm').then(response => this.lastfm = response.data);
|
||||
axios.get('./api/lastfm').then(response => this.lastfm = response.data);
|
||||
},
|
||||
|
||||
update: function() {
|
||||
this.library.updating = true;
|
||||
axios.put('/api/update').then(console.log('Library is updating'));
|
||||
axios.put('./api/update').then(console.log('Library is updating'));
|
||||
},
|
||||
|
||||
update_meta: function() {
|
||||
this.library.updating = true;
|
||||
axios.put('/api/rescan').then(console.log('Library is rescanning meta'));
|
||||
axios.put('./api/rescan').then(console.log('Library is rescanning meta'));
|
||||
},
|
||||
|
||||
kickoffPairing: function() {
|
||||
axios.post('/api/pairing', this.pairing_req).then(response => {
|
||||
axios.post('./api/pairing', this.pairing_req).then(response => {
|
||||
console.log('Kicked off pairing');
|
||||
if (!this.config.websocket_port) {
|
||||
this.pairing = {};
|
||||
@@ -80,7 +80,7 @@ var app = new Vue({
|
||||
},
|
||||
|
||||
kickoffVerification: function() {
|
||||
axios.post('/api/verification', this.verification_req).then(response => {
|
||||
axios.post('./api/verification', this.verification_req).then(response => {
|
||||
console.log('Kicked off verification');
|
||||
this.verification_req.pin = '';
|
||||
});
|
||||
@@ -94,7 +94,7 @@ var app = new Vue({
|
||||
}
|
||||
}
|
||||
|
||||
axios.put('/api/outputs/set', { outputs: selected_outputs }).then(response => {
|
||||
axios.put('./api/outputs/set', { outputs: selected_outputs }).then(response => {
|
||||
if (!this.config.websocket_port) {
|
||||
this.loadOutputs();
|
||||
}
|
||||
@@ -102,7 +102,7 @@ var app = new Vue({
|
||||
},
|
||||
|
||||
loginLibspotify: function() {
|
||||
axios.post('/api/spotify-login', this.libspotify).then(response => {
|
||||
axios.post('./api/spotify-login', this.libspotify).then(response => {
|
||||
this.libspotify.user = '';
|
||||
this.libspotify.password = '';
|
||||
this.libspotify.errors.user = '';
|
||||
@@ -117,7 +117,7 @@ var app = new Vue({
|
||||
},
|
||||
|
||||
loginLastfm: function() {
|
||||
axios.post('/api/lastfm-login', this.lastfm_login).then(response => {
|
||||
axios.post('./api/lastfm-login', this.lastfm_login).then(response => {
|
||||
this.lastfm_login.user = '';
|
||||
this.lastfm_login.password = '';
|
||||
this.lastfm_login.errors.user = '';
|
||||
@@ -132,7 +132,7 @@ var app = new Vue({
|
||||
},
|
||||
|
||||
logoutLastfm: function() {
|
||||
axios.get('/api/lastfm-logout', this.lastfm_login).then(response => {
|
||||
axios.get('./api/lastfm-logout', this.lastfm_login).then(response => {
|
||||
if (!this.config.websocket_port) {
|
||||
this.loadLastfm();
|
||||
}
|
||||
|
||||
@@ -1 +1 @@
|
||||
<!DOCTYPE html><html class="has-navbar-fixed-top has-navbar-fixed-bottom"><head><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><title>forked-daapd-web 2</title><link rel=apple-touch-icon sizes=120x120 href=/apple-touch-icon.png?ver1.1><link rel=icon type=image/png sizes=32x32 href=/favicon-32x32.png><link rel=icon type=image/png sizes=16x16 href=/favicon-16x16.png><link rel=manifest href=/site.webmanifest><link rel=mask-icon href=/safari-pinned-tab.svg color=#5bbad5><meta name=msapplication-TileColor content=#da532c><meta name=theme-color content=#ffffff><link href=/player/css/app.css rel=preload as=style><link href=/player/css/chunk-vendors.css rel=preload as=style><link href=/player/js/app.js rel=modulepreload as=script><link href=/player/js/chunk-vendors.js rel=modulepreload as=script><link href=/player/css/chunk-vendors.css rel=stylesheet><link href=/player/css/app.css rel=stylesheet></head><body><div id=app></div><script type=module src=/player/js/chunk-vendors.js></script><script type=module src=/player/js/app.js></script><script>!function(){var e=document,t=e.createElement("script");if(!("noModule"in t)&&"onbeforeload"in t){var n=!1;e.addEventListener("beforeload",function(e){if(e.target===t)n=!0;else if(!e.target.hasAttribute("nomodule")||!n)return;e.preventDefault()},!0),t.type="module",t.src=".",e.head.appendChild(t),t.remove()}}();</script><script src=/player/js/chunk-vendors-legacy.js nomodule></script><script src=/player/js/app-legacy.js nomodule></script></body></html>
|
||||
<!DOCTYPE html><html class="has-navbar-fixed-top has-navbar-fixed-bottom"><head><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><title>forked-daapd-web 2</title><link rel=apple-touch-icon sizes=120x120 href=apple-touch-icon.png?ver1.1><link rel=icon type=image/png sizes=32x32 href=favicon-32x32.png><link rel=icon type=image/png sizes=16x16 href=favicon-16x16.png><link rel=manifest href=site.webmanifest><link rel=mask-icon href=safari-pinned-tab.svg color=#5bbad5><meta name=msapplication-TileColor content=#da532c><meta name=theme-color content=#ffffff><link href=player/css/app.css rel=preload as=style><link href=player/css/chunk-vendors.css rel=preload as=style><link href=player/js/app.js rel=modulepreload as=script><link href=player/js/chunk-vendors.js rel=modulepreload as=script><link href=player/css/chunk-vendors.css rel=stylesheet><link href=player/css/app.css rel=stylesheet></head><body><div id=app></div><script type=module src=player/js/chunk-vendors.js></script><script type=module src=player/js/app.js></script><script>!function(){var e=document,t=e.createElement("script");if(!("noModule"in t)&&"onbeforeload"in t){var n=!1;e.addEventListener("beforeload",function(e){if(e.target===t)n=!0;else if(!e.target.hasAttribute("nomodule")||!n)return;e.preventDefault()},!0),t.type="module",t.src=".",e.head.appendChild(t),t.remove()}}();</script><script src=player/js/chunk-vendors-legacy.js nomodule></script><script src=player/js/app-legacy.js nomodule></script></body></html>
|
||||
Reference in New Issue
Block a user