kopia lustrzana https://github.com/friendica/friendica
				
				
				
			New option to disable SVG icons / Functionality added to Vier
							rodzic
							
								
									eded4209d2
								
							
						
					
					
						commit
						f36353e010
					
				|  | @ -18,6 +18,7 @@ use Friendica\Util\Strings; | ||||||
|  */ |  */ | ||||||
| class ContactSelector | class ContactSelector | ||||||
| { | { | ||||||
|  | 	const SVG_DISABLED    = -1; | ||||||
| 	const SVG_COLOR_BLACK = 0; | 	const SVG_COLOR_BLACK = 0; | ||||||
| 	const SVG_BLACK       = 1; | 	const SVG_BLACK       = 1; | ||||||
| 	const SVG_COLOR_WHITE = 2; | 	const SVG_COLOR_WHITE = 2; | ||||||
|  | @ -183,6 +184,10 @@ class ContactSelector | ||||||
| 	{ | 	{ | ||||||
| 		$platform_icon_style = $uid ? (DI::pConfig()->get($uid, 'accessibility', 'platform_icon_style') ?? self::SVG_COLOR_BLACK) : self::SVG_COLOR_BLACK; | 		$platform_icon_style = $uid ? (DI::pConfig()->get($uid, 'accessibility', 'platform_icon_style') ?? self::SVG_COLOR_BLACK) : self::SVG_COLOR_BLACK; | ||||||
| 
 | 
 | ||||||
|  | 		if ($platform_icon_style == self::SVG_DISABLED) { | ||||||
|  | 			return ''; | ||||||
|  | 		} | ||||||
|  | 
 | ||||||
| 		$nets = [ | 		$nets = [ | ||||||
| 			Protocol::ACTIVITYPUB => 'activitypub', // https://commons.wikimedia.org/wiki/File:ActivityPub-logo-symbol.svg
 | 			Protocol::ACTIVITYPUB => 'activitypub', // https://commons.wikimedia.org/wiki/File:ActivityPub-logo-symbol.svg
 | ||||||
| 			Protocol::BLUESKY     => 'bluesky', // https://commons.wikimedia.org/wiki/File:Bluesky_Logo.svg
 | 			Protocol::BLUESKY     => 'bluesky', // https://commons.wikimedia.org/wiki/File:Bluesky_Logo.svg
 | ||||||
|  |  | ||||||
|  | @ -253,6 +253,7 @@ class Display extends BaseSettings | ||||||
| 		$hide_custom_emojis      =  $this->pConfig->get($uid, 'accessibility', 'hide_custom_emojis', false); | 		$hide_custom_emojis      =  $this->pConfig->get($uid, 'accessibility', 'hide_custom_emojis', false); | ||||||
| 		$platform_icon_style     =  $this->pConfig->get($uid, 'accessibility', 'platform_icon_style', ContactSelector::SVG_COLOR_BLACK); | 		$platform_icon_style     =  $this->pConfig->get($uid, 'accessibility', 'platform_icon_style', ContactSelector::SVG_COLOR_BLACK); | ||||||
| 		$platform_icon_styles = [ | 		$platform_icon_styles = [ | ||||||
|  | 			ContactSelector::SVG_DISABLED    => $this->t('Disabled'), | ||||||
| 			ContactSelector::SVG_COLOR_BLACK => $this->t('Color/Black'), | 			ContactSelector::SVG_COLOR_BLACK => $this->t('Color/Black'), | ||||||
| 			ContactSelector::SVG_BLACK       => $this->t('Black'), | 			ContactSelector::SVG_BLACK       => $this->t('Black'), | ||||||
| 			ContactSelector::SVG_COLOR_WHITE => $this->t('Color/White'), | 			ContactSelector::SVG_COLOR_WHITE => $this->t('Color/White'), | ||||||
|  |  | ||||||
|  | @ -71,9 +71,13 @@ | ||||||
|                                 {{/if}} |                                 {{/if}} | ||||||
| 				<span class="pinned">{{$item.pinned}}</span> | 				<span class="pinned">{{$item.pinned}}</span> | ||||||
| 			</span> | 			</span> | ||||||
|                             {{if $item.lock}}<span class="icon s10 lock fakelink" onclick="lockview(event, 'item', {{$item.id}});" title="{{$item.lock}}">{{$item.lock}}</span>{{/if}} | 			{{if $item.lock}}<span class="icon s10 lock fakelink" onclick="lockview(event, 'item', {{$item.id}});" title="{{$item.lock}}">{{$item.lock}}</span>{{/if}} | ||||||
| 							<span class="wall-item-network" title="{{$item.app}}"> | 			<span class="wall-item-network" title="{{$item.app}}"> | ||||||
|  | 			{{if $item.network_svg}} | ||||||
|  | 				<img class="network-svg" src="{{$item.network_svg}}" title="{{$item.network_name}}" alt="{{$item.network_name}}" loading="lazy"/> | ||||||
|  | 			{{else}} | ||||||
| 				{{$item.network_name}} | 				{{$item.network_name}} | ||||||
|  | 			{{/if}} | ||||||
| 			</span> | 			</span> | ||||||
| 							<div class="wall-item-network-end"></div> | 							<div class="wall-item-network-end"></div> | ||||||
| 						</div> | 						</div> | ||||||
|  |  | ||||||
|  | @ -1779,6 +1779,13 @@ section.minimal { | ||||||
| 	padding-right: 12px; */ | 	padding-right: 12px; */ | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
|  | .network-svg { | ||||||
|  | 	width: 18px; | ||||||
|  | 	height: 18px; | ||||||
|  | 	border-radius: 4px; | ||||||
|  | 	padding: 2px; | ||||||
|  | } | ||||||
|  | 
 | ||||||
| #profile-jot-form { | #profile-jot-form { | ||||||
| 	box-shadow: 1px 2px 0px 0px #D8D8D8; | 	box-shadow: 1px 2px 0px 0px #D8D8D8; | ||||||
| 	background-color: #fafafa; | 	background-color: #fafafa; | ||||||
|  |  | ||||||
		Ładowanie…
	
		Reference in New Issue
	
	 Michael
						Michael