Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
CS-Tao committed Dec 31, 2018
2 parents 19a6bed + 7bbde46 commit d67f681
Show file tree
Hide file tree
Showing 38 changed files with 1,721 additions and 264 deletions.
18 changes: 9 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[![Build status](https://ci.appveyor.com/api/projects/status/qq2adqaxv6vfj7di/branch/master?svg=true)](https://ci.appveyor.com/project/CS-Tao/whu-library-seat/branch/master)
[![Build Status](https://travis-ci.com/CS-Tao/whu-library-seat.svg?branch=master)](https://travis-ci.com/CS-Tao/whu-library-seat)
[![Join the chat at https://gitter.im/whu-library-seat/Lobby](https://img.shields.io/badge/chat-on%20gitter-28BC99.svg)](https://gitter.im/whu-library-seat/Lobby?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
[![license](https://img.shields.io/badge/license-none-yellow.svg)](#版权声明)
[![feedback](https://img.shields.io/badge/feedback-issues-blue.svg)](https://github.com/CS-Tao/whu-library-seat/issues/new)

# whu-library-seat

Expand All @@ -24,31 +24,31 @@
### 最新版本下载

- Windows
- 链接: [whu-library-seat-setup-1.7.1.exe](https://github.com/CS-Tao/whu-library-seat/releases/download/v1.7.1/whu-library-seat-setup-1.7.1.exe)
- 链接: [whu-library-seat-setup-1.8.0.exe](https://github.com/CS-Tao/whu-library-seat/releases/download/v1.8.0/whu-library-seat-setup-1.8.0.exe)

- Mac OS
- 链接: [whu-library-seat-1.7.1.dmg](https://github.com/CS-Tao/whu-library-seat/releases/download/v1.7.1/whu-library-seat-1.7.1.dmg)
- 链接: [whu-library-seat-1.8.0.dmg](https://github.com/CS-Tao/whu-library-seat/releases/download/v1.8.0/whu-library-seat-1.8.0.dmg)

- Linux
- 链接: [whu-library-seat-1.7.1-x86_64.AppImage](https://github.com/CS-Tao/whu-library-seat/releases/download/v1.7.1/whu-library-seat-1.7.1-x86_64.AppImage)
- 链接: [whu-library-seat-1.8.0-x86_64.AppImage](https://github.com/CS-Tao/whu-library-seat/releases/download/v1.8.0/whu-library-seat-1.8.0-x86_64.AppImage)

### 安装软件

运行安装包即可

### 申请软件使用权

> 不再对桌面版本低于 v1.5.0、安卓版本低于 v1.2.0 的软件提供用户认证支持
在您登录之前,软件会检查您的学号是否被记录在[这个文件](https://github.com/CS-Tao/whu-library-seat/blob/user-validation/validation.json)中,只有被记录在这个文件中的学号(经过加密)才能使用本软件,如果您的学号(经过加密)没有被记录,您可以通过邮件[联系我](http://mail.qq.com/cgi-bin/qm_share?t=qm_mailme&[email protected])(请在邮件中注明学号、院系和姓名)
> v1.8.0 已移除本功能,改为 GitHub Star 认证,具体请查看 [GitHub Star 认证](https://home.cs-tao.cc/whu-library-seat/specification/auth.html)
当然,因为本软件为开源软件,您可以在遵守本软件[版权声明](#版权声明)的前提下,自己构建软件并删除其中的认证代码,具体请查看[面向开发者](#面向开发者)

### 软件更新

软件启动的时候会自动访问[GitHub Release](https://github.com/CS-Tao/whu-library-seat/releases/latest)检查更新,如果有更新,在软件的左下角会出现更新的按钮
软件启动的时候会自动访问[GitHub Release](https://github.com/CS-Tao/whu-library-seat/releases/latest)检查更新,如果有更新,在软件的左下角会出现更新的按钮,您可以点击菜单中的 `关于` -> `更新日志` 查看新版本的特性

![图片加载失败](https://raw.githubusercontent.com/CS-Tao/github-content/master/contents/github/whu-library-seat/update.png)

# 面向开发者
## 面向开发者

您可以通过以下步骤自行构建本软件,但请您务必注意,本仓库并未提供任何源码`许可证`,您没有权利将源码更改后继续传播,更没有权利将本软件或源码用于商业活动

Expand Down
1 change: 1 addition & 0 deletions docs/.vuepress/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ module.exports = {
title: '用户手册',
children: [
['', '下载安装'],
['auth', '用户认证'],
['menu', '菜单'],
['settings', '软件设置'],
['reservation', '定时预约'],
Expand Down
10 changes: 10 additions & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,22 @@ footer: Copyright © 2018 CS-Tao

![安卓版本二维码](https://raw.githubusercontent.com/CS-Tao/whu-library-seat/user-validation/last-android-qr.jpg)

#### 用户认证

请移步 [GitHub Star 认证](/specification/auth.html)

#### 使用演示

> 以桌面端为例,移动端相关操作与之一致
![软件演示](https://raw.githubusercontent.com/CS-Tao/github-content/master/contents/github/whu-library-seat/full.gif)

#### Gitter 群聊

[![Join the chat at https://gitter.im/whu-library-seat/Lobby](https://img.shields.io/badge/chat-on%20gitter-28BC99.svg)](https://gitter.im/whu-library-seat/Lobby?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)

---

::: warning Copyright © 2018 CS-Tao
本软件开源,但没有向开发者提供任何源码`许可证`,作者本人保留源代码的所有权利,任何组织和个人不得将本软件或源码用于商业活动
:::
18 changes: 18 additions & 0 deletions docs/project/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,3 +52,21 @@ next: false
- 其他

开发新功能(最终会策略合并到`develop`分支)、解决刚发布版本的 bug(最终会策略合并到`master`分支和`develop`分支)

### GitHub OAuth 第三方登录中间件

> 项目工程:[whu-library-seat-ghauth](https://github.com/CS-Tao/whu-library-seat-ghauth),使用 Express + Socket-io 搭建
#### 分支使用说明

- master

主分支,每次提交都标记一个 tag,对应一个新版本

- develop

开发分支,开发的新功能都汇总到本分支

- 其他

开发新功能(最终会策略合并到`develop`分支)、解决刚发布版本的 bug(最终会策略合并到`master`分支和`develop`分支)
9 changes: 3 additions & 6 deletions docs/specification/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,13 @@

### 申请软件使用权

::: warning
不再对桌面版本低于 v1.5.0、安卓版本低于 v1.2.0 的软件提供用户认证支持
:::
> v1.8.0 已移除本功能,改为 GitHub Star 认证,具体请查看 [GitHub Star 认证](./auth.html)
在您登录之前,软件会检查您的学号是否被记录在[这个文件](https://github.com/CS-Tao/whu-library-seat/blob/user-validation/validation.json)中,只有被记录在这个文件中的学号(经过加密)才能使用本软件,如果您的学号(经过加密)没有被记录,您可以通过邮件[联系我](http://mail.qq.com/cgi-bin/qm_share?t=qm_mailme&[email protected])(请在邮件中注明学号、院系和姓名)

当然,因为本软件为开源软件,您可以在遵守本软件[版权声明](https://github.com/CS-Tao/whu-library-seat/blob/master/README.md#版权声明)的前提下,自己构建软件并删除其中的认证代码,具体请查看[面向开发者](https://github.com/CS-Tao/whu-library-seat/blob/master/README.md#面向开发者)

### 软件更新

![图片加载失败](https://raw.githubusercontent.com/CS-Tao/github-content/master/contents/github/whu-library-seat/update.png)

- 桌面端
软件启动的时候会自动访问[GitHub Release](https://github.com/CS-Tao/whu-library-seat/releases/latest)检查更新,如果有更新,在软件的左下角会出现更新的按钮

Expand Down
37 changes: 37 additions & 0 deletions docs/specification/auth.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# GitHub Star 认证

请按照以下步骤登录本软件并获取永久授权

1. 点击软件下方的**钥匙**进入软件授权页面(第一次打开软件会默认进入本页面)

![图片加载失败](https://raw.githubusercontent.com/CS-Tao/github-content/master/contents/github/whu-library-seat/OAuth/1.png)

1. 点击`GitHub Star 永久授权`按钮,软件会打开系统浏览器访问认证页面

![图片加载失败](https://raw.githubusercontent.com/CS-Tao/github-content/master/contents/github/whu-library-seat/OAuth/3.png)

1. 点击`确定通过 GitHub 账号登录`,此时 GitHub 会让你确认是否授权(如果没有登录 GitHub,此时会进入登录页面)

![图片加载失败](https://raw.githubusercontent.com/CS-Tao/github-content/master/contents/github/whu-library-seat/OAuth/4.png)

1. 点击`Authorize CS-Tao`即可成功登录

![图片加载失败](https://raw.githubusercontent.com/CS-Tao/github-content/master/contents/github/whu-library-seat/OAuth/5.png)

1. 登录成功后返回软件,如果出现下面的弹窗,说明您还未对本仓库点星,请进行下一步

![图片加载失败](https://raw.githubusercontent.com/CS-Tao/github-content/master/contents/github/whu-library-seat/OAuth/5.1.png)

1. 如果您还未给本仓库点星,请到指定仓库点星以供管理员了解软件使用情况。桌面端进入:[whu-library-seat](https://github.com/CS-Tao/whu-library-seat),移动端进入:[whu-library-seat-mobile](https://github.com/CS-Tao/whu-library-seat-mobile)

- 桌面端点击右上角的`Star`按钮,按钮如下图所示:

![图片加载失败](https://raw.githubusercontent.com/CS-Tao/github-content/master/contents/github/whu-library-seat/OAuth/5.2.png)

- 移动端需要登录才会显示`Star`按钮,登录状态下直接点击即可,按钮如下图所示:

![图片加载失败](https://raw.githubusercontent.com/CS-Tao/github-content/master/contents/github/whu-library-seat/OAuth/5.3.png)

1. 点星后回到本软件,点击确定即可

![图片加载失败](https://raw.githubusercontent.com/CS-Tao/github-content/master/contents/github/whu-library-seat/OAuth/6.png)
9 changes: 4 additions & 5 deletions docs/specification/menu.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,12 @@

### 权限

- 申请权限
> v1.8.0 版本已移除本菜单
打开[申请软件使用权](https://home.cs-tao.cc/whu-library-seat/specification/#申请软件使用权)
### 群聊

- 查看用户白名单

打开[用户白名单](https://github.com/CS-Tao/whu-library-seat/blob/user-validation/validation.json)
- Chat on gitter
在 gitter 上反馈、讨论关于本软件的问题。群聊链接:[https://gitter.im/whu-library-seat/Lobby](https://gitter.im/whu-library-seat/Lobby)

### 关于

Expand Down
4 changes: 4 additions & 0 deletions docs/specification/settings.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

启动程序,在未登录的状态下,点击软件右上角的设置按钮即可进入设置界面

![settings.png](https://raw.githubusercontent.com/CS-Tao/github-content/master/contents/github/whu-library-seat/settings.png)

### 配置设置项

#### 服务地址
Expand All @@ -24,6 +26,8 @@

这个功能可以在您的系统时间和网络时间有些许偏差的时候,防止提前抢座或滞后抢座。

> 桌面端 v1.8.0(移动端 v1.5.0) 新增。这个设置的时间间隔可以通过下面的`提前检测时间`设置
默认``勾选该项

#### 退出到托盘
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "whu-library-seat",
"version": "1.7.1",
"version": "1.8.0",
"author": "CS-Tao <[email protected]>",
"description": "武汉大学图书馆抢座软件",
"license": null,
Expand Down Expand Up @@ -68,6 +68,7 @@
"js-md5": "^0.7.3",
"mockjs": "^1.0.1-beta3",
"node-notifier": "^5.2.1",
"socket.io-client": "^2.2.0",
"vue": "^2.3.3",
"vue-electron": "^1.0.6",
"vue-markdown": "^2.2.4",
Expand Down
17 changes: 8 additions & 9 deletions src/main/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,11 @@ app.on('ready', () => {
click () { require('electron').shell.openExternal('https://github.com/CS-Tao/whu-library-seat') }
},
{ type: 'separator' },
{
label: 'Chat on gitter',
click () { require('electron').shell.openExternal('https://gitter.im/whu-library-seat/Lobby') }
},
{ type: 'separator' },
{
label: '恢复所有设置',
click () {
Expand Down Expand Up @@ -138,15 +143,11 @@ const template = [
}
]
}, {
label: '权限',
label: '群聊',
submenu: [
{
label: '申请权限',
click () { require('electron').shell.openExternal('https://home.cs-tao.cc/whu-library-seat/specification/#申请软件使用权') }
},
{
label: '查看白名单',
click () { require('electron').shell.openExternal('https://github.com/CS-Tao/whu-library-seat/blob/user-validation/validation.json') }
label: 'Chat on gitter',
click () { require('electron').shell.openExternal('https://gitter.im/whu-library-seat/Lobby') }
}
]
}, {
Expand Down Expand Up @@ -314,10 +315,8 @@ ipcMain.on('show-window-notify', (event, title, message) => {
})

// 配置自动更新

autoUpdater.autoDownload = false
autoUpdater.autoInstallOnAppQuit = true
autoUpdater.allowPrerelease = true
autoUpdater.allowDowngrade = true

ipcMain.on('check-updates', (event, arg) => {
Expand Down
2 changes: 1 addition & 1 deletion src/renderer/api/config/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const store = new Store({
// create an axios instance
const service = axios.create({
baseURL: store.get('baseUrl', 'https://seat.lib.whu.edu.cn:8443'),
timeout: 5000,
timeout: 8000,
headers: {
'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8'
},
Expand Down
20 changes: 20 additions & 0 deletions src/renderer/api/gitcontents.api.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,25 @@ export default {
time: new Date()
}
})
},
// GitHub id 黑名单
blacklist: () => {
return service({
url: urls.gitcontents.blacklist.url(),
method: urls.gitcontents.blacklist.method,
params: {
time: new Date()
}
})
},
// 禁用软件
ban: () => {
return service({
url: urls.gitcontents.ban.url(),
method: urls.gitcontents.ban.method,
params: {
time: new Date()
}
})
}
}
Loading

0 comments on commit d67f681

Please sign in to comment.