Skip to content

Commit

Permalink
Icons update, new hashmark in hashmarks.misc
Browse files Browse the repository at this point in the history
  • Loading branch information
cipres authored and cipres committed Nov 24, 2018
1 parent 26c81eb commit e831329
Show file tree
Hide file tree
Showing 9 changed files with 27 additions and 5 deletions.
4 changes: 4 additions & 0 deletions galacteek/core/ipfsmarks.py
Original file line number Diff line number Diff line change
Expand Up @@ -260,11 +260,15 @@ def insertMark(self, mark, category):

# Handle IPFSHashMark or tuple
if isinstance(mark, IPFSHashMark):
if mark.path in sec[marksKey]:
return False
sec[marksKey].update(mark)
self.markAdded.emit(mark.path, mark.markData)
else:
try:
mPath, mData = mark
if mPath in sec[marksKey]:
return False
sec[marksKey][mPath] = mData
self.markAdded.emit(mPath, mData)
except Exception:
Expand Down
17 changes: 16 additions & 1 deletion galacteek/hashmarks/default/hashmarks.misc.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,22 @@
"ipfsmarks": {
"categories": {
"computers": {
"_marks": {},
"_marks": {
"/ipfs/QmVDWmkM87NfR85WE1LvfwfJLRcMEtfNnCBiCJQRePP7Ly": {
"metadata": {
"title": "A Declaration of the Independence of Cyberspace",
"description": "",
"datasize": 5708,
"cumulativesize": 5711,
"numlinks": 0
},
"datecreated": "2018-11-24T23:48:06.309057",
"tscreated": 1543099686,
"comment": "",
"share": false,
"tags": []
}
},
"atari": {
"_marks": {
"/ipfs/QmbKxNNCxBox7Cmv3jiUZbiG3zpzmtnYzVUuKHxfAjvpyH": {
Expand Down
4 changes: 2 additions & 2 deletions galacteek/templates/ipfssearch.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@
<a href="ipfs:{{ hit['path'] }}">{{ hit['title'] }}</a>
(Size {{ hit['size'] }})

<a href="ipfs:{{ hit['path'] }}#hashmark"><img src=":/share/icons/hashmarks.png" width="16" height="16"/></a>
<a href="ipfs:{{ hit['path'] }}#hashmark"><img src=":/share/icons/star-navy.png" width="16" height="16"/></a>

{% if hit['type'] == 'directory' %}
<a href="ipfs:{{ hit['path'] }}#explore"><img src=":/share/icons/folder-open.png" width="16" height="16"/></a>
<a href="ipfs:{{ hit['path'] }}#explore"><img src=":/share/icons/folder-open-black.png" width="16" height="16"/></a>
{% endif %}

</p>
Expand Down
4 changes: 2 additions & 2 deletions galacteek/ui/browsertab.ui
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@
</property>
<property name="maximumSize">
<size>
<width>54</width>
<width>48</width>
<height>16777215</height>
</size>
</property>
Expand All @@ -140,7 +140,7 @@
</property>
<property name="maximumSize">
<size>
<width>54</width>
<width>48</width>
<height>16777215</height>
</size>
</property>
Expand Down
3 changes: 3 additions & 0 deletions galacteek/ui/galacteek.qrc
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
<RCC>
<qresource>
<file>../../share/icons/star-navy.png</file>
<file>../../share/icons/folder-open-black.png</file>
<file>../../share/icons/window.png</file>
<file>../../share/icons/hashmark-add.png</file>
<file>../../share/icons/ipld.png</file>
<file>../../share/icons/settings.png</file>
<file>../../share/icons/stroke-cube.png</file>
Expand Down
Binary file added share/icons/folder-open-black.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified share/icons/left-arrow.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified share/icons/right-arrow.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added share/icons/star-navy.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit e831329

Please sign in to comment.