Skip to content

Commit

Permalink
Fix electron header issue
Browse files Browse the repository at this point in the history
  • Loading branch information
Rustem Mussabekov committed May 21, 2024
1 parent 15f74bc commit fb984b2
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 18 deletions.
7 changes: 0 additions & 7 deletions src/co/common/header/index.module.styl
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
.header {
app-region: drag
-webkit-app-region: drag
display: flex
flex-direction: row
align-items: center
Expand All @@ -14,11 +12,6 @@
position: sticky
top: 0

> * {
app-region: no-drag
-webkit-app-region: no-drag
}

> *:not(:last-child):not(.space) {
margin-right: var(--padding-mini)
}
Expand Down
13 changes: 13 additions & 0 deletions src/co/screen/basic/index.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,19 @@
min-height: 100%;
}

/* electron */
html:before {
content: '';
position: fixed;
top: 0;
left: 0;
right: 0;
height: env(titlebar-area-height);
app-region: drag;
-webkit-app-region: drag;
z-index: 999999999999999;
}

/* extension */
@media (max-width: 800px) {
html:global(.extension:not(.sidepanel):not(.mobile)) .page {
Expand Down
4 changes: 2 additions & 2 deletions src/data/reducers/bookmarks/sort.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ export default function(state, action) {switch (action.type) {
blankSpace.sorts
.setIn(
['sort', 'enabled'],
parseInt(spaceId) != 0 && !space.getIn(['query', 'search']).length ? true : false
parseInt(spaceId) != 0 && !space.getIn(['query', 'search'])?.length ? true : false
)
.setIn(
['score', 'enabled'],
space.getIn(['query', 'search']).length ? true : false
space.getIn(['query', 'search'])?.length ? true : false
)
)

Expand Down
11 changes: 11 additions & 0 deletions src/data/selectors/collections/items.js
Original file line number Diff line number Diff line change
Expand Up @@ -139,4 +139,15 @@ export const makeBranchIds = () => createSelector(
return getChildrens(_.sortBy(items, ({sort})=>sort), item, 0, true)
.map(({item})=>item._id)
}
)

export const makeNested = () => createSelector(
[_collectionsItems, (_, cid)=>cid],
(items, cid)=>{
if (cid <= 0)
return emptyArray

return _.sortBy(items, ({sort})=>sort)
.filter(({parentId})=>parentId==cid)
}
)
7 changes: 0 additions & 7 deletions src/routes/account/layout.module.styl
Original file line number Diff line number Diff line change
@@ -1,18 +1,11 @@
.page {
app-region: drag
-webkit-app-region: drag
width: 100%
overflow: auto
display: grid
grid-template-columns: minmax(auto, 9.5rem) //380px
grid-template-rows: 1fr auto
align-items: center
justify-content: center

> * {
app-region: no-drag
-webkit-app-region: no-drag
}
}

.content {
Expand Down
2 changes: 0 additions & 2 deletions src/routes/join/layout.module.styl
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
.page {
app-region: drag
-webkit-app-region: drag
width: 100%
overflow: auto
display: flex
Expand Down

0 comments on commit fb984b2

Please sign in to comment.