Skip to content

Commit

Permalink
Merge pull request #23 from TankNee/rebuild/develop
Browse files Browse the repository at this point in the history
202001002
  • Loading branch information
TankNee authored Oct 2, 2020
2 parents c469bbe + 5cc16af commit 683f312
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 18 deletions.
29 changes: 17 additions & 12 deletions src/components/NoteOutline.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
overlay
elevated
side="right"
class="transparent"
class="bg-blur"
>
<q-scroll-area
:thumb-style="thumbStyle"
Expand All @@ -18,22 +18,21 @@
<q-tree
:nodes="contentsList"
node-key="key"
default-expand-all
selected-color="primary"
class="non-selectable"
class="non-selectable z-max"
:selected.sync="selected"
:expanded.sync="expanded"
@update:selected="v => {
nodeClickHandler(v)
}"
default-expand-all
no-connectors
/>
<!-- <q-icon name="close" class="absolute-bottom" size="24px" color="#26A69A" />-->
</q-scroll-area>
<q-icon
name="close"
:class="`absolute-bottom-right fab-icon cursor-pointer material-icons-round neeto-icon${$q.dark.isActive ? '-dark' : ''}`"
@click="$refs.drawer.hide()"
:class="`absolute-bottom-right fab-icon cursor-pointer material-icons-round neeto-icon${$q.dark.isActive ? '-dark' : ''} z-max`"
@click="hide"
size="24px"
color="#26A69A"
v-ripple
Expand All @@ -49,18 +48,22 @@ import events from 'src/constants/events'
const { mapGetters, mapState } = createNamespacedHelpers('server')
export default {
name: 'NoteOutline',
props: {
change: {
types: Function,
default: () => {}
}
},
computed: {
thumbStyle () {
return {
backgroundColor: '#E8ECF1',
width: '7px',
opacity: 0.75
display: 'none'
}
},
barStyle () {
return {
width: '7px'
display: 'none'
}
},
...mapGetters(['currentNote']),
Expand All @@ -73,11 +76,13 @@ export default {
}
},
methods: {
toggle: function () {
this.$refs.drawer.toggle()
show: function () {
this.$refs.drawer.show()
this.change(true)
},
hide: function () {
this.$refs.drawer.hide()
this.change(false)
},
nodeClickHandler: function (v) {
const node = helper.findNodeByNodeKey(this.contentsList, v)
Expand Down
19 changes: 18 additions & 1 deletion src/css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ body {
margin: 0;
overflow: hidden;
background: #ffffff !important;
font-family: "Helvetica Neue",Helvetica,"PingFang SC","Hiragino Sans GB","Microsoft YaHei","微软雅黑",Arial,sans-serif;
font-family: 'Helvetica Neue', Helvetica, 'PingFang SC', 'Hiragino Sans GB',
'Microsoft YaHei', '微软雅黑', Arial, sans-serif;
}
body.body {
background: #ffffff !important;
Expand All @@ -41,6 +42,22 @@ body.body--dark {
font-size: 15px;
font-weight: bold;
}
.bg-blur {
/*webkit-filter: blur(10px); !* Chrome, Opera *!*/
/*-moz-filter: blur(10px);*/
/*-ms-filter: blur(10px);*/
/*filter: blur(10px);*/
position: fixed;
top: 0;
bottom: 0;
right: 0;
z-index: 99;
background-color: #fafafa;
backdrop-filter: blur(10px);
opacity: 0.8;
box-shadow: 0px 1px 16px 0px rgba(0, 0, 0, 0.31);
/*background: rgba(7, 7, 7, 0.6);*/
}
.tooltip {
font-size: 17px;
}
Expand Down
14 changes: 9 additions & 5 deletions src/pages/Index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@
<q-icon
name="format_align_center"
class="absolute-top-right fab-icon cursor-pointer material-icons-round"
@click="() => $refs.outlineDrawer.toggle()"
@click="() => $refs.outlineDrawer.show()"
size="24px"
color="#26A69A"
v-if="dataLoaded && contentsListLoaded"
v-show="dataLoaded && contentsListLoaded && !isOutlineShow"
v-ripple
/>
<q-icon
Expand All @@ -43,11 +43,11 @@
@click="refreshCurrentNote"
size="24px"
color="#26A69A"
v-if="dataLoaded"
v-show="dataLoaded && !isOutlineShow"
v-ripple
/>
</div>
<NoteOutline ref="outlineDrawer" />
<NoteOutline ref="outlineDrawer" :change="outlineDrawerChangeHandler" />
<Loading :visible="isCurrentNoteLoading" />
</template>
</q-splitter>
Expand Down Expand Up @@ -93,12 +93,16 @@ export default {
},
data () {
return {
splitterModel: 300
splitterModel: 300,
isOutlineShow: false
}
},
methods: {
refreshCurrentNote: function () {
bus.$emit(events.SAVE_NOTE)
},
outlineDrawerChangeHandler: function (state) {
this.isOutlineShow = state
}
},
mounted () {
Expand Down

0 comments on commit 683f312

Please sign in to comment.