log: revamp html+css and icons

This commit is contained in:
Hylke Bons 2011-06-11 02:51:04 +01:00
parent 72f4052526
commit f46a7969b0
16 changed files with 2036 additions and 39 deletions

View file

@ -117,7 +117,6 @@ namespace SparkleShare {
public void UpdateEventLog ()
{
InvokeOnMainThread (delegate {
if (HTML == null)
ContentView.AddSubview (ProgressIndicator);
});
@ -147,6 +146,14 @@ namespace SparkleShare {
HTML = HTML.Replace ("<!-- $a-hover-color -->", "#009ff8");
HTML = HTML.Replace ("<!-- $no-buddy-icon-background-image -->",
"file://" + Path.Combine (NSBundle.MainBundle.ResourcePath, "Pixmaps", "avatar-default.png"));
HTML = HTML.Replace ("<!-- $document-added-background-image -->",
"file://" + Path.Combine (NSBundle.MainBundle.ResourcePath, "Pixmaps", "document-added-12.png"));
HTML = HTML.Replace ("<!-- $document-deleted-background-image -->",
"file://" + Path.Combine (NSBundle.MainBundle.ResourcePath, "Pixmaps", "document-deleted-12.png"));
HTML = HTML.Replace ("<!-- $document-edited-background-image -->",
"file://" + Path.Combine (NSBundle.MainBundle.ResourcePath, "Pixmaps", "document-edited-12.png"));
HTML = HTML.Replace ("<!-- $document-moved-background-image -->",
"file://" + Path.Combine (NSBundle.MainBundle.ResourcePath, "Pixmaps", "document-moved-12.png"));
}

View file

@ -55,10 +55,6 @@
<Reference Include="MonoMac">
<SpecificVersion>False</SpecificVersion>
</Reference>
<Reference Include="SparkleLib, Version=0.2.0.0, Culture=neutral, PublicKeyToken=null">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\bin\SparkleLib.dll</HintPath>
</Reference>
<Reference Include="Mono.Posix">
<SpecificVersion>False</SpecificVersion>
</Reference>
@ -66,6 +62,10 @@
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\bin\Meebey.SmartIrc4net.dll</HintPath>
</Reference>
<Reference Include="SparkleLib, Version=0.2.1.0, Culture=neutral, PublicKeyToken=null">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\bin\SparkleLib.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="AppDelegate.cs">
@ -158,6 +158,18 @@
<Content Include="..\..\data\icons\error-active.png">
<Link>Pixmaps\error-active.png</Link>
</Content>
<Content Include="..\..\data\icons\document-added-12.png">
<Link>Pixmaps\document-added-12.png</Link>
</Content>
<Content Include="..\..\data\icons\document-edited-12.png">
<Link>Pixmaps\document-edited-12.png</Link>
</Content>
<Content Include="..\..\data\icons\document-deleted-12.png">
<Link>Pixmaps\document-deleted-12.png</Link>
</Content>
<Content Include="..\..\data\icons\document-moved-12.png">
<Link>Pixmaps\document-moved-12.png</Link>
</Content>
</ItemGroup>
<ItemGroup>
<Folder Include="Pixmaps\" />

View file

@ -154,7 +154,7 @@ namespace SparkleShare {
Menu.AddItem (NSMenuItem.SeparatorItem);
RecentEventsMenuItem = new NSMenuItem () {
Title = "Recent Events"
Title = "Show Events"
};
RecentEventsMenuItem.Activated +=delegate {

View file

@ -320,7 +320,7 @@ namespace SparkleShare {
string event_entry = "<dl>";
if (change_set.IsMerge) {
event_entry += "<dd>Merged a branch</dd>";
event_entry += "<dd>Did something magical</dd>";
} else {
if (change_set.Edited.Count > 0) {
@ -329,9 +329,9 @@ namespace SparkleShare {
change_set.Folder, file_path);
if (File.Exists (absolute_file_path))
event_entry += "<dd class='file-edited'><a href='" + absolute_file_path + "'>" + file_path + "</a></dd>";
event_entry += "<dd class='document-edited'><a href='" + absolute_file_path + "'>" + file_path + "</a></dd>";
else
event_entry += "<dd class='file-edited'>" + file_path + "</dd>";
event_entry += "<dd class='document-edited'>" + file_path + "</dd>";
}
}
@ -341,9 +341,9 @@ namespace SparkleShare {
change_set.Folder, file_path);
if (File.Exists (absolute_file_path))
event_entry += "<dd class='file-added'><a href='" + absolute_file_path + "'>" + file_path + "</a></dd>";
event_entry += "<dd class='document-added'><a href='" + absolute_file_path + "'>" + file_path + "</a></dd>";
else
event_entry += "<dd class='file-added'>" + file_path + "</dd>";
event_entry += "<dd class='document-added'>" + file_path + "</dd>";
}
}
@ -353,9 +353,9 @@ namespace SparkleShare {
change_set.Folder, file_path);
if (File.Exists (absolute_file_path))
event_entry += "<dd class='file-deleted'><a href='" + absolute_file_path + "'>" + file_path + "</a></dd>";
event_entry += "<dd class='document-deleted'><a href='" + absolute_file_path + "'>" + file_path + "</a></dd>";
else
event_entry += "<dd class='file-deleted'>" + file_path + "</dd>";
event_entry += "<dd class='document-deleted'>" + file_path + "</dd>";
}
}
@ -369,11 +369,9 @@ namespace SparkleShare {
change_set.Folder, to_file_path);
if (File.Exists (absolute_file_path))
event_entry += "<dd class='file-moved'><a href='" + absolute_file_path + "'>" + file_path + "</a><br/>" +
"<span class='moved-arrow'>&rarr;</span> ";
event_entry += "<dd class='document-moved'><a href='" + absolute_file_path + "'>" + file_path + "</a><br/>";
else
event_entry += "<dd class='file-moved'>" + file_path + "<br/>" +
"<span class='moved-arrow'>&rarr;</span> ";
event_entry += "<dd class='document-moved'>" + file_path + "<br/>";
if (File.Exists (absolute_to_file_path))
event_entry += "<a href='" + absolute_to_file_path + "'>" + to_file_path + "</a></dd>";
@ -388,7 +386,7 @@ namespace SparkleShare {
event_entry += "</dl>";
event_entries += event_entry_html.Replace ("<!-- $event-entry-content -->", event_entry)
.Replace ("<!-- $event-user-name -->", change_set.UserName)
.Replace ("<!-- $event-avatar-url -->", "file://" + GetAvatar (change_set.UserEmail, 36) )
.Replace ("<!-- $event-avatar-url -->", "file://" + GetAvatar (change_set.UserEmail, 36))
.Replace ("<!-- $event-time -->", change_set.Timestamp.ToString ("H:mm"))
.Replace ("<!-- $event-folder -->", change_set.Folder)
.Replace ("<!-- $event-folder-color -->", AssignColor (change_set.Folder));
@ -1038,7 +1036,7 @@ namespace SparkleShare {
{
string hash = GetMD5 (s).Substring (0, 8);
string numbers = Regex.Replace (hash, "[a-z]", "");
int number = int.Parse (numbers);
int number = 1 + int.Parse (numbers);
return this.tango_palette [number % this.tango_palette.Length];
}
}

1960
data/actions.svg Normal file

File diff suppressed because it is too large Load diff

After

Width:  |  Height:  |  Size: 64 KiB

View file

@ -3,12 +3,13 @@
<div class='event-entry-content'>
<div class='event-info'><div style="float:left;">
<div class='no-buddy-icon'>
<div class='buddy-icon' style='background-image: url("<!-- $event-avatar-url -->");'></div>
</div>
<b><!-- $event-user-name --></b><br/>
<small><!-- $event-time --></small>
<div class='event-info'>
<div style="float:left;">
<div class='no-buddy-icon'>
<div class='buddy-icon' style='background-image: url("<!-- $event-avatar-url -->");'></div>
</div>
<b><!-- $event-user-name --></b><br/>
<small><!-- $event-time --></small>
</div>
<div class='event-time' style='opacity: 0.8;background-color: <!-- $event-folder-color -->'><!-- $event-folder --></div>
</div>

View file

@ -27,7 +27,7 @@
font-size: <!-- $day-entry-header-font-size -->;
color: #444;
margin-bottom: 9px;
margin-left: 40px;
margin-left: 30px;
}
.day-entry-content {
@ -60,6 +60,7 @@
margin-right: auto;
margin-bottom: 12px;
padding: 0px;
padding-bottom: 6px;
border: #ccc 1px solid;
-webkit-border-radius: 0 0 3px 3px;
}
@ -72,19 +73,37 @@
dd {
width: 90%;
overflow: hidden;
margin-left: 24px;
text-overflow: ellipsis;
padding: 4px 0px;
border-bottom: 1px solid #ddd;
}
dd:first-child {
padding-top: 12px;
padding: 0;
padding-top: 2px;
padding-bottom: 4px;
padding-left: 22px;
margin: 0;
margin-bottom: 2px;
margin-left: 12px;
border-bottom: 1px solid #ddd;
background-repeat: no-repeat;
background-position: center left;
}
dd:last-child {
border: none;
padding-bottom: 12px;
}
.document-added {
background-image: url('<!-- $document-added-background-image -->');
}
.document-deleted {
background-image: url('<!-- $document-deleted-background-image -->');
}
.document-edited {
background-image: url('<!-- $document-edited-background-image -->');
}
.document-moved {
background-image: url('<!-- $document-moved-background-image -->');
}
.no-buddy-icon {
@ -105,10 +124,10 @@
.event-info {
float: left;
padding: 15px;
margin-bottom: 6px;
width: 410px;
background-color: #fff;
border-bottom: 1px #ccc solid;
position: relative;
}
</style>
</head>

View file

@ -25,10 +25,10 @@ app_theme_icons = \
status,avatar-default-24.png \
status,avatar-default-32.png \
status,avatar-default-48.png \
status,document-added-16.png \
status,document-edited-16.png \
status,document-moved-16.png \
status,document-removed-16.png \
status,document-added-12.png \
status,document-edited-12.png \
status,document-deleted-12.png \
status,document-moved-12.png \
status,dialog-error-16.png \
status,dialog-error-24.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 459 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 487 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 333 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 618 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 610 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 589 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 318 B