Big Update:
* Menus open and close based on URL, allowing for back button on note menus to close Minor Updates: * Made night mode buttons green * Widend the global menu * Added a version display * Made the create note button real big * Made the creane note button more visible on mobile * Hide the note button if there are no notes * Changed quick menu item to "Quick Note" * Added reload option if version is clicked * Moved around menu buttons at the bottom of the note * Moved tags back into the main footer on note * Disabled hiding of toolbar on mobile when editor focused * Updated locked note display on main title card * Put last edit on note display * Tweaked display styles to be more minimal, added fade-in on hover * Added solid scribe to all title displays on the site * Reactivated help page and put some good help on it...decent help * Increased max upload size for files to 5MB * Shortened text on title display cards to make them all the same size
This commit is contained in:
@@ -93,47 +93,41 @@
|
||||
|
||||
<!-- bottom stats -->
|
||||
<div class="ui basic segment">
|
||||
<div class="ui grid reduced-padding">
|
||||
<div class="ui grid compact">
|
||||
|
||||
<div class="four wide column">
|
||||
<!-- Tags -->
|
||||
<button class="ui compact basic fluid button shrinking" v-on:click="showTagSlideMenu = !showTagSlideMenu; modified = true">
|
||||
<i class="tags icon"></i> Tags
|
||||
<button class="ui compact basic fluid icon button shrinking" v-if="!isEncrypted"
|
||||
v-on:click="$router.push(`/notes/open/${noteid}/menu/passwordprotect`)" data-tooltip="Add Password">
|
||||
<i class="shield alternate icon"></i>
|
||||
Protect
|
||||
</button>
|
||||
<button class="ui compact basic fluid icon button shrinking" v-if="isEncrypted && isDecrypted" v-on:click="disableEncryption" data-tooltip="Remove Password Protection">
|
||||
<i class="unlock icon"></i>
|
||||
Un-protect
|
||||
</button>
|
||||
</div>
|
||||
<div class="four wide column">
|
||||
<!-- Archive Button -->
|
||||
<button class="ui compact basic fluid button shrinking" v-on:click="onToggleArchived">
|
||||
<button class="ui compact basic fluid icon button shrinking" v-on:click="onToggleArchived" :data-tooltip="archived == 1?'Move to main list':'Move to Archive'">
|
||||
<span v-if="archived == 1"><i class="green archive icon"></i> Archived</span>
|
||||
<span v-if="archived != 1"><i class="archive icon"></i> Archive</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="four wide column"><!-- Pin button -->
|
||||
<button class="ui compact basic fluid button shrinking" v-on:click="onTogglePinned">
|
||||
<div class="four wide column">
|
||||
<!-- Pin button -->
|
||||
<button class="ui compact basic fluid icon button shrinking" v-on:click="onTogglePinned" :data-tooltip="pinned == 1?'Un-pin from top':'Pin to top'">
|
||||
<span v-if="pinned == 1"><i class="green pin icon"></i> Pinned</span>
|
||||
<span v-if="pinned != 1"><i class="pin icon"></i> Pin</span>
|
||||
</button></div>
|
||||
<div class="four wide column">
|
||||
<!-- files button -->
|
||||
<button class="ui compact basic fluid button shrinking" v-on:click="openEditAttachment">
|
||||
<button class="ui compact basic fluid icon button shrinking" v-on:click="openEditAttachment" data-tooltip="Files on note">
|
||||
<i class="folder icon"></i> Files
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<!-- <div class="sixteen wide column"></div> -->
|
||||
|
||||
<div class="eight wide column">
|
||||
|
||||
<button class="ui basic compact button shrinking" v-if="!isEncrypted" v-on:click="passwordEnterVisible = true">
|
||||
<i class="shield alternate icon"></i>
|
||||
Password Protect
|
||||
</button>
|
||||
<button class="ui icon basic compact button shrinking" v-if="isEncrypted && isDecrypted" v-on:click="disableEncryption">
|
||||
<i class="unlock icon"></i>
|
||||
Remove Password
|
||||
</button>
|
||||
</div>
|
||||
<div class="seven wide right aligned middle aligned column">
|
||||
<div class="one wide column"></div>
|
||||
<div class="eight wide middle aligned column">
|
||||
<span :data-tooltip="`Created: ${$helpers.timeAgo(created)}`">
|
||||
Edited: {{ $helpers.timeAgo(updated) }}
|
||||
</span>
|
||||
@@ -151,13 +145,21 @@
|
||||
</span>
|
||||
|
||||
<!-- Note options on the bottom of note -->
|
||||
<div class="all-settings" :class="{ 'low-settings':!extraToolbarsVisible }">
|
||||
<div class="all-settings">
|
||||
|
||||
<div class="note-menu shrink-icons-on-mobile">
|
||||
|
||||
<!-- Tags -->
|
||||
<nm-button
|
||||
v-on:click.native="$router.push(`/notes/open/${noteid}/menu/tags`)"
|
||||
icon="tags"
|
||||
text="Tags"
|
||||
tip="Tags"
|
||||
></nm-button>
|
||||
|
||||
<!-- colors button -->
|
||||
<nm-button
|
||||
v-on:click.native="showColorPicker"
|
||||
v-on:click.native="$router.push(`/notes/open/${noteid}/menu/colors`)"
|
||||
icon="paint brush"
|
||||
text="Color"
|
||||
tip="Note Color"
|
||||
@@ -165,7 +167,7 @@
|
||||
|
||||
<!-- add images panel -->
|
||||
<nm-button
|
||||
v-on:click.native="showFilesSideMenu = !showFilesSideMenu"
|
||||
v-on:click.native="$router.push(`/notes/open/${noteid}/menu/images`)"
|
||||
icon="image"
|
||||
text="Images"
|
||||
tip="Images"
|
||||
@@ -182,7 +184,7 @@
|
||||
icon="ellipsis horizontal"
|
||||
text="Options"
|
||||
tip="More Options"
|
||||
v-on:click.native="showNoteOptions = !showNoteOptions" />
|
||||
v-on:click.native="$router.push(`/notes/open/${noteid}/menu/options`)" />
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -191,31 +193,31 @@
|
||||
|
||||
<!-- Side slide menus for colors, tags, images and other options -->
|
||||
|
||||
<side-slide-menu v-show="colorPickerVisible" v-on:close="colorPickerVisible = false" name="colors">
|
||||
<side-slide-menu v-show="colors" v-on:close="colors = false" name="colors">
|
||||
<color-picker
|
||||
@changeColor="onChangeColor"
|
||||
@close="onCloseColorChanger"
|
||||
@close="colors = false"
|
||||
:style-object="styleObject"
|
||||
/>
|
||||
</side-slide-menu>
|
||||
|
||||
<side-slide-menu v-show="showTagSlideMenu" v-on:close="showTagSlideMenu = false" name="tags" :style-object="styleObject">
|
||||
<side-slide-menu v-show="tags" v-on:close="tags = false" name="tags" :style-object="styleObject">
|
||||
<div class="ui basic segment">
|
||||
<note-tag-edit :noteId="noteid" :key="'tags-for-note-'+noteid"/>
|
||||
</div>
|
||||
</side-slide-menu>
|
||||
|
||||
<side-slide-menu v-show="showFilesSideMenu" v-on:close="showFilesSideMenu = false" name="images" :style-object="styleObject">
|
||||
<side-slide-menu v-show="images" v-on:close="images = false" name="images" :style-object="styleObject">
|
||||
<div class="ui basic segment">
|
||||
<simple-attachment-note
|
||||
v-on:close="showFilesSideMenu = false"
|
||||
v-on:close="images = false"
|
||||
:note-id="noteid"
|
||||
:squire-editor="editor">
|
||||
</simple-attachment-note>
|
||||
</div>
|
||||
</side-slide-menu>
|
||||
|
||||
<side-slide-menu v-show="showNoteOptions" v-on:close="showNoteOptions = false" name="note-options" :style-object="styleObject">
|
||||
<side-slide-menu v-show="options" v-on:close="options = false" name="note-options" :style-object="styleObject">
|
||||
<div class="ui basic padded segment">
|
||||
<div class="ui grid">
|
||||
<div class="sixteen wide column">
|
||||
@@ -257,7 +259,7 @@
|
||||
</div>
|
||||
</side-slide-menu>
|
||||
|
||||
<side-slide-menu v-show="passwordEnterVisible" v-on:close="passwordEnterVisible = false" :fullShadow="true" name="encrypt note">
|
||||
<side-slide-menu v-show="passwordprotect" v-on:close="passwordprotect = false" :fullShadow="true" name="encrypt note">
|
||||
<div class="ui basic segment" v-if="isDecrypted && isEncrypted">
|
||||
<p>Note Decrypted</p>
|
||||
<div class="ui green button" v-on:click="lockNote">Lock Note</div>
|
||||
@@ -319,7 +321,7 @@
|
||||
|
||||
export default {
|
||||
name: 'InputNotes',
|
||||
props: [ 'noteid', 'position' ],
|
||||
props: [ 'noteid', 'position', 'openMenu', 'urlData' ],
|
||||
components:{
|
||||
'note-tag-edit': () => import('@/components/NoteTagEdit.vue'),
|
||||
'color-picker': () => import('@/components/ColorPicker.vue'),
|
||||
@@ -371,11 +373,10 @@
|
||||
// pastFocusedNode: null,
|
||||
usersOnNote: 0,
|
||||
|
||||
extraToolbarsVisible: true,
|
||||
showTagSlideMenu: false,
|
||||
colorPickerVisible: false,
|
||||
showFilesSideMenu: false,
|
||||
showNoteOptions: false,
|
||||
tags: false,
|
||||
colors: false,
|
||||
images: false,
|
||||
options: false,
|
||||
|
||||
//Encryption options
|
||||
passwordHint: '',
|
||||
@@ -384,7 +385,7 @@
|
||||
hashedPass: '', //sha-256 password hash, sends to server for decryption
|
||||
isEncrypted: false,
|
||||
isDecrypted: false,
|
||||
passwordEnterVisible: false,
|
||||
passwordprotect: false,
|
||||
decryptAttempts: 0,
|
||||
lockedOut: false,
|
||||
autoLockTimeout: null,
|
||||
@@ -404,6 +405,30 @@
|
||||
this.currentNoteId = newVal
|
||||
this.loadNote(this.currentNoteId)
|
||||
|
||||
},
|
||||
urlData(newVal, oldVal){
|
||||
|
||||
//Handle changes in URL to
|
||||
|
||||
if(newVal.id == undefined || newVal.id != this.noteid){
|
||||
this.close()
|
||||
}
|
||||
|
||||
//Reset all note menus on URL change
|
||||
this.colors = false
|
||||
this.tags = false
|
||||
this.passwordprotect = false
|
||||
this.options = false
|
||||
this.images = false
|
||||
|
||||
//If a menu value is set, open it
|
||||
if(newVal.openMenu){
|
||||
//Only modify menu boolean if its defined
|
||||
if(typeof this[newVal.openMenu] == 'boolean'){
|
||||
|
||||
this[newVal.openMenu] = true
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
beforeMount(){
|
||||
@@ -518,13 +543,11 @@
|
||||
|
||||
//Show and hide additional toolbars
|
||||
this.editor.addEventListener('focus', e => {
|
||||
if(this.$store.getters.getIsUserOnMobile){
|
||||
this.extraToolbarsVisible = false
|
||||
}
|
||||
//Add events here if you like
|
||||
})
|
||||
this.editor.addEventListener('blur', e => {
|
||||
|
||||
this.save()
|
||||
this.extraToolbarsVisible = true
|
||||
})
|
||||
},
|
||||
//If nothing is selected, select the entire line
|
||||
@@ -598,7 +621,7 @@
|
||||
|
||||
//Close menu if user is on mobile, then sort list
|
||||
if(this.$store.getters.getIsUserOnMobile){
|
||||
this.showNoteOptions = false
|
||||
this.options = false
|
||||
}
|
||||
|
||||
//Fetch the container
|
||||
@@ -615,7 +638,7 @@
|
||||
|
||||
//Close menu if user is on mobile, then sort list
|
||||
if(this.$store.getters.getIsUserOnMobile){
|
||||
this.showNoteOptions = false
|
||||
this.options = false
|
||||
}
|
||||
|
||||
//Fetch the container
|
||||
@@ -671,7 +694,7 @@
|
||||
|
||||
//Close menu if user is on mobile, then sort list
|
||||
if(this.$store.getters.getIsUserOnMobile){
|
||||
this.showNoteOptions = false
|
||||
this.options = false
|
||||
}
|
||||
|
||||
//Fetch the container
|
||||
@@ -735,7 +758,7 @@
|
||||
|
||||
//Close menu if user is on mobile, then sort list
|
||||
if(this.$store.getters.getIsUserOnMobile){
|
||||
this.showNoteOptions = false
|
||||
this.options = false
|
||||
}
|
||||
|
||||
//Fetch the container
|
||||
@@ -791,11 +814,6 @@
|
||||
|
||||
return this.editor.getHTML()
|
||||
},
|
||||
showColorPicker(event){
|
||||
|
||||
this.colorPickerVisible = !this.colorPickerVisible
|
||||
this.colorPickerLocation = {'x':event.clientX, 'y':event.clientY}
|
||||
},
|
||||
openEditAttachment(){
|
||||
|
||||
this.$router.push('/attachments/note/'+this.currentNoteId)
|
||||
@@ -822,10 +840,6 @@
|
||||
this.lastNoteHash = 0
|
||||
this.save()
|
||||
},
|
||||
onCloseColorChanger(){
|
||||
|
||||
this.colorPickerVisible = false
|
||||
},
|
||||
onChangeColor(newStyleObject){
|
||||
|
||||
//Set new style object for note, page will use some styles, styles will be saved to database
|
||||
@@ -1136,8 +1150,6 @@
|
||||
this.updated = Math.round((+new Date)/1000)
|
||||
this.modified = true
|
||||
|
||||
console.log('Saved')
|
||||
|
||||
//Update last saved note hash
|
||||
this.lastNoteHash = this.hashString( currentNoteText )
|
||||
this.startAutolockTimer()
|
||||
@@ -1198,9 +1210,6 @@
|
||||
},
|
||||
close(){
|
||||
|
||||
// this.loading = true
|
||||
// this.loadingMessage = 'Save and Close'
|
||||
|
||||
this.save().then( result => {
|
||||
|
||||
this.sizeDown = true
|
||||
@@ -1241,7 +1250,7 @@
|
||||
this.isDecrypted = false
|
||||
this.password = ''
|
||||
this.hashedPass = ''
|
||||
this.passwordEnterVisible = false
|
||||
this.passwordprotect = false
|
||||
this.setText('')
|
||||
})
|
||||
},
|
||||
@@ -1258,7 +1267,7 @@
|
||||
this.lastNoteHash = 0
|
||||
this.password = ''
|
||||
this.passwordConfirm = ''
|
||||
this.passwordEnterVisible = false
|
||||
this.passwordprotect = false
|
||||
|
||||
this.save()
|
||||
.then(results => {
|
||||
@@ -1273,7 +1282,7 @@
|
||||
this.password = ''
|
||||
this.passwordConfirm = ''
|
||||
this.hashedPass = ''
|
||||
this.passwordEnterVisible = false
|
||||
this.passwordprotect = false
|
||||
|
||||
//Reload Note
|
||||
this.save()
|
||||
@@ -1364,14 +1373,6 @@
|
||||
/*padding: 1.2em 0 0;*/
|
||||
flex-grow: 0;
|
||||
}
|
||||
.low-settings {
|
||||
bottom: 0px;
|
||||
cursor: pointer;
|
||||
height: 1.4em;
|
||||
padding-top: 1.5em;
|
||||
overflow: hidden;
|
||||
border: 1px solid #534c68;
|
||||
}
|
||||
/*End Settings manager styles */
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user