Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
李少辉-开发者
gitlab-foss
提交
e5cd65a4
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,发现更多精彩内容 >>
未验证
提交
e5cd65a4
编写于
10月 18, 2017
作者:
P
Phil Hughes
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fixed new file/directory modal using methods that no longer exist
[ci skip]
上级
caee9d58
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
47 addition
and
46 deletion
+47
-46
app/assets/javascripts/repo/components/new_dropdown/index.vue
...assets/javascripts/repo/components/new_dropdown/index.vue
+34
-35
app/assets/javascripts/repo/components/new_dropdown/modal.vue
...assets/javascripts/repo/components/new_dropdown/modal.vue
+12
-10
app/assets/javascripts/repo/components/repo_tab.vue
app/assets/javascripts/repo/components/repo_tab.vue
+1
-1
未找到文件。
app/assets/javascripts/repo/components/new_dropdown/index.vue
浏览文件 @
e5cd65a4
...
...
@@ -24,43 +24,42 @@
</
script
>
<
template
>
<div
class=
"breadcrumb repo-breadcrumb"
>
<div
class=
"dropdown"
>
<button
type=
"button"
class=
"btn btn-default dropdown-toggle add-to-tree"
data-toggle=
"dropdown"
data-target=
".add-to-tree-dropdown"
>
<i
class=
"fa fa-plus"
aria-hidden=
"true"
<div>
<ul
class=
"breadcrumb repo-breadcrumb"
>
<li
class=
"dropdown"
>
<button
type=
"button"
class=
"btn btn-default dropdown-toggle add-to-tree"
data-toggle=
"dropdown"
>
</i>
</button>
</div>
<div
class=
"add-to-tree-dropdown"
>
<ul
class=
"dropdown-menu"
>
<li>
<a
href=
"#"
role=
"button"
@
click.prevent=
"createNewItem('blob')"
<i
class=
"fa fa-plus"
aria-hidden=
"true"
>
{{
__
(
'
New file
'
)
}}
</a>
</li>
<li>
<a
href=
"#"
role=
"button"
@
click.prevent=
"createNewItem('tree')"
>
{{
__
(
'
New directory
'
)
}}
</a>
</li>
</ul>
</div>
</i>
</button>
<ul
class=
"dropdown-menu"
>
<li>
<a
href=
"#"
role=
"button"
@
click.prevent=
"createNewItem('blob')"
>
{{
__
(
'
New file
'
)
}}
</a>
</li>
<li>
<a
href=
"#"
role=
"button"
@
click.prevent=
"createNewItem('tree')"
>
{{
__
(
'
New directory
'
)
}}
</a>
</li>
</ul>
</li>
</ul>
<new-modal
v-if=
"openModal"
:type=
"modalType"
...
...
app/assets/javascripts/repo/components/new_dropdown/modal.vue
浏览文件 @
e5cd65a4
...
...
@@ -24,12 +24,13 @@
if
(
this
.
entryName
===
''
)
return
;
const
fileName
=
this
.
type
===
'
tree
'
?
'
.gitkeep
'
:
this
.
entryName
;
let
tree
=
null
;
let
tree
=
RepoStore
;
if
(
this
.
type
===
'
tree
'
)
{
tree
=
RepoHelper
.
serialize
Tree
(
{
tree
=
RepoHelper
.
serialize
RepoEntity
(
'
tree
'
,
{
name
:
this
.
entryName
,
path
:
this
.
entryName
,
icon
:
'
folder
'
,
tempFile
:
true
,
});
RepoStore
.
files
.
push
(
tree
);
...
...
@@ -37,17 +38,14 @@
RepoHelper
.
setDirectoryOpen
(
tree
,
tree
.
name
);
}
const
file
=
RepoHelper
.
serialize
Blob
(
{
const
file
=
RepoHelper
.
serialize
RepoEntity
(
'
blob
'
,
{
name
:
fileName
,
path
:
tree
?
`
${
tree
}
/
${
fileName
}
`
:
fileName
,
path
:
tree
.
path
?
`
${
tree
.
path
}
/
${
fileName
}
`
:
fileName
,
icon
:
'
file-text-o
'
,
tempFile
:
true
,
});
}
,
(
this
.
type
===
'
tree
'
?
tree
.
level
+
1
:
0
)
);
if
(
tree
)
{
RepoStore
.
addFilesToDirectory
(
tree
,
RepoStore
.
files
,
[
file
]);
}
else
{
RepoStore
.
addFilesToDirectory
(
tree
,
RepoStore
.
files
,
[...
RepoStore
.
files
,
file
]);
}
tree
.
files
.
push
(
file
);
RepoHelper
.
setFile
(
file
,
file
);
RepoStore
.
editMode
=
true
;
...
...
@@ -82,6 +80,9 @@
return
__
(
'
File name
'
);
},
},
mounted
()
{
this
.
$refs
.
fieldName
.
focus
();
},
};
</
script
>
...
...
@@ -107,6 +108,7 @@
type=
"text"
class=
"form-control"
v-model=
"entryName"
ref=
"fieldName"
/>
</div>
</fieldset>
...
...
app/assets/javascripts/repo/components/repo_tab.vue
浏览文件 @
e5cd65a4
...
...
@@ -30,7 +30,7 @@ const RepoTab = {
Store
.
setActiveFiles
(
file
);
},
closeTab
(
file
)
{
if
(
file
.
changed
)
return
;
if
(
file
.
changed
||
file
.
tempFile
)
return
;
Store
.
removeFromOpenedFiles
(
file
);
},
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录