Skip to content

Commit 135dfe2

Browse files
committed
Merge pull request #370 from CodeNow/onepointthree
Onepointthree
2 parents 93caf94 + 772a885 commit 135dfe2

File tree

70 files changed

+543
-524
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

70 files changed

+543
-524
lines changed

client/assets/styles/scss/box/box-header.scss

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -86,13 +86,13 @@
8686
position: relative;
8787

8888
// offset for vertical-align: middle
89-
> .btn-group {
89+
.btn-group {
9090
top: -2px;
91+
}
9192

92-
> .btn[disabled],
93-
> .btn.disabled {
94-
margin: 0;
95-
}
93+
.btn[disabled],
94+
.btn.disabled {
95+
margin: 0;
9696
}
9797
}
9898

client/assets/styles/scss/components/menu.scss

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,11 @@
1717
padding: 0;
1818
pointer-events: none;
1919
position: absolute;
20-
right: 0;
21-
z-index: 3;
20+
right: 0;
2221
transform: scale3d(0,0,1);
2322
transform-origin: 90% -30%;
2423
transition: opacity .2s cubic-bezier(.19,1,.22,1), transform .4s cubic-bezier(.19,1,.22,1);
24+
z-index: 3;
2525

2626
&::before,
2727
&::after {
@@ -31,7 +31,7 @@
3131
display: block;
3232
height: 0;
3333
position: absolute;
34-
right: 11px;
34+
right: 11px;
3535
width: 0;
3636
}
3737

client/assets/styles/scss/sidebar/sidebar-boxes.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
display: flex;
44
flex: 1 1 auto;
55
flex-direction: column;
6+
height: calc(100% - 108px);
67
position: relative;
78
z-index: $z-sidebar-content;
89

client/controllers/controllerApp.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ function ControllerApp(
8686
};
8787

