Skip to content

Commit 057f43c

Browse files
committed
fix design & using api
1 parent 87c9e3e commit 057f43c

7 files changed

Lines changed: 34 additions & 27 deletions

File tree

electron_src/popup/index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@
2020
</div>
2121

2222
<div class="result-block row-fluid">
23-
<ul id="result-list" class="result-list left-pane" ng-class="{focused:isFocusing == 2}">
24-
<li ng-click="selectSnippet($index)" ng-repeat="snippet in filteredSnippets" ng-class="{active:$index == selectIndex}"><a href="#">{{snippet.description}}</a></li>
23+
<ul id="result-list" class="result-list left-pane">
24+
<li ng-click="selectSnippet($index)" ng-repeat="snippet in filteredSnippets" ng-class="{active:$index == selectIndex}"><a href="#"> <span ng-bind="snippet.callSign"></span> <small ng-bind="snippet.description"></small></a></li>
2525
</ul>
2626

2727
<div class="right-pane">

electron_src/styles/_popup.styl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
.result-list
2525
list-style:none
2626
padding: 0
27-
border-right: 1px solid $border-color
27+
border-right: 1px solid $baseBorderColor
2828
li
2929
&:nth-child(even)
3030
background-color $baseBackgroundColor

main.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -220,8 +220,8 @@ app.on('ready', function () {
220220
function makeNewMainWindow () {
221221
console.log('new Window!')
222222
mainWindow = new BrowserWindow({
223-
width: 800,
224-
height: 600,
223+
width: 920,
224+
height: 640,
225225
'web-preferences': {
226226
'overlay-scrollbars': true
227227
}

src/controllers/states/SnippetsDetailController.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,7 @@ angular.module('codexen')
77

88
var snippetId = $state.params.id
99

10-
Snippet.show(snippetId, {
11-
'include': ['Tag']
12-
})
10+
Snippet.show(snippetId)
1311
.success(function (data) {
1412
vm.snippet = data
1513
vm.isLoaded = true

src/controllers/states/SnippetsListController.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,9 +74,7 @@ angular.module('codexen')
7474

7575
function loadSnippets() {
7676
if ($auth.isAuthenticated) {
77-
Snippet.findMine({
78-
'include': ['Tag']
79-
})
77+
Snippet.findMine()
8078
.success(function (data) {
8179
vm.snippets = data
8280
})

src/styles/states/snippets.styl

Lines changed: 26 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -88,32 +88,43 @@ $snippet-list-active-bg= $brand-primary
8888

8989

9090
.snippets-detail-state
91+
position absolute
92+
top 0
93+
width 100%
94+
bottom 0
95+
overflow hidden
9196
.detail-header
97+
position absolute
98+
top 0
99+
width 100%
92100
background-color lighten($baseBackgroundColor, 5%)
93-
padding: 5px 10px
94-
height: 50px
95-
border-bottom: solid 1px $baseBorderColor
101+
padding 5px 10px
102+
height 50px
103+
border-bottom solid 1px $baseBorderColor
96104
.detail-header-title
97-
color: $textColorHighlight
105+
color $textColorHighlight
106+
line-height 40px
107+
font-size 1.2em
98108
small
99109
font-size: 0.6em
100-
color: $textColor
110+
color $textColor
101111

102-
line-height: 40px
103-
font-size: 1.2em
104112

105113
.detail-header-control
106-
padding:3px
107-
114+
padding 3px
108115

109116
.detail-body
110-
padding: 5px 10px
117+
position absolute
118+
top 50px
119+
width 100%
120+
bottom 0
121+
padding 5px 10px
122+
overflow-y auto
111123
.ace_editor
112-
min-height: 300px
113-
border: solid 1px $border-color
114-
border-radius: 5px
115-
116-
124+
min-height 300px
125+
border solid 1px $border-color
126+
border-radius 5px
127+
margin-bottom 5px
117128

118129
.tags
119130
word-break: break-all

src/tpls/states/auth.tpl.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<div class="auth-state container-fluid">
22
<div class="row">
3-
<div class="col-sm-6 col-sm-offset-3 panel panel-default">
3+
<div class="col-xs-10 col-xs-offset-1 col-sm-8 col-sm-offset-2 col-lg-6 col-lg-offset-3 panel panel-default">
44

55
<div class="text-center">
66

0 commit comments

Comments
 (0)