Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 7cf27f2

Browse files
implement card front-end and back-end
1 parent 2984734 commit 7cf27f2

File tree

76 files changed

+3443
-145
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

76 files changed

+3443
-145
lines changed

‎front-end/package-lock.json

Lines changed: 121 additions & 71 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎front-end/package.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,19 @@
1515
"@fortawesome/fontawesome-svg-core": "^1.2.3",
1616
"@fortawesome/free-solid-svg-icons": "^5.3.0",
1717
"@fortawesome/vue-fontawesome": "^0.1.1",
18+
"autosize": "^4.0.2",
1819
"axios": "^0.18.0",
20+
"blueimp-file-upload": "^9.22.0",
1921
"bootstrap": "^4.1.3",
22+
"date-fns": "^2.0.0-alpha.9",
2023
"i": "^0.3.6",
2124
"jquery": "^3.3.1",
25+
"jquery-ui": "^1.12.1",
2226
"lodash": "^4.17.10",
2327
"noty": "^3.2.0-beta",
2428
"npm": "^6.4.0",
2529
"popper.js": "^1.14.4",
30+
"showdown": "^1.8.6",
2631
"sockjs-client": "^1.1.5",
2732
"vue": "^2.5.17",
2833
"vue-i18n": "^8.0.0",

‎front-end/src/App.vue

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@ export default {
1414
// Initializing the real time connection
1515
this.$rt.init(myData.settings.realTimeServerUrl, myData.user.token)
1616
})
17+
18+
this.$bus.$on('user.unauthenticated', () => {
19+
this.$router.push({name: 'login'})
20+
})
1721
}
1822
}
1923
</script>
@@ -22,6 +26,7 @@ export default {
2226
html, body {
2327
height: 100%;
2428
font-size: 14px;
29+
font-family: "Helvetica Neue", Arial, Helvetica, sans-serif !important;
2530
}
2631
2732
#app, .page {
@@ -89,6 +94,10 @@ textarea.form-control:focus {
8994
.modal-title {
9095
font-size: 1rem;
9196
}
97+
98+
.close {
99+
outline: none !important;
100+
}
92101
}
93102
94103
.modal-body {
@@ -112,4 +121,8 @@ textarea.form-control:focus {
112121
}
113122
}
114123
}
124+
125+
.modal-open .modal-backdrop.show {
126+
opacity: .7;
127+
}
115128
</style>

‎front-end/src/components/Uploader.vue

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
<template>
2+
<div class="fileinput-button">
3+
<font-awesome-icon :icon="icon" class="icon" v-if="icon"/> {{ label }}
4+
<input :id="id" type="file" name="file" multiple>
5+
</div>
6+
</template>
7+
8+
<script>
9+
import $ from 'jquery'
10+
import 'jquery-ui/ui/widget'
11+
import 'blueimp-file-upload/js/jquery.fileupload'
12+
import 'blueimp-file-upload/js/jquery.iframe-transport'
13+
14+
export default {
15+
name: 'Uploader',
16+
props: ['id', 'url', 'icon', 'label'],
17+
watch: {
18+
url () {
19+
if (!this.url) {
20+
return
21+
}
22+
23+
$('#' + this.id).fileupload({
24+
url: this.url,
25+
dataType: 'json',
26+
add: (e, data) => {
27+
this.$emit('uploading', data.files[0])
28+
data.submit()
29+
},
30+
fail: (e, data) => {
31+
this.$emit('failed', data._response.jqXHR.responseJSON.message)
32+
},
33+
done: (e, data) => {
34+
this.$emit('uploaded', data.result)
35+
},
36+
progress: (e, data) => {
37+
let progress = parseInt(data.loaded / data.total * 100, 10)
38+
this.$emit('progress', progress)
39+
}
40+
})
41+
}
42+
}
43+
}
44+
</script>
45+
46+
<style lang="scss" scoped>
47+
.icon {
48+
margin-right: .5rem;
49+
}
50+
</style>

‎front-end/src/main.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,10 @@ import store from './store'
55
import axios from 'axios'
66
import Vuelidate from 'vuelidate'
77
import { library as faLibrary } from '@fortawesome/fontawesome-svg-core'
8-
import { faHome, faSearch, faPlus, faEllipsisH, faUserPlus, faListUl } from '@fortawesome/free-solid-svg-icons'
8+
import {
9+
faHome, faSearch, faPlus, faEllipsisH, faUserPlus, faListUl, faWindowMaximize,
10+
faUser, faPaperclip, faArchive, faPencilAlt, faComment, faUndo, faTrashAlt, faSpinner
11+
} from '@fortawesome/free-solid-svg-icons'
912
import { FontAwesomeIcon } from '@fortawesome/vue-fontawesome'
1013
import { i18n } from './i18n'
1114
import eventBus from './event-bus'
@@ -25,7 +28,8 @@ axios.interceptors.response.use(
2528
Vue.use(Vuelidate)
2629

2730
// Set up FontAwesome
28-
faLibrary.add(faHome, faSearch, faPlus, faEllipsisH, faUserPlus, faListUl)
31+
faLibrary.add(faHome, faSearch, faPlus, faEllipsisH, faUserPlus, faListUl, faWindowMaximize,
32+
faUser, faPaperclip, faArchive, faPencilAlt, faComment, faUndo, faTrashAlt, faSpinner)
2933
Vue.component('font-awesome-icon', FontAwesomeIcon)
3034

3135
Vue.config.productionTip = false

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /