mirror of
https://github.com/loot/libloot.git
synced 2026-07-27 14:16:01 -07:00
Added card icon for master-flagged files.
Using a crown icon for the moment, that may change based on user feedback.
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
<link rel="import" href="../bower_components/core-iconset-svg/core-iconset-svg.html">
|
||||
|
||||
<core-iconset-svg id="loot-custom-icons">
|
||||
<svg viewBox="0 0 24 24" height="100%" width="100%" preserveAspectRatio="xMidYMid meet" fit style="pointer-events: none; display: block;">
|
||||
<defs>
|
||||
<g id="m-circle">
|
||||
<circle cx="12" cy="12" r="10"/>
|
||||
<path d="m 8,17 0,-9 0.4,0 3.2,5 0.8,0 3.2,-5 0.4,0 0,9" style="stroke: white; stroke-width: 2; fill: none;" />
|
||||
</g>
|
||||
<g id="crown">
|
||||
<path d="m 5,18 -2,-9 6,3 3,-7 3,7 6,-3 -2,9 z" />
|
||||
</g>
|
||||
</defs>
|
||||
</svg>
|
||||
</core-iconset-svg>
|
||||
@@ -23,6 +23,7 @@ loot-clear-metadata
|
||||
<link rel="import" href="../bower_components/paper-icon-button/paper-icon-button.html">
|
||||
|
||||
<link rel="import" href="loot-plugin-editor.html">
|
||||
<link rel="import" href="loot-custom-icons.html">
|
||||
|
||||
|
||||
<polymer-element name="loot-plugin-card" attributes="data">
|
||||
@@ -53,6 +54,7 @@ loot-clear-metadata
|
||||
}
|
||||
:host([data-bsa=false]) #loadsBSA,
|
||||
:host([data-empty=false]) #emptyPlugin,
|
||||
:host([data-master=false]) #isMaster,
|
||||
:host(:not([data-edits])) #hasUserEdits {
|
||||
display: none;
|
||||
}
|
||||
@@ -151,6 +153,9 @@ loot-clear-metadata
|
||||
<content select=".version"></content>
|
||||
<content select=".crc"></content>
|
||||
</div>
|
||||
<core-tooltip id="isMaster" label="Master File" noarrow>
|
||||
<core-icon icon="loot-custom-icons:crown"></core-icon>
|
||||
</core-tooltip>
|
||||
<core-tooltip id="emptyPlugin" label="Empty Plugin" noarrow>
|
||||
<core-icon icon="visibility-off"></core-icon>
|
||||
</core-tooltip>
|
||||
|
||||
@@ -29,6 +29,7 @@ function Plugin(obj) {
|
||||
this.version = obj.version;
|
||||
this.isActive = obj.isActive;
|
||||
this.isEmpty = obj.isEmpty;
|
||||
this.isMaster = obj.isMaster;
|
||||
this.loadsBSA = obj.loadsBSA;
|
||||
|
||||
this.masterlist = obj.masterlist;
|
||||
|
||||
@@ -203,7 +203,7 @@
|
||||
</section>
|
||||
<core-list flex>
|
||||
<template>
|
||||
<loot-plugin-card data="{{model}}" id="{{model.id}}" data-active="{{model.isActive}}" data-empty="{{model.isEmpty}}" data-bsa="{{model.loadsBSA}}">
|
||||
<loot-plugin-card data="{{model}}" id="{{model.id}}" data-active="{{model.isActive}}" data-empty="{{model.isEmpty}}" data-bsa="{{model.loadsBSA}}" data-master="{{model.isMaster}}">
|
||||
<h1>{{model.name}}</h1>
|
||||
<span class="version">{{model.version}}</span>
|
||||
<span class="crc">{{model.computed.crc}}</span>
|
||||
|
||||
@@ -670,6 +670,7 @@ namespace loot {
|
||||
pluginNode["name"] = plugin.Name();
|
||||
pluginNode["isActive"] = g_app_state.CurrentGame().IsActive(plugin.Name());
|
||||
pluginNode["isEmpty"] = plugin.IsEmpty();
|
||||
pluginNode["isMaster"] = plugin.IsMaster();
|
||||
pluginNode["loadsBSA"] = plugin.LoadsBSA(g_app_state.CurrentGame());
|
||||
pluginNode["crc"] = IntToHexString(plugin.Crc());
|
||||
pluginNode["version"] = plugin.Version();
|
||||
|
||||
Reference in New Issue
Block a user