Added paste button and touched up some styles

This commit is contained in:
Max G 2022-07-05 05:10:40 +00:00
parent d94b8c90fc
commit 77cd95fdcb
7 changed files with 42 additions and 9 deletions

View File

@ -930,4 +930,14 @@ i.green.icon.icon.icon.icon {
left: 100%;
opacity: 0;
}
}
.shade {
position: fixed;
top: 0;
bottom: 0;
left: 0;
right: 0;
background-color: rgba(0,0,0,0.7);
z-index: 1000;
}

View File

@ -113,6 +113,7 @@
<style type="text/css">
.button-fix {
display: inline-block;
float: left;
}
.hover-row:hover {
cursor: pointer;

View File

@ -543,7 +543,7 @@ export default {
'#00b5ad', //Teal
'#2185d0', //Blue
'#7128b9', //Violet
'#a333c8', // "Purple"
'#a333c8', //Purple
'#e03997', //Pink
'#db2828', //Red
'#f2711c', //Orange

View File

@ -27,7 +27,9 @@
v-on:tagClick="tagId => toggleTagFilter(tagId)"
/>
<span>
<paste-button />
<span class="ui grey text text-fix">
Active Sessions {{ $store.getters.getActiveSessions }}
</span>
@ -38,8 +40,6 @@
<span v-if="!titleView">
<i class="list icon"></i> List
</span>
</div>
</div>
@ -176,6 +176,7 @@
'attachment-display': require('@/components/AttachmentDisplayCard').default,
'tag-display':require('@/components/TagDisplayComponent.vue').default,
'loading-icon':require('@/components/LoadingIconComponent.vue').default,
'paste-button':require('@/components/PasteButton.vue').default,
},
data () {
return {
@ -809,6 +810,11 @@
</script>
<style type="text/css" scoped>
.text-fix {
padding: 8px 0 0 15px;
display: inline-block;
color: var(--menu-accent);
}
.detail {
float: right;
}

View File

@ -1,3 +1,5 @@
const fs = require('fs')
module.exports = {
pwa: {
name: 'SolidScribe',
@ -13,6 +15,10 @@ module.exports = {
disableHostCheck: true,
proxy: 'http://localhost:8081',
public: 'marvin.local',
https: {
key: fs.readFileSync('./certs/192.168.1.164+4-key.pem'),
cert: fs.readFileSync('./certs/192.168.1.164+4.pem'),
},
},
}
}

View File

@ -442,6 +442,10 @@ Note.update = (userId, noteId, noteText, noteTitle, color, pinned, archived, has
})
.then((rows, fields) => {
if(!rows[0] || !rows[0][0] || !rows[0][0]['note_raw_text_id']){
return reject(false)
}
const textId = rows[0][0]['note_raw_text_id']
let salt = rows[0][0]['salt']
let snippetSalt = rows[0][0]['snippet_salt']
@ -658,6 +662,9 @@ Note.delete = (userId, noteId, masterKey = null) => {
})
}
//
// Returns noteData
//
Note.get = (userId, noteId, masterKey) => {
return new Promise((resolve, reject) => {

View File

@ -13,11 +13,14 @@ QuickNote.get = (userId, masterKey) => {
SELECT note.id FROM note WHERE quick_note = 1 AND user_id = ? LIMIT 1`, [userId])
.then((rows, fields) => {
//Quick Note is set, return note text
//Quick Note is set, return note object
if(rows[0][0] != undefined){
let noteId = rows[0][0].id
return resolve({'noteId':noteId})
const note = Note.get(userId, noteId, masterKey)
.then(noteData => {
return resolve(noteData)
})
} else {
//Or create a new note and get the id
@ -81,7 +84,7 @@ QuickNote.update = (userId, pushText, masterKey) => {
.replace(/&[#A-Za-z0-9]+;/g,'') //Rip out all HTML entities
.replace(/<[^>]+>/g, '') //Rip out all HTML tags
//Turn links into actual linx
//Turn links into actual link
clean = QuickNote.makeUrlLink(clean)
if(clean == ''){ clean = '&nbsp;' }
@ -114,7 +117,7 @@ QuickNote.update = (userId, pushText, masterKey) => {
}
})
.then( saveResults => {
return resolve(true)
return resolve(saveResults)
})
})