2018-03-28 15:25:30 +00:00
|
|
|
<style lang="scss">
|
|
|
|
|
|
|
|
@keyframes scale-up{
|
|
|
|
0%{ transform: scale(0); }
|
|
|
|
100%{ transform: scale(1); }
|
|
|
|
}
|
|
|
|
|
|
|
|
.minipopup{
|
|
|
|
display: block;
|
|
|
|
position: absolute;
|
|
|
|
top: 0;
|
|
|
|
left: 0;
|
|
|
|
width: calc( 100% - 2*1em );
|
|
|
|
height: auto;
|
|
|
|
|
|
|
|
margin: .7em 1em;
|
|
|
|
|
|
|
|
border-radius: 5px;
|
|
|
|
box-shadow: 0 2px 10 0 rgba(0,0,0,.5);
|
|
|
|
|
|
|
|
background-color: #ffffff;
|
|
|
|
|
|
|
|
will-change: transform;
|
|
|
|
transform-origin: 100% 0;
|
|
|
|
|
|
|
|
animation: scale-up .3s ease-in-out;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
overflow: hidden;
|
|
|
|
|
|
|
|
z-index: 100;
|
|
|
|
|
|
|
|
& > span{
|
|
|
|
|
|
|
|
display: block;
|
|
|
|
position: relative;
|
|
|
|
|
|
|
|
padding: .7em 1em;
|
|
|
|
padding-left: 3em;
|
|
|
|
|
|
|
|
background-color: #fff;
|
|
|
|
background: url('/asset/svg/minipopup.invite.svg') left 1em center no-repeat;
|
|
|
|
background-size: auto 45%;
|
|
|
|
|
|
|
|
color: #99aab5;
|
|
|
|
font-size: .85em;
|
|
|
|
letter-spacing: .05em;
|
|
|
|
white-space: nowrap;
|
|
|
|
|
|
|
|
cursor: pointer;
|
|
|
|
|
|
|
|
transition: background-color .2s ease-in-out,
|
|
|
|
color .2s ease-in-out;
|
|
|
|
|
|
|
|
|
|
|
|
&[data-icon='create']{ background-image: url('/asset/svg/minipopup.create.svg'); }
|
|
|
|
&[data-icon='category']{ background-image: url('/asset/svg/minipopup.category.svg'); }
|
|
|
|
&[data-icon='edit']{ background-image: url('/asset/svg/minipopup.edit.svg'); }
|
2018-03-28 19:51:04 +00:00
|
|
|
&[data-icon='remove']{ background-image: url('/asset/svg/minipopup.remove.svg'); }
|
|
|
|
&[data-icon='remove']{ background-image: url('/asset/svg/minipopup.remove.svg'); }
|
2018-03-28 15:25:30 +00:00
|
|
|
&[data-icon='logout']{ background-image: url('/asset/svg/minipopup.logout.svg'); }
|
2018-03-28 19:51:04 +00:00
|
|
|
&[data-icon='leave']{ background-image: url('/asset/svg/minipopup.leave.svg'); }
|
2018-03-28 15:25:30 +00:00
|
|
|
|
|
|
|
&:hover{ background-color: #f9f9f9; color: #737f8d; }
|
|
|
|
|
|
|
|
/* separators */
|
|
|
|
/*after*/ &.sa{ border-bottom: 1px solid #f3f3f3; }
|
|
|
|
/*before*/ &.sb{ border-top: 1px solid #f3f3f3; }
|
|
|
|
|
|
|
|
&.special{
|
|
|
|
color: #7289da;
|
|
|
|
|
|
|
|
&:hover{ color: #677bc4; }
|
|
|
|
}
|
|
|
|
|
2018-03-28 19:51:04 +00:00
|
|
|
&.invalid{ color: #e65835; }
|
|
|
|
|
|
|
|
&.invalid-h:hover{ color: #e65835; }
|
2018-03-28 15:25:30 +00:00
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</style>
|
2018-03-21 17:44:27 +00:00
|
|
|
<template>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class='dialog'>
|
|
|
|
|
2018-03-22 17:15:57 +00:00
|
|
|
|
2018-03-28 18:06:26 +00:00
|
|
|
<div class='header' @click='minipop = !minipop' :data-open='minipop?1:0'>
|
2018-03-28 19:51:04 +00:00
|
|
|
<div class='title'>{{ gs.content.cbuf.label }}</div>
|
2018-03-21 17:44:27 +00:00
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class='body'>
|
|
|
|
|
2018-03-28 15:25:30 +00:00
|
|
|
<div v-show='minipop' class='minipopup'>
|
2018-03-28 19:51:04 +00:00
|
|
|
<span class='special sa' @click='gs.popup.show(`channel.invite`); minipop=false'>Invite people</span>
|
|
|
|
<span data-icon='create' @click='gs.popup.show(`channel.create`); minipop=false'>Create channel</span>
|
|
|
|
<span class ='invalid-h' data-icon='remove' @click='gs.popup.show(`channel.remove`); minipop=false'>Remove channel</span>
|
|
|
|
<span data-icon='category' @click='gs.popup.show(`room.create`); minipop=false'>Create room</span>
|
|
|
|
<span data-icon='edit' @click='gs.popup.show(`nickname.change`); minipop=false'>Change nickname</span>
|
|
|
|
<span class='sb invalid' data-icon='leave' @click='gs.popup.show(`channel.leave`); minipop=false'>Leave channel</span>
|
|
|
|
<span class='sb invalid' data-icon='logout' @click='gs.auth.token=null; gs.refresh()'>Logout</span>
|
2018-03-28 15:25:30 +00:00
|
|
|
</div>
|
|
|
|
|
2018-03-28 19:51:04 +00:00
|
|
|
<div v-for='(rooms, type) in gs.room' v-if='type[0] != `_`'>
|
2018-03-21 21:44:49 +00:00
|
|
|
<div class='toggle'
|
2018-03-22 12:40:48 +00:00
|
|
|
:data-toggle='rooms.visible?1:0'
|
2018-03-22 17:15:57 +00:00
|
|
|
@click='rooms.visible=!rooms.visible'>
|
|
|
|
{{ type }} <span>rooms</span>
|
|
|
|
</div>
|
2018-03-22 19:03:29 +00:00
|
|
|
<div class='add' @click='gs.popup.show(`room.create`)' data-title='Create channel'></div>
|
2018-03-21 21:44:49 +00:00
|
|
|
<ul>
|
2018-03-22 12:40:48 +00:00
|
|
|
<li v-for='r in rooms.list'
|
|
|
|
:class='rooms.current==r.id?`active`:``'
|
|
|
|
:data-type='r.type'
|
2018-03-22 13:57:03 +00:00
|
|
|
@click='gs.room.nav(r.type, r.id)'>{{ r.name }}</li>
|
2018-03-21 21:44:49 +00:00
|
|
|
</ul>
|
|
|
|
</div>
|
2018-03-22 12:40:48 +00:00
|
|
|
|
2018-03-21 21:44:49 +00:00
|
|
|
</div>
|
|
|
|
|
2018-03-21 17:44:27 +00:00
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</template><script>
|
|
|
|
export default {
|
|
|
|
|
|
|
|
name: 'dialog-',
|
|
|
|
|
2018-03-28 15:25:30 +00:00
|
|
|
data(){ return { gs: gs.get, minipop: false }; },
|
|
|
|
|
|
|
|
methods: {
|
|
|
|
/* show: */
|
|
|
|
}
|
2018-03-21 17:44:27 +00:00
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
</script>
|