prepare for sharing functionality
All checks were successful
continuous-integration/drone Build is passing
All checks were successful
continuous-integration/drone Build is passing
This commit is contained in:
parent
a22bb67d23
commit
dc83bd6c65
@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<div id="app">
|
<div id="app">
|
||||||
<nav
|
<nav
|
||||||
v-show="$route.path != '/login' && $route.path != '/setup'"
|
v-show="$route.path != '/login' && $route.path != '/setup' && $route.path != '/share' "
|
||||||
:class="{ slideOverTop: $store.getters.isDialogOpen }"
|
:class="{ slideOverTop: $store.getters.isDialogOpen }"
|
||||||
>
|
>
|
||||||
<div>
|
<div>
|
||||||
|
@ -102,7 +102,6 @@ import { mapGetters } from "vuex";
|
|||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
move: 152,
|
|
||||||
albums: [],
|
albums: [],
|
||||||
scrollTimer: 0,
|
scrollTimer: 0,
|
||||||
loadingPrev: false,
|
loadingPrev: false,
|
||||||
@ -110,11 +109,6 @@ export default {
|
|||||||
elements: {},
|
elements: {},
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
mounted() {
|
|
||||||
if (window.innerWidth <= 480 || window.innerHeight <= 480) {
|
|
||||||
this.move = 120;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
methods: {
|
methods: {
|
||||||
dblclick() {
|
dblclick() {
|
||||||
this.$store.commit("tracks/resetSelectedTrack");
|
this.$store.commit("tracks/resetSelectedTrack");
|
||||||
|
@ -7,6 +7,7 @@ import RadiosView from "./views/Radios";
|
|||||||
import BoxesView from "./views/Boxes";
|
import BoxesView from "./views/Boxes";
|
||||||
import SearchView from "./views/Search";
|
import SearchView from "./views/Search";
|
||||||
import SetupView from "./views/Setup";
|
import SetupView from "./views/Setup";
|
||||||
|
import ShareView from "./views/Share";
|
||||||
import HomeView from "./views/Home";
|
import HomeView from "./views/Home";
|
||||||
import UsersView from "./views/Users";
|
import UsersView from "./views/Users";
|
||||||
import FavouritesView from "./views/Favourites"
|
import FavouritesView from "./views/Favourites"
|
||||||
@ -56,6 +57,10 @@ const routes = [
|
|||||||
path: "/setup",
|
path: "/setup",
|
||||||
component: SetupView
|
component: SetupView
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
path: "/share",
|
||||||
|
component: ShareView
|
||||||
|
},
|
||||||
{
|
{
|
||||||
path: "/me",
|
path: "/me",
|
||||||
component: UsersView
|
component: UsersView
|
||||||
|
@ -15,6 +15,7 @@ import user from "./modules/user"
|
|||||||
import videos from "./modules/videos"
|
import videos from "./modules/videos"
|
||||||
import system from "./modules/system"
|
import system from "./modules/system"
|
||||||
import search from "./modules/search"
|
import search from "./modules/search"
|
||||||
|
import share from "./modules/share"
|
||||||
|
|
||||||
export default createStore({
|
export default createStore({
|
||||||
state,
|
state,
|
||||||
@ -31,6 +32,7 @@ export default createStore({
|
|||||||
user,
|
user,
|
||||||
videos,
|
videos,
|
||||||
system,
|
system,
|
||||||
search
|
search,
|
||||||
|
share
|
||||||
}
|
}
|
||||||
})
|
})
|
9
src/store/modules/share/actions.js
Normal file
9
src/store/modules/share/actions.js
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
import axios from 'axios'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
get(context, id) {
|
||||||
|
axios.get(context.rootGetters.server + "/api/shares/" + id, context.rootGetters.headers).then((res) => {
|
||||||
|
console.log(res);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
}
|
9
src/store/modules/share/index.js
Normal file
9
src/store/modules/share/index.js
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
//import state from './state.js';
|
||||||
|
//import getters from './getters.js';
|
||||||
|
//import mutations from './mutations.js';
|
||||||
|
import actions from './actions.js';
|
||||||
|
|
||||||
|
export default {
|
||||||
|
namespaced: true,
|
||||||
|
actions
|
||||||
|
}
|
16
src/views/Share.vue
Normal file
16
src/views/Share.vue
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
<template>
|
||||||
|
<div ref="share" id="share"></div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
name: "ShareView",
|
||||||
|
mounted() {
|
||||||
|
if (this.$route.query.id) {
|
||||||
|
this.$store.dispatch("share/get", this.$route.query.id);
|
||||||
|
} else {
|
||||||
|
this.$router.replace("/");
|
||||||
|
}
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
Loading…
Reference in New Issue
Block a user