forked from kevadesu/forgejo
#1146 finsih UI work for access mode of collaborators
Collaborators have write access as default, and can be changed via repository collaboration settings page to change between read, write and admin.
This commit is contained in:
parent
05d8664f15
commit
045f14fbd0
16 changed files with 292 additions and 164 deletions
|
@ -20,15 +20,6 @@
|
|||
"outputPathIsOutsideProject": 0,
|
||||
"outputPathIsSetByUser": 0
|
||||
},
|
||||
"\/css\/gogs.min.css": {
|
||||
"fileType": 16,
|
||||
"ignore": 1,
|
||||
"ignoreWasSetByUser": 0,
|
||||
"inputAbbreviatedPath": "\/css\/gogs.min.css",
|
||||
"outputAbbreviatedPath": "No Output Path",
|
||||
"outputPathIsOutsideProject": 0,
|
||||
"outputPathIsSetByUser": 0
|
||||
},
|
||||
"\/css\/semantic-2.1.8.min.css": {
|
||||
"fileType": 16,
|
||||
"ignore": 0,
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
background-size: contain;
|
||||
}
|
||||
body {
|
||||
font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif, '微软雅黑';
|
||||
font-family: "Helvetica Neue", "Microsoft YaHei", Arial, Helvetica, sans-serif !important;
|
||||
background-color: #fff;
|
||||
overflow-y: scroll;
|
||||
}
|
||||
|
@ -104,6 +104,9 @@ code.wrap {
|
|||
.ui.container.fluid.padded {
|
||||
padding: 0 10px 0 10px;
|
||||
}
|
||||
.ui.form .ui.button {
|
||||
font-weight: normal;
|
||||
}
|
||||
.ui .text.red {
|
||||
color: #d95c5c !important;
|
||||
}
|
||||
|
@ -234,6 +237,10 @@ code.wrap {
|
|||
.ui.status.buttons .octicon {
|
||||
margin-right: 4px;
|
||||
}
|
||||
.ui.inline.delete-button {
|
||||
padding: 8px 15px;
|
||||
font-weight: normal;
|
||||
}
|
||||
.overflow.menu .items {
|
||||
max-height: 300px;
|
||||
overflow-y: auto;
|
||||
|
@ -1984,10 +1991,11 @@ footer .container .links > *:first-child {
|
|||
.repository.settings.collaboration .collaborator.list {
|
||||
padding: 0;
|
||||
}
|
||||
.repository.settings.collaboration .collaborator.list .item {
|
||||
padding: 10px 20px;
|
||||
.repository.settings.collaboration .collaborator.list > .item {
|
||||
margin: 0;
|
||||
line-height: 2em;
|
||||
}
|
||||
.repository.settings.collaboration .collaborator.list .item:not(:last-child) {
|
||||
.repository.settings.collaboration .collaborator.list > .item:not(:last-child) {
|
||||
border-bottom: 1px solid #DDD;
|
||||
}
|
||||
.repository.settings.collaboration #repo-collab-form #search-user-box .results {
|
||||
|
|
1
public/css/gogs.min.css
vendored
1
public/css/gogs.min.css
vendored
File diff suppressed because one or more lines are too long
|
@ -458,6 +458,20 @@ function initRepository() {
|
|||
}
|
||||
}
|
||||
|
||||
function initRepositoryCollaboration(){
|
||||
console.log('initRepositoryCollaboration');
|
||||
|
||||
// Change collaborator access mode
|
||||
$('.access-mode.menu .item').click(function(){
|
||||
var $menu = $(this).parent();
|
||||
$.post($menu.data('url'), {
|
||||
"_csrf": csrf,
|
||||
"uid": $menu.data('uid'),
|
||||
"mode": $(this).data('value')
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
function initWiki() {
|
||||
if ($('.repository.wiki').length == 0) {
|
||||
return;
|
||||
|
@ -964,7 +978,8 @@ $(document).ready(function () {
|
|||
initAdmin();
|
||||
|
||||
var routes = {
|
||||
'div.user.settings': initUserSettings
|
||||
'div.user.settings': initUserSettings,
|
||||
'div.repository.settings.collaboration': initRepositoryCollaboration
|
||||
};
|
||||
|
||||
var selector;
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
@footer-margin: 40px;
|
||||
|
||||
body {
|
||||
font-family: 'Helvetica Neue',Arial,Helvetica,sans-serif,'微软雅黑';
|
||||
font-family: "Helvetica Neue", "Microsoft YaHei", Arial, Helvetica, sans-serif !important;
|
||||
background-color: #fff;
|
||||
overflow-y: scroll;
|
||||
}
|
||||
|
@ -109,6 +109,12 @@ pre, code {
|
|||
}
|
||||
}
|
||||
|
||||
&.form {
|
||||
.ui.button {
|
||||
font-weight: normal;
|
||||
}
|
||||
}
|
||||
|
||||
.text {
|
||||
&.red {
|
||||
color: #d95c5c !important;
|
||||
|
@ -260,6 +266,11 @@ pre, code {
|
|||
margin-right: 4px;
|
||||
}
|
||||
}
|
||||
|
||||
&.inline.delete-button {
|
||||
padding: 8px 15px;
|
||||
font-weight: normal;
|
||||
}
|
||||
}
|
||||
|
||||
.overflow.menu {
|
||||
|
|
|
@ -1026,8 +1026,9 @@
|
|||
.collaborator.list {
|
||||
padding: 0;
|
||||
|
||||
.item {
|
||||
padding: 10px 20px;
|
||||
>.item {
|
||||
margin: 0;
|
||||
line-height: 2em;
|
||||
|
||||
&:not(:last-child) {
|
||||
border-bottom: 1px solid #DDD;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue