@jx3box/jx3box-common-ui 8.6.4 → 8.6.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +2 -2
- package/src/bread/AdminDrop.vue +14 -4
- package/src/single/PostHeader.vue +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jx3box/jx3box-common-ui",
|
|
3
|
-
"version": "8.6.
|
|
3
|
+
"version": "8.6.6",
|
|
4
4
|
"description": "JX3BOX UI",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -68,4 +68,4 @@
|
|
|
68
68
|
"type": "git",
|
|
69
69
|
"url": "git+https://github.com/JX3BOX/jx3box-common-ui.git"
|
|
70
70
|
}
|
|
71
|
-
}
|
|
71
|
+
}
|
package/src/bread/AdminDrop.vue
CHANGED
|
@@ -5,17 +5,20 @@
|
|
|
5
5
|
><i class="el-icon-setting"></i> 管理<i class="el-icon-arrow-down el-icon--right"></i>
|
|
6
6
|
</el-button>
|
|
7
7
|
<el-dropdown-menu slot="dropdown">
|
|
8
|
-
<el-dropdown-item v-if="
|
|
8
|
+
<el-dropdown-item v-if="!isCommunity && hasPermission('update_post')" command="toggleAdminPanel" icon="el-icon-setting">
|
|
9
9
|
<span>设置</span>
|
|
10
10
|
</el-dropdown-item>
|
|
11
11
|
<el-dropdown-item
|
|
12
|
-
v-else-if="
|
|
12
|
+
v-else-if="isCommunity"
|
|
13
13
|
command="toggleCommunityAdminPanel"
|
|
14
14
|
icon="el-icon-setting"
|
|
15
15
|
>
|
|
16
16
|
<span>设置</span>
|
|
17
17
|
</el-dropdown-item>
|
|
18
|
-
<el-dropdown-item v-if="
|
|
18
|
+
<el-dropdown-item v-if="hasPermission('update_post') && !isCommunity" command="editPost" icon="el-icon-edit-outline">
|
|
19
|
+
<span>编辑</span>
|
|
20
|
+
</el-dropdown-item>
|
|
21
|
+
<el-dropdown-item v-if="hasPermission('create_system_message')" command="directMessage" icon="el-icon-message">
|
|
19
22
|
<span>私信</span>
|
|
20
23
|
</el-dropdown-item>
|
|
21
24
|
<el-dropdown-item v-if="isEditor && showMove" command="onMoveToCommunity" icon="el-icon-refresh">
|
|
@@ -28,7 +31,7 @@
|
|
|
28
31
|
</el-dropdown>
|
|
29
32
|
|
|
30
33
|
<design-task v-model="showDesignTask" :post="post"></design-task>
|
|
31
|
-
<CommunityAdmin v-model="communityAdminVisible" :postId="post.id" />
|
|
34
|
+
<CommunityAdmin v-model="communityAdminVisible" :postId="post && post.id" />
|
|
32
35
|
<MoveToCommunityDialog v-model="moveVisible" :post="post" />
|
|
33
36
|
</div>
|
|
34
37
|
</template>
|
|
@@ -40,6 +43,7 @@ import DesignTask from "./DesignTask.vue";
|
|
|
40
43
|
import MoveToCommunityDialog from "./MoveToCommunityDialog.vue";
|
|
41
44
|
import { sendMessage } from "../../service/admin";
|
|
42
45
|
import CommunityAdmin from "./CommunityAdmin.vue";
|
|
46
|
+
import { editLink } from "@jx3box/jx3box-common/js/utils";
|
|
43
47
|
export default {
|
|
44
48
|
name: "AdminDrop",
|
|
45
49
|
components: {
|
|
@@ -94,6 +98,9 @@ export default {
|
|
|
94
98
|
return this.post?.post_type;
|
|
95
99
|
}
|
|
96
100
|
},
|
|
101
|
+
edit_link: function() {
|
|
102
|
+
return editLink(this.post?.post_type, this.post?.ID);
|
|
103
|
+
},
|
|
97
104
|
},
|
|
98
105
|
methods: {
|
|
99
106
|
handleCommand(command) {
|
|
@@ -141,6 +148,9 @@ export default {
|
|
|
141
148
|
designTask() {
|
|
142
149
|
this.showDesignTask = true;
|
|
143
150
|
},
|
|
151
|
+
editPost() {
|
|
152
|
+
location.href = this.edit_link + '?from=admin';
|
|
153
|
+
},
|
|
144
154
|
hasPermission(permission) {
|
|
145
155
|
return User.hasPermission(permission);
|
|
146
156
|
},
|
|
@@ -122,7 +122,7 @@ export default {
|
|
|
122
122
|
return editLink(this.post?.post_type, this.post?.ID);
|
|
123
123
|
},
|
|
124
124
|
canEdit: function() {
|
|
125
|
-
return this.post?.post_author == User.getInfo().uid
|
|
125
|
+
return this.post?.post_author == User.getInfo().uid
|
|
126
126
|
},
|
|
127
127
|
client: function() {
|
|
128
128
|
return this.post?.client || "std";
|