mirror of
https://git.mirrors.martin98.com/https://github.com/sub-store-org/Sub-Store.git
synced 2025-08-09 23:59:01 +08:00
Add some components
This commit is contained in:
parent
0a11261eee
commit
8cec472812
108
backend/.idea/workspace.xml
generated
108
backend/.idea/workspace.xml
generated
@ -20,23 +20,15 @@
|
||||
</component>
|
||||
<component name="ChangeListManager">
|
||||
<list default="true" id="8b97a098-48b2-4e64-a9ef-522fe2d30b52" name="Default Changelist" comment="">
|
||||
<change afterPath="$PROJECT_DIR$/../web/src/store/index.js" afterDir="false" />
|
||||
<change afterPath="$PROJECT_DIR$/../web/src/utils/index.js" afterDir="false" />
|
||||
<change afterPath="$PROJECT_DIR$/../web/src/views/CollectionEditor.vue" afterDir="false" />
|
||||
<change afterPath="$PROJECT_DIR$/../web/src/views/PopUpProxyList.vue" afterDir="false" />
|
||||
<change afterPath="$PROJECT_DIR$/../web/src/views/SubEditor.vue" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/sub-store.js" beforeDir="false" afterPath="$PROJECT_DIR$/sub-store.js" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/../web/package-lock.json" beforeDir="false" afterPath="$PROJECT_DIR$/../web/package-lock.json" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/../web/package.json" beforeDir="false" afterPath="$PROJECT_DIR$/../web/package.json" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/../web/src/App.vue" beforeDir="false" afterPath="$PROJECT_DIR$/../web/src/App.vue" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/../web/src/components/BottomNav.vue" beforeDir="false" afterPath="$PROJECT_DIR$/../web/src/components/BottomNav.vue" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/../web/src/components/TopToolbar.vue" beforeDir="false" afterPath="$PROJECT_DIR$/../web/src/components/TopToolbar.vue" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/../web/src/main.js" beforeDir="false" afterPath="$PROJECT_DIR$/../web/src/main.js" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/../web/src/router/index.js" beforeDir="false" afterPath="$PROJECT_DIR$/../web/src/router/index.js" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/../web/src/views/Dashboard.vue" beforeDir="false" afterPath="$PROJECT_DIR$/../web/src/views/Dashboard.vue" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/../web/src/store/index.js" beforeDir="false" afterPath="$PROJECT_DIR$/../web/src/store/index.js" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/../web/src/views/Subscription.vue" beforeDir="false" afterPath="$PROJECT_DIR$/../web/src/views/Subscription.vue" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/../web/src/views/User.vue" beforeDir="false" afterPath="$PROJECT_DIR$/../web/src/views/User.vue" afterDir="false" />
|
||||
</list>
|
||||
<option name="SHOW_DIALOG" value="false" />
|
||||
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
||||
@ -87,6 +79,8 @@
|
||||
<workItem from="1597902241253" duration="776000" />
|
||||
<workItem from="1598004165212" duration="400000" />
|
||||
<workItem from="1598099373952" duration="2155000" />
|
||||
<workItem from="1598154135550" duration="297000" />
|
||||
<workItem from="1598154453014" duration="923000" />
|
||||
</task>
|
||||
<servers />
|
||||
</component>
|
||||
@ -106,85 +100,85 @@
|
||||
<option name="oldMeFiltersMigrated" value="true" />
|
||||
</component>
|
||||
<component name="WindowStateProjectService">
|
||||
<state width="840" height="374" key="GridCell.Tab.0.bottom" timestamp="1598115358068">
|
||||
<screen x="0" y="0" width="1792" height="1120" />
|
||||
<state width="840" height="374" key="GridCell.Tab.0.bottom" timestamp="1598154511980">
|
||||
<screen x="70" y="23" width="1722" height="1097" />
|
||||
</state>
|
||||
<state width="840" height="374" key="GridCell.Tab.0.bottom/0.0.1792.1120@0.0.1792.1120" timestamp="1598115358068" />
|
||||
<state width="840" height="303" key="GridCell.Tab.0.bottom/70.23.1722.1097@70.23.1722.1097" timestamp="1598100552976" />
|
||||
<state width="840" height="374" key="GridCell.Tab.0.center" timestamp="1598115358067">
|
||||
<screen x="0" y="0" width="1792" height="1120" />
|
||||
<state width="840" height="374" key="GridCell.Tab.0.bottom/70.23.1722.1097@70.23.1722.1097" timestamp="1598154511980" />
|
||||
<state width="840" height="374" key="GridCell.Tab.0.center" timestamp="1598154511979">
|
||||
<screen x="70" y="23" width="1722" height="1097" />
|
||||
</state>
|
||||
<state width="840" height="374" key="GridCell.Tab.0.center/0.0.1792.1120@0.0.1792.1120" timestamp="1598115358067" />
|
||||
<state width="840" height="303" key="GridCell.Tab.0.center/70.23.1722.1097@70.23.1722.1097" timestamp="1598100552975" />
|
||||
<state width="840" height="374" key="GridCell.Tab.0.left" timestamp="1598115358067">
|
||||
<screen x="0" y="0" width="1792" height="1120" />
|
||||
<state width="840" height="374" key="GridCell.Tab.0.center/70.23.1722.1097@70.23.1722.1097" timestamp="1598154511979" />
|
||||
<state width="840" height="374" key="GridCell.Tab.0.left" timestamp="1598154511979">
|
||||
<screen x="70" y="23" width="1722" height="1097" />
|
||||
</state>
|
||||
<state width="840" height="374" key="GridCell.Tab.0.left/0.0.1792.1120@0.0.1792.1120" timestamp="1598115358067" />
|
||||
<state width="840" height="303" key="GridCell.Tab.0.left/70.23.1722.1097@70.23.1722.1097" timestamp="1598100552974" />
|
||||
<state width="840" height="374" key="GridCell.Tab.0.right" timestamp="1598115358068">
|
||||
<screen x="0" y="0" width="1792" height="1120" />
|
||||
<state width="840" height="374" key="GridCell.Tab.0.left/70.23.1722.1097@70.23.1722.1097" timestamp="1598154511979" />
|
||||
<state width="840" height="374" key="GridCell.Tab.0.right" timestamp="1598154511980">
|
||||
<screen x="70" y="23" width="1722" height="1097" />
|
||||
</state>
|
||||
<state width="840" height="374" key="GridCell.Tab.0.right/0.0.1792.1120@0.0.1792.1120" timestamp="1598115358068" />
|
||||
<state width="840" height="303" key="GridCell.Tab.0.right/70.23.1722.1097@70.23.1722.1097" timestamp="1598100552975" />
|
||||
<state width="840" height="374" key="GridCell.Tab.1.bottom" timestamp="1598115358069">
|
||||
<screen x="0" y="0" width="1792" height="1120" />
|
||||
<state width="840" height="374" key="GridCell.Tab.0.right/70.23.1722.1097@70.23.1722.1097" timestamp="1598154511980" />
|
||||
<state width="840" height="374" key="GridCell.Tab.1.bottom" timestamp="1598154432354">
|
||||
<screen x="70" y="23" width="1722" height="1097" />
|
||||
</state>
|
||||
<state width="840" height="374" key="GridCell.Tab.1.bottom/0.0.1792.1120@0.0.1792.1120" timestamp="1598115358069" />
|
||||
<state width="840" height="374" key="GridCell.Tab.1.bottom/70.23.1722.1097@70.23.1722.1097" timestamp="1598099904581" />
|
||||
<state width="840" height="374" key="GridCell.Tab.1.center" timestamp="1598115358069">
|
||||
<screen x="0" y="0" width="1792" height="1120" />
|
||||
<state width="840" height="374" key="GridCell.Tab.1.bottom/70.23.1722.1097@70.23.1722.1097" timestamp="1598154432354" />
|
||||
<state width="840" height="374" key="GridCell.Tab.1.center" timestamp="1598154432353">
|
||||
<screen x="70" y="23" width="1722" height="1097" />
|
||||
</state>
|
||||
<state width="840" height="374" key="GridCell.Tab.1.center/0.0.1792.1120@0.0.1792.1120" timestamp="1598115358069" />
|
||||
<state width="840" height="374" key="GridCell.Tab.1.center/70.23.1722.1097@70.23.1722.1097" timestamp="1598099904581" />
|
||||
<state width="840" height="374" key="GridCell.Tab.1.left" timestamp="1598115358069">
|
||||
<screen x="0" y="0" width="1792" height="1120" />
|
||||
<state width="840" height="374" key="GridCell.Tab.1.center/70.23.1722.1097@70.23.1722.1097" timestamp="1598154432353" />
|
||||
<state width="840" height="374" key="GridCell.Tab.1.left" timestamp="1598154432352">
|
||||
<screen x="70" y="23" width="1722" height="1097" />
|
||||
</state>
|
||||
<state width="840" height="374" key="GridCell.Tab.1.left/0.0.1792.1120@0.0.1792.1120" timestamp="1598115358069" />
|
||||
<state width="840" height="374" key="GridCell.Tab.1.left/70.23.1722.1097@70.23.1722.1097" timestamp="1598099904581" />
|
||||
<state width="840" height="374" key="GridCell.Tab.1.right" timestamp="1598115358069">
|
||||
<screen x="0" y="0" width="1792" height="1120" />
|
||||
<state width="840" height="374" key="GridCell.Tab.1.left/70.23.1722.1097@70.23.1722.1097" timestamp="1598154432352" />
|
||||
<state width="840" height="374" key="GridCell.Tab.1.right" timestamp="1598154432353">
|
||||
<screen x="70" y="23" width="1722" height="1097" />
|
||||
</state>
|
||||
<state width="840" height="374" key="GridCell.Tab.1.right/0.0.1792.1120@0.0.1792.1120" timestamp="1598115358069" />
|
||||
<state width="840" height="374" key="GridCell.Tab.1.right/70.23.1722.1097@70.23.1722.1097" timestamp="1598099904581" />
|
||||
<state width="840" height="374" key="GridCell.Tab.2.bottom" timestamp="1598115358071">
|
||||
<screen x="0" y="0" width="1792" height="1120" />
|
||||
<state width="840" height="374" key="GridCell.Tab.1.right/70.23.1722.1097@70.23.1722.1097" timestamp="1598154432353" />
|
||||
<state width="840" height="374" key="GridCell.Tab.2.bottom" timestamp="1598154432356">
|
||||
<screen x="70" y="23" width="1722" height="1097" />
|
||||
</state>
|
||||
<state width="840" height="374" key="GridCell.Tab.2.bottom/0.0.1792.1120@0.0.1792.1120" timestamp="1598115358071" />
|
||||
<state width="840" height="374" key="GridCell.Tab.2.bottom/70.23.1722.1097@70.23.1722.1097" timestamp="1598099904582" />
|
||||
<state width="840" height="374" key="GridCell.Tab.2.center" timestamp="1598115358070">
|
||||
<screen x="0" y="0" width="1792" height="1120" />
|
||||
<state width="840" height="374" key="GridCell.Tab.2.bottom/70.23.1722.1097@70.23.1722.1097" timestamp="1598154432356" />
|
||||
<state width="840" height="374" key="GridCell.Tab.2.center" timestamp="1598154432355">
|
||||
<screen x="70" y="23" width="1722" height="1097" />
|
||||
</state>
|
||||
<state width="840" height="374" key="GridCell.Tab.2.center/0.0.1792.1120@0.0.1792.1120" timestamp="1598115358070" />
|
||||
<state width="840" height="374" key="GridCell.Tab.2.center/70.23.1722.1097@70.23.1722.1097" timestamp="1598099904582" />
|
||||
<state width="840" height="374" key="GridCell.Tab.2.left" timestamp="1598115358070">
|
||||
<screen x="0" y="0" width="1792" height="1120" />
|
||||
<state width="840" height="374" key="GridCell.Tab.2.center/70.23.1722.1097@70.23.1722.1097" timestamp="1598154432355" />
|
||||
<state width="840" height="374" key="GridCell.Tab.2.left" timestamp="1598154432354">
|
||||
<screen x="70" y="23" width="1722" height="1097" />
|
||||
</state>
|
||||
<state width="840" height="374" key="GridCell.Tab.2.left/0.0.1792.1120@0.0.1792.1120" timestamp="1598115358070" />
|
||||
<state width="840" height="374" key="GridCell.Tab.2.left/70.23.1722.1097@70.23.1722.1097" timestamp="1598099904581" />
|
||||
<state width="840" height="374" key="GridCell.Tab.2.right" timestamp="1598115358070">
|
||||
<screen x="0" y="0" width="1792" height="1120" />
|
||||
<state width="840" height="374" key="GridCell.Tab.2.left/70.23.1722.1097@70.23.1722.1097" timestamp="1598154432354" />
|
||||
<state width="840" height="374" key="GridCell.Tab.2.right" timestamp="1598154432355">
|
||||
<screen x="70" y="23" width="1722" height="1097" />
|
||||
</state>
|
||||
<state width="840" height="374" key="GridCell.Tab.2.right/0.0.1792.1120@0.0.1792.1120" timestamp="1598115358070" />
|
||||
<state width="840" height="374" key="GridCell.Tab.2.right/70.23.1722.1097@70.23.1722.1097" timestamp="1598099904582" />
|
||||
<state width="840" height="374" key="GridCell.Tab.3.bottom" timestamp="1598115358072">
|
||||
<screen x="0" y="0" width="1792" height="1120" />
|
||||
<state width="840" height="374" key="GridCell.Tab.2.right/70.23.1722.1097@70.23.1722.1097" timestamp="1598154432355" />
|
||||
<state width="840" height="374" key="GridCell.Tab.3.bottom" timestamp="1598154432357">
|
||||
<screen x="70" y="23" width="1722" height="1097" />
|
||||
</state>
|
||||
<state width="840" height="374" key="GridCell.Tab.3.bottom/0.0.1792.1120@0.0.1792.1120" timestamp="1598115358072" />
|
||||
<state width="840" height="374" key="GridCell.Tab.3.bottom/70.23.1722.1097@70.23.1722.1097" timestamp="1598099904582" />
|
||||
<state width="840" height="374" key="GridCell.Tab.3.center" timestamp="1598115358071">
|
||||
<screen x="0" y="0" width="1792" height="1120" />
|
||||
<state width="840" height="374" key="GridCell.Tab.3.bottom/70.23.1722.1097@70.23.1722.1097" timestamp="1598154432357" />
|
||||
<state width="840" height="374" key="GridCell.Tab.3.center" timestamp="1598154432356">
|
||||
<screen x="70" y="23" width="1722" height="1097" />
|
||||
</state>
|
||||
<state width="840" height="374" key="GridCell.Tab.3.center/0.0.1792.1120@0.0.1792.1120" timestamp="1598115358071" />
|
||||
<state width="840" height="374" key="GridCell.Tab.3.center/70.23.1722.1097@70.23.1722.1097" timestamp="1598099904582" />
|
||||
<state width="840" height="374" key="GridCell.Tab.3.left" timestamp="1598115358071">
|
||||
<screen x="0" y="0" width="1792" height="1120" />
|
||||
<state width="840" height="374" key="GridCell.Tab.3.center/70.23.1722.1097@70.23.1722.1097" timestamp="1598154432356" />
|
||||
<state width="840" height="374" key="GridCell.Tab.3.left" timestamp="1598154432356">
|
||||
<screen x="70" y="23" width="1722" height="1097" />
|
||||
</state>
|
||||
<state width="840" height="374" key="GridCell.Tab.3.left/0.0.1792.1120@0.0.1792.1120" timestamp="1598115358071" />
|
||||
<state width="840" height="374" key="GridCell.Tab.3.left/70.23.1722.1097@70.23.1722.1097" timestamp="1598099904582" />
|
||||
<state width="840" height="374" key="GridCell.Tab.3.right" timestamp="1598115358072">
|
||||
<screen x="0" y="0" width="1792" height="1120" />
|
||||
<state width="840" height="374" key="GridCell.Tab.3.left/70.23.1722.1097@70.23.1722.1097" timestamp="1598154432356" />
|
||||
<state width="840" height="374" key="GridCell.Tab.3.right" timestamp="1598154432357">
|
||||
<screen x="70" y="23" width="1722" height="1097" />
|
||||
</state>
|
||||
<state width="840" height="374" key="GridCell.Tab.3.right/0.0.1792.1120@0.0.1792.1120" timestamp="1598115358072" />
|
||||
<state width="840" height="374" key="GridCell.Tab.3.right/70.23.1722.1097@70.23.1722.1097" timestamp="1598099904582" />
|
||||
<state width="840" height="374" key="GridCell.Tab.3.right/70.23.1722.1097@70.23.1722.1097" timestamp="1598154432357" />
|
||||
</component>
|
||||
</project>
|
5
web/package-lock.json
generated
5
web/package-lock.json
generated
@ -10888,6 +10888,11 @@
|
||||
"integrity": "sha1-sj5DWK+oogL+ehAK8fX4g/AgB+4=",
|
||||
"dev": true
|
||||
},
|
||||
"v-clipboard": {
|
||||
"version": "2.2.3",
|
||||
"resolved": "https://registry.npmjs.org/v-clipboard/-/v-clipboard-2.2.3.tgz",
|
||||
"integrity": "sha512-Wg+ObZoYK6McHb5OOCFWvm0R7xHp0/p0G1ocx/8bO22jvA/yVY05rADbfiztwCokXBNfQuGv/XSd1ozcTFgekw=="
|
||||
},
|
||||
"v8-compile-cache": {
|
||||
"version": "2.1.1",
|
||||
"resolved": "https://registry.npm.taobao.org/v8-compile-cache/download/v8-compile-cache-2.1.1.tgz",
|
||||
|
@ -12,6 +12,7 @@
|
||||
"core-js": "^3.6.5",
|
||||
"lodash": "^4.17.20",
|
||||
"material-design-icons-iconfont": "^5.0.1",
|
||||
"v-clipboard": "^2.2.3",
|
||||
"vue": "^2.6.11",
|
||||
"vue-router": "^3.4.3",
|
||||
"vuetify": "^2.2.11",
|
||||
|
@ -5,6 +5,25 @@
|
||||
<router-view></router-view>
|
||||
</v-content>
|
||||
<BottomNav></BottomNav>
|
||||
<v-snackbar
|
||||
:value="successMessage"
|
||||
app
|
||||
bottom
|
||||
color="success"
|
||||
elevation="20"
|
||||
>
|
||||
{{ successMessage }}
|
||||
</v-snackbar>
|
||||
|
||||
<v-snackbar
|
||||
:value="errorMessage"
|
||||
app
|
||||
bottom
|
||||
color="error"
|
||||
elevation="20"
|
||||
>
|
||||
{{ errorMessage }}
|
||||
</v-snackbar>
|
||||
</v-app>
|
||||
</template>
|
||||
|
||||
@ -32,7 +51,25 @@ export default {
|
||||
},
|
||||
|
||||
computed: {
|
||||
successMessage: function () {
|
||||
return this.$store.state.successMessage;
|
||||
},
|
||||
errorMessage: function () {
|
||||
return this.$store.state.errorMessage;
|
||||
}
|
||||
},
|
||||
|
||||
watch: {
|
||||
successMessage: function () {
|
||||
setTimeout(() => {
|
||||
this.$store.commit("SET_SUCCESS_MESSAGE", "");
|
||||
}, 1000);
|
||||
},
|
||||
errorMessage: function () {
|
||||
setTimeout(() => {
|
||||
this.$store.commit("SET_ERROR_MESSAGE", "");
|
||||
}, 1000);
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
@ -1,5 +1,4 @@
|
||||
<template>
|
||||
|
||||
<v-bottom-navigation
|
||||
app
|
||||
color="primary"
|
||||
|
@ -1,11 +1,12 @@
|
||||
import Vue from 'vue'
|
||||
import App from './App.vue'
|
||||
import Clipboard from 'v-clipboard';
|
||||
import vuetify from './plugins/vuetify';
|
||||
import router from './router';
|
||||
import store from './store';
|
||||
|
||||
Vue.config.productionTip = false
|
||||
|
||||
Vue.use(Clipboard);
|
||||
new Vue({
|
||||
vuetify,
|
||||
router,
|
||||
|
@ -5,6 +5,8 @@ import store from "../store";
|
||||
import Subscription from "@/views/Subscription";
|
||||
import Dashboard from "@/views/Dashboard";
|
||||
import User from "@/views/User";
|
||||
import SubEditor from "@/views/SubEditor";
|
||||
import CollectionEditor from "@/views/CollectionEditor";
|
||||
|
||||
Vue.use(Router);
|
||||
|
||||
@ -29,6 +31,18 @@ const router = new Router({
|
||||
name: "user",
|
||||
component: User,
|
||||
meta: {title: "我的"}
|
||||
},
|
||||
{
|
||||
path: "/sub-edit/:name",
|
||||
name: "sub-editor",
|
||||
component: SubEditor,
|
||||
meta: {title: "订阅编辑"}
|
||||
},
|
||||
{
|
||||
path: "/collection-edit/:name",
|
||||
name: "collection-edit",
|
||||
component: CollectionEditor,
|
||||
meta: {title: "订阅编辑"}
|
||||
}
|
||||
]
|
||||
});
|
||||
|
@ -9,6 +9,9 @@ const store = new Vuex.Store({
|
||||
title: "Sub-Store",
|
||||
isDarkMode: false,
|
||||
|
||||
successMessage: "",
|
||||
errorMessage: "",
|
||||
|
||||
subscriptions: {},
|
||||
collections: {},
|
||||
|
||||
@ -24,29 +27,55 @@ const store = new Vuex.Store({
|
||||
state.isDarkMode = isDarkMode
|
||||
},
|
||||
|
||||
// Data
|
||||
SET_SUBSCRIPTIONS(state, subscriptions) {
|
||||
state.subscriptions = subscriptions;
|
||||
SET_SUCCESS_MESSAGE(state, msg) {
|
||||
state.successMessage = msg;
|
||||
},
|
||||
|
||||
SET_ERROR_MESSAGE(state, msg) {
|
||||
state.errorMessage = msg;
|
||||
},
|
||||
SET_COLLECTIONS(state, collections) {
|
||||
state.collections = collections;
|
||||
}
|
||||
},
|
||||
|
||||
actions: {
|
||||
// fetch subscriptions
|
||||
async FETCH_SUBSCRIPTIONS({commit}) {
|
||||
async FETCH_SUBSCRIPTIONS({state}) {
|
||||
axios.get("/sub").then(resp => {
|
||||
const {data} = resp.data;
|
||||
commit("SET_SUBSCRIPTIONS", data);
|
||||
state.subscriptions = data;
|
||||
});
|
||||
},
|
||||
// fetch collections
|
||||
async FETCH_COLLECTIONS({commit}) {
|
||||
async FETCH_COLLECTIONS({state}) {
|
||||
axios.get("/collection").then(resp => {
|
||||
const {data} = resp.data;
|
||||
commit("SET_COLLECTIONS", data);
|
||||
state.collections = data;
|
||||
});
|
||||
},
|
||||
// update subscriptions
|
||||
async UPDATE_SUBSCRIPTION({commit}, {name, sub}) {
|
||||
axios.patch(`/sub/${name}`, sub).then(() => {
|
||||
commit("FETCH_SUBSCRIPTIONS");
|
||||
});
|
||||
},
|
||||
// new subscription
|
||||
async NEW_SUBSCRIPTION() {
|
||||
|
||||
},
|
||||
// delete subscription
|
||||
async DELETE_SUBSCRIPTION() {
|
||||
|
||||
},
|
||||
// update collection
|
||||
async UPDATE_COLLECTION() {
|
||||
|
||||
},
|
||||
// new collection
|
||||
async NEW_COLLECTION() {
|
||||
|
||||
},
|
||||
// delete collection
|
||||
async DELETE_COLLECTION() {
|
||||
|
||||
}
|
||||
},
|
||||
|
||||
|
@ -1,33 +1,53 @@
|
||||
<template>
|
||||
<v-container fluid>
|
||||
<v-spacer></v-spacer>
|
||||
<v-list inset dense>
|
||||
<v-list dense>
|
||||
<v-subheader>单个订阅</v-subheader>
|
||||
<v-list-item
|
||||
v-for="item in subscriptions"
|
||||
:key="item.name"
|
||||
v-for="sub in subscriptions"
|
||||
:key="sub.name"
|
||||
@click="preview(sub)"
|
||||
>
|
||||
<v-list-item-avatar>
|
||||
<v-img
|
||||
src="https://avatars2.githubusercontent.com/u/21050064?s=460&u=40a74913dd0a3d00670d05148c3a08c787470021&v=4"></v-img>
|
||||
</v-list-item-avatar>
|
||||
<v-list-item-content>
|
||||
<v-list-item-title v-text="item.name" class="font-weight-medium"></v-list-item-title>
|
||||
<v-list-item-title v-text="item.url"></v-list-item-title>
|
||||
<v-list-item-title v-text="sub.name" class="font-weight-medium"></v-list-item-title>
|
||||
<v-list-item-title v-text="sub.url"></v-list-item-title>
|
||||
</v-list-item-content>
|
||||
<v-list-item-action>
|
||||
<v-btn icon>
|
||||
<v-icon>mdi-dots-vertical</v-icon>
|
||||
</v-btn>
|
||||
<v-menu bottom left>
|
||||
<template v-slot:activator="{ on, attrs }">
|
||||
<v-btn
|
||||
icon
|
||||
v-bind="attrs"
|
||||
v-on="on"
|
||||
>
|
||||
<v-icon>mdi-dots-vertical</v-icon>
|
||||
</v-btn>
|
||||
</template>
|
||||
|
||||
<v-list>
|
||||
<v-list-item
|
||||
v-for="(menuItem, i) in editMenu"
|
||||
:key="i"
|
||||
@click="subscriptionMenu(menuItem.action, sub)"
|
||||
>
|
||||
<v-list-item-content>{{ menuItem.title }}</v-list-item-content>
|
||||
</v-list-item>
|
||||
</v-list>
|
||||
</v-menu>
|
||||
</v-list-item-action>
|
||||
</v-list-item>
|
||||
</v-list>
|
||||
<v-divider></v-divider>
|
||||
<v-list inset dense>
|
||||
<v-list dense>
|
||||
<v-subheader>组合订阅</v-subheader>
|
||||
<v-list-item
|
||||
v-for="item in collections"
|
||||
:key="item.name"
|
||||
v-for="collection in collections"
|
||||
:key="collection.name"
|
||||
@click="preview(collection)"
|
||||
dense
|
||||
>
|
||||
<v-list-item-avatar>
|
||||
@ -35,15 +55,15 @@
|
||||
src="https://avatars2.githubusercontent.com/u/21050064?s=460&u=40a74913dd0a3d00670d05148c3a08c787470021&v=4"></v-img>
|
||||
</v-list-item-avatar>
|
||||
<v-list-item-content>
|
||||
<v-list-item-title v-text="item.name" class="font-weight-medium"></v-list-item-title>
|
||||
<v-list-item-title v-text="collection.name" class="font-weight-medium"></v-list-item-title>
|
||||
<v-chip-group
|
||||
column
|
||||
>
|
||||
<v-chip
|
||||
v-for="subs in item.subscriptions"
|
||||
v-for="subs in collection.subscriptions"
|
||||
:key="subs"
|
||||
small
|
||||
class="ma-2"
|
||||
class="ma-2 ml-0 mr-1 pa-2"
|
||||
label
|
||||
>
|
||||
{{ subs }}
|
||||
@ -51,9 +71,27 @@
|
||||
</v-chip-group>
|
||||
</v-list-item-content>
|
||||
<v-list-item-action>
|
||||
<v-btn icon>
|
||||
<v-icon>mdi-dots-vertical</v-icon>
|
||||
</v-btn>
|
||||
<v-menu bottom left>
|
||||
<template v-slot:activator="{ on, attrs }">
|
||||
<v-btn
|
||||
icon
|
||||
v-bind="attrs"
|
||||
v-on="on"
|
||||
>
|
||||
<v-icon>mdi-dots-vertical</v-icon>
|
||||
</v-btn>
|
||||
</template>
|
||||
|
||||
<v-list>
|
||||
<v-list-item
|
||||
v-for="(menuItem, i) in editMenu"
|
||||
:key="i"
|
||||
@click="collectionMenu(menuItem.action, collection)"
|
||||
>
|
||||
<v-list-item-content>{{ menuItem.title }}</v-list-item-content>
|
||||
</v-list-item>
|
||||
</v-list>
|
||||
</v-menu>
|
||||
</v-list-item-action>
|
||||
</v-list-item>
|
||||
</v-list>
|
||||
@ -91,7 +129,21 @@
|
||||
export default {
|
||||
data: () => {
|
||||
return {
|
||||
opened: false
|
||||
opened: false,
|
||||
editMenu: [
|
||||
{
|
||||
title: "复制",
|
||||
action: "COPY"
|
||||
},
|
||||
{
|
||||
title: "编辑",
|
||||
action: "EDIT"
|
||||
},
|
||||
{
|
||||
title: "删除",
|
||||
action: "DELETE"
|
||||
},
|
||||
]
|
||||
}
|
||||
},
|
||||
|
||||
@ -104,6 +156,39 @@ export default {
|
||||
const cols = this.$store.state.collections;
|
||||
return Object.keys(cols).map(k => cols[k]);
|
||||
}
|
||||
},
|
||||
|
||||
methods: {
|
||||
subscriptionMenu(action, sub) {
|
||||
console.log(`${action} --> ${sub.name}`);
|
||||
switch (action) {
|
||||
case 'COPY':
|
||||
this.$clipboard(`http://127.0.0.1:3000/download/${sub.name}`);
|
||||
this.$store.commit("SET_SUCCESS_MESSAGE", "成功复制订阅链接");
|
||||
break
|
||||
case 'EDIT':
|
||||
this.$router.push(`/sub-edit/${sub.name}`);
|
||||
break
|
||||
case 'DELETE':
|
||||
break
|
||||
}
|
||||
},
|
||||
collectionMenu(action, collection) {
|
||||
console.log(`${action} --> ${collection.name}`);
|
||||
switch (action) {
|
||||
case 'COPY':
|
||||
this.$clipboard(`http://127.0.0.1:3000/download/collection/${collection.name}`);
|
||||
this.$store.commit("SET_SUCCESS_MESSAGE", "成功复制订阅链接");
|
||||
break
|
||||
case 'EDIT':
|
||||
break
|
||||
case 'DELETE':
|
||||
break
|
||||
}
|
||||
},
|
||||
preview(item) {
|
||||
console.log(`PREVIEW: ${item.name}`);
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
Loading…
x
Reference in New Issue
Block a user