Skip to content

Commit

Permalink
Merge pull request #220 from FroggyTaipei/staging
Browse files Browse the repository at this point in the history
Release v1.0.3 on release
  • Loading branch information
travishen authored Feb 26, 2019
2 parents d65d748 + e3f9b84 commit 17fc57b
Show file tree
Hide file tree
Showing 10 changed files with 61 additions and 24 deletions.
3 changes: 2 additions & 1 deletion backend/apps/cases/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,8 @@ def get_search_results(self, request, queryset, search_term):
| Q(case_histories__id__in=histories_ids)
| Q(number__icontains=search_term)
| Q(disapprove_info__icontains=search_term)
| Q(note__icontains=search_term),
| Q(note__icontains=search_term)
| Q(tags__name__icontains=search_term),
).distinct()

return queryset, use_distinct
Expand Down
19 changes: 19 additions & 0 deletions backend/apps/cases/migrations/0004_auto_20190226_1439.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Generated by Django 2.1.7 on 2019-02-26 06:39

from django.db import migrations
import tagulous.models.fields


class Migration(migrations.Migration):

dependencies = [
('cases', '0003_auto_20190226_1138'),
]

operations = [
migrations.AlterField(
model_name='case',
name='tags',
field=tagulous.models.fields.TagField(_set_tag_meta=True, blank=True, help_text='Enter a comma-separated tag string', to='cases.Tagulous_Case_tags', verbose_name='Tags', verbose_name_plural='Tags'),
),
]
2 changes: 1 addition & 1 deletion backend/apps/cases/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ class Case(Model):
disapprove_info = TextField(null=True, blank=True, verbose_name=_('Disapprove Info'))

note = TextField(null=True, blank=True, verbose_name=_('Case Notes'))
tags = TagField(blank=True, verbose_name=_('Case Tags'), verbose_name_plural='Case Tags')
tags = TagField(blank=True, verbose_name=_('Tags'), verbose_name_plural=_('Tags'))

objects = CaseQuerySet.as_manager()

Expand Down
2 changes: 0 additions & 2 deletions backend/config/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,6 @@
# See: https://docs.djangoproject.com/en/dev/ref/settings/#admins
ADMINS = [
('ssivart', '[email protected]'),
('matt', '[email protected]'),
('kai', '[email protected]'),
]

# See: https://docs.djangoproject.com/en/dev/ref/settings/#managers
Expand Down
4 changes: 2 additions & 2 deletions backend/locale/zh_Hant/LC_MESSAGES/django.po
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2019-02-26 11:39+0800\n"
"POT-Creation-Date: 2019-02-26 14:41+0800\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <[email protected]>\n"
Expand Down Expand Up @@ -149,7 +149,7 @@ msgid "Case Notes"
msgstr "內部備註"

#: apps/cases/models.py:133
msgid "Case Tags"
msgid "Tags"
msgstr "標籤"

