Skip to content

Commit a0b2c90

Browse files
committed
feat: make all settings expandables
1 parent 93d194e commit a0b2c90

File tree

10 files changed

+123
-74
lines changed

10 files changed

+123
-74
lines changed

app-src/scripts/collapsible/_collapsible-d.scss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@ collapsible {
88
.collapsible-title {
99
cursor: pointer;
1010

11+
&:focus{
12+
outline: none;
13+
}
14+
1115
.collapsible-expand-icon {
1216
transition: all 200ms;
1317
}
Lines changed: 54 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,45 @@
11
.page-settings {
22
text-align: left;
33

4-
h1 {
5-
// NOTE: this is not working
6-
break-after: avoid;
4+
collapsible {
5+
position: relative;
76
}
87

9-
@media(min-width: $layout-gt-sm) {
10-
column-count: 2;
11-
section {
12-
display: inline-block;
13-
width: 100%;
14-
overflow: hidden;
15-
break-inside: avoid;
16-
-webkit-column-break-inside: avoid;
8+
.collapsible-title {
9+
font-size: 18px;
10+
margin-top: 0;
11+
max-width: 90%;
12+
display: block;
13+
}
14+
15+
.collapsible-panel {
16+
overflow: visible;
17+
padding-top: 10px;
18+
19+
> * {
20+
// for help icon positioning
21+
position: static;
1722
}
1823
}
1924

20-
@media(min-width: $layout-gt-lg) {
21-
column-count: 3;
25+
.help-btn {
26+
top: -8px;
27+
right: -8px;
28+
visibility: hidden;
29+
animation: 0.3s help-ico-animation ease-in-out;
30+
animation-fill-mode: forwards;
31+
// wait for slide up
32+
animation-delay: 0.3s;
2233
}
2334

24-
.keep-together {
25-
display: inline-block;
26-
width: 100%;
35+
.ng-leave .help-btn {
36+
display: none;
2737
}
2838

2939
.config-section {
3040
padding: 15px;
3141
margin-bottom: 10px;
3242
background: #ffffff;
33-
position: relative;
3443

3544
@include dark-theme {
3645
background-color: $dark-theme-bg-lighter;
@@ -40,6 +49,17 @@
4049
}
4150
}
4251

52+
@media(min-width: $layout-gt-sm) {
53+
.settings-col {
54+
&:first-child {
55+
margin-right: 10px;
56+
}
57+
&:last-child {
58+
margin-left: 10px;
59+
}
60+
}
61+
}
62+
4363
@media(max-width: $layout-xs) {
4464
.keyboard-settings {
4565
display: none;
@@ -57,4 +77,21 @@
5777
}
5878
}
5979
}
80+
}
81+
82+
@keyframes help-ico-animation {
83+
0% {
84+
-webkit-transform: scale(0);
85+
transform: scale(0);
86+
visibility: visible;
87+
}
88+
50% {
89+
-webkit-transform: scale(1.1);
90+
transform: scale(1.1);
91+
}
92+
100% {
93+
-webkit-transform: scale(1);
94+
transform: scale(1);
95+
visibility: visible;
96+
}
6097
}
Lines changed: 64 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,50 +1,81 @@
11
<div class="page-settings">
22

3-
<section class="config-section"
4-
md-whiteframe="2">
5-
<project-settings all-projects="vm.allProjects"
6-
selected-current-project="vm.selectedCurrentProject"></project-settings>
7-
</section>
3+
<div layout-gt-sm="row">
4+
<div flex-gt-sm="50"
5+
class="settings-col">
6+
<h1 class="md-title">Global Settings</h1>
87

8+
<section class="config-section"
9+
md-whiteframe="2">
10+
<collapsible collapsible-title="Projects"
11+
icon="account_balance">
12+
<project-settings all-projects="vm.allProjects"
13+
selected-current-project="vm.selectedCurrentProject"></project-settings>
14+
</collapsible>
15+
</section>
916

10-
<section class="config-section"
11-
md-whiteframe="2">
12-
<backup-settings settings="r.config"></backup-settings>
13-
</section>
1417

18+
<section class="config-section"
19+
md-whiteframe="2">
20+
<collapsible collapsible-title="Backup and Sync"
21+
icon="swap_vert">
1522

16-
<section class="config-section keyboard-settings"
17-
md-whiteframe="2">
18-
<keyboard-settings keys="r.keys"></keyboard-settings>
19-
</section>
23+
<backup-settings settings="r.config"></backup-settings>
24+
</collapsible>
25+
</section>
2026

2127

22-
<section class="config-section"
23-
md-whiteframe="2">
24-
<misc-settings settings="r.config"></misc-settings>
25-
</section>
28+
<section class="config-section keyboard-settings"
29+
md-whiteframe="2">
30+
<collapsible collapsible-title="Keyboard Shortcuts"
31+
icon="keyboard">
2632

33+
<keyboard-settings keys="r.keys"></keyboard-settings>
34+
</collapsible>
35+
</section>
2736

28-
<div class="keep-together">
29-
<h1 class="md-title">Project Specific Settings</h1>
3037

31-
<section class="config-section"
32-
md-whiteframe="2">
33-
<theme-settings current-theme="r.theme"
34-
is-current-project-theme="true"></theme-settings>
35-
</section>
36-
</div>
38+
<section class="config-section"
39+
md-whiteframe="2">
40+
<collapsible collapsible-title="Misc Settings"
41+
icon="settings">
42+
43+
<misc-settings settings="r.config"></misc-settings>
44+
</collapsible>
45+
</section>
46+
</div>
47+
48+
<div flex-gt-sm="50"
49+
class="settings-col">
3750

38-
<section class="config-section"
39-
md-whiteframe="2">
40-
<jira-settings settings="r.jiraSettings"></jira-settings>
41-
</section>
51+
<h1 class="md-title">Project Specific Settings</h1>
4252

53+
<section class="config-section"
54+
md-whiteframe="2">
55+
<collapsible collapsible-title="Theme Settings"
56+
icon="color_lens">
57+
<theme-settings current-theme="r.theme"
58+
is-current-project-theme="true"></theme-settings>
59+
</collapsible>
60+
</section>
4361

44-
<section class="config-section"
45-
md-whiteframe="2">
46-
<git-settings settings="r.git"></git-settings>
47-
</section>
62+
<section class="config-section"
63+
md-whiteframe="2">
64+
<collapsible collapsible-title="Jira-Integration">
4865

66+
<jira-settings settings="r.jiraSettings"></jira-settings>
67+
</collapsible>
68+
</section>
4969

70+
71+
<section class="config-section"
72+
md-whiteframe="2">
73+
<collapsible collapsible-title="Git Integration"
74+
icon="github-circle">
75+
76+
<git-settings settings="r.git"></git-settings>
77+
</collapsible>
78+
</section>
79+
</div>
80+
</div>
5081
</div>

app-src/scripts/settings/backup-settings/backup-settings-d.html

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,3 @@
1-
<h2 class="md-title">
2-
<ng-md-icon icon="swap_vert"></ng-md-icon>
3-
Backup and Sync
4-
</h2>
5-
61
<help-section>
72
<p>Here you can export all your data as a
83
<strong>JSON</strong> for backups, but also to use it in a different context (e.g. you might want to export your projects in the browser and import them into the desktop version).

app-src/scripts/settings/git-settings/git-settings-d.html

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
<h2 class="md-title">Git integration</h2>
21
<help-section>
32
<p>Here you can configure SuperProductivity to list open GithHub issues for a specific repository in the task creation panel in the daily planning view. They will be listed as suggestions and will provide a link to the issue as well as more information about it.</p>
43
<p>In addition you can automatically add and sync all open issues to your task backlog.</p>

app-src/scripts/settings/jira-settings/jira-settings-d.html

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
<h2 class="md-title">Jira-Integration</h2>
2-
31
<help-section ng-if="vm.hasJiraSupport">
42
<div class="md-caption">Basic configuration</div>
53
<p>Please provide a username (can be found on your profile page) and an

app-src/scripts/settings/keyboard-settings/keyboard-settings-d.html

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,3 @@
1-
<h2 class="md-title">
2-
<ng-md-icon icon="keyboard"></ng-md-icon>
3-
Keyboard Shortcuts
4-
</h2>
5-
61
<help-section>
72
<p>Here you can configure all keyboard shortcuts.</p>
83
<p>Click on the text input and enter the desired keyboard combination. Hit enter to save and Escape to abort.</p>

app-src/scripts/settings/misc-settings/misc-settings-d.html

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,3 @@
1-
<h2 class="md-title">
2-
<ng-md-icon icon="settings"></ng-md-icon>
3-
Misc Settings
4-
</h2>
5-
61
<help-section>
72
<div class="md-caption">Auto-start next task on done</div>
83
<p>Decide if you want to automatically start the next task, once you mark a task as done.</p>

app-src/scripts/settings/project-settings/project-settings-d.html

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,3 @@
1-
<h2 class="md-title">
2-
<ng-md-icon icon="account_balance"></ng-md-icon>
3-
Project
4-
</h2>
5-
61
<help-section>
72
<p>Here you can add, edit, switch and delete different projects.</p>
83
</help-section>

app-src/scripts/settings/theme-settings/theme-settings-d.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<h2 class="md-title">
1+
<h2 class="md-caption">
22
<ng-md-icon icon="color_lens"></ng-md-icon>
33
Select Theme
44
</h2>

0 commit comments

Comments
 (0)