-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
dbebab8
commit b619ad1
Showing
18 changed files
with
659 additions
and
64 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
|
||
<template> | ||
<div class="rmli-add rmli-note" @click="$emit('click')"> | ||
<textarea v-model="value" @keydown="onKeyDown" @keyup="onKeyPress" :placeholder="$t('add.new')"/> | ||
</div> | ||
</template> | ||
|
||
<style lang="scss"> | ||
@import '../scss/add.scss'; | ||
@import '../scss/note.scss'; | ||
</style> | ||
<script> | ||
export default { | ||
name: 'Add', | ||
emits: ['change', 'click'], | ||
props: { | ||
}, | ||
data: function () { | ||
return { | ||
value: '' | ||
} | ||
}, | ||
components: { | ||
}, | ||
methods: { | ||
onKeyPress (e) { | ||
this.$emit('change', e.target.value) | ||
this.value ='' | ||
} | ||
}, | ||
mounted () { | ||
} | ||
} | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
|
||
<template> | ||
<div class="rmli-note" @click="$emit('click')"> | ||
<textarea :value="element.value" @keydown="onKeyDown" @keyup="onKeyPress" ref="input" :placeholder="element.placeholder"/> | ||
</div> | ||
</template> | ||
|
||
<style lang="scss"> | ||
@import '../scss/note.scss'; | ||
</style> | ||
<script> | ||
export default { | ||
name: 'Note', | ||
emits: ['change', 'focus', 'click'], | ||
props: { | ||
element :{ | ||
type: Object, | ||
default() { | ||
return { value: '' , placeholder:"Click to create new"} | ||
} | ||
}, | ||
}, | ||
data: function () { | ||
return { | ||
value: '' | ||
} | ||
}, | ||
components: { | ||
}, | ||
methods: { | ||
onKeyPress (e) { | ||
console.debug('onKeyPress', e.target.value) | ||
this.$emit('change', e.target.value) | ||
}, | ||
onKeyDown () { | ||
//console.debug('onKeyDown()', this.value, e) | ||
/* | ||
if (e.key == 'Tab') { | ||
e.preventDefault(); | ||
var start = this.selectionStart; | ||
var end = this.selectionEnd; | ||
// set textarea value to: text before caret + tab + text after caret | ||
this.value = this.value.substring(0, start) + | ||
"\t" + this.value.substring(end); | ||
// put caret at right position again | ||
this.selectionStart = | ||
this.selectionEnd = start + 1; | ||
} | ||
this.style.height = "auto"; | ||
this.style.height = (this.scrollHeight) + "px"; | ||
*/ | ||
}, | ||
focus () { | ||
this.$refs.input.focus() | ||
} | ||
}, | ||
mounted () { | ||
if (this.element) { | ||
this.value = this.element.value | ||
} | ||
} | ||
} | ||
</script> |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"add": { | ||
"new": "Type here to create new" | ||
}, | ||
"toolbar": { | ||
"search": "Search here" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,17 @@ | ||
import { createApp } from 'vue' | ||
import App from './App.vue' | ||
import router from './router' | ||
import { createI18n } from 'vue-i18n' | ||
|
||
createApp(App).use(router).mount('#app') | ||
const i18n = createI18n({ | ||
locale: 'en', // set locale | ||
fallbackLocale: 'en', // set fallback locale | ||
messages: { | ||
'en': require('./i18n/en.json'), | ||
'en-uk': require('./i18n/en.json'), | ||
'en-us': require('./i18n/en.json') | ||
} | ||
}) | ||
|
||
|
||
createApp(App).use(router).use(i18n).mount('#app') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
@import './ds.scss'; | ||
|
||
.rmli-add{ | ||
|
||
textarea{ | ||
height: 30px; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
@import './ds.scss'; | ||
|
||
#app { | ||
font-family: $font-family; | ||
-webkit-font-smoothing: antialiased; | ||
-moz-osx-font-smoothing: grayscale; | ||
color: $color1; | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,8 @@ | ||
@import './ds.scss'; | ||
|
||
.rmli-editor { | ||
padding: $spacing-l; | ||
border: 1px solid red; | ||
|
||
textarea{ | ||
border:0px; | ||
|
||
.rmli-element-add { | ||
|
||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
@import './ds.scss'; | ||
|
||
.rmli-container { | ||
min-width: 400px; | ||
max-width: 800px; | ||
margin: auto; | ||
border: 1px dashed #ccc; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
@import './ds.scss'; | ||
|
||
.rmli-note{ | ||
|
||
textarea{ | ||
border: none; | ||
border-left: 3px solid transparent; | ||
|
||
width: 100%; | ||
box-sizing: border-box; | ||
font-family: $font-family; | ||
|
||
&:focus { | ||
border-left: 3px solid blue; | ||
outline: none; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
@import './ds.scss'; | ||
|
||
.rmli-toolbar { | ||
display: flex; | ||
gap: $spacing-m; | ||
|
||
.rmli-tools { | ||
display: flex; | ||
align-items: center; | ||
} | ||
|
||
.rmli-search { | ||
display: flex; | ||
flex-grow: 1; | ||
font-size: $font-size-m; | ||
gap: $spacing-m; | ||
align-items: center; | ||
|
||
input { | ||
border: 1px solid transparent; | ||
flex-grow: 1; | ||
text-align: right; | ||
&:focus { | ||
border: 1px solid $border-color-focus; | ||
outline:none; | ||
} | ||
} | ||
} | ||
|
||
i { | ||
font-size: $font-size-xl; | ||
color: $color1; | ||
|
||
&:hover { | ||
color: $color1-hover; | ||
} | ||
} | ||
} |
Oops, something went wrong.