Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Phcoder cherrypicks #238

Merged
merged 46 commits into from
Aug 23, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
45abc0e
Revert "Remove support for editing files."
phcoder Nov 17, 2015
bd7c6d1
Don't use coffeescript for internal editor
maks Aug 4, 2016
f63c813
Add copy whole file to editor
maks Aug 4, 2016
6dbfb8d
Add ssh key generation and exporting
phcoder Oct 29, 2015
d5b5086
Don't rtrim the buffer.
phcoder Aug 5, 2016
8874fa1
Improve commit metadata checks
maks Aug 17, 2016
cbb02af
Change commit view to be more in line with usual android interface
phcoder Nov 5, 2015
ed4e3c0
Add ability to create a branch from any commit
phcoder Nov 6, 2015
070fa35
Save and share a diff
maks Aug 17, 2016
8cdcaaf
Remove SheimiArrayAdapter
phcoder Nov 7, 2015
a29d46a
Make branch picker an activity
phcoder Nov 7, 2015
01e3e16
Add branch menu to create and delete branches
phcoder Nov 8, 2015
608dd86
Prevent NPE using up affordance from BranchChooser
maks Aug 18, 2016
26b83c7
Track item visual selection in actionmode
maks Aug 18, 2016
cb35d53
Show author and not committer in short list
phcoder Nov 8, 2015
e285469
Show the name of key to be deleted.
phcoder Nov 8, 2015
222c8e4
Track item visual selection in actionmodei:SSH Key
maks Aug 18, 2016
af72597
Don't swallow subsequent lines on amend.
phcoder Nov 19, 2015
d2c72ae
Fix commitdiff header
phcoder Nov 21, 2015
afacf8b
Add support for setting commit author.
phcoder Nov 21, 2015
055af6e
Add force pull functionality
phcoder Nov 22, 2015
9785bb4
Allow rebase on non-local branch
phcoder Nov 23, 2015
90c070b
Clear merge and rebase status in force pull
phcoder Nov 23, 2015
3acfa4d
Discard rebases and merges on hard reset.
phcoder Nov 25, 2015
eeaed38
Add staged and unstaged diff functionality
phcoder Nov 25, 2015
07f0af6
Show public key on click on key
phcoder Nov 25, 2015
590e970
Limit author autocomplete to 500 last commits.
phcoder Nov 25, 2015
f7e3af0
Add an Action to edit raw config
phcoder Dec 5, 2015
55ac594
Respect user.name and user.email in config
phcoder Dec 5, 2015
de28f32
Add config dialog.
phcoder Dec 5, 2015
94133dc
Restructure import of local repo for future migration to OPEN_DOCUMEN…
phcoder Dec 6, 2015
368036a
Implement commit search
phcoder Dec 8, 2015
3e3c5e1
Import midnight codemirror theme
phcoder Dec 9, 2015
b0c93e5
Add missing COPYING file.
phcoder Dec 9, 2015
870d78a
Dark theme
phcoder Dec 9, 2015
2163a24
Commits touching a file
phcoder Dec 9, 2015
353276f
Do not include old commit in title when printing a commitdiff
phcoder Dec 9, 2015
ba41622
Optimize commit search
phcoder Dec 9, 2015
a8424c8
tidy up from cherry-picks
maks Aug 23, 2016
899e107
Fix crash on commit tab rotate
phcoder Dec 12, 2015
69519a5
Improve responsiveness to commit search
phcoder Dec 12, 2015
3c24614
Fix bugs with backrounf commit search
phcoder Dec 13, 2015
c3d6c3f
Fix accidental search in parents field
phcoder Dec 13, 2015
17e240c
Fix save icon bug
phcoder Dec 18, 2015
fa8f646
Update codemirror version to HEAD
phcoder Jan 1, 2016
6ea23fc
Fix unit test to match code changes
maks Aug 23, 2016
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
674 changes: 674 additions & 0 deletions COPYING

Large diffs are not rendered by default.

8 changes: 8 additions & 0 deletions src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,14 @@
android:name="android.support.PARENT_ACTIVITY"
android:value=".activities.RepoDetailActivity" />
</activity>
<activity
android:name=".activities.BranchChooserActivity"
android:configChanges="orientation|keyboardHidden"
android:parentActivityName=".activities.RepoDetailActivity" >
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value=".activities.RepoDetailActivity" />
</activity>
<activity
android:name=".activities.CommitDiffActivity"
android:parentActivityName=".activities.RepoDetailActivity" >
Expand Down
334 changes: 334 additions & 0 deletions src/main/assets/css/codemirror.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,334 @@
/* BASICS */

.CodeMirror {
/* Set height, width, borders, and global font properties here */
font-family: monospace;
height: 300px;
color: black;
}

/* PADDING */

