-
Notifications
You must be signed in to change notification settings - Fork 6
/
index.html
223 lines (207 loc) · 12.9 KB
/
index.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
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
</meta>
<title>PaperArxiv</title>
<link rel="stylesheet" href="node_modules/element-ui/lib/theme-chalk/index.css">
<link rel="stylesheet" href="node_modules/katex/dist/katex.min.css">
<script defer src="node_modules/katex/dist/katex.min.js"></script>
<script defer src="node_modules/katex/dist/contrib/auto-render.min.js"></script>
<script src="node_modules/vue/dist/vue.js"></script>
<script src="node_modules/element-ui/lib/index.js"></script>
<script src="node_modules/mermaid/dist/mermaid.min.js"></script>
</head>
<style>
.default-font{
font-family: Helvetica;
}
/* Do not show the table header*/
.el-table__header-wrapper{
display: none !important;
}
.search-result-block{color: #dc322f !important;}
td {background-color: #fdf6e3 ;font-size:120%}
td:hover {background-color: #f9f2df !important;}
.el-dialog__body, .el-dialog__header, .el-dialog__footer,.el-textarea__inner, .el-button--default, .el-input__inner, .el-message-box {background-color: #fdf6e3 !important}
#el-input-search {background-color: #fdf6e3 !important;}
#el-input-search:focus {background-color: #fdf6e3;}
#el-main-table {background-color: #fdf6e3;}
.my-el-button{background-color:#fdf6e3 !important; margin-top: 1px;}
.my-el-button:hover{background-color:#EAE0C0 !important;border-color: #DDDFE5 !important;color: #606266 !important; }
.foot_tags { float:right; }
.el-tree{
background: rgba(0,0,0,0) !important;
min-width: 100%;
display: inline-block !important;
}
.el-tree-node__content {
background-color: #fdf6e3 !important;
}
.el-tree-node.is-current > .el-tree-node__content {
background-color: #DECB88 !important;
}
.el-tree-node__content:hover {background-color: #EAE0C0 !important;
}
.main-tag-list, .tag-list{ background: #fdf6e3;border: 0px;color: #586e75;}
.main-tag-list:hover{cursor: default; background-color: #EAE0C0}
.tag-list:hover{cursor: pointer; background-color: #EAE0C0}
.tag-list-toggle, .tag-list-toggle:hover, .main-tag-list-toggle, .main-tag-list-toggle:hover{ background: #DECB88;}
.split {
display: flex;
flex-direction: row;
}
.gutter {
background-color: #eee8d5;
background-repeat: no-repeat;
background-position: 50%;
}
.gutter.gutter-horizontal {
background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAeCAYAAADkftS9AAAAIklEQVQoU2M4c+bMfxAGAgYYmwGrIIiDjrELjpo5aiZeMwF+yNnOs5KSvgAAAABJRU5ErkJggg==');
cursor: col-resize;
}
.gutter.gutter-vertical {
background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB4AAAAFAQMAAABo7865AAAABlBMVEVHcEzMzMzyAv2sAAAAAXRSTlMAQObYZgAAABBJREFUeF5jOAMEEAIEEFwAn3kMwcB6I2AAAAAASUVORK5CYII=');
cursor: row-resize;
}
img.img_icons{
opacity: .6;
cursor:pointer;
width: 1em;
}
span.default-font img{max-width: 90%;display: inline; margin: 0px; padding: 0px;}
.grabbable {
cursor: move;
cursor: grab;
cursor: -moz-grab;
cursor: -webkit-grab;
}
.grabbable:active {
cursor: grabbing;
cursor: -moz-grabbing;
cursor: -webkit-grabbing;
}
</style>
<body style="overflow-y:hidden" bgcolor="#fdf6e3">
<div id="app">
<div style="float:right; width:128px; margin-bottom: 8px;">
<el-button icon="el-icon-plus" @click="openPdfFile" class="my-el-button" plain><!--Add--></el-button>
<el-button icon="el-icon-setting" @click="itemConfigFormVisible = true" class="my-el-button" plain><!--Config--></el-button>
</div>
<div style="margin-right: 138px;margin-bottom: 8px;">
<el-input id="el-input-search" placeholder="Please input query (support regular expressions)" v-model="userInputSearchText" autofocus v-on:input="searchContent" style="width:100%; margin-top: 1px;" ref="searchBox">
<el-button slot="append" icon="el-icon-search" @click="searchContent" class="my-el-button"></el-button>
<el-button id="el-input-clear-search" slot="append" style="display:none" @click="searchContent('')"></el-button>
</el-input>
</div>
<el-dialog title="Config" :visible.sync="itemConfigFormVisible" :show-close=false width="80%">
<el-input v-model="itemConfigFormData" type="textarea" autosize auto-complete="off"></el-input>
<div slot="footer" class="dialog-footer">
<el-button @click="itemConfigFormVisible = false">Cancel</el-button>
<el-button type="primary" @click="itemConfigFormDataUpdate" autofocus>OK</el-button>
</div>
</el-dialog>
<el-dialog title="Edit Item" :visible.sync="itemEditFormVisible" :show-close=false width="80%">
<el-form :model="itemEditFormData">
<el-form-item label="Name">
<el-input v-model="itemEditFormData.name" type="textarea" autosize auto-complete="off" :disabled="true"></el-input>
</el-form-item>
<el-form-item label="Title">
<el-input v-model="itemEditFormData.title" type="textarea" autosize auto-complete="off"></el-input>
</el-form-item>
<el-form-item label="Journal">
<el-input v-model="itemEditFormData.journal" type="textarea" autosize auto-complete="off" @input="changNameByNewInfo"></el-input>
</el-form-item>
<el-form-item label="Authors">
<el-input v-model="itemEditFormData.authors" type="textarea" autosize auto-complete="off" @input="changNameByNewInfo"></el-input>
</el-form-item>
<el-form-item label="Year">
<el-input v-model="itemEditFormData.year" type="textarea" autosize auto-complete="off" @input="changNameByNewInfo"></el-input>
</el-form-item>
<el-form-item label="tags">
<el-autocomplete v-model="itemEditFormData.tags" :fetch-suggestions="queryUserTagSuggestion" @select="queryUserTagSelect" type="textarea" autosize auto-complete="off" style="width:100% !important"></el-input>
</el-form-item>
<el-form-item label="Library Path">
<el-input v-model="itemEditFormData.libraryPath" type="textarea" autosize auto-complete="off"></el-input>
<el-form-item label="Notes"><br>
<el-input v-model="itemEditFormData.comment" type="textarea" autosize auto-complete="off" @paste.native="handleNotesPaste"></el-input>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="danger" @click="deleteRowInfo()">Delete</el-button>
<el-button @click="itemEditFormVisible = false;itemEditFormDataCancel();">Cancel</el-button>
<el-button type="primary" @click="itemEditFormDataUpdate" autofocus>OK</el-button>
</div>
</el-dialog>
<div class="split" style="height: 100%; width: 100%; border-style: solid;border-width: 2px; border-color: #eee8d5; border-bottom: none;">
<div id="split-0">
<div id="split-00">
<el-scrollbar style="height: 100%;">
<el-tree :data="treePath" :highlight-current="true" :expand-on-click-node="false" default-expand-all @node-click="handleLibraryNodeClick" node-key="node.path" ref="library-tree" draggable @node-drop="handleLibraryTreeNodeDrop">
<span class="custom-tree-node" slot-scope="{ node, data }">
<span class="tree-label" v-show="data.isEdit">
<i class="el-icon-delete" @mousedown="handleTreeFinishEdit(data, true)"></i>
<el-input size="mini" autofocus
v-model="data.name"
@blur="handleTreeFinishEdit(data)"
@keyup.enter.native="handleTreeFinishEdit(data)"></el-input>
</span>
<span @drop="handleLibraryNodeDrop($event)" @dragover.prevent :path="data.path" class="custom-tree-node" @dblclick='handleLibraryNodeDBClick($event, data)' v-html='node.label'>
</span>
</span>
</el-tree>
</el-scrollbar>
</div>
<div id="split-01">
<el-scrollbar style="height: 100%;">
<div v-for="(value,key,index) in userTags" style="display:inline">
<el-tag size="mini" class="tag-list" :etag="key">
<span class="tag-label" v-show="value.isEdit">
<i class="el-icon-delete" @mousedown="handleTagsFinishEdit(key, value, true)"></i>
<el-input size="mini" autofocus
v-model="value.label"
@blur="handleTagsFinishEdit(key, value)"
@keyup.enter.native="handleTagsFinishEdit(key, value)"></el-input>
</span>
<span v-html="key + '(' + value.count.toString() + ')'" @click="leftTagClick($event);" @dblclick='handleLibraryNodeDBClick($event, value)' v-show="!value.isEdit"></span> </el-tag><small> </small>
</div>
</el-scrollbar>
</div>
</div>
<div id="split-1">
<el-table id="el-main-table" :data="tableData" height="100%" style=" width: 100%;" :default-sort="{prop: 'paper', order: 'descending'}" @cell-dblclick="onCellDBClick">
<el-table-column prop="paper" label="Paper" sortable :sort-method="sortTableItem">
<template slot-scope="table">
<lazy-component wrapper-tag="section" root-margin="2000px 2000px 2000px 2000px">
<span draggable="true" :name="table.row.name" @dragstart="handleItemIconDrag($event)" class = "grabbable">📄</span> <span v-html="table.row.title" class="default-font" style="color: #073642; font-weight: bold; font-size: large;"></span>
<span>   </span>
<span v-html="table.row.name" @click="openPdfFileWithSystemTool(table.row.name)" style="color:#268bd2; cursor:pointer;" class="default-font"></span>
<br>
<span v-html="table.row.authors.replace(/\n/g, ', ')" style="white-space: pre-line;color:#859900" class="default-font"></span>
<br>
<span v-html="renderComments(table.row.comment)" class="default-font"></span>
<span class="foot_tags" class="default-font">
<span><i class="el-icon-price-tag"></i></span>
<span v-for="item in table.row.tags.split(',')" v-if="item.length !== 0"> <el-tag size="mini" :mtag="item.trim()" class="main-tag-list"> <span v-html="item" @click="mainTagClick($event);"></span> </el-tag> <small> </small> </span>
<span @click="searchTitleInBrowser(table.row.title, 'search')"><img class="img_icons" src="icons/google-brands.svg" alt="Google"></img></span>
<span @click="searchTitleInBrowser(table.row.title, 'googlescholar')"><img class="img_icons" src="icons/google-scholar.svg" alt="google-scholar"></span>
<span @click="searchTitleInBrowser(table.row.title, 'github')"><img class="img_icons" src="icons/github-brands.svg" alt="Github"></span>
<span @click="searchTitleInBrowser(table.row.title, 'dblp')"><img class="img_icons" src="icons/icon_dblp_bw.svg" alt="dblp"></span>
<span><i class="el-icon-date"></i></span>
<span v-html="table.row.addTime" style="color: #93a1a1;font-size: small;"></span>
<span >✏</span>
<span v-html="table.row.updateTime" style="color: #93a1a1;font-size: small;"></span>
</span>
</lazy-component>
</template>
</el-table-column>
</el-table>
</div>
</div>
</div>
</body>
<script>
require('./renderer.js');
</script>
</html>