#: apps/cases/models.py:139
Expand Down
6 changes: 3 additions & 3 deletions frontend/public/manifest.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "website",
"short_name": "website",
"name": "選服魔鏡號",
"short_name": "選服魔鏡號",
"icons": [
{
"src": "/img/icons/android-chrome-192x192.png",
Expand All @@ -13,7 +13,7 @@
"type": "image/png"
}
],
"start_url": "",
"start_url": "https://service.froggychiu.com",
"display": "standalone",
"background_color": "#000000",
"theme_color": "#4DBA87"
Expand Down
1 change: 1 addition & 0 deletions frontend/src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ export default {
location.href = 'home?openExternalBrowser=1'
this.inLineApp = true
}
this.$store.commit('setIsInApp', true)
}
} else {
this.$store.commit('setIsMobile', false)
Expand Down
1 change: 1 addition & 0 deletions frontend/src/components/InputCase.vue
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
:accept="acceptFileType"
:limit="5">
<el-button slot="trigger" type="primary">上傳檔案</el-button>
<div v-if="$store.state.isInApp" slot="tip" class="el-upload__tip" style="color: #ff944d !important;">特定手機的應用程式內瀏覽器(InAppBrowser),可能無法上傳檔案,請使用手機原生瀏覽器。</div>
<div slot="tip" class="el-upload__tip">1.上傳單檔限制為10MB,最多5個檔案。</div>
<div v-if="!$store.state.isMobile" slot="tip" class="el-upload__tip">2.可上傳的檔案類型為jpg, jpeg, png, mpg, mpeg, avi, wmv, mp3, mp4, zip, rar, 7z, txt, doc, docx, ppt, pptx, pdf, odt, xls, xlsx, key, pages, numbers。</div>
<div v-if="$store.state.isMobile" slot="tip" class="el-upload__tip">2.可上傳的檔案類型為jpg, jpeg, png。</div>
Expand Down
41 changes: 27 additions & 14 deletions frontend/src/components/ThemeSong.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<template>
<div @click="playToggle" class="theme-song" :class="{ 'sound-on' : play }">
<div v-show="!play" class="pulse-button"></div>
<font-awesome-icon v-show="play" icon="volume-up" />
<font-awesome-icon v-show="!play" icon="volume-off" />
</div>
Expand All @@ -17,16 +18,7 @@ export default {
this.audio.volume = 0.01
this.audio.loop = true
},
mounted () {
document.addEventListener('click', this.startSound)
},
methods: {
startSound () {
this.audio.play()
this.play = true
this.volumeIncrease()
document.removeEventListener('click', this.startSound)
},
volumeIncrease () {
if (this.audio.volume < 0.1) {
setTimeout(() => {
Expand All @@ -39,6 +31,7 @@ export default {
this.play = !this.play
if (this.play) {
this.audio.play()
this.volumeIncrease()
} else {
this.audio.pause()
}
Expand All @@ -49,12 +42,32 @@ export default {

<style scoped>
.sound-on {
color: royalblue;
color: royalblue;
}
.theme-song{
position: fixed;
margin-left: 8px;
font-size: x-large;
z-index: 9999;
position: fixed;
margin-left: 8px;
font-size: x-large;
z-index: 9999;
cursor: pointer;
}
.pulse-button {
position: fixed;
top: 16px;
left: 16px;
width: 1px;
height: 1px;
border: none;
box-shadow: 0 0 0 0 rgb(58, 58, 58);
border-radius: 50%;
-webkit-animation: pulse 1.5s infinite cubic-bezier(0.66, 0, 0, 1);
-moz-animation: pulse 1.5s infinite cubic-bezier(0.66, 0, 0, 1);
-ms-animation: pulse 1.5s infinite cubic-bezier(0.66, 0, 0, 1);
animation: pulse 1.5s infinite cubic-bezier(0.66, 0, 0, 1);
}
@-webkit-keyframes pulse {to {box-shadow: 0 0 0 45px rgba(232, 76, 61, 0);}}
@-moz-keyframes pulse {to {box-shadow: 0 0 0 45px rgba(232, 76, 61, 0);}}
@-ms-keyframes pulse {to {box-shadow: 0 0 0 45px rgba(232, 76, 61, 0);}}
@keyframes pulse {to {box-shadow: 0 0 0 45px rgba(232, 76, 61, 0);}}
</style>
6 changes: 5 additions & 1 deletion frontend/src/store.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ const store = new Vuex.Store({
redirectTo: null,
firstVisit: false,
isLoadingTable: false,
isMobile: null,
isMobile: false,
isInApp: false,
authentication: false,
browser: ''
},
Expand All @@ -26,6 +27,9 @@ const store = new Vuex.Store({
setBrowser (state, browser) {
state.browser = browser
},
setIsInApp (state, isinapp) {
state.isInApp = isinapp
},
setIsMobile (state, isMobile) {
state.isMobile = isMobile
},
Expand Down

0 comments on commit 17fc57b

Please sign in to comment.