Browse Source

remove user status pixmaps

Andrew Dolgov 7 years ago
parent
commit
7565e6e2e0
12 changed files with 23 additions and 479 deletions
  1. 0 5
      backend.php
  2. BIN
      images/user_me.png
  3. 0 119
      images/user_me.svg
  4. BIN
      images/user_normal.png
  5. 0 104
      images/user_normal.svg
  6. BIN
      images/user_op.png
  7. 0 119
      images/user_op.svg
  8. BIN
      images/user_voice.png
  9. 0 119
      images/user_voice.svg
  10. 1 1
      index.php
  11. 6 11
      js/tt-irc.js
  12. 16 1
      tt-irc.css

+ 0 - 5
backend.php

@@ -301,11 +301,6 @@
 
 		$rv["status"] = 1;
 
-		foreach (array("user_normal.png", "user_voice.png", "user_op.png") as $img) {
-
-			$rv["images"][$img] = theme_image($link, "images/$img");
-		}
-
 		$rv["theme"] = get_pref($link, "USER_THEME");
 		$rv["update_delay_max"] = UPDATE_DELAY_MAX;
 		$rv["uniqid"] = uniqid();

BIN
images/user_me.png


+ 0 - 119
images/user_me.svg

@@ -1,119 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<!-- Created with Inkscape (http://www.inkscape.org/) -->
-
-<svg
-   xmlns:dc="http://purl.org/dc/elements/1.1/"
-   xmlns:cc="http://creativecommons.org/ns#"
-   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
-   xmlns:svg="http://www.w3.org/2000/svg"
-   xmlns="http://www.w3.org/2000/svg"
-   xmlns:xlink="http://www.w3.org/1999/xlink"
-   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
-   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
-   width="16px"
-   height="16px"
-   id="svg2816"
-   version="1.1"
-   inkscape:version="0.47 r22583"
-   inkscape:export-filename="/Users/fox/Desktop/user_me.png"
-   inkscape:export-xdpi="71.57"
-   inkscape:export-ydpi="71.57"
-   sodipodi:docname="user_me.svg">
-  <defs
-     id="defs2818">
-    <linearGradient
-       id="linearGradient3641">
-      <stop
-         id="stop3643"
-         offset="0"
-         style="stop-color:#ffffff;stop-opacity:1;" />
-      <stop
-         style="stop-color:#e1cdff;stop-opacity:1;"
-         offset="0.44186047"
-         id="stop3645" />
-      <stop
-         id="stop3647"
-         offset="1"
-         style="stop-color:#9554ff;stop-opacity:1;" />
-    </linearGradient>
-    <linearGradient
-       id="linearGradient3608">
-      <stop
-         style="stop-color:#ffffff;stop-opacity:1;"
-         offset="0"
-         id="stop3610" />
-      <stop
-         id="stop3618"
-         offset="0.44186047"
-         style="stop-color:#ffffff;stop-opacity:0.49803922;" />
-      <stop
-         style="stop-color:#595959;stop-opacity:0;"
-         offset="1"
-         id="stop3612" />
-    </linearGradient>
-    <inkscape:perspective
-       sodipodi:type="inkscape:persp3d"
-       inkscape:vp_x="0 : 8 : 1"
-       inkscape:vp_y="0 : 1000 : 0"
-       inkscape:vp_z="16 : 8 : 1"
-       inkscape:persp3d-origin="8 : 5.3333333 : 1"
-       id="perspective2824" />
-    <radialGradient
-       inkscape:collect="always"
-       xlink:href="#linearGradient3641"
-       id="radialGradient3616"
-       cx="8.6344891"
-       cy="9.5228825"
-       fx="8.6344891"
-       fy="9.5228825"
-       r="8.3836641"
-       gradientUnits="userSpaceOnUse"
-       gradientTransform="matrix(1.1788907,-0.02306023,0.02388217,1.22091,-1.772057,-1.9045866)" />
-  </defs>
-  <sodipodi:namedview
-     id="base"
-     pagecolor="#ffffff"
-     bordercolor="#666666"
-     borderopacity="1.0"
-     inkscape:pageopacity="0.0"
-     inkscape:pageshadow="2"
-     inkscape:zoom="22.197802"
-     inkscape:cx="-8.7133665"
-     inkscape:cy="8"
-     inkscape:current-layer="layer1"
-     showgrid="true"
-     inkscape:grid-bbox="true"
-     inkscape:document-units="px"
-     inkscape:window-width="1600"
-     inkscape:window-height="1099"
-     inkscape:window-x="5"
-     inkscape:window-y="8"
-     inkscape:window-maximized="1" />
-  <metadata
-     id="metadata2821">
-    <rdf:RDF>
-      <cc:Work
-         rdf:about="">
-        <dc:format>image/svg+xml</dc:format>
-        <dc:type
-           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
-        <dc:title></dc:title>
-      </cc:Work>
-    </rdf:RDF>
-  </metadata>
-  <g
-     id="layer1"
-     inkscape:label="Layer 1"
-     inkscape:groupmode="layer">
-    <path
-       sodipodi:type="arc"
-       style="fill:url(#radialGradient3616);fill-opacity:1.0;stroke:#88b0f0;stroke-opacity:1"
-       id="path3606"
-       sodipodi:cx="10.136139"
-       sodipodi:cy="10.774258"
-       sodipodi:rx="7.8836637"
-       sodipodi:ry="7.8836637"
-       d="m 18.019803,10.774258 a 7.8836637,7.8836637 0 1 1 -15.7673277,0 7.8836637,7.8836637 0 1 1 15.7673277,0 z"
-       transform="matrix(0.9,0,0,0.9,-1.122525,-1.6968319)" />
-  </g>
-</svg>

BIN
images/user_normal.png


+ 0 - 104
images/user_normal.svg

@@ -1,104 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<!-- Created with Inkscape (http://www.inkscape.org/) -->
-
-<svg
-   xmlns:dc="http://purl.org/dc/elements/1.1/"
-   xmlns:cc="http://creativecommons.org/ns#"
-   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
-   xmlns:svg="http://www.w3.org/2000/svg"
-   xmlns="http://www.w3.org/2000/svg"
-   xmlns:xlink="http://www.w3.org/1999/xlink"
-   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
-   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
-   width="16px"
-   height="16px"
-   id="svg2816"
-   version="1.1"
-   inkscape:version="0.47 r22583"
-   inkscape:export-filename="/Users/fox/Desktop/user_normal.png"
-   inkscape:export-xdpi="71.57"
-   inkscape:export-ydpi="71.57"
-   sodipodi:docname="New document 2">
-  <defs
-     id="defs2818">
-    <linearGradient
-       id="linearGradient3608">
-      <stop
-         style="stop-color:#ffffff;stop-opacity:1;"
-         offset="0"
-         id="stop3610" />
-      <stop
-         id="stop3618"
-         offset="0.44186047"
-         style="stop-color:#ffffff;stop-opacity:0.49803922;" />
-      <stop
-         style="stop-color:#595959;stop-opacity:0;"
-         offset="1"
-         id="stop3612" />
-    </linearGradient>
-    <inkscape:perspective
-       sodipodi:type="inkscape:persp3d"
-       inkscape:vp_x="0 : 8 : 1"
-       inkscape:vp_y="0 : 1000 : 0"
-       inkscape:vp_z="16 : 8 : 1"
-       inkscape:persp3d-origin="8 : 5.3333333 : 1"
-       id="perspective2824" />
-    <radialGradient
-       inkscape:collect="always"
-       xlink:href="#linearGradient3608"
-       id="radialGradient3616"
-       cx="8.6344891"
-       cy="9.5228825"
-       fx="8.6344891"
-       fy="9.5228825"
-       r="8.3836641"
-       gradientUnits="userSpaceOnUse"
-       gradientTransform="matrix(1.1788907,-0.02306023,0.02388217,1.22091,-1.772057,-1.9045866)" />
-  </defs>
-  <sodipodi:namedview
-     id="base"
-     pagecolor="#ffffff"
-     bordercolor="#666666"
-     borderopacity="1.0"
-     inkscape:pageopacity="0.0"
-     inkscape:pageshadow="2"
-     inkscape:zoom="22.197802"
-     inkscape:cx="-0.379208"
-     inkscape:cy="8"
-     inkscape:current-layer="layer1"
-     showgrid="true"
-     inkscape:grid-bbox="true"
-     inkscape:document-units="px"
-     inkscape:window-width="1600"
-     inkscape:window-height="1099"
-     inkscape:window-x="0"
-     inkscape:window-y="0"
-     inkscape:window-maximized="0" />
-  <metadata
-     id="metadata2821">
-    <rdf:RDF>
-      <cc:Work
-         rdf:about="">
-        <dc:format>image/svg+xml</dc:format>
-        <dc:type
-           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
-        <dc:title></dc:title>
-      </cc:Work>
-    </rdf:RDF>
-  </metadata>
-  <g
-     id="layer1"
-     inkscape:label="Layer 1"
-     inkscape:groupmode="layer">
-    <path
-       sodipodi:type="arc"
-       style="fill:url(#radialGradient3616);fill-opacity:1;stroke:#88b0f0;stroke-opacity:1"
-       id="path3606"
-       sodipodi:cx="10.136139"
-       sodipodi:cy="10.774258"
-       sodipodi:rx="7.8836637"
-       sodipodi:ry="7.8836637"
-       d="m 18.019803,10.774258 a 7.8836637,7.8836637 0 1 1 -15.7673277,0 7.8836637,7.8836637 0 1 1 15.7673277,0 z"
-       transform="matrix(0.9,0,0,0.9,-1.122525,-1.6968319)" />
-  </g>
-</svg>

BIN
images/user_op.png


+ 0 - 119
images/user_op.svg

@@ -1,119 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<!-- Created with Inkscape (http://www.inkscape.org/) -->
-
-<svg
-   xmlns:dc="http://purl.org/dc/elements/1.1/"
-   xmlns:cc="http://creativecommons.org/ns#"
-   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
-   xmlns:svg="http://www.w3.org/2000/svg"
-   xmlns="http://www.w3.org/2000/svg"
-   xmlns:xlink="http://www.w3.org/1999/xlink"
-   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
-   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
-   width="16px"
-   height="16px"
-   id="svg2816"
-   version="1.1"
-   inkscape:version="0.47 r22583"
-   inkscape:export-filename="/Users/fox/Desktop/user_voice.png"
-   inkscape:export-xdpi="71.57"
-   inkscape:export-ydpi="71.57"
-   sodipodi:docname="user_normal.svg">
-  <defs
-     id="defs2818">
-    <linearGradient
-       id="linearGradient3641">
-      <stop
-         id="stop3643"
-         offset="0"
-         style="stop-color:#ffffff;stop-opacity:1;" />
-      <stop
-         style="stop-color:#cdffcf;stop-opacity:1;"
-         offset="0.44186047"
-         id="stop3645" />
-      <stop
-         id="stop3647"
-         offset="1"
-         style="stop-color:#54ff5d;stop-opacity:1;" />
-    </linearGradient>
-    <linearGradient
-       id="linearGradient3608">
-      <stop
-         style="stop-color:#ffffff;stop-opacity:1;"
-         offset="0"
-         id="stop3610" />
-      <stop
-         id="stop3618"
-         offset="0.44186047"
-         style="stop-color:#ffffff;stop-opacity:0.49803922;" />
-      <stop
-         style="stop-color:#595959;stop-opacity:0;"
-         offset="1"
-         id="stop3612" />
-    </linearGradient>
-    <inkscape:perspective
-       sodipodi:type="inkscape:persp3d"
-       inkscape:vp_x="0 : 8 : 1"
-       inkscape:vp_y="0 : 1000 : 0"
-       inkscape:vp_z="16 : 8 : 1"
-       inkscape:persp3d-origin="8 : 5.3333333 : 1"
-       id="perspective2824" />
-    <radialGradient
-       inkscape:collect="always"
-       xlink:href="#linearGradient3641"
-       id="radialGradient3616"
-       cx="8.6344891"
-       cy="9.5228825"
-       fx="8.6344891"
-       fy="9.5228825"
-       r="8.3836641"
-       gradientUnits="userSpaceOnUse"
-       gradientTransform="matrix(1.1788907,-0.02306023,0.02388217,1.22091,-1.772057,-1.9045866)" />
-  </defs>
-  <sodipodi:namedview
-     id="base"
-     pagecolor="#ffffff"
-     bordercolor="#666666"
-     borderopacity="1.0"
-     inkscape:pageopacity="0.0"
-     inkscape:pageshadow="2"
-     inkscape:zoom="22.197802"
-     inkscape:cx="-0.379208"
-     inkscape:cy="8"
-     inkscape:current-layer="layer1"
-     showgrid="true"
-     inkscape:grid-bbox="true"
-     inkscape:document-units="px"
-     inkscape:window-width="1600"
-     inkscape:window-height="1099"
-     inkscape:window-x="0"
-     inkscape:window-y="0"
-     inkscape:window-maximized="0" />
-  <metadata
-     id="metadata2821">
-    <rdf:RDF>
-      <cc:Work
-         rdf:about="">
-        <dc:format>image/svg+xml</dc:format>
-        <dc:type
-           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
-        <dc:title></dc:title>
-      </cc:Work>
-    </rdf:RDF>
-  </metadata>
-  <g
-     id="layer1"
-     inkscape:label="Layer 1"
-     inkscape:groupmode="layer">
-    <path
-       sodipodi:type="arc"
-       style="fill:url(#radialGradient3616);fill-opacity:1.0;stroke:#88b0f0;stroke-opacity:1"
-       id="path3606"
-       sodipodi:cx="10.136139"
-       sodipodi:cy="10.774258"
-       sodipodi:rx="7.8836637"
-       sodipodi:ry="7.8836637"
-       d="m 18.019803,10.774258 a 7.8836637,7.8836637 0 1 1 -15.7673277,0 7.8836637,7.8836637 0 1 1 15.7673277,0 z"
-       transform="matrix(0.9,0,0,0.9,-1.122525,-1.6968319)" />
-  </g>
-</svg>

BIN
images/user_voice.png


+ 0 - 119
images/user_voice.svg

@@ -1,119 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<!-- Created with Inkscape (http://www.inkscape.org/) -->
-
-<svg
-   xmlns:dc="http://purl.org/dc/elements/1.1/"
-   xmlns:cc="http://creativecommons.org/ns#"
-   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
-   xmlns:svg="http://www.w3.org/2000/svg"
-   xmlns="http://www.w3.org/2000/svg"
-   xmlns:xlink="http://www.w3.org/1999/xlink"
-   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
-   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
-   width="16px"
-   height="16px"
-   id="svg2816"
-   version="1.1"
-   inkscape:version="0.47 r22583"
-   inkscape:export-filename="/Users/fox/Desktop/user_voice.png"
-   inkscape:export-xdpi="71.57"
-   inkscape:export-ydpi="71.57"
-   sodipodi:docname="New document 2">
-  <defs
-     id="defs2818">
-    <linearGradient
-       id="linearGradient3641">
-      <stop
-         id="stop3643"
-         offset="0"
-         style="stop-color:#ffffff;stop-opacity:1;" />
-      <stop
-         style="stop-color:#fff1cd;stop-opacity:1;"
-         offset="0.44186047"
-         id="stop3645" />
-      <stop
-         id="stop3647"
-         offset="1"
-         style="stop-color:#ffc155;stop-opacity:1;" />
-    </linearGradient>
-    <linearGradient
-       id="linearGradient3608">
-      <stop
-         style="stop-color:#ffffff;stop-opacity:1;"
-         offset="0"
-         id="stop3610" />
-      <stop
-         id="stop3618"
-         offset="0.44186047"
-         style="stop-color:#ffffff;stop-opacity:0.49803922;" />
-      <stop
-         style="stop-color:#595959;stop-opacity:0;"
-         offset="1"
-         id="stop3612" />
-    </linearGradient>
-    <inkscape:perspective
-       sodipodi:type="inkscape:persp3d"
-       inkscape:vp_x="0 : 8 : 1"
-       inkscape:vp_y="0 : 1000 : 0"
-       inkscape:vp_z="16 : 8 : 1"
-       inkscape:persp3d-origin="8 : 5.3333333 : 1"
-       id="perspective2824" />
-    <radialGradient
-       inkscape:collect="always"
-       xlink:href="#linearGradient3641"
-       id="radialGradient3616"
-       cx="8.6344891"
-       cy="9.5228825"
-       fx="8.6344891"
-       fy="9.5228825"
-       r="8.3836641"
-       gradientUnits="userSpaceOnUse"
-       gradientTransform="matrix(1.1788907,-0.02306023,0.02388217,1.22091,-1.772057,-1.9045866)" />
-  </defs>
-  <sodipodi:namedview
-     id="base"
-     pagecolor="#ffffff"
-     bordercolor="#666666"
-     borderopacity="1.0"
-     inkscape:pageopacity="0.0"
-     inkscape:pageshadow="2"
-     inkscape:zoom="22.197802"
-     inkscape:cx="-0.379208"
-     inkscape:cy="8"
-     inkscape:current-layer="layer1"
-     showgrid="true"
-     inkscape:grid-bbox="true"
-     inkscape:document-units="px"
-     inkscape:window-width="1600"
-     inkscape:window-height="1099"
-     inkscape:window-x="0"
-     inkscape:window-y="0"
-     inkscape:window-maximized="0" />
-  <metadata
-     id="metadata2821">
-    <rdf:RDF>
-      <cc:Work
-         rdf:about="">
-        <dc:format>image/svg+xml</dc:format>
-        <dc:type
-           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
-        <dc:title></dc:title>
-      </cc:Work>
-    </rdf:RDF>
-  </metadata>
-  <g
-     id="layer1"
-     inkscape:label="Layer 1"
-     inkscape:groupmode="layer">
-    <path
-       sodipodi:type="arc"
-       style="fill:url(#radialGradient3616);fill-opacity:1.0;stroke:#88b0f0;stroke-opacity:1"
-       id="path3606"
-       sodipodi:cx="10.136139"
-       sodipodi:cy="10.774258"
-       sodipodi:rx="7.8836637"
-       sodipodi:ry="7.8836637"
-       d="m 18.019803,10.774258 a 7.8836637,7.8836637 0 1 1 -15.7673277,0 7.8836637,7.8836637 0 1 1 15.7673277,0 z"
-       transform="matrix(0.9,0,0,0.9,-1.122525,-1.6968319)" />
-  </g>
-</svg>

+ 1 - 1
index.php

@@ -181,7 +181,7 @@
 			<div data-bind="with: activeChannel" id="userlist-inner">
 				<ul id="userlist-list" data-bind="foreach: nicklist">
 					<li>
-						<img data-bind="attr: { src: $root.getNickImage($data) }" alt=""/>
+						<span data-bind="css: { 'user-img': true, op: $root.nickIsOp($data), voice: $root.nickIsVoiced($data) }"> </span>
 						<span onclick="query_user(this)"
 							data-bind="text: $root.stripNickPrefix($data), attr: { nick: $root.stripNickPrefix($data),
 								title: $root.getNickHost($root.activeChannel().connection_id(), $data) }"></span>

+ 6 - 11
js/tt-irc.js

@@ -11,7 +11,6 @@ var input_cache = [];
 var input_cache_offset = 0;
 var highlight_on = [];
 var notify_events = [];
-var theme_images = [];
 var update_delay_max = 0;
 var theme = "";
 var hide_join_part = false;
@@ -293,15 +292,12 @@ function Model() {
 			return "";
 	};
 
-	self.getNickImage = function(nick) {
-		switch (nick.substr(0,1)) {
-		case "@":
-			return theme_images['user_op.png'];
-		case "+":
-			return theme_images['user_voice.png'];
-		default:
-			return theme_images['user_normal.png'];
-		}
+	self.nickIsOp = function(nick) {
+		return nick[0] == '@';
+	};
+
+	self.nickIsVoiced = function(nick) {
+		return nick[0] == '+';
 	};
 
 	self.cleanupChannels = function(connection_id, titles) {
@@ -518,7 +514,6 @@ function init_second_stage(transport) {
 		}
 
 		last_old_id = params.max_id;
-		theme_images = params.images;
 		update_delay_max = params.update_delay_max;
 		theme = params.theme;
 		uniqid = params.uniqid;

+ 16 - 1
tt-irc.css

@@ -302,8 +302,23 @@ form.connect-form {
 	margin-top : 5px;
 }
 
-#userlist img {
+#userlist span.user-img {
+	display : inline-block;
 	vertical-align : middle;
+	width : 11px;
+	height : 11px;
+	border : 1px solid #ccc;
+	border-radius : 20px;
+	box-shadow: 0 0 2px rgba(0, 0, 0, 0.1);
+	background : #f0f0f0;
+}
+
+#userlist span.user-img.voice {
+	background : #EDE4B6;
+}
+
+#userlist span.user-img.op {
+	background : #B8F2B8;
 }
 
 #log-inner {