* Small hack to fix images not closing window on mobile
* Made note active text modifier buttons better * Fixed Colored notes being to big on mobile
This commit is contained in:
@@ -9,7 +9,7 @@
|
||||
.floating-button {
|
||||
position: absolute;
|
||||
right: 7px;
|
||||
top: 4px;
|
||||
top: 5px;
|
||||
z-index: 2;
|
||||
}
|
||||
.floating-note-options {
|
||||
@@ -26,40 +26,48 @@
|
||||
}
|
||||
</style>
|
||||
<template>
|
||||
<span v-on:mouseenter="extraMenuHover = true" v-on:mouseleave="extraMenuHover = false">
|
||||
<span>
|
||||
|
||||
<div class="ui form">
|
||||
<div class="ui form" v-on:mouseenter="extraMenuHover = true" v-on:mouseleave="extraMenuHover = false">
|
||||
<!-- normal search menu -->
|
||||
<div class="ui left icon fluid input">
|
||||
<input ref="desktopSearch" v-on:blur="focused = false" v-on:focus="focused = true" v-model="searchTerm" @keydown="onKeyDown" @keyup="onKeyUp" placeholder="Search or Start Typing New Note" />
|
||||
<i class="search icon"></i>
|
||||
</div>
|
||||
|
||||
<div class="floating-button" v-if="searchTerm.length > 0 && !searched && searchTerm.indexOf(' ') == -1">
|
||||
<div class="ui green compact button" v-on:click="search()">Search</div>
|
||||
|
||||
<div class="floating-button" v-if="searchTerm.length > 0">
|
||||
<i class="big link grey close icon" v-on:click="clear()"></i>
|
||||
</div>
|
||||
|
||||
<div class="floating-button" v-if="searchTerm.length > 0 && searched">
|
||||
<div class="ui grey compact button" v-on:click="clear()">Clear</div>
|
||||
</div>
|
||||
|
||||
<div class="floating-button" v-if="!searched && searchTerm.length > 0 && searchTerm.indexOf(' ') != -1">
|
||||
<div class="ui grey compact button" v-on:click="searchTerm = ''">Clear</div>
|
||||
</div>
|
||||
|
||||
<div class="floating-note-options"
|
||||
v-if="(searchTerm.indexOf(' ') != -1 || tagSuggestions.length > 0) && (extraMenuHover)">
|
||||
v-if="(searchTerm.length > 0 || tagSuggestions.length > 0) && (extraMenuHover)">
|
||||
<div class="ui segment">
|
||||
<div class="ui very compact grid" v-if="searchTerm.indexOf(' ') != -1">
|
||||
<div class="eight wide column">
|
||||
<div class="ui green compact shrinking button" v-on:click="pushToNewNote()">
|
||||
<div class="ui very compact grid">
|
||||
<div class="five wide column">
|
||||
<div class="ui mini green fluid compact shrinking button" v-on:click="search()">
|
||||
<i class="search icon"></i>Search
|
||||
</div>
|
||||
<span class="button-sub">
|
||||
( Enter )
|
||||
</span>
|
||||
</div>
|
||||
<div class="five wide middle aligned column">
|
||||
<div class="ui mini green fluid compact shrinking button" v-on:click="pushToNewNote()">
|
||||
<i class="plus icon"></i>A New Note
|
||||
</div>
|
||||
<span class="button-sub">
|
||||
( Tab )
|
||||
</span>
|
||||
</div>
|
||||
<div class="eight wide right aligned column">
|
||||
<div class="ui green compact shrinking button" v-on:click="pushToQuickNote()">
|
||||
<div class="six wide right aligned column">
|
||||
<div class="ui mini green fluid compact shrinking button" v-on:click="pushToQuickNote()">
|
||||
<i class="sticky note outline icon"></i>The Scratch Pad
|
||||
</div>
|
||||
<span class="button-sub">
|
||||
( CTRL + ENTER )
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -182,18 +190,34 @@
|
||||
},
|
||||
onKeyDown(event){
|
||||
|
||||
//Commant + Enter
|
||||
if((event.metaKey || event.ctrlKey) && event.keyCode == 13 ){
|
||||
this.pushToQuickNote()
|
||||
return
|
||||
//Tab
|
||||
if(event.keyCode == 9){
|
||||
this.pushToNewNote()
|
||||
event.preventDefault()
|
||||
return false
|
||||
}
|
||||
|
||||
//Commant + Enter
|
||||
if((event.metaKey || event.ctrlKey) && event.keyCode == 13 ){
|
||||
this.pushToQuickNote()
|
||||
event.preventDefault()
|
||||
return false
|
||||
}
|
||||
|
||||
//Enter
|
||||
if(event.keyCode == 13){
|
||||
this.search()
|
||||
return
|
||||
event.preventDefault()
|
||||
return false
|
||||
}
|
||||
},
|
||||
search(){
|
||||
|
||||
if(this.searchTerm.length == 0){
|
||||
this.clear()
|
||||
return
|
||||
}
|
||||
|
||||
this.searched = true
|
||||
|
||||
this.$refs.desktopSearch.focus()
|
||||
|
Reference in New Issue
Block a user