Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
G
group23_com2027
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Kostopoulos, Eric (UG - Computer Science)
group23_com2027
Commits
1170f761
Commit
1170f761
authored
4 years ago
by
Endrizzi, Marco (UG - Comp Sci & Elec Eng)
Browse files
Options
Downloads
Patches
Plain Diff
Added SignalForm component
parent
a59e5500
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/components/SignalForm.vue
+71
-0
71 additions, 0 deletions
src/components/SignalForm.vue
src/layouts/MainLayout.vue
+10
-5
10 additions, 5 deletions
src/layouts/MainLayout.vue
with
81 additions
and
5 deletions
src/components/SignalForm.vue
0 → 100644
+
71
−
0
View file @
1170f761
<
template
lang=
"pug"
>
q-card.full-width
//- Create Signal Header
q-card-section.bg-blue-grey-1(style='padding: 8px')
span.text-subtitle1.text-weight-light.text-blue-grey-10.q-ml-sm Create new signal
q-chip.float-right(
@click='submitSignal()',
clickable,
color='accent',
text-color='white',
icon='done',
style='margin-top: -1px'
) Create Signal
//- Create Signal Form
q-card-section
//- Event name field
.row.q-pb-md
span.text-subtitle1.text-blue-grey-10 Type of signal:
q-select.full-width(
v-model='signalType',
:options='options',
label='Signal type',
transition-show='flip-up',
transition-hide='flip-down',
rounded,
outlined
)
template(v-slot:prepend)
q-icon(:name='icon')
//- Event details field
.row
span.text-subtitle1.text-blue-grey-10 Details:
q-input.full-width(v-model='details', rounded, outlined, autogrow, placeholder='Describe the situation')
</
template
>
<
script
>
export
default
{
data
()
{
return
{
signalType
:
null
,
options
:
[
'
Danger
'
,
'
Emergency
'
,
'
Fight Breakout
'
,
'
Free Drinks
'
,
'
Car Rental
'
],
details
:
null
}
},
methods
:
{
submitSignal
()
{
console
.
log
(
this
.
signalType
)
}
},
computed
:
{
icon
()
{
switch
(
this
.
signalType
)
{
case
'
Danger
'
:
return
'
warning
'
case
'
Emergency
'
:
return
'
medical_services
'
case
'
Fight Breakout
'
:
return
'
reduce_capacity
'
case
'
Free Drinks
'
:
return
'
liquor
'
case
'
Car Rental
'
:
return
'
car_rental
'
default
:
return
'
add_location
'
}
}
}
}
</
script
>
\ No newline at end of file
This diff is collapsed.
Click to expand it.
src/layouts/MainLayout.vue
+
10
−
5
View file @
1170f761
...
...
@@ -16,7 +16,7 @@ q-layout(view='lHh Lpr lFf')
style='height: 150px'
)
.row.absolute-bottom.bg-transparent.justify-center
q-avatar(size='
7
em')
q-avatar(size='
6.5
em')
img(
src='https://avataaars.io/?avatarStyle=Circle&topType=Eyepatch&facialHairType=Blank&clotheType=ShirtVNeck&clotheColor=Pink&eyeType=Squint&eyebrowType=AngryNatural&mouthType=Default&skinColor=Light'
)
...
...
@@ -28,6 +28,8 @@ q-layout(view='lHh Lpr lFf')
//- Bottom Drawers
q-dialog(v-model='newEvent', position='bottom')
EventForm
q-dialog(v-model='newSignal', position='bottom')
SignalForm
//- Page container and floating buttons
q-page-container
router-view
...
...
@@ -37,13 +39,14 @@ q-layout(view='lHh Lpr lFf')
q-btn(@click='rightDrawer = !rightDrawer', fab, color='primary', icon='chat')
q-page-sticky(position='bottom', :offset='[18, 36]')
q-fab(vertical-actions-align='center', color='secondary', icon='add', direction='up')
q-fab-action(
color='orange',
@click='newEvent = true', icon='add_location', label='New Event')
q-fab-action(color='accent', icon='notification_add', label='New Signal')
q-fab-action(@click='newEvent = true',
color='orange',
icon='add_location', label='New Event')
q-fab-action(
@click='newSignal = true',
color='accent', icon='notification_add', label='New Signal')
</
template
>
<
script
>
import
Friends
from
'
components/Friends.vue
'
import
EventForm
from
'
components/EventForm.vue
'
import
SignalForm
from
'
components/SignalForm.vue
'
import
{
mapState
}
from
'
vuex
'
export
default
{
...
...
@@ -51,14 +54,16 @@ export default {
components
:
{
Friends
,
EventForm
EventForm
,
SignalForm
},
data
()
{
return
{
leftDrawer
:
false
,
rightDrawer
:
false
,
newEvent
:
false
newEvent
:
false
,
newSignal
:
false
}
},
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment