Merge branch 'dev'
This commit is contained in:
commit
7459332382
21
README.md
21
README.md
@ -2,7 +2,7 @@
|
||||
|
||||
部署教程:[docker-compose部署](https://github.com/FleyX/bookmark/blob/master/DEPLOY.md)
|
||||
|
||||
自用地址(你们也可以用,长期提供服务):[bm.tapme.top](http://bm.tapme.top)
|
||||
自用地址(你们也可以用,长期提供服务):[bm.tapme.top](https://bm.tapme.top)
|
||||
|
||||
|
||||
# 缘由
|
||||
@ -15,15 +15,24 @@
|
||||
|
||||
所以有了这样这样一个项目,建立一个和平台无关的书签管理器,可在任意平台使用。
|
||||
|
||||
计划开发顺序如下:web 端->chrome 插件->firfox 插件。
|
||||
|
||||
最终目的就是所有浏览器(不包含 ie10 及以下等远古浏览器)中都能便捷的使用书签。
|
||||
|
||||
# 主要功能
|
||||
|
||||
1. 基础的书签增删改查功能。支持chrome、firefox等浏览器书签文件导入,导出。
|
||||
|
||||
按需加载书签节点,即使上万条书签也不会卡
|
||||
|
||||
支持鼠标拖拽排序、移动位置、层级(移动端不支持)
|
||||
|
||||
支持书签文件双向导入导出(从浏览器导入到系统、从系统导出到浏览器)
|
||||
|
||||
2. 强大的书签检索功能,毫秒级的关键字检索。
|
||||
|
||||
支持使用 书签名搜索、url搜索、书签名拼音搜索、书签名拼音首字母搜索。(注意不支持组合使用)
|
||||
4. 移动端支持,web页面可在浏览器中正常使用
|
||||
|
||||
## TODO
|
||||
|
||||
- 浏览器插件
|
||||
- 主页功能
|
||||
- 拼音检索 Ok!
|
||||
- 书签导出 OK!
|
||||
- 侧边栏显示
|
||||
|
@ -14,6 +14,8 @@ import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import javax.validation.Valid;
|
||||
|
||||
/**
|
||||
* 类功能简述:
|
||||
* 类功能详述:
|
||||
@ -59,7 +61,7 @@ public class UserController {
|
||||
* @date 2019/7/6 16:34
|
||||
*/
|
||||
@PutMapping("")
|
||||
public Result register(@RequestBody RegisterBody body) {
|
||||
public Result register(@Valid @RequestBody RegisterBody body) {
|
||||
return Result.success(userServiceImpl.register(body));
|
||||
}
|
||||
|
||||
|
@ -2,6 +2,9 @@ package com.fanxb.bookmark.business.user.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import javax.validation.constraints.Pattern;
|
||||
|
||||
/**
|
||||
* 类功能简述: 注册表单
|
||||
* 类功能详述:
|
||||
@ -11,8 +14,13 @@ import lombok.Data;
|
||||
*/
|
||||
@Data
|
||||
public class RegisterBody {
|
||||
@NotBlank(message = "用户名不能为空")
|
||||
@Pattern(regexp = "^\\w{1,50}$", message = "用户名长度为1-50")
|
||||
private String username;
|
||||
@NotBlank(message = "密码不能为空")
|
||||
@Pattern(regexp = "^\\w{6,18}$", message = "密码为6-18位组合")
|
||||
private String password;
|
||||
@NotBlank(message = "邮箱不能为空")
|
||||
private String email;
|
||||
private String authCode;
|
||||
}
|
||||
|
@ -1,14 +1,14 @@
|
||||
<template>
|
||||
<div class="search">
|
||||
<a-input-search id="searchInput" ref="searchInput" size="large" style="width: 100%" v-model="value" @change="search" @search="searchClick" allowClear @blur.prevent="inputBlur" @focus="inputFocus" @keydown="keyPress">
|
||||
<a-tooltip :title="searchBookmark?'搜索书签':'全网搜索'" slot="enterButton">
|
||||
<a-button :icon="searchBookmark?'book':'search'" type="primary" />
|
||||
<a-tooltip title="全网搜索" slot="enterButton">
|
||||
<a-button icon="search" type="primary" />
|
||||
</a-tooltip>
|
||||
</a-input-search>
|
||||
<div v-if="focused && searchBookmark" class="searchContent">
|
||||
<a-empty v-if="list.length == 0" />
|
||||
<div class="listItem" :class="{ itemActive: index == hoverIndex || index == selectIndex }" v-for="(item, index) in list" :key="item.bookmarkId" @mouseenter="mouseEnterOut(index, 'enter')" @mouseleave="mouseEnterOut(index, 'leave')" @mouseup="onMouse" @click="itemClick(item)">
|
||||
<a class="listItemUrl" style="padding-right: 1em; max-width: calc(100% - 2em)" :id="'bookmark:' + item.bookmarkId" :href="item.url" @click="itemClick($event,item.bookmarkId)" target="_blank">
|
||||
<div class="listItem" :class="{ itemActive: index == hoverIndex || index == selectIndex }" v-for="(item, index) in list" :key="item.bookmarkId" @mouseenter="mouseEnterOut(index, 'enter')" @mouseleave="mouseEnterOut(index, 'leave')" @mouseup="onMouse">
|
||||
<a class="listItemUrl" style="padding-right: 1em;min-width:3em; max-width: calc(100% - 2em)" :id="'bookmark:' + item.bookmarkId" :href="item.url" @click="itemClick($event,index)" target="_blank">
|
||||
{{ item.name }}
|
||||
</a>
|
||||
<a-tooltip v-if="showActions && hoverIndex === index" title="定位到书签树中">
|
||||
@ -75,34 +75,28 @@ export default {
|
||||
if (this.timer != null) {
|
||||
clearTimeout(this.timer);
|
||||
}
|
||||
if (!this.searchBookmark) {
|
||||
switch (this.userInfo.defaultSearchEngine) {
|
||||
case "bing":
|
||||
window.open("https://www.bing.com/search?q=" + encodeURIComponent(this.value));
|
||||
break;
|
||||
case "google":
|
||||
window.open("https://www.google.com/search?q=" + encodeURIComponent(this.value));
|
||||
break;
|
||||
default:
|
||||
window.open("https://www.baidu.com/s?ie=UTF-8&wd=" + encodeURIComponent(this.value));
|
||||
}
|
||||
switch (this.userInfo.defaultSearchEngine) {
|
||||
case "bing":
|
||||
window.open("https://www.bing.com/search?q=" + encodeURIComponent(this.value));
|
||||
break;
|
||||
case "google":
|
||||
window.open("https://www.google.com/search?q=" + encodeURIComponent(this.value));
|
||||
break;
|
||||
default:
|
||||
window.open("https://www.baidu.com/s?ie=UTF-8&wd=" + encodeURIComponent(this.value));
|
||||
}
|
||||
},
|
||||
itemClick(e, id) {
|
||||
itemClick(e, index) {
|
||||
if (e) {
|
||||
this.stopDefault(e);
|
||||
}
|
||||
if (!id) {
|
||||
if (!index) {
|
||||
return;
|
||||
}
|
||||
HttpUtil.post("/bookmark/visitNum", { id });
|
||||
if (this.selectIndex == null) {
|
||||
this.targetUrl = "https://www.baidu.com/s?ie=UTF-8&wd=" + encodeURIComponent(this.value);
|
||||
} else {
|
||||
this.targetUrl = this.list[this.selectIndex].url;
|
||||
}
|
||||
let bookmark = this.list[index];
|
||||
HttpUtil.post("/bookmark/visitNum", { id: bookmark.bookmarkId });
|
||||
let a = this.$refs["targetA"];
|
||||
a.href = this.targetUrl;
|
||||
a.href = bookmark.url;
|
||||
a.click();
|
||||
return false;
|
||||
},
|
||||
@ -144,10 +138,19 @@ export default {
|
||||
this.stopDefault();
|
||||
break;
|
||||
case "Enter":
|
||||
this.itemClick(e, this.list[this.selectIndex].bookmarkId);
|
||||
if (this.searchBookmark) {
|
||||
this.itemClick(e, this.selectIndex);
|
||||
} else {
|
||||
this.searchClick();
|
||||
}
|
||||
break;
|
||||
case "Tab":
|
||||
this.searchBookmark = !this.searchBookmark;
|
||||
if (this.searchBookmark) {
|
||||
this.$message.info("书签搜索");
|
||||
} else {
|
||||
this.$message.info("全网搜索");
|
||||
}
|
||||
this.stopDefault();
|
||||
break;
|
||||
case "Escape":
|
||||
|
Loading…
x
Reference in New Issue
Block a user