Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
李少辉-开发者
gitlab-foss
提交
098a9805
G
gitlab-foss
项目概览
李少辉-开发者
/
gitlab-foss
通知
15
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
G
gitlab-foss
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
未验证
提交
098a9805
编写于
10月 30, 2017
作者:
P
Phil Hughes
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
spec fixes
increased perf of scrolling tabs into view
上级
5c75d750
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
19 addition
and
13 deletion
+19
-13
app/assets/javascripts/repo/components/new_dropdown/modal.vue
...assets/javascripts/repo/components/new_dropdown/modal.vue
+2
-2
app/assets/javascripts/repo/components/repo.vue
app/assets/javascripts/repo/components/repo.vue
+5
-3
app/assets/javascripts/repo/components/repo_preview.vue
app/assets/javascripts/repo/components/repo_preview.vue
+1
-1
app/assets/javascripts/repo/stores/actions.js
app/assets/javascripts/repo/stores/actions.js
+2
-5
app/assets/stylesheets/pages/repo.scss
app/assets/stylesheets/pages/repo.scss
+3
-0
spec/features/projects/tree/create_file_spec.rb
spec/features/projects/tree/create_file_spec.rb
+1
-1
spec/javascripts/repo/components/new_dropdown/index_spec.js
spec/javascripts/repo/components/new_dropdown/index_spec.js
+5
-1
未找到文件。
app/assets/javascripts/repo/components/new_dropdown/modal.vue
浏览文件 @
098a9805
<
script
>
import
{
mapActions
,
mapState
}
from
'
vuex
'
;
import
{
mapActions
}
from
'
vuex
'
;
import
{
__
}
from
'
../../../locale
'
;
import
popupDialog
from
'
../../../vue_shared/components/popup_dialog.vue
'
;
...
...
@@ -28,7 +28,7 @@
]),
createEntryInStore
()
{
this
.
createTempEntry
({
name
:
this
.
entryName
.
replace
(
new
RegExp
(
`^
${
this
.
path
}
\
/`
),
''
),
name
:
this
.
entryName
.
replace
(
new
RegExp
(
`^
${
this
.
path
}
/`
),
''
),
type
:
this
.
type
,
});
...
...
app/assets/javascripts/repo/components/repo.vue
浏览文件 @
098a9805
...
...
@@ -26,12 +26,14 @@ export default {
RepoPreview
,
},
mounted
()
{
const
alertMessag
e
=
'
Are you sure you want to lose unsaved changes?
'
;
const
returnValu
e
=
'
Are you sure you want to lose unsaved changes?
'
;
window
.
onbeforeunload
=
(
e
)
=>
{
if
(
!
this
.
changedFiles
.
length
)
return
undefined
;
e
.
returnValue
=
alertMessage
;
return
alertMessage
;
Object
.
assign
(
e
,
{
returnValue
,
});
return
returnValue
;
};
},
};
...
...
app/assets/javascripts/repo/components/repo_preview.vue
浏览文件 @
098a9805
...
...
@@ -8,7 +8,7 @@ export default {
'
activeFile
'
,
]),
renderErrorTooLarge
()
{
return
this
.
activeFile
.
renderError
==
'
too_large
'
;
return
this
.
activeFile
.
renderError
==
=
'
too_large
'
;
},
},
methods
:
{
...
...
app/assets/javascripts/repo/stores/actions.js
浏览文件 @
098a9805
...
...
@@ -2,9 +2,6 @@ import Vue from 'vue';
import
flash
from
'
../../flash
'
;
import
service
from
'
../services
'
;
import
*
as
types
from
'
./mutation_types
'
;
import
{
pushState
,
}
from
'
./utils
'
;
export
const
redirectToUrl
=
url
=>
gl
.
utils
.
visitUrl
(
url
);
...
...
@@ -118,9 +115,9 @@ export const scrollToTab = () => {
const
tabs
=
document
.
getElementById
(
'
tabs
'
);
if
(
tabs
)
{
const
tabEl
=
tabs
.
querySelector
(
'
.active
'
);
const
tabEl
=
tabs
.
querySelector
(
'
.active
.repo-tab
'
);
tab
s
.
scrollLeft
=
tabEl
.
offsetLeft
;
tab
El
.
focus
()
;
}
});
};
...
...
app/assets/stylesheets/pages/repo.scss
浏览文件 @
098a9805
...
...
@@ -41,7 +41,9 @@
}
.panel-right
{
display
:
-
webkit-flex
;
display
:
flex
;
-webkit-flex-direction
:
column
;
flex-direction
:
column
;
width
:
80%
;
height
:
100%
;
...
...
@@ -73,6 +75,7 @@
}
.blob-viewer-container
{
-webkit-flex
:
1
;
flex
:
1
;
overflow
:
auto
;
...
...
spec/features/projects/tree/create_file_spec.rb
浏览文件 @
098a9805
...
...
@@ -28,7 +28,7 @@ feature 'Multi-file editor new file', :js do
click_button
(
'Create file'
)
end
find
(
'.inputarea'
,
visible:
false
).
send_keys
(
'file content'
)
find
(
'.inputarea'
).
send_keys
(
'file content'
)
fill_in
(
'commit-message'
,
with:
'commit message'
)
...
...
spec/javascripts/repo/components/new_dropdown/index_spec.js
浏览文件 @
098a9805
...
...
@@ -10,7 +10,11 @@ describe('new dropdown component', () => {
beforeEach
(()
=>
{
const
component
=
Vue
.
extend
(
newDropdown
);
vm
=
createComponentWithStore
(
component
,
store
).
$mount
();
vm
=
createComponentWithStore
(
component
,
store
);
vm
.
$store
.
state
.
path
=
''
;
vm
.
$mount
();
});
afterEach
(()
=>
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录