8888
fetchUser(function(err, results) {
89-
if (!err) {
89+
if (!err && results) {
9090
thisUser = results;
9191
dataApp.data.user = results;
9292
fetchOrgs(function (err, results) {

client/directives/accountsSelect/directiveAccountsSelect.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,8 @@ function accountsSelect (
1111
$rootScope
1212
) {
1313
return {
14-
restrict: 'E',
14+
restrict: 'A',
1515
templateUrl: 'viewAccountsSelect',
16-
replace: true,
1716
scope: {
1817
data: '='
1918
},
Lines changed: 46 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -1,52 +1,49 @@
1-
header.row.account-header.load(
2-
ng-show = "data.activeAccount"
1+
ol.accounts-group(
2+
ng-class = "{ \
3+
in: isChangeAccount \
4+
}"
5+
ng-click = "isChangeAccount = !isChangeAccount; \
6+
$event.stopPropagation();"
37
)
4-
ol.accounts-group(
5-
ng-class = "{ \
6-
in: isChangeAccount \
7-
}"
8-
ng-click = "isChangeAccount = !isChangeAccount; \
9-
$event.stopPropagation();"
10-
)
11-
li.accounts-group-item
12-
a.account.load(
13-
ng-show = "data.activeAccount.gravitar()"
14-
)
15-
img.gravatar(
16-
height = "24"
17-
ng-src = "{{ data.activeAccount.gravitar() }}"
18-
width = "24"
19-
)
20-
span.account-name.text-overflow {{ data.activeAccount.oauthName() }}
21-
//- icons-arrow-down only for first account
22-
svg.iconnables.icons-arrow-down
23-
use(
24-
xlink:href = "#icons-arrow-down"
25-
)
26-
//- current user (if user is not active)
27-
li.accounts-group-item(
28-
ng-if = "data.user !== data.activeAccount"
29-
ng-click = "$event.stopPropagation(); \
30-
selectActiveAccount(data.user)"
31-
)
32-
a.account
33-
img.gravatar(
34-
height = "24"
35-
ng-src = "{{ data.user.gravitar() }}"
36-
width = "24"
37-
)
38-
span.account-name.text-overflow {{ data.user.oauthName() }}
39-
//- Orgs that are not the active account
40-
li.accounts-group-item(
41-
ng-click = "$event.stopPropagation(); \
42-
selectActiveAccount(org)"
43-
ng-if = "org !== data.activeAccount"
44-
ng-repeat = "org in data.orgs.models"
8+
li.accounts-group-item
9+
a.account.load(
10+
ng-show = "data.activeAccount.gravitar()"
4511
)
46-
a.account
47-
img.gravatar(
48-
height = "24"
49-
ng-src = "{{ org.gravitar() }}"
50-
width = "24"
12+
img.gravatar(
13+
height = "24"
14+
ng-src = "{{ data.activeAccount.gravitar() }}"
15+
width = "24"
16+
)
17+
span.account-name.text-overflow {{ data.activeAccount.oauthName() }}
18+
//- icons-arrow-down only for first account
19+
svg.iconnables.icons-arrow-down
20+
use(
21+
xlink:href = "#icons-arrow-down"
5122
)
52-
span.account-name.text-overflow {{ org.oauthName() }}
23+
//- current user (if user is not active)
24+
li.accounts-group-item(
25+
ng-if = "data.user !== data.activeAccount"
26+
ng-click = "$event.stopPropagation(); \
27+
selectActiveAccount(data.user)"
28+
)
29+
a.account
30+
img.gravatar(
31+
height = "24"
32+
ng-src = "{{ data.user.gravitar() }}"
33+
width = "24"
34+
)
35+
span.account-name.text-overflow {{ data.user.oauthName() }}
36+
//- Orgs that are not the active account
37+
li.accounts-group-item(
38+
ng-click = "$event.stopPropagation(); \
39+
selectActiveAccount(org)"
40+
ng-if = "org !== data.activeAccount"
41+
ng-repeat = "org in data.orgs.models"
42+
)
43+
a.account
44+
img.gravatar(
45+
height = "24"
46+
ng-src = "{{ org.gravitar() }}"
47+
width = "24"
48+
)
49+
span.account-name.text-overflow {{ org.oauthName() }}

client/directives/activePanel/directiveActivePanel.js

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -24,20 +24,13 @@ function activePanel(
2424
user
2525
) {
2626
return {
27-
restrict: 'E',
27+
restrict: 'A',
2828
templateUrl: 'viewActivePanel',
29-
replace: true,
3029
scope: {
31-
isDarkTheme: '=',
32-
// instance: '=',
33-
// build: '=',
34-
// setupData: '=',
35-
// container: '=',
3630
openItems: '=',
3731
currentModel: '=', // CurrentModel houses the original model without changes
38-
stateModel: '=' // The StateModel is where changes will be applied
39-
// readOnly: '=',
40-
// update: '=' // true: save file when content changes
32+
stateModel: '=', // The StateModel is where changes will be applied
33+
item: '='
4134
},
4235
link: function ($scope, element, attrs) {
4336

Lines changed: 38 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -1,53 +1,46 @@
1-
//- don't use ng-if here, use ng-show
2-
.active-panel(
3-
ng-class = "{\
4-
'loaded': (item === openItems.activeHistory.last()),\
5-
'ace-runnable-dark': isDarkTheme\
6-
}"
7-
ng-repeat = "item in openItems.models"
8-
ng-show = "item === openItems.activeHistory.last()"
1+
.spinner-container.spinner-backdrop.spinner-md(
2+
ng-class = "{in: loading}"
3+
ng-include = "'spinner'"
94
)
105

11-
.spinner-container.spinner-backdrop.spinner-md(
12-
ng-class = "{in: loading}"
13-
ng-include = "'spinner'"
14-
)
15-
16-
log-build(
17-
ng-if = "item.state.type === 'BuildStream'"
18-
)
6+
.logs(
7+
log-build
8+
ng-if = "item.state.type === 'BuildStream'"
9+
)
1910

20-
log-box(
21-
ng-if = "item.state.type === 'LogView'"
22-
)
11+
.logs(
12+
log-box
13+
ng-if = "item.state.type === 'LogView'"
14+
)
2315

24-
pre.pre(
25-
ng-class = "{readonly: data.readOnly}"
26-
ng-if = "item.state.type === 'File'"
27-
ng-init = "wrapperFunc = actions.wrapWithItem(item)"
28-
ng-model = "openItems.activeHistory.last().state.body"
29-
readonly = "{{ (data.readOnly) ? 'true' : 'false' }}"
30-
ui-ace = "{ \
31-
onLoad: wrapperFunc, \
32-
onFocus: actions.onFocus \
33-
}"
34-
)
16+
pre.pre(
17+
ng-class = "{readonly: data.readOnly}"
18+
ng-if = "item.state.type === 'File'"
19+
ng-init = "wrapperFunc = actions.wrapWithItem(item)"
20+
ng-model = "openItems.activeHistory.last().state.body"
21+
readonly = "{{ (data.readOnly) ? 'true' : 'false' }}"
22+
ui-ace = "{ \
23+
onLoad: wrapperFunc, \
24+
onFocus: actions.onFocus \
25+
}"
26+
)
3527

36-
.term-container(
37-
ng-if = "item.state.type === 'Terminal'"
28+
.term-container(
29+
ng-if = "item.state.type === 'Terminal'"
30+
)
31+
term.terminal(
32+
item = "item"
3833
)
39-
term.terminal(
40-
item = "item"
41-
)
42-
span.js-char-width 0
34+
span.js-char-width 0
4335

44-
web-view(
45-
ng-if = "item.state.type === 'WebView'"
46-
)
36+
.web-container(
37+
web-view
38+
ng-if = "item.state.type === 'WebView'"
39+
)
4740

48-
button.btn.silver.editor-status(
49-
disabled
50-
ng-if = "(data.readOnly && item.state.type === 'File') || \
51-
(item.state.type === 'EnvVars' && item.state.readOnly)"
52-
type = "button"
53-
) Readonly
41+
button.btn.silver.editor-status(
42+
disabled
43+
ng-if = "(data.readOnly && item.state.type === 'File') || \
44+
(item.state.type === 'EnvVars' && item.state.readOnly)"
45+
type = "button"
46+
) Readonly

client/directives/addRepoPopover/directiveAddRepoPopover.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ function addRepoPopover(
1717
return {
1818
restrict: 'E',
1919
templateUrl: 'viewAddRepoPopover',
20-
replace: true,
2120
scope: {
2221
show: '='
2322
},

client/directives/addTab/directiveAddTab.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,8 @@ function addTab(
88
$state
99
) {
1010
return {
11-
restrict: 'E',
11+
restrict: 'A',
1212
templateUrl: 'viewAddTab',
13-
replace: true,
1413
scope: {
1514
openItems: '='
1615
},

0 commit comments

Comments
 (0)