Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
ransome
sleek
Commits
5e1fdb7d
Commit
5e1fdb7d
authored
May 29, 2021
by
ransome1
Browse files
Improved user data on windows options, removed unnecessary classes, improved compact mode
parent
6c18904e
Pipeline
#3724
failed with stages
in 2 minutes and 18 seconds
Changes
8
Pipelines
2
Expand all
Hide whitespace changes
Inline
Side-by-side
package.json
View file @
5e1fdb7d
{
"name"
:
"sleek"
,
"productName"
:
"sleek"
,
"version"
:
"1.0.5-
2
"
,
"version"
:
"1.0.5-
3
"
,
"description"
:
"Todo app based on todo.txt for Linux, Windows and MacOS, free and open-source"
,
"synopsis"
:
"Todo app based on todo.txt for Linux, Windows and MacOS, free and open-source"
,
"category"
:
"ProjectManagement"
,
...
...
@@ -53,7 +53,7 @@
"mac"
:
{
"target"
:
{
"target"
:
"default"
,
"arch"
:
"universal"
"arch"
:
[
"arm64"
,
"x64"
]
},
"icon"
:
"assets/icons/sleek.icns"
,
"category"
:
"public.app-category.productivity"
...
...
@@ -63,6 +63,7 @@
},
"win"
:
{
"target"
:
[
"zip"
,
"portable"
,
"nsis"
],
...
...
src/configs/store.config.js
View file @
5e1fdb7d
...
...
@@ -6,10 +6,25 @@ class Store {
constructor
(
opts
)
{
// Renderer process has to get `app` module via `remote`, whereas the main process can get it directly
// app.getPath('userData') will return a string of the user's app data directory path.
const
userDataPath
=
(
electron
.
app
||
electron
.
remote
.
app
).
getPath
(
'
userData
'
);
let
userDataPath
;
//userDataPath = path.dirname(app.getPath('exe'));
//fs.mkdirSync(userDataPath + '\config\sleek');
//this.path = path.join(userDataPath, opts.configName + '.json');
//console.log(path.join(path.dirname(process.execPath), 'config', 'sleek'));
if
(
process
.
env
.
PORTABLE_EXECUTABLE_FILE
)
{
userDataPath
=
path
.
join
(
path
.
dirname
(
process
.
env
.
PORTABLE_EXECUTABLE_FILE
),
'
config
'
,
'
sleek
'
);
if
(
!
fs
.
existsSync
(
userDataPath
))
fs
.
mkdirSync
(
userDataPath
,
{
recursive
:
true
});
}
else
if
(
!
process
.
env
.
PORTABLE_EXECUTABLE_FILE
&&
process
.
platform
===
"
win32
"
)
{
userDataPath
=
path
.
dirname
(
process
.
execPath
);
if
(
!
fs
.
existsSync
(
userDataPath
))
fs
.
mkdirSync
(
userDataPath
,
{
recursive
:
true
});
}
else
{
userDataPath
=
(
electron
.
app
||
electron
.
remote
.
app
).
getPath
(
'
userData
'
);
}
// We'll use the `configName` property to set the file name and path.join to bring it all together as a string
this
.
path
=
path
.
join
(
userDataPath
,
opts
.
configName
+
'
.json
'
);
this
.
data
=
parseDataFile
(
this
.
path
,
opts
.
defaults
);
}
...
...
src/css/style.css
View file @
5e1fdb7d
...
...
@@ -155,7 +155,8 @@ svg {
color
:
#3273dc
;
}
code
{
code
,
pre
{
font-family
:
SFMono-Regular
,
Consolas
,
Liberation
Mono
,
Menlo
,
monospace
!important
;
background-color
:
transparent
!important
;
color
:
inherit
!important
;
}
...
...
@@ -1158,6 +1159,9 @@ body.compact #todoTable .flex-table .flex-row.itemDueDate svg.fa-sort-down {
right
:
0.225em
;
bottom
:
1.75em
;
}
body
.compact
#todoTable
.flex-table.group
{
font-size
:
0.8em
;
}
body
.compact
.modal.content
.modal-card
{
width
:
90%
!important
;
padding
:
0.5em
;
...
...
@@ -1179,6 +1183,17 @@ body.compact nav ul li.logo {
body
.compact
.drawer
{
padding
:
1.5em
!important
;
}
body
.compact
.drawer
.button
{
font-size
:
0.9em
;
}
body
.compact
.drawer
.button
.tag
{
padding
:
0
0.5em
;
width
:
auto
;
height
:
auto
;
min-width
:
1.5em
;
min-height
:
1.5em
;
font-size
:
0.9em
;
}
body
.compact
#autoCompleteContainer
.drawer
{
padding
:
0
!important
;
}
...
...
src/css/style.css.map
View file @
5e1fdb7d
This diff is collapsed.
Click to expand it.
src/js/filters.mjs
View file @
5e1fdb7d
...
...
@@ -326,7 +326,8 @@ function generateFilterButtons(category, autoCompleteValue, autoCompletePrefix,
// skip this loop if no filters are present
if
(
!
filter
)
continue
;
let
todoFiltersItem
=
document
.
createElement
(
"
a
"
);
todoFiltersItem
.
setAttribute
(
"
class
"
,
"
button
"
+
filter
);
todoFiltersItem
.
setAttribute
(
"
class
"
,
"
button
"
);
if
(
category
===
"
priority
"
)
todoFiltersItem
.
classList
.
add
(
filter
);
todoFiltersItem
.
setAttribute
(
"
data-filter
"
,
filter
);
todoFiltersItem
.
setAttribute
(
"
data-category
"
,
category
);
if
(
autoCompletePrefix
===
undefined
)
{
todoFiltersItem
.
setAttribute
(
"
tabindex
"
,
0
)
}
else
{
todoFiltersItem
.
setAttribute
(
"
tabindex
"
,
301
)
}
...
...
src/js/form.mjs
View file @
5e1fdb7d
...
...
@@ -14,7 +14,6 @@ const modalForm = document.getElementById("modalForm");
const
modalFormInputResize
=
document
.
getElementById
(
"
modalFormInputResize
"
);
const
modalBackground
=
document
.
querySelectorAll
(
'
.modal-background
'
);
const
modalClose
=
document
.
querySelectorAll
(
'
.close
'
);
//const modalFormInput = document.getElementById("modalFormInput");
const
priorityPicker
=
document
.
getElementById
(
"
priorityPicker
"
);
const
btnItemStatus
=
document
.
getElementById
(
"
btnItemStatus
"
);
...
...
@@ -55,37 +54,6 @@ modalForm.addEventListener("submit", function(event) {
handleError
(
error
);
});
});
/*modalForm.addEventListener ("keydown", function(event) {
if(event.ctrlKey && event.shiftKey && event.key.length===1 && event.key.match(/[a-z]/i)) {
event.preventDefault();
setPriority(event.key.substr(0,1)).then(response => {
console.log(response);
}).catch(error => {
handleError(error);
});
} else if(event.ctrlKey && event.shiftKey && event.key.length===1 && event.key.match(/[_]/i)) {
setPriority(null).then(response => {
console.log(response);
}).catch(error => {
handleError(error);
});
} else if(event.key==="Enter" && event.ctrlKey) {
submitForm().then(response => {
console.log(response);
}).catch(error => {
handleError(error);
});
} else if(event.key === "Escape" && !autoCompleteContainer.classList.contains("is-active")) {
resetModal().then(function(result) {
console.log(result);
}).catch(function(error) {
handleError(error);
});
//this.classList.remove("is-active");
} else if(event.key === "Escape" && autoCompleteContainer.classList.contains("is-active")) {
autoCompleteContainer.classList.remove("is-active");
}
});*/
modalForm
.
addEventListener
(
"
click
"
,
function
()
{
// close recurrence picker if click is outside of recurrence container
if
(
!
event
.
target
.
closest
(
"
#recurrencePickerContainer
"
)
&&
event
.
target
!=
recurrencePickerInput
)
document
.
getElementById
(
"
recurrencePickerContainer
"
).
classList
.
remove
(
"
is-active
"
)
...
...
@@ -97,7 +65,6 @@ priorityPicker.addEventListener("change", e => {
handleError
(
error
);
});
});
priorityPicker
.
onfocus
=
function
()
{
// close suggestion box if focus comes to priority picker
autoCompleteContainer
.
classList
.
remove
(
"
is-active
"
);
...
...
src/main.js
View file @
5e1fdb7d
...
...
@@ -27,6 +27,8 @@ const getChannel = function() {
return
"
Flathub
"
;
}
else
if
(
process
.
env
.
AUR
)
{
return
"
AUR
"
;
}
else
if
(
process
.
env
.
PORTABLE_EXECUTABLE_DIR
)
{
return
"
Portable
"
;
}
else
{
return
"
Misc
"
;
}
...
...
src/scss/style.scss
View file @
5e1fdb7d
...
...
@@ -138,7 +138,8 @@ strong {
svg
{
color
:
$has-text-link
;
}
code
{
code
,
pre
{
font-family
:
SFMono-Regular
,
Consolas
,
Liberation
Mono
,
Menlo
,
monospace
!
important
;
background-color
:
transparent
!
important
;
color
:
inherit
!
important
;
}
...
...
@@ -1142,6 +1143,9 @@ body.compact {
}
}
}
.flex-table.group
{
font-size
:
.8em
;
}
}
.modal.content
{
.modal-card
{
...
...
@@ -1165,6 +1169,17 @@ body.compact {
}
.drawer
{
padding
:
1
.5em
!
important
;
.button
{
font-size
:
.9em
;
.tag
{
padding
:
0
.5em
;
width
:
auto
;
height
:
auto
;
min-width
:
1
.5em
;
min-height
:
1
.5em
;
font-size
:
.9em
;
}
}
}
#autoCompleteContainer
.drawer
{
padding
:
0
!
important
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment