@girder/core 3.1.23 → 3.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/auth.js +5 -6
- package/package.json +2 -2
- package/rest.js +4 -2
- package/stylesheets/apidocs/apidocs.styl +2 -1
- package/stylesheets/body/groupPage.styl +11 -3
- package/stylesheets/body/itemPage.styl +5 -3
- package/stylesheets/body/systemConfig.styl +4 -3
- package/stylesheets/body/userAccount.styl +3 -3
- package/stylesheets/body/userList.styl +2 -1
- package/stylesheets/layout/global.styl +6 -6
- package/stylesheets/layout/globalNav.styl +3 -3
- package/stylesheets/layout/header.styl +1 -1
- package/stylesheets/layout/layout.styl +2 -2
- package/stylesheets/layout/loading.styl +1 -1
- package/stylesheets/widgets/accessWidget.styl +2 -1
- package/stylesheets/widgets/hierarchyWidget.styl +22 -11
- package/stylesheets/widgets/metadataWidget.styl +10 -4
- package/stylesheets/widgets/timelineWidget.styl +2 -1
- package/stylesheets/widgets/uploadWidget.styl +4 -2
- package/stylesheets/widgets/userOtpManagementWidget.styl +7 -7
- package/views/layout/RegisterView.js +2 -5
package/auth.js
CHANGED
|
@@ -8,6 +8,7 @@ import { restRequest } from '@girder/core/rest';
|
|
|
8
8
|
// girder.corsAuth could be an override. See login doc below.
|
|
9
9
|
var corsAuth = false;
|
|
10
10
|
|
|
11
|
+
// TODO delete in next major version
|
|
11
12
|
var cookie = {
|
|
12
13
|
findAll: function () {
|
|
13
14
|
var cookies = {};
|
|
@@ -43,7 +44,7 @@ var cookie = {
|
|
|
43
44
|
};
|
|
44
45
|
|
|
45
46
|
var currentUser = null;
|
|
46
|
-
var currentToken =
|
|
47
|
+
var currentToken = window.localStorage.getItem('girderToken');
|
|
47
48
|
|
|
48
49
|
function getCurrentUser() {
|
|
49
50
|
return currentUser;
|
|
@@ -110,11 +111,7 @@ function login(username, password, cors = corsAuth, otpToken = null) {
|
|
|
110
111
|
setCurrentUser(new UserModel(response.user));
|
|
111
112
|
setCurrentToken(response.user.token.token);
|
|
112
113
|
|
|
113
|
-
|
|
114
|
-
// For cross-origin requests, we should write the token into
|
|
115
|
-
// this document's cookie also.
|
|
116
|
-
document.cookie = 'girderToken=' + getCurrentToken();
|
|
117
|
-
}
|
|
114
|
+
window.localStorage.setItem('girderToken', response.user.token.token);
|
|
118
115
|
|
|
119
116
|
events.trigger('g:login.success', response.user);
|
|
120
117
|
events.trigger('g:login', response);
|
|
@@ -133,6 +130,8 @@ function logout() {
|
|
|
133
130
|
setCurrentUser(null);
|
|
134
131
|
setCurrentToken(null);
|
|
135
132
|
|
|
133
|
+
window.localStorage.removeItem('girderToken');
|
|
134
|
+
|
|
136
135
|
events.trigger('g:login', null);
|
|
137
136
|
events.trigger('g:logout.success');
|
|
138
137
|
}).fail(function (jqxhr) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@girder/core",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.2.0",
|
|
4
4
|
"description": "Extensible data management platform",
|
|
5
5
|
"homepage": "https://girder.readthedocs.org",
|
|
6
6
|
"bugs": {
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"qrcode": "~1.4.4",
|
|
26
26
|
"remarkable": "^2.0.0",
|
|
27
27
|
"sprintf-js": "^1.1.2",
|
|
28
|
-
"swagger-ui": "^
|
|
28
|
+
"swagger-ui-dist": "^5.7.2",
|
|
29
29
|
"typeface-open-sans": "^0.0.75",
|
|
30
30
|
"underscore": "^1.13.6",
|
|
31
31
|
"url-otpauth": "^2.0.0"
|
package/rest.js
CHANGED
|
@@ -3,7 +3,7 @@ import _ from 'underscore';
|
|
|
3
3
|
import Backbone from 'backbone';
|
|
4
4
|
|
|
5
5
|
import events from '@girder/core/events';
|
|
6
|
-
import { getCurrentToken,
|
|
6
|
+
import { getCurrentToken, setCurrentUser, setCurrentToken } from '@girder/core/auth';
|
|
7
7
|
|
|
8
8
|
let apiRoot;
|
|
9
9
|
var uploadHandlers = {};
|
|
@@ -70,11 +70,13 @@ const restRequest = function (opts) {
|
|
|
70
70
|
const defaults = {
|
|
71
71
|
// the default 'method' is 'GET', as set by 'jquery.ajax'
|
|
72
72
|
|
|
73
|
-
girderToken: getCurrentToken() ||
|
|
73
|
+
girderToken: getCurrentToken() || window.localStorage.getItem('girderToken'),
|
|
74
74
|
|
|
75
75
|
error: (error, status) => {
|
|
76
76
|
let info;
|
|
77
77
|
if (error.status === 401) {
|
|
78
|
+
setCurrentUser(null);
|
|
79
|
+
setCurrentToken(null);
|
|
78
80
|
events.trigger('g:loginUi');
|
|
79
81
|
info = {
|
|
80
82
|
text: 'You must log in to view this resource',
|
|
@@ -6,6 +6,7 @@ $border = 1px solid #d7d7d7
|
|
|
6
6
|
body
|
|
7
7
|
font-family "Open Sans", sans-serif
|
|
8
8
|
background-color #adada1
|
|
9
|
+
margin 0
|
|
9
10
|
|
|
10
11
|
.right
|
|
11
12
|
float right
|
|
@@ -29,7 +30,7 @@ body
|
|
|
29
30
|
padding 5px 18px 12px
|
|
30
31
|
border-top $border
|
|
31
32
|
|
|
32
|
-
@media screen and (min-width
|
|
33
|
+
@media screen and (min-width 990px)
|
|
33
34
|
.docs-header
|
|
34
35
|
.docs-body
|
|
35
36
|
.docs-swagger-container
|
|
@@ -34,10 +34,17 @@
|
|
|
34
34
|
> a
|
|
35
35
|
font-weight bold
|
|
36
36
|
|
|
37
|
-
.g-group-members-container
|
|
37
|
+
.g-group-members-container
|
|
38
|
+
.g-group-requests-container
|
|
39
|
+
.g-group-admins-container
|
|
40
|
+
.g-group-mods-container
|
|
38
41
|
margin-top 15px
|
|
39
42
|
|
|
40
|
-
.g-group-members
|
|
43
|
+
.g-group-members
|
|
44
|
+
.g-group-mods
|
|
45
|
+
.g-group-admins
|
|
46
|
+
.g-group-requests
|
|
47
|
+
.g-group-invites
|
|
41
48
|
list-style-type none
|
|
42
49
|
padding 0
|
|
43
50
|
margin-bottom 20px
|
|
@@ -57,7 +64,8 @@
|
|
|
57
64
|
margin 5px 0
|
|
58
65
|
|
|
59
66
|
.g-group-member-controls
|
|
60
|
-
>a
|
|
67
|
+
>a
|
|
68
|
+
span>a
|
|
61
69
|
font-size 15px
|
|
62
70
|
margin-left 4px
|
|
63
71
|
border 1px solid #d5d5d5
|
|
@@ -11,10 +11,12 @@
|
|
|
11
11
|
font-size 14px
|
|
12
12
|
float right
|
|
13
13
|
|
|
14
|
-
.g-item-files
|
|
14
|
+
.g-item-files
|
|
15
|
+
.g-item-metadata
|
|
15
16
|
margin-top 20px
|
|
16
17
|
|
|
17
|
-
.g-item-files-header
|
|
18
|
+
.g-item-files-header
|
|
19
|
+
.g-item-info-header
|
|
18
20
|
background-color #f0f0f0
|
|
19
21
|
padding 5px 6px
|
|
20
22
|
color #555
|
|
@@ -27,7 +29,7 @@
|
|
|
27
29
|
background-color #fbfbfb
|
|
28
30
|
|
|
29
31
|
.editing
|
|
30
|
-
background-color #
|
|
32
|
+
background-color #c6deff
|
|
31
33
|
|
|
32
34
|
.g-file-list
|
|
33
35
|
list-style-type none
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
.g-settings-form
|
|
2
2
|
margin-top 10px
|
|
3
3
|
|
|
4
|
-
.bootstrap-switch-handle-on
|
|
4
|
+
.bootstrap-switch-handle-on
|
|
5
5
|
.bootstrap-switch-handle-off
|
|
6
|
-
|
|
6
|
+
word-wrap normal
|
|
7
7
|
|
|
8
8
|
#g-core-banner-color
|
|
9
9
|
display inline
|
|
@@ -51,5 +51,6 @@
|
|
|
51
51
|
margin-bottom 0
|
|
52
52
|
|
|
53
53
|
.g-search-container
|
|
54
|
-
.g-search-wrapper
|
|
54
|
+
.g-search-wrapper
|
|
55
|
+
input[type="text"]
|
|
55
56
|
width 200px
|
|
@@ -9,7 +9,7 @@ body
|
|
|
9
9
|
word-wrap break-word
|
|
10
10
|
|
|
11
11
|
i
|
|
12
|
-
font-smoothing antialiased
|
|
12
|
+
-webkit-font-smoothing antialiased
|
|
13
13
|
|
|
14
14
|
a
|
|
15
15
|
cursor pointer
|
|
@@ -65,11 +65,11 @@ ul.dropdown-menu
|
|
|
65
65
|
padding 6px 8px
|
|
66
66
|
border 1px solid #e5e2c8
|
|
67
67
|
|
|
68
|
-
|
|
68
|
+
// Augment the bootstrap tabs styling a bit
|
|
69
69
|
.nav-tabs>li:not(.active)>a
|
|
70
70
|
border 1px solid #e2e2e2
|
|
71
71
|
|
|
72
|
-
|
|
72
|
+
// Personal preference for less white space at bottom of dialogs
|
|
73
73
|
.modal-footer
|
|
74
74
|
margin-top 5px
|
|
75
75
|
|
|
@@ -82,7 +82,7 @@ ul.dropdown-menu
|
|
|
82
82
|
.modal-backdrop.in
|
|
83
83
|
opacity 0.35
|
|
84
84
|
|
|
85
|
-
|
|
85
|
+
// By default bootstrap only applies form-inline rules at >=768px width
|
|
86
86
|
.form-inline .form-group
|
|
87
87
|
display inline-block
|
|
88
88
|
margin-bottom 0
|
|
@@ -94,7 +94,7 @@ blockquote p
|
|
|
94
94
|
code
|
|
95
95
|
font-family monospace
|
|
96
96
|
|
|
97
|
-
|
|
97
|
+
// Don't show the vertical scroll bar when we show a dialog unless we must
|
|
98
98
|
.modal
|
|
99
99
|
overflow-y auto
|
|
100
100
|
|
|
@@ -112,7 +112,7 @@ code
|
|
|
112
112
|
textarea
|
|
113
113
|
max-width 100%
|
|
114
114
|
|
|
115
|
-
|
|
115
|
+
// Stuff that applies across the top level object lists
|
|
116
116
|
.g-top-level-list-title-container
|
|
117
117
|
display inline-block
|
|
118
118
|
overflow hidden
|
|
@@ -47,7 +47,7 @@ ul.g-global-nav
|
|
|
47
47
|
i
|
|
48
48
|
color black
|
|
49
49
|
|
|
50
|
-
@media (max-width
|
|
50
|
+
@media (max-width 720px)
|
|
51
51
|
.g-nav-link
|
|
52
52
|
display inline-block
|
|
53
53
|
padding 0 10px 0 6px
|
|
@@ -69,7 +69,7 @@ ul.g-global-nav
|
|
|
69
69
|
>li:not(.g-active)
|
|
70
70
|
background-color #f1f1f1
|
|
71
71
|
|
|
72
|
-
@media (min-width
|
|
72
|
+
@media (min-width 721px)
|
|
73
73
|
ul.g-global-nav
|
|
74
74
|
>li:hover:not(.g-active)
|
|
75
75
|
.g-nav-link:after
|
|
@@ -81,7 +81,7 @@ ul.g-global-nav
|
|
|
81
81
|
right -1px
|
|
82
82
|
background-color #ffcc00
|
|
83
83
|
|
|
84
|
-
@media (max-width
|
|
84
|
+
@media (max-width 720px)
|
|
85
85
|
.g-global-nav-main
|
|
86
86
|
padding 0
|
|
87
87
|
box-shadow none
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
overflow hidden
|
|
55
55
|
text-overflow ellipsis
|
|
56
56
|
|
|
57
|
-
@media (min-width
|
|
57
|
+
@media (min-width 721px)
|
|
58
58
|
#g-app-body-container.g-default-layout
|
|
59
59
|
padding 10px + $headerHeight 10px 10px 10px
|
|
60
60
|
margin-left $navWidth + 1px
|
|
@@ -64,7 +64,7 @@
|
|
|
64
64
|
top $headerHeight
|
|
65
65
|
width $navWidth
|
|
66
66
|
|
|
67
|
-
@media (max-width
|
|
67
|
+
@media (max-width 720px)
|
|
68
68
|
#g-global-nav-container
|
|
69
69
|
width 100%
|
|
70
70
|
position static
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
.g-hierarchy-sticky
|
|
5
5
|
position sticky
|
|
6
6
|
z-index 10
|
|
7
|
-
|
|
7
|
+
|
|
8
8
|
.g-hierarchy-actions-header
|
|
9
9
|
background linear-gradient(to bottom, #e6e6e6 0, #f7f7f7 8px)
|
|
10
10
|
padding 4px 5px 3px
|
|
@@ -37,13 +37,14 @@
|
|
|
37
37
|
margin 0
|
|
38
38
|
padding 0
|
|
39
39
|
border-radius 4px
|
|
40
|
-
.g-page-next
|
|
40
|
+
.g-page-next
|
|
41
|
+
.g-page-prev
|
|
41
42
|
a
|
|
42
43
|
padding 8px 12px
|
|
43
44
|
#g-page-selection-input
|
|
44
45
|
margin-left 3px
|
|
45
46
|
margin-right 3px
|
|
46
|
-
|
|
47
|
+
|
|
47
48
|
|
|
48
49
|
.g-hierarchy-breadcrumb-bar
|
|
49
50
|
ol.breadcrumb
|
|
@@ -76,12 +77,14 @@
|
|
|
76
77
|
user-select none
|
|
77
78
|
cursor default
|
|
78
79
|
|
|
79
|
-
.g-subfolder-count-container
|
|
80
|
+
.g-subfolder-count-container
|
|
81
|
+
.g-item-count-container
|
|
80
82
|
display inline-block
|
|
81
83
|
position relative
|
|
82
84
|
margin-left 8px
|
|
83
85
|
|
|
84
|
-
.g-subfolder-count
|
|
86
|
+
.g-subfolder-count
|
|
87
|
+
.g-item-count
|
|
85
88
|
display inline-block
|
|
86
89
|
border-radius 3px
|
|
87
90
|
color black
|
|
@@ -92,11 +95,14 @@
|
|
|
92
95
|
right -3px
|
|
93
96
|
padding 0 0.3em
|
|
94
97
|
|
|
95
|
-
.g-folder-list-container
|
|
98
|
+
.g-folder-list-container
|
|
99
|
+
.g-item-list-container
|
|
96
100
|
position relative
|
|
97
101
|
z-index 0
|
|
98
102
|
|
|
99
|
-
.g-folder-list
|
|
103
|
+
.g-folder-list
|
|
104
|
+
.g-item-list
|
|
105
|
+
.g-file-list
|
|
100
106
|
margin 0
|
|
101
107
|
padding 0
|
|
102
108
|
list-style-type none
|
|
@@ -106,7 +112,8 @@
|
|
|
106
112
|
box-sizing border-box
|
|
107
113
|
padding 4px 5px 3px
|
|
108
114
|
|
|
109
|
-
>.g-folder-list-entry
|
|
115
|
+
>.g-folder-list-entry
|
|
116
|
+
>.g-item-list-entry
|
|
110
117
|
font-size 15px
|
|
111
118
|
|
|
112
119
|
&:hover
|
|
@@ -127,7 +134,8 @@
|
|
|
127
134
|
position relative
|
|
128
135
|
top -1px
|
|
129
136
|
|
|
130
|
-
.g-checked-folder-count
|
|
137
|
+
.g-checked-folder-count
|
|
138
|
+
.g-checked-item-count
|
|
131
139
|
margin-right 23px
|
|
132
140
|
|
|
133
141
|
.g-level-up-button-container
|
|
@@ -144,7 +152,8 @@
|
|
|
144
152
|
border 1px solid #aaa
|
|
145
153
|
background-color #dadada
|
|
146
154
|
|
|
147
|
-
.g-item-size
|
|
155
|
+
.g-item-size
|
|
156
|
+
.g-folder-privacy
|
|
148
157
|
display inline-block
|
|
149
158
|
padding 1px 5px
|
|
150
159
|
margin-left 10px
|
|
@@ -161,7 +170,9 @@
|
|
|
161
170
|
.g-folder-metadata
|
|
162
171
|
margin-top 20px
|
|
163
172
|
|
|
164
|
-
.g-folder-info-line
|
|
173
|
+
.g-folder-info-line
|
|
174
|
+
.g-collection-info-line
|
|
175
|
+
.g-file-info-line
|
|
165
176
|
color #808080
|
|
166
177
|
margin-bottom 2px
|
|
167
178
|
padding 2px 4px
|
|
@@ -13,7 +13,8 @@
|
|
|
13
13
|
font-size 14px
|
|
14
14
|
color #777
|
|
15
15
|
|
|
16
|
-
.g-widget-metadata-key
|
|
16
|
+
.g-widget-metadata-key
|
|
17
|
+
.g-widget-metadata-value
|
|
17
18
|
margin 5px
|
|
18
19
|
display inline-block
|
|
19
20
|
overflow hidden
|
|
@@ -48,7 +49,8 @@
|
|
|
48
49
|
margin-left 5px
|
|
49
50
|
margin-right 5px
|
|
50
51
|
|
|
51
|
-
.ace_editor
|
|
52
|
+
.ace_editor
|
|
53
|
+
textarea
|
|
52
54
|
height 365px !important
|
|
53
55
|
|
|
54
56
|
button.g-widget-metadata-add-button
|
|
@@ -64,7 +66,8 @@ button.g-widget-metadata-add-button
|
|
|
64
66
|
padding 3px
|
|
65
67
|
|
|
66
68
|
.g-widget-metadata-row.editing
|
|
67
|
-
.g-widget-metadata-key-input
|
|
69
|
+
.g-widget-metadata-key-input
|
|
70
|
+
.g-widget-metadata-value-input
|
|
68
71
|
height 24px
|
|
69
72
|
margin-left 5px
|
|
70
73
|
margin-right 5px
|
|
@@ -77,7 +80,10 @@ button.g-widget-metadata-add-button
|
|
|
77
80
|
.g-widget-metadata-value-input
|
|
78
81
|
width 54%
|
|
79
82
|
|
|
80
|
-
.g-widget-metadata-cancel-button
|
|
83
|
+
.g-widget-metadata-cancel-button
|
|
84
|
+
.g-widget-metadata-save-button
|
|
85
|
+
.g-widget-metadata-delete-button
|
|
86
|
+
.g-widget-metadata-toggle-button
|
|
81
87
|
margin-right 4px
|
|
82
88
|
margin-top 1px
|
|
83
89
|
display inline-block
|
|
@@ -1,9 +1,11 @@
|
|
|
1
|
-
.g-current-progress-message
|
|
1
|
+
.g-current-progress-message
|
|
2
|
+
.g-overall-progress-message
|
|
2
3
|
color #737373
|
|
3
4
|
margin-top 5px
|
|
4
5
|
margin-bottom 5px
|
|
5
6
|
|
|
6
|
-
.g-progress-current
|
|
7
|
+
.g-progress-current
|
|
8
|
+
.g-progress-overall
|
|
7
9
|
>.progress-bar
|
|
8
10
|
transition none
|
|
9
11
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#g-account-tab-otp
|
|
2
|
-
// Included parent ID to avoid using !important for style overrides
|
|
2
|
+
// Included parent ID to avoid using !important for style overrides
|
|
3
3
|
.g-user-settings-container
|
|
4
4
|
background none
|
|
5
5
|
border none
|
|
@@ -13,10 +13,10 @@
|
|
|
13
13
|
margin 0 20px 10px 0
|
|
14
14
|
display inline-block
|
|
15
15
|
&.g-user-otp-heading-enable
|
|
16
|
-
background #
|
|
17
|
-
border 1px solid #
|
|
16
|
+
background #effff0
|
|
17
|
+
border 1px solid #4caf50
|
|
18
18
|
border-radius 5px
|
|
19
|
-
color #
|
|
19
|
+
color #4caf50
|
|
20
20
|
font-size 26px
|
|
21
21
|
padding 20px 26px
|
|
22
22
|
&:before
|
|
@@ -121,7 +121,7 @@
|
|
|
121
121
|
padding 16px 20px
|
|
122
122
|
margin-top 12px
|
|
123
123
|
.g-user-otp-footer
|
|
124
|
-
background-color #
|
|
124
|
+
background-color #3f3b3b
|
|
125
125
|
border-radius 0 0 4px 4px
|
|
126
126
|
padding 15px 20px 18px
|
|
127
127
|
// clearfix
|
|
@@ -136,7 +136,7 @@
|
|
|
136
136
|
font-size 20px
|
|
137
137
|
|
|
138
138
|
// Responsive Goodness
|
|
139
|
-
@media screen and (max-width
|
|
139
|
+
@media screen and (max-width 1156px)
|
|
140
140
|
.g-account-otp-container
|
|
141
141
|
.g-account-otp-steps
|
|
142
142
|
.g-account-otp-step
|
|
@@ -146,7 +146,7 @@
|
|
|
146
146
|
&:before
|
|
147
147
|
display none
|
|
148
148
|
|
|
149
|
-
@media screen and (max-width
|
|
149
|
+
@media screen and (max-width 960px)
|
|
150
150
|
.g-account-otp-container
|
|
151
151
|
.g-account-otp-steps
|
|
152
152
|
.g-account-otp-step
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import UserModel from '@girder/core/models/UserModel';
|
|
2
2
|
import View from '@girder/core/views/View';
|
|
3
3
|
import events from '@girder/core/events';
|
|
4
|
-
import { getCurrentUser, setCurrentUser, getCurrentToken, setCurrentToken
|
|
4
|
+
import { getCurrentUser, setCurrentUser, getCurrentToken, setCurrentToken } from '@girder/core/auth';
|
|
5
5
|
import { handleClose, handleOpen } from '@girder/core/dialog';
|
|
6
6
|
|
|
7
7
|
import RegisterDialogTemplate from '@girder/core/templates/layout/registerDialog.pug';
|
|
@@ -44,10 +44,7 @@ var RegisterView = View.extend({
|
|
|
44
44
|
if (authToken.token) {
|
|
45
45
|
setCurrentUser(user);
|
|
46
46
|
setCurrentToken(authToken.token);
|
|
47
|
-
|
|
48
|
-
if (corsAuth) {
|
|
49
|
-
document.cookie = 'girderToken=' + getCurrentToken();
|
|
50
|
-
}
|
|
47
|
+
window.localStorage.setItem('girderToken', getCurrentToken());
|
|
51
48
|
|
|
52
49
|
events.trigger('g:login');
|
|
53
50
|
} else {
|