Skip to content
This repository has been archived by the owner on Jan 21, 2024. It is now read-only.

Commit

Permalink
release 1.1.0 (#40)
Browse files Browse the repository at this point in the history
release 1.1.0

Co-authored-by: guqing <[email protected]>
  • Loading branch information
ruibaby and guqing authored Sep 11, 2019
2 parents 46e7f83 + bdd85b0 commit c9c99e6
Show file tree
Hide file tree
Showing 75 changed files with 4,593 additions and 2,777 deletions.
1,258 changes: 510 additions & 748 deletions package-lock.json

Large diffs are not rendered by default.

24 changes: 13 additions & 11 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "halo-admin",
"version": "1.0.3",
"version": "1.1.0",
"private": true,
"scripts": {
"serve": "vue-cli-service serve",
Expand All @@ -10,21 +10,23 @@
},
"dependencies": {
"animate.css": "^3.7.0",
"ant-design-vue": "~1.3.9",
"ant-design-vue": "^1.3.16",
"axios": "^0.18.0",
"enquire.js": "^2.1.6",
"marked": "^0.6.2",
"mavon-editor": "^2.7.4",
"filepond": "^4.6.1",
"filepond-plugin-image-preview": "^4.4.0",
"halo-editor": "^2.7.6",
"marked": "^0.6.3",
"moment": "^2.24.0",
"nprogress": "^0.2.0",
"viser-vue": "^2.4.6",
"verte": "^0.0.12",
"vue": "^2.6.10",
"vue-clipboard2": "^0.3.0",
"vue-codemirror-lite": "^1.0.4",
"vue-count-to": "^1.0.13",
"vue-cropper": "0.4.9",
"vue-filepond": "^5.1.3",
"vue-ls": "^3.2.1",
"vue-router": "^3.0.6",
"vue-router": "^3.1.2",
"vue-video-player": "^5.0.2",
"vuejs-logger": "^1.5.3",
"vuex": "^3.1.1"
Expand All @@ -38,14 +40,14 @@
"@vue/eslint-config-standard": "^4.0.0",
"@vue/test-utils": "^1.0.0-beta.20",
"babel-core": "7.0.0-bridge.0",
"babel-eslint": "^10.0.1",
"babel-jest": "^24.8.0",
"babel-eslint": "^10.0.2",
"babel-jest": "^24.9.0",
"babel-plugin-import": "^1.11.2",
"eslint": "^5.16.0",
"eslint-plugin-html": "^5.0.5",
"eslint-plugin-vue": "^5.2.2",
"eslint-plugin-vue": "^5.2.3",
"generate-asset-webpack-plugin": "^0.3.0",
"less": "^3.9.0",
"less": "^3.10.0",
"less-loader": "^5.0.0",
"vue-svg-icon-loader": "^2.1.1",
"vue-template-compiler": "^2.6.10"
Expand Down
45 changes: 25 additions & 20 deletions public/index.html
Original file line number Diff line number Diff line change
@@ -1,23 +1,28 @@
<!DOCTYPE html>
<html lang="zh-cmn-Hans">
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" />
<meta name="robots" content="noindex,nofllow" />
<meta name="generator" content="Halo" />
<link rel="icon" href="<%= BASE_URL %>logo.png" />
<title>Halo Dashboard</title>
</head>

<body>
<noscript>
<strong
>We're sorry but vue-antd-pro doesn't work properly without JavaScript enabled. Please enable it to
continue.</strong
>
</noscript>
<div id="app"></div>
<!-- built files will be auto injected -->
</body>
</html>
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" />
<meta name="robots" content="noindex,nofllow" />
<meta name="generator" content="Halo" />
<link rel="icon" href="<%= BASE_URL %>logo.png" />
<title>Halo Dashboard</title>
<style>
#loader{position:absolute;top:0;right:0;bottom:0;left:0;margin:auto;border:solid 3px #e5e5e5;border-top-color:#333;border-radius:50%;width:30px;height:30px;animation:spin .6s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}
</style>
</head>

<body>
<noscript>
<strong>We're sorry but vue-antd-pro doesn't work properly without JavaScript enabled. Please enable it to
continue.</strong>
</noscript>
<div id="app">
<div id="loader"></div>
</div>
<!-- built files will be auto injected -->
</body>

</html>
23 changes: 23 additions & 0 deletions src/api/admin.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,13 @@ adminApi.counts = () => {
})
}

adminApi.isInstalled = () => {
return service({
url: `${baseUrl}/is_installed`,
method: 'get'
})
}

