-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmemos.html
224 lines (196 loc) · 7.58 KB
/
memos.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<META HTTP-EQUIV="Cache-Control" CONTENT="no-cache">
<META HTTP-EQUIV="Pragma" CONTENT="no-cache">
<META HTTP-EQUIV="Expires" CONTENT="0">
<title>Sp22Anno 留言板</title>
<link href="css/bootstrap_5.1.3_.min.css" rel="stylesheet">
<link href="css/style.css" rel="stylesheet">
<style type="text/css">
</style>
</head>
<body>
<div class="bodywrap" id="bodywrap">
<div class="page-cover" v-if="false">
<div class="container pt-5 text-center">
<div class="row">
<div><h2>空间关系理解数据标注 2022 留言板</h2></div>
</div>
<div class="row">
<div>
<p>正在加载,请稍候……</p>
</div>
</div>
</div>
</div>
<!-- navbar start -->
<nav class="navbar navbar-expand-lg navbar-dark bg-dark">
<div class="container">
<a class="navbar-brand" href="#">空间关系理解数据标注 2022 留言板</a>
</div>
</nav>
<!-- navbar end -->
<div class="container page my-4">
<div class="container py-2">
<div class="row align-items-center">
<div class="col col-12 col-md-3 col-lg-4 my-2">
<div class="form-floating">
<input
class="form-control form-control-sm"
type="text"
v-model="ctrl.currentUser.name"
placeholder="请输入您的姓名"
>
<label class="form-label">姓名</label>
</div>
</div>
<div class="col col-12 col-md-9 col-lg-8 my-2">
<div class="form-floating">
<input
class="form-control form-control-sm"
type="password"
v-model="ctrl.currentUser.token"
placeholder="请输入您的密码"
>
<label class="form-label">密码</label>
</div>
</div>
</div>
<div class="row align-items-center my-2">
<div class="col col-12">
<button
type="button"
class="btn btn-sm me-2 my-1"
:class="`btn-outline-dark`"
@click="getMemoList"
title="刷新留言板"
>刷新留言板</button>
</div>
</div>
<!-- </div>
</div>
<div class="container page my-4">
<div class="container py-2"> -->
<div class="row align-items-center my-2" __v-show="ctrl.tab == TABS.memos">
<div class="col col-12">
<p>在下方文本框填写内容并「发布」,所有管理人员皆可看到。(普通标注人员不可见)</p>
</div>
<div class="col col-12">
<textarea
class="form-control form-control-sm"
v-model="theBoard.text"
></textarea>
<button
type="button"
class="btn btn-sm me-2 my-1"
:class="`btn-outline-dark`"
@click="postNormalMemo"
title="发布"
>发布</button>
</div>
<!-- <div class="col col-12">
<button
type="button"
class="btn btn-sm me-2 my-1"
:class="`btn-outline-dark`"
@click="getMemoList"
title="刷新留言板"
>刷新</button>
</div> -->
</div>
<div class="row align-items-center my-2" __v-show="ctrl.tab == TABS.memos">
<div class="container">
<div
class="row"
v-for="memo in theBoard.memos"
>
<div class="col col-12 my-1">
<div class="border border-1 rounded my-2 px-2" :class="{'border-dark': memo.pinned}">
<!-- <p class="pre-wrap">{{memo.text}}</p> -->
<div class="memo-content-wrap">
<div
class="memo-content"
v-html="mkd.parse(memo.text)"
></div>
</div>
<p class="text-muted small opacity-50">
<span>#{{memo.id}}</span><span> </span>
<span>{{memo.user?.name}}</span><span> </span>
<span>发布于 {{(new Date(memo.postedAt)).toLocaleString()}}</span><span> </span>
<span v-if="memo.pinned">📌 已置顶<span> </span></span>
<span
v-if="memo.user?.id==ctrl.currentUser?.id"
>
<span class="cursor-pointer" @click="modalBox_open('confirm', {desc: '确定要删除吗?', action: (()=>{deleteMemo(memo)}),})">删除</span>
<span> </span>
</span>
<span
v-if="ctrl.currentUser?.role?.includes?.('admin')&&!memo.pinned"
>
<span class="cursor-pointer" @click="modalBox_open('confirm', {desc: '确定要置顶吗?', action: (()=>{pinMemo(memo)}),})">置顶</span>
<span> </span>
</span>
<span
v-if="ctrl.currentUser?.role?.includes?.('admin')&&memo.pinned"
>
<span class="cursor-pointer" @click="modalBox_open('confirm', {desc: '确定要取消置顶吗?', action: (()=>{unpinMemo(memo)}),})">取消置顶</span>
<span> </span>
</span>
</p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- Modal -->
<div class="modal-wrap" style="display: block;" ref="modal_wrap">
<div class="modal" v-show="modalBox.data.show" :class="{show: modalBox.data.show}">
<div class="modal-dialog modal-lg modal-dialog-centered modal-dialog-scrollable">
<modal-content
v-if="MODAL_THEMES[modalBox.data.theme] == MODAL_THEMES['default']"
:box="modalBox"
>
<div class="row align-items-center my-2">
<div class="col-12">
<p>😄</p>
</div>
</div>
</modal-content>
<modal-content
v-if="MODAL_THEMES[modalBox.data.theme] == MODAL_THEMES['confirm']"
:box="modalBox"
:needconfirm="true"
@confirm="()=>{modalBox.data.kwargs.action();modalBox.hide();}"
:closetext="modalBox.data.kwargs.closetext"
:confirmtext="modalBox.data.kwargs.confirmtext"
:confirmstyle="modalBox.data.kwargs.confirmstyle"
>
<div class="row align-items-center my-2">
<div class="col-12">
<p>{{ modalBox.data.kwargs.desc }}</p>
</div>
</div>
</modal-content>
</div>
</div>
</div>
<!-- Alert -->
<div class="alert-wrap" style="display: block;" ref="alert_wrap">
<transition name="fade" v-for="alert in alertBox.data.alerts">
<div v-show="alert?.show" class="alert alert-dismissible" :class="'alert-'+(alert?.type ?? 'info')">
<button type="button" class="btn-close" @click="alertBox.removeAlert(alert?.idx)"></button>
<div>{{alert?.content}}</div>
</div>
</transition>
</div>
</div>
<!-- bodywrap end -->
<script type="module" src="js/manage.mjs.js"></script>
</body>
</html>