.CodeMirror-lines {
padding: 4px 0; /* Vertical padding around content */
}
.CodeMirror pre {
padding: 0 4px; /* Horizontal padding of content */
}

.CodeMirror-scrollbar-filler, .CodeMirror-gutter-filler {
background-color: white; /* The little square between H and V scrollbars */
}

/* GUTTER */

.CodeMirror-gutters {
border-right: 1px solid #ddd;
background-color: #f7f7f7;
white-space: nowrap;
}
.CodeMirror-linenumbers {}
.CodeMirror-linenumber {
padding: 0 3px 0 5px;
min-width: 20px;
text-align: right;
color: #999;
white-space: nowrap;
}

.CodeMirror-guttermarker { color: black; }
.CodeMirror-guttermarker-subtle { color: #999; }

/* CURSOR */

.CodeMirror-cursor {
border-left: 1px solid black;
border-right: none;
width: 0;
}
/* Shown when moving in bi-directional text */
.CodeMirror div.CodeMirror-secondarycursor {
border-left: 1px solid silver;
}
.cm-fat-cursor .CodeMirror-cursor {
width: auto;
border: 0;
background: #7e7;
}
.cm-fat-cursor div.CodeMirror-cursors {
z-index: 1;
}

.cm-animate-fat-cursor {
width: auto;
border: 0;
-webkit-animation: blink 1.06s steps(1) infinite;
-moz-animation: blink 1.06s steps(1) infinite;
animation: blink 1.06s steps(1) infinite;
background-color: #7e7;
}
@-moz-keyframes blink {
0% {}
50% { background-color: transparent; }
100% {}
}
@-webkit-keyframes blink {
0% {}
50% { background-color: transparent; }
100% {}
}
@keyframes blink {
0% {}
50% { background-color: transparent; }
100% {}
}

/* Can style cursor different in overwrite (non-insert) mode */
.CodeMirror-overwrite .CodeMirror-cursor {}

.cm-tab { display: inline-block; text-decoration: inherit; }

.CodeMirror-ruler {
border-left: 1px solid #ccc;
position: absolute;
}

/* DEFAULT THEME */

.cm-s-default .cm-header {color: blue;}
.cm-s-default .cm-quote {color: #090;}
.cm-negative {color: #d44;}
.cm-positive {color: #292;}
.cm-header, .cm-strong {font-weight: bold;}
.cm-em {font-style: italic;}
.cm-link {text-decoration: underline;}
.cm-strikethrough {text-decoration: line-through;}

.cm-s-default .cm-keyword {color: #708;}
.cm-s-default .cm-atom {color: #219;}
.cm-s-default .cm-number {color: #164;}
.cm-s-default .cm-def {color: #00f;}
.cm-s-default .cm-variable,
.cm-s-default .cm-punctuation,
.cm-s-default .cm-property,
.cm-s-default .cm-operator {}
.cm-s-default .cm-variable-2 {color: #05a;}
.cm-s-default .cm-variable-3 {color: #085;}
.cm-s-default .cm-comment {color: #a50;}
.cm-s-default .cm-string {color: #a11;}
.cm-s-default .cm-string-2 {color: #f50;}
.cm-s-default .cm-meta {color: #555;}
.cm-s-default .cm-qualifier {color: #555;}
.cm-s-default .cm-builtin {color: #30a;}
.cm-s-default .cm-bracket {color: #997;}
.cm-s-default .cm-tag {color: #170;}
.cm-s-default .cm-attribute {color: #00c;}
.cm-s-default .cm-hr {color: #999;}
.cm-s-default .cm-link {color: #00c;}

.cm-s-default .cm-error {color: #f00;}
.cm-invalidchar {color: #f00;}

.CodeMirror-composing { border-bottom: 2px solid; }

/* Default styles for common addons */

div.CodeMirror span.CodeMirror-matchingbracket {color: #0f0;}
div.CodeMirror span.CodeMirror-nonmatchingbracket {color: #f22;}
.CodeMirror-matchingtag { background: rgba(255, 150, 0, .3); }
.CodeMirror-activeline-background {background: #e8f2ff;}

/* STOP */

/* The rest of this file contains styles related to the mechanics of
the editor. You probably shouldn't touch them. */

.CodeMirror {
position: relative;
overflow: hidden;
background: white;
}

.CodeMirror-scroll {
overflow: scroll !important; /* Things will break if this is overridden */
/* 30px is the magic margin used to hide the element's real scrollbars */
/* See overflow: hidden in .CodeMirror */
margin-bottom: -30px; margin-right: -30px;
padding-bottom: 30px;
height: 100%;
outline: none; /* Prevent dragging from highlighting the element */
position: relative;
}
.CodeMirror-sizer {
position: relative;
border-right: 30px solid transparent;
}

/* The fake, visible scrollbars. Used to force redraw during scrolling
before actual scrolling happens, thus preventing shaking and
flickering artifacts. */
.CodeMirror-vscrollbar, .CodeMirror-hscrollbar, .CodeMirror-scrollbar-filler, .CodeMirror-gutter-filler {
position: absolute;
z-index: 6;
display: none;
}
.CodeMirror-vscrollbar {
right: 0; top: 0;
overflow-x: hidden;
overflow-y: scroll;
}
.CodeMirror-hscrollbar {
bottom: 0; left: 0;
overflow-y: hidden;
overflow-x: scroll;
}
.CodeMirror-scrollbar-filler {
right: 0; bottom: 0;
}
.CodeMirror-gutter-filler {
left: 0; bottom: 0;
}

.CodeMirror-gutters {
position: absolute; left: 0; top: 0;
z-index: 3;
}
.CodeMirror-gutter {
white-space: normal;
height: 100%;
display: inline-block;
margin-bottom: -30px;
/* Hack to make IE7 behave */
*zoom:1;
*display:inline;
}
.CodeMirror-gutter-wrapper {
position: absolute;
z-index: 4;
background: none !important;
border: none !important;
}
.CodeMirror-gutter-background {
position: absolute;
top: 0; bottom: 0;
z-index: 4;
}
.CodeMirror-gutter-elt {
position: absolute;
cursor: default;
z-index: 4;
}
.CodeMirror-gutter-wrapper {
-webkit-user-select: none;
-moz-user-select: none;
user-select: none;
}

.CodeMirror-lines {
cursor: text;
min-height: 1px; /* prevents collapsing before first draw */
}
.CodeMirror pre {
/* Reset some styles that the rest of the page might have set */
-moz-border-radius: 0; -webkit-border-radius: 0; border-radius: 0;
border-width: 0;
background: transparent;
font-family: inherit;
font-size: inherit;
margin: 0;
white-space: pre;
word-wrap: normal;
line-height: inherit;
color: inherit;
z-index: 2;
position: relative;
overflow: visible;
-webkit-tap-highlight-color: transparent;
}
.CodeMirror-wrap pre {
word-wrap: break-word;
white-space: pre-wrap;
word-break: normal;
}

.CodeMirror-linebackground {
position: absolute;
left: 0; right: 0; top: 0; bottom: 0;
z-index: 0;
}

.CodeMirror-linewidget {
position: relative;
z-index: 2;
overflow: auto;
}

.CodeMirror-widget {}

.CodeMirror-code {
outline: none;
}

/* Force content-box sizing for the elements where we expect it */
.CodeMirror-scroll,
.CodeMirror-sizer,
.CodeMirror-gutter,
.CodeMirror-gutters,
.CodeMirror-linenumber {
-moz-box-sizing: content-box;
box-sizing: content-box;
}

.CodeMirror-measure {
position: absolute;
width: 100%;
height: 0;
overflow: hidden;
visibility: hidden;
}

.CodeMirror-cursor { position: absolute; }
.CodeMirror-measure pre { position: static; }

div.CodeMirror-cursors {
visibility: hidden;
position: relative;
z-index: 3;
}
div.CodeMirror-dragcursors {
visibility: visible;
}

.CodeMirror-focused div.CodeMirror-cursors {
visibility: visible;
}

.CodeMirror-selected { background: #d9d9d9; }
.CodeMirror-focused .CodeMirror-selected { background: #d7d4f0; }
.CodeMirror-crosshair { cursor: crosshair; }
.CodeMirror-line::selection, .CodeMirror-line > span::selection, .CodeMirror-line > span > span::selection { background: #d7d4f0; }
.CodeMirror-line::-moz-selection, .CodeMirror-line > span::-moz-selection, .CodeMirror-line > span > span::-moz-selection { background: #d7d4f0; }

.cm-searching {
background: #ffa;
background: rgba(255, 255, 0, .4);
}

/* IE7 hack to prevent it from returning funny offsetTops on the spans */
.CodeMirror span { *vertical-align: text-bottom; }

/* Used to force a border model for a node */
.cm-force-border { padding-right: .1px; }

@media print {
/* Hide the cursor when printing */
.CodeMirror div.CodeMirror-cursors {
visibility: hidden;
}
}

/* See issue #2901 */
.cm-tab-wrap-hack:after { content: ''; }

/* Help users use markselection to safely style text background */
span.CodeMirror-selectedtext { background: none; }
7 changes: 6 additions & 1 deletion src/main/assets/css/local_commits_diff.css
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,13 @@ pre code {
padding: 5px;
}
.path-block {
overflow: hidden;
overflow: hidden;
}

.commitinfo-block {
overflow: scroll;
}

.change-type {
float: right;
color: #999;
Expand Down
Loading