adminApi.environments = () => {
return service({
url: `${baseUrl}/environments`,
Expand Down Expand Up @@ -52,6 +59,22 @@ adminApi.refreshToken = refreshToken => {
})
}

adminApi.sendResetCode = param => {
return service({
url: `${baseUrl}/password/code`,
data: param,
method: 'post'
})
}

adminApi.resetPassword = param => {
return service({
url: `${baseUrl}/password/reset`,
data: param,
method: 'put'
})
}

adminApi.updateAdminAssets = () => {
return service({
url: `${baseUrl}/halo-admin`,
Expand Down
2 changes: 1 addition & 1 deletion src/api/backup.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const backupApi = {}

backupApi.importMarkdown = (formData, uploadProgress, cancelToken) => {
return service({
url: `${baseUrl}/import/markdowns`,
url: `${baseUrl}/import/markdown`,
timeout: 8640000, // 24 hours
data: formData, // form data
onUploadProgress: uploadProgress,
Expand Down
8 changes: 8 additions & 0 deletions src/api/comment.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,14 @@ commentApi.create = (target, comment) => {
})
}

commentApi.update = (target, commentId, comment) => {
return service({
url: `${baseUrl}/${target}/comments/${commentId}`,
data: comment,
method: 'put'
})
}

/**
* Creates a comment.
* @param {String} target
Expand Down
9 changes: 9 additions & 0 deletions src/api/journal.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,13 @@ journalApi.commentTree = journalId => {
})
}

journalApi.journalType = {
PUBLIC: {
text: '公开'
},
INTIMATE: {
text: '私密'
}
}

export default journalApi
7 changes: 7 additions & 0 deletions src/api/photo.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,11 @@ photoApi.delete = photoId => {
})
}

photoApi.listTeams = () => {
return service({
url: `${baseUrl}/teams`,
method: 'get'
})
}

export default photoApi
12 changes: 12 additions & 0 deletions src/api/post.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,13 @@ postApi.delete = postId => {
})
}

postApi.preview = postId => {
return service({
url: `${baseUrl}/preview/${postId}`,
method: 'get'
})
}

postApi.postStatus = {
PUBLISHED: {
color: 'green',
Expand All @@ -81,6 +88,11 @@ postApi.postStatus = {
color: 'red',
status: 'error',
text: '回收站'
},
INTIMATE: {
color: 'blue',
status: 'success',
text: '私密'
}
}
export default postApi
7 changes: 7 additions & 0 deletions src/api/sheet.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,13 @@ sheetApi.delete = sheetId => {
})
}

sheetApi.preview = sheetId => {
return service({
url: `${baseUrl}/preview/${sheetId}`,
method: 'get'
})
}

sheetApi.sheetStatus = {
PUBLISHED: {
color: 'green',
Expand Down
51 changes: 45 additions & 6 deletions src/api/theme.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,16 @@ themeApi.listAll = () => {
})
}

themeApi.listFiles = () => {
themeApi.listFilesActivated = () => {
return service({
url: `${baseUrl}/files`,
url: `${baseUrl}/activation/files`,
method: 'get'
})
}

themeApi.listFiles = themeId => {
return service({
url: `${baseUrl}/${themeId}/files`,
method: 'get'
})
}
Expand Down Expand Up @@ -41,7 +48,7 @@ themeApi.getActivatedTheme = () => {

themeApi.update = themeId => {
return service({
url: `${baseUrl}/${themeId}`,
url: `${baseUrl}/fetching/${themeId}`,
timeout: 60000,
method: 'put'
})
Expand Down Expand Up @@ -94,6 +101,17 @@ themeApi.upload = (formData, uploadProgress, cancelToken) => {
})
}

themeApi.updateByUpload = (formData, uploadProgress, cancelToken, themeId) => {
return service({
url: `${baseUrl}/upload/${themeId}`,
timeout: 86400000, // 24 hours
data: formData, // form data
onUploadProgress: uploadProgress,
cancelToken: cancelToken,
method: 'put'
})
}

themeApi.fetching = url => {
return service({
url: `${baseUrl}/fetching`,
Expand All @@ -115,13 +133,34 @@ themeApi.getContent = path => {
})
}

themeApi.saveContent = (path, content) => {
themeApi.getContent = (themeId, path) => {
return service({
url: `${baseUrl}/files/content`,
url: `${baseUrl}/${themeId}/files/content`,
params: {
path: path
},
data: content,
method: 'get'
})
}

themeApi.saveContent = (path, content) => {
return service({
url: `${baseUrl}/files/content`,
data: {
path: path,
content: content
},
method: 'put'
})
}

themeApi.saveContent = (themeId, path, content) => {
return service({
url: `${baseUrl}/${themeId}/files/content`,
data: {
path: path,
content: content
},
method: 'put'
})
}
Expand Down
19 changes: 8 additions & 11 deletions src/components/GlobalFooter/GlobalFooter.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
<template>
<div class="footer">
<div class="copyright">
<div
class="footer"
style="padding: 0 16px;margin: 48px 0 0;text-align: center;"
>
<div
class="copyright"
style="color: rgba(0, 0, 0, 0.45);font-size: 14px;"
>
Proudly power by
<router-link :to="{ name:'About' }">
<a href="javascript:void(0);">Halo</a>
Expand All @@ -19,13 +25,4 @@ export default {
</script>

<style lang="less" scoped>
.footer {
padding: 0 16px;
margin: 48px 0 0;
text-align: center;
.copyright {
color: rgba(0, 0, 0, 0.45);
font-size: 14px;
}
}
</style>
2 changes: 1 addition & 1 deletion src/components/GlobalHeader/GlobalHeader.vue
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ export default {
}
},
mounted() {
document.body.addEventListener('scroll', this.handleScroll, { passive: true })
document.addEventListener('scroll', this.handleScroll, { passive: true })
},
methods: {
handleScroll() {
Expand Down
Loading

0 comments on commit c9c99e6

Please sign in to comment.