Commit babcc5d5 authored by Gabriel Mazetto's avatar Gabriel Mazetto

Codestyle changes

parent c99d7d33
...@@ -13,7 +13,9 @@ ...@@ -13,7 +13,9 @@
}, },
filters: { filters: {
emptyRepo: (value) => { emptyRepo: (value) => {
if (!value) return '<clone url for primary repository>'; if (!value) {
return '<clone url for primary repository>';
}
return value; return value;
}, },
}, },
...@@ -30,7 +32,7 @@ ...@@ -30,7 +32,7 @@
<slot name="clipboard-1"></slot> <slot name="clipboard-1"></slot>
<pre class="dark" id="geo-info-1">git clone {{cloneUrlSecondary}}</pre> <pre class="dark" id="geo-info-1">git clone {{cloneUrlSecondary}}</pre>
<p><strong>Step2.</strong> In your repository's directory define <strong>primary's node</strong> repository URL as target to <strong>push</strong> code:</p> <p><strong>Step2.</strong> Go to the new directory and define <strong>primary's node</strong> repository URL as the <strong>push</strong> remote:</p>
<slot name="clipboard-2"></slot> <slot name="clipboard-2"></slot>
<pre class="dark" id="geo-info-2">git remote set-url --push origin {{cloneUrlPrimary | emptyRepo}}</pre> <pre class="dark" id="geo-info-2">git remote set-url --push origin {{cloneUrlPrimary | emptyRepo}}</pre>
<p><strong>Done.</strong> You can now commit and push code as you normally do, but with increased speed.</p> <p><strong>Done.</strong> You can now commit and push code as you normally do, but with increased speed.</p>
...@@ -42,10 +44,10 @@ ...@@ -42,10 +44,10 @@
}); });
document.addEventListener('DOMContentLoaded', () => { document.addEventListener('DOMContentLoaded', () => {
const geoClone = document.getElementById('geo_clone'); const geoClone = document.getElementById('geo-clone');
if (geoClone) { if (geoClone) {
gl.GeoCloneDialog = new Vue({ gl.GeoCloneDialog = new Vue({
el: '#geo_clone', el: '#geo-clone',
data: Object.assign({}, geoClone.dataset), data: Object.assign({}, geoClone.dataset),
}); });
} }
......
...@@ -918,7 +918,7 @@ a.allowed-to-push { ...@@ -918,7 +918,7 @@ a.allowed-to-push {
} }
} }
#modal_geo_info .modal-dialog { #modal-geo-info .modal-dialog {
width: 700px; width: 700px;
.btn-clipboard { .btn-clipboard {
......
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
= text_field_tag :project_clone, default_url_to_repo(project), class: "js-select-on-focus form-control", readonly: true = text_field_tag :project_clone, default_url_to_repo(project), class: "js-select-on-focus form-control", readonly: true
.input-group-btn .input-group-btn
= clipboard_button(clipboard_target: '#project_clone') = clipboard_button(clipboard_target: '#project_clone')
= geo_button(modal_target: '#modal_geo_info') if Gitlab::Geo.secondary? = geo_button(modal_target: '#modal-geo-info') if Gitlab::Geo.secondary?
:javascript :javascript
$('ul.clone-options-dropdown a').on('click',function(e){ $('ul.clone-options-dropdown a').on('click',function(e){
......
#geo_clone{data: {'clone-url-secondary': h(default_url_to_repo(project)), 'clone-url-primary': h(geo_primary_default_url_to_repo(project))}} #geo-clone{data: {clone_url_secondary: h(default_url_to_repo(project)), clone_url_primary: h(geo_primary_default_url_to_repo(project))}}
%geo-clone-dialog{id: 'modal_geo_info', title: 'How to work faster with Geo'} %geo-clone-dialog{id: 'modal-geo-info', title: 'How to work faster with Geo'}
%span{slot: 'clipboard-1'} %span{slot: 'clipboard-1'}
= clipboard_button(clipboard_target: 'pre#geo-info-1') = clipboard_button(clipboard_target: 'pre#geo-info-1')
%span{slot: 'clipboard-2'} %span{slot: 'clipboard-2'}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment