mirror of
https://github.com/go-gitea/gitea.git
synced 2026-10-21 23:33:19 +02:00
Move jquery-minicolors to npm/webpack (#12305)
* Move jquery-minicolors to npm/webpack - Unvendor and add as npm dependency - Removed unneeded backend variable - Fixed existing bug where picker would previously initizalize to the same green color when editing a label. There was probably a version bump because the previous version was over 3 years old but it seems to be compatible. * use file-loader * trailing comma and comment update * misc tweaks Co-authored-by: Lauris BH <lauris@nix.lv> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
This commit is contained in:
15 files changed
+36
-366
No files matched your search
@@ -79,6 +79,7 @@ coverage.all
|
||||
/public/serviceworker.js
|
||||
/public/css
|
||||
/public/fonts
|
||||
/public/img/webpack
|
||||
/web_src/fomantic/build
|
||||
/VERSION
|
||||
/.air
|
||||
|
||||
@@ -96,7 +96,7 @@ FOMANTIC_DEST_DIR := web_src/fomantic/build
|
||||
WEBPACK_SOURCES := $(shell find web_src/js web_src/less -type f) $(FOMANTIC_DEST)
|
||||
WEBPACK_CONFIGS := webpack.config.js
|
||||
WEBPACK_DEST := public/js/index.js public/css/index.css
|
||||
WEBPACK_DEST_ENTRIES := public/js public/css public/fonts public/serviceworker.js
|
||||
WEBPACK_DEST_ENTRIES := public/js public/css public/fonts public/img/webpack public/serviceworker.js
|
||||
|
||||
BINDATA_DEST := modules/public/bindata.go modules/options/bindata.go modules/templates/bindata.go
|
||||
BINDATA_HASH := $(addsuffix .hash,$(BINDATA_DEST))
|
||||
|
||||
Generated
+5
@@ -904,6 +904,11 @@
|
||||
"resolved": "https://registry.npmjs.org/@braintree/sanitize-url/-/sanitize-url-3.1.0.tgz",
|
||||
"integrity": "sha512-GcIY79elgB+azP74j8vqkiXz8xLFfIzbQJdlwOPisgbKT00tviJQuEghOXSMVxJ00HoYJbGswr4kcllUc4xCcg=="
|
||||
},
|
||||
"@claviska/jquery-minicolors": {
|
||||
"version": "2.3.5",
|
||||
"resolved": "https://registry.npmjs.org/@claviska/jquery-minicolors/-/jquery-minicolors-2.3.5.tgz",
|
||||
"integrity": "sha512-LpiN8hyqRPYB2tEzFD4lI54GxKHQXhzrJMnKnsumElYxjkjbdAPmiIm+1k/Mkfn92HepL7t9uaK5iQSFP/19aw=="
|
||||
},
|
||||
"@csstools/convert-colors": {
|
||||
"version": "1.4.0",
|
||||
"resolved": "https://registry.npmjs.org/@csstools/convert-colors/-/convert-colors-1.4.0.tgz",
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
"@babel/plugin-transform-runtime": "7.10.5",
|
||||
"@babel/preset-env": "7.10.4",
|
||||
"@babel/runtime": "7.10.5",
|
||||
"@claviska/jquery-minicolors": "2.3.5",
|
||||
"@primer/octicons": "10.0.0",
|
||||
"babel-loader": "8.1.0",
|
||||
"clipboard": "2.0.6",
|
||||
|
||||
-18
@@ -1,18 +0,0 @@
|
||||
Copyright 2017 A Beautiful Site, LLC
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||
this software and associated documentation files (the "Software"), to deal in
|
||||
the Software without restriction, including without limitation the rights to use,
|
||||
copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the
|
||||
Software, and to permit persons to whom the Software is furnished to do so,
|
||||
subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
||||
INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
|
||||
PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
||||
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
@@ -1,323 +0,0 @@
|
||||
.minicolors {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.minicolors-sprite {
|
||||
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAA2YAAACWCAYAAAC1r5t6AAEL2klEQVR4AeSaBY8czxHFqw6SW3vvz4yiMDMnojB9pESsfI8wMzNzRGFmMhz6aGcq1btvck/PM31eec0tlYp6eqp2fOP+ba//7cm3x7K35jYbEWHd8BItieNQmmHubhGWmuLpN7ZkD/96w22B40c/+tES+y960Ys0b3PmW1vsCA385Cc/MR0veMEL7FrMe97znsd1tiQhdlPJIQ+7vk4bEYM5iA3EG/YrttZVrTEi6uvUbe3tkmqp3LthH+tBBq8zjWtN0P+/fxmIdfnAaMhvy4DBIyaTSds0TXt0dBQHBwft3t5eu7Oz0545cyZ+85vftO941zuP7LTZVE6Rhmhs7tya2d6S2W6aFyx1TAU2xDsfOmWn8z1t+Nspmyn/xjxz/evl2Chj96e+I2O3pb2OgljGFzcSKT7uYlgHdrM6K6gUtudFqGg0sZeCZhFPKXFuDLKVspFyDvXLWEq5CzKeSqS4Pq6USPH0A92kPYvBD30ktmwHKIKKTvG0A3FHEzGLI3+BNaR7OhuQ1qJp+fks/k3tV2mxevqaNHj9l4EL2ZzrKljQPHx9qefPVvyRxCVfja2ZHeifMOma3f0l6PvqP7Dr47aU+1Nuh72eMtb3FRXbozU2WaYGehvSmDaHZuBv4111Hv9ryXhCyn3oYJ0qHkuF9Igg9CjUx7pmh72Fw7/EJ7aj7ys0k+NjC/yDWyniZqsGKX5Ae7FFG2yDILfs1njYxCwl7am21AHtyEXalFfNc6DJX4H/8tRjzH196sdlTRJdn+9hf8jrvgx/O+3v4Z6Tidyb+qA1+tZ0xOqfRdiKeUrRZstm8FNDVi0y7tDpF5sfkkXRmVvU8HjyWpi1c7xhEfPOpZ1NuPlvD5ZsgeOHP/zh9Q5m7fUMZs95znOKmtSA5OQcNCTHfOvMb9dBReoR6Ik5ALECbXPDXeRQMJNa6j3BV1vhi/2geJ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BED+NXr/AMwKg5Xdu6Dd5hscoY05CXlErSGKAEkGs6JtVcysRviighkbfjS1rLUbpBWYf8zNzZXbbrut++LNVx1Rn4vc6mkAl4YtemFCPI+awYyEpeRF+jkIkCmckZwZjxSEMgZhVuzKqGCWZ6GC+cknCmmF5od7Nnq5kTjNxBSKeQlpVMWM5D8JZTwgLmeihiG/TAKZAGv+e2hOA+SRpey/pdn8qA8QE4jTV9EjoMyUB4PtF650IB7Rnv7E8wIwRcIUoxuhGf9wvlkMX/FzRyGYQksnLAQKRumU/K4yjZfN96Vg616x99KpUMmPVTJuS605ZhG3SIn8/xas3G73cH7sYc8TbVzwxgcz1D5lKphx1LIPanGa1qJ6/DBaQjHDDvTpFbjGjz4FmPlxl0HptQIoQyHFrLdkmzmS0j+WUw3MWs7Yf63jr+pS3t+ADAoZYCsAM+n7NdpjqmU+kEmtyhn6a1Y7gNbmWl7am+r839ax95xaYPawb0RQt2NXVfSrKLbLcvPQ8mX/PLXDwGwwyWBWc4MAZgIaMZjJOoaezVWxGKxiYItNSPQZ9blKFGoo9ylOntcIzPwcrxjMMB4pZnQfjHMo4kaKmQIYX8OqGO6ZmiTGilntAswajLXpguKBGRSzBmdVcW1zpUFaM/+opdRwxu5Lt187777kSGhinuF+oKRJKGPZ26L+JLqvcHpWYIAMQxALine truncated
|
||||
}
|
||||
|
||||
.minicolors-no-data-uris .minicolors-sprite {
|
||||
background-image: url(jquery.minicolors.png);
|
||||
}
|
||||
|
||||
.minicolors-swatch {
|
||||
position: absolute;
|
||||
vertical-align: middle;
|
||||
background-position: -80px 0;
|
||||
border: solid 1px #ccc;
|
||||
cursor: text;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.minicolors-swatch-color {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
}
|
||||
|
||||
.minicolors input[type=hidden] + .minicolors-swatch {
|
||||
width: 28px;
|
||||
position: static;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.minicolors input[type=hidden][disabled] + .minicolors-swatch {
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
/* Panel */
|
||||
.minicolors-panel {
|
||||
position: absolute;
|
||||
width: 173px;
|
||||
height: 152px;
|
||||
background: white;
|
||||
border: solid 1px #CCC;
|
||||
box-shadow: 0 0 20px rgba(0, 0, 0, .2);
|
||||
z-index: 99999;
|
||||
-moz-box-sizing: content-box;
|
||||
-webkit-box-sizing: content-box;
|
||||
box-sizing: content-box;
|
||||
display: none;
|
||||
}
|
||||
|
||||
.minicolors-panel.minicolors-with-swatches {
|
||||
height: 182px;
|
||||
}
|
||||
|
||||
.minicolors-panel.minicolors-visible {
|
||||
display: block;
|
||||
}
|
||||
|
||||
/* Panel positioning */
|
||||
.minicolors-position-top .minicolors-panel {
|
||||
top: -154px;
|
||||
}
|
||||
|
||||
.minicolors-position-right .minicolors-panel {
|
||||
right: 0;
|
||||
}
|
||||
|
||||
.minicolors-position-bottom .minicolors-panel {
|
||||
top: auto;
|
||||
}
|
||||
|
||||
.minicolors-position-left .minicolors-panel {
|
||||
left: 0;
|
||||
}
|
||||
|
||||
.minicolors-with-opacity .minicolors-panel {
|
||||
width: 194px;
|
||||
}
|
||||
|
||||
.minicolors .minicolors-grid {
|
||||
position: absolute;
|
||||
top: 1px;
|
||||
left: 1px;
|
||||
width: 150px;
|
||||
height: 150px;
|
||||
background-position: -120px 0;
|
||||
cursor: crosshair;
|
||||
}
|
||||
|
||||
.minicolors .minicolors-grid-inner {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 150px;
|
||||
height: 150px;
|
||||
}
|
||||
|
||||
.minicolors-slider-saturation .minicolors-grid {
|
||||
background-position: -420px 0;
|
||||
}
|
||||
|
||||
.minicolors-slider-saturation .minicolors-grid-inner {
|
||||
background-position: -270px 0;
|
||||
background-image: inherit;
|
||||
}
|
||||
|
||||
.minicolors-slider-brightness .minicolors-grid {
|
||||
background-position: -570px 0;
|
||||
}
|
||||
|
||||
.minicolors-slider-brightness .minicolors-grid-inner {
|
||||
background-color: black;
|
||||
}
|
||||
|
||||
.minicolors-slider-wheel .minicolors-grid {
|
||||
background-position: -720px 0;
|
||||
}
|
||||
|
||||
.minicolors-slider,
|
||||
.minicolors-opacity-slider {
|
||||
position: absolute;
|
||||
top: 1px;
|
||||
left: 152px;
|
||||
width: 20px;
|
||||
height: 150px;
|
||||
background-color: white;
|
||||
background-position: 0 0;
|
||||
cursor: row-resize;
|
||||
}
|
||||
|
||||
.minicolors-slider-saturation .minicolors-slider {
|
||||
background-position: -60px 0;
|
||||
}
|
||||
|
||||
.minicolors-slider-brightness .minicolors-slider {
|
||||
background-position: -20px 0;
|
||||
}
|
||||
|
||||
.minicolors-slider-wheel .minicolors-slider {
|
||||
background-position: -20px 0;
|
||||
}
|
||||
|
||||
.minicolors-opacity-slider {
|
||||
left: 173px;
|
||||
background-position: -40px 0;
|
||||
display: none;
|
||||
}
|
||||
|
||||
.minicolors-with-opacity .minicolors-opacity-slider {
|
||||
display: block;
|
||||
}
|
||||
|
||||
/* Pickers */
|
||||
.minicolors-grid .minicolors-picker {
|
||||
position: absolute;
|
||||
top: 70px;
|
||||
left: 70px;
|
||||
width: 12px;
|
||||
height: 12px;
|
||||
border: solid 1px black;
|
||||
border-radius: 10px;
|
||||
margin-top: -6px;
|
||||
margin-left: -6px;
|
||||
background: none;
|
||||
}
|
||||
|
||||
.minicolors-grid .minicolors-picker > div {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 8px;
|
||||
height: 8px;
|
||||
border-radius: 8px;
|
||||
border: solid 2px white;
|
||||
-moz-box-sizing: content-box;
|
||||
-webkit-box-sizing: content-box;
|
||||
box-sizing: content-box;
|
||||
}
|
||||
|
||||
.minicolors-picker {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 18px;
|
||||
height: 2px;
|
||||
background: white;
|
||||
border: solid 1px black;
|
||||
margin-top: -2px;
|
||||
-moz-box-sizing: content-box;
|
||||
-webkit-box-sizing: content-box;
|
||||
box-sizing: content-box;
|
||||
}
|
||||
|
||||
/* Swatches */
|
||||
.minicolors-swatches,.minicolors-swatches li {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
list-style: none;
|
||||
overflow: hidden;
|
||||
position: absolute;
|
||||
top: 157px;
|
||||
left: 5px;
|
||||
}
|
||||
|
||||
.minicolors-swatches .minicolors-swatch {
|
||||
position: relative;
|
||||
float: left;
|
||||
cursor: pointer;
|
||||
margin:0 4px 0 0;
|
||||
}
|
||||
|
||||
.minicolors-with-opacity .minicolors-swatches .minicolors-swatch {
|
||||
margin-right:7px;
|
||||
}
|
||||
|
||||
.minicolors-swatch.selected {
|
||||
border-color:#000;
|
||||
}
|
||||
|
||||
/* Inline controls */
|
||||
.minicolors-inline {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.minicolors-inline .minicolors-input {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
.minicolors-inline .minicolors-panel {
|
||||
position: relative;
|
||||
top: auto;
|
||||
left: auto;
|
||||
box-shadow: none;
|
||||
z-index: auto;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
/* Default theme */
|
||||
.minicolors-theme-default .minicolors-swatch {
|
||||
top: 5px;
|
||||
left: 5px;
|
||||
width: 18px;
|
||||
height: 18px;
|
||||
}
|
||||
.minicolors-theme-default .minicolors-swatches .minicolors-swatch {
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 18px;
|
||||
height: 18px;
|
||||
}
|
||||
.minicolors-theme-default .minicolors-swatches {
|
||||
height: 20px;
|
||||
}
|
||||
.minicolors-theme-default.minicolors-position-right .minicolors-swatch {
|
||||
left: auto;
|
||||
right: 5px;
|
||||
}
|
||||
.minicolors-theme-default.minicolors {
|
||||
width: auto;
|
||||
display: inline-block;
|
||||
}
|
||||
.minicolors-theme-default .minicolors-input {
|
||||
height: 20px;
|
||||
width: auto;
|
||||
display: inline-block;
|
||||
padding-left: 26px;
|
||||
}
|
||||
.minicolors-theme-default.minicolors-position-right .minicolors-input {
|
||||
padding-right: 26px;
|
||||
padding-left: inherit;
|
||||
}
|
||||
|
||||
/* Bootstrap theme */
|
||||
.minicolors-theme-bootstrap .minicolors-swatch {
|
||||
z-index: 2;
|
||||
top: 3px;
|
||||
left: 3px;
|
||||
width: 28px;
|
||||
height: 28px;
|
||||
border-radius: 3px;
|
||||
}
|
||||
.minicolors-theme-bootstrap .minicolors-swatches .minicolors-swatch {
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
}
|
||||
.minicolors-theme-bootstrap .minicolors-swatch-color {
|
||||
border-radius: inherit;
|
||||
}
|
||||
.minicolors-theme-bootstrap.minicolors-position-right .minicolors-swatch {
|
||||
left: auto;
|
||||
right: 3px;
|
||||
}
|
||||
.minicolors-theme-bootstrap .minicolors-input {
|
||||
float: none;
|
||||
padding-left: 44px;
|
||||
}
|
||||
.minicolors-theme-bootstrap.minicolors-position-right .minicolors-input {
|
||||
padding-right: 44px;
|
||||
padding-left: 12px;
|
||||
}
|
||||
.minicolors-theme-bootstrap .minicolors-input.input-lg + .minicolors-swatch {
|
||||
top: 4px;
|
||||
left: 4px;
|
||||
width: 37px;
|
||||
height: 37px;
|
||||
border-radius: 5px;
|
||||
}
|
||||
.minicolors-theme-bootstrap .minicolors-input.input-sm + .minicolors-swatch {
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
}
|
||||
.input-group .minicolors-theme-bootstrap:not(:first-child) .minicolors-input {
|
||||
border-top-left-radius: 0;
|
||||
border-bottom-left-radius: 0;
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
/*
|
||||
* jQuery MiniColors: A tiny color picker built on jQuery
|
||||
*
|
||||
* Copyright: Cory LaViska for A Beautiful Site, LLC: http://www.abeautifulsite.net/
|
||||
*
|
||||
* Contribute: https://github.com/claviska/jquery-minicolors
|
||||
*
|
||||
* @license: http://opensource.org/licenses/MIT
|
||||
*
|
||||
*/
|
||||
!function(i){"function"==typeof define&&define.amd?define(["jquery"],i):"object"==typeof exports?module.exports=i(require("jquery")):i(jQuery)}(function($){"use strict";function i(i,t){var o=$('<div class="minicolors" />'),a=$.minicolors.defaults,s=i.attr("data-opacity"),n;i.data("minicolors-initialized")||(t=$.extend(!0,{},a,t),o.addClass("minicolors-theme-"+t.theme).toggleClass("minicolors-with-opacity",t.opacity).toggleClass("minicolors-no-data-uris",t.dataUris!==!0),void 0!==t.position&&$.each(t.position.split(" "),function(){o.addClass("minicolors-position-"+this)}),n="rgb"===t.format?t.opacity?"25":"20":t.keywords?"11":"7",i.addClass("minicolors-input").data("minicolors-initialized",!1).data("minicolors-settings",t).prop("size",n).wrap(o).after('<div class="minicolors-panel minicolors-slider-'+t.control+'"><div class="minicolors-slider minicolors-sprite"><div class="minicolors-picker"></div></div><div class="minicolors-opacity-slider minicolors-sprite"><div class="minicolors-picker"></div></div><div class="minicolors-grid minicolors-sprite"><div class="minicolors-grid-inner"></div><div class="minicolors-picker"><div></div></div></div></div>'),t.inline||(i.after('<span class="minicolors-swatch minicolors-sprite"><span class="minicolors-swatch-color"></span></span>'),i.next(".minicolors-swatch").on("click",function(t){t.preventDefault(),i.focus()})),i.parent().find(".minicolors-panel").on("selectstart",function(){return!1}).end(),t.inline&&i.parent().addClass("minicolors-inline"),r(i,!1),i.data("minicolors-initialized",!0))}function t(i){var t=i.parent();i.removeData("minicolors-initialized").removeData("minicolors-settings").removeProp("size").removeClass("minicolors-input"),t.before(i).remove()}function o(i){var t=i.parent(),o=t.find(".minicolors-panel"),s=i.data("minicolors-settings");!i.data("minicolors-initialized")||i.prop("disabled")||t.hasClass("minicolors-inline")||t.hasClass("minicolors-focus")||(a(),t.addClass("minicolors-focus"),o.stop(!0,!0).fadeIn(s.showSpeed,function(){s.show&&s.show.call(i.get(0))}))}function a(){$(".minicolors-focus").each(function(){var i=$(this),t=i.find(".minicolors-input"),o=i.find(".minicolors-panel"),a=t.data("minicolors-settings");o.fadeOut(a.hideSpeed,function(){a.hide&&a.hide.call(t.get(0)),i.removeClass("minicolors-focus")})})}function s(i,t,o){var a=i.parents(".minicolors").find(".minicolors-input"),s=a.data("minicolors-settings"),r=i.find("[class$=-picker]"),e=i.offset().left,c=i.offset().top,l=Math.round(t.pageX-e),h=Math.round(t.pageY-c),d=o?s.animationSpeed:0,u,p,g,m;t.originalEvent.changedTouches&&(l=t.originalEvent.changedTouches[0].pageX-e,h=t.originalEvent.changedTouches[0].pageY-c),0>l&&(l=0),0>h&&(h=0),l>i.width()&&(l=i.width()),h>i.height()&&(h=i.height()),i.parent().is(".minicolors-slider-wheel")&&r.parent().is(".minicolors-grid")&&(u=75-l,p=75-h,g=Math.sqrt(u*u+p*p),m=Math.atan2(p,u),0>m&&(m+=2*Math.PI),g>75&&(g=75,l=75-75*Math.cos(m),h=75-75*Math.sin(m)),l=Math.round(l),h=Math.round(h)),i.is(".minicolors-grid")?r.stop(!0).animate({top:h+"px",left:l+"px"},d,s.animationEasing,function(){n(a,i)}):r.stop(!0).animate({top:h+"px"},d,s.animationEasing,function(){n(a,i)})}function n(i,t){function o(i,t){var o,a;return i.length&&t?(o=i.offset().left,a=i.offset().top,{x:o-t.offset().left+i.outerWidth()/2,y:a-t.offset().top+i.outerHeight()/2}):null}var a,s,n,r,c,l,d,u=i.val(),p=i.attr("data-opacity"),m,f=i.parent(),v=i.data("minicolors-settings"),b=f.find(".minicolors-swatch"),y=f.find(".minicolors-grid"),C=f.find(".minicolors-slider"),M=f.find(".minicolors-opacity-slider"),x=y.find("[class$=-picker]"),I=C.find("[class$=-picker]"),S=M.find("[class$=-picker]"),z=o(x,y),F=o(I,C),j=o(S,M);if(t.is(".minicolors-grid, .minicolors-slider, .minicolors-opacity-slider")){switch(v.control){case"wheel":r=y.width()/2-z.x,c=y.height()/2-z.y,l=Math.sqrt(r*r+c*c),d=Math.atan2(c,r),0>d&&(d+=2*Math.PI),l>75&&(l=75,z.x=69-75*Math.cos(d),z.y=69-75*Math.sin(d)),s=g(l/.75,0,100),a=g(180*d/Math.PI,0,360),n=g(100-Math.floor(F.y*(100/C.height())),0,100),u=w({h:a,s:s,b:n}),C.css("backgroundColor",w({h:a,s:s,b:100}));break;case"saturation":a=g(parseInt(z.x*(360/y.width()),10),0,360),s=g(100-Math.floor(F.y*(100/C.height())),0,100),n=g(100-Math.floor(z.y*(100/y.height())),0,100),u=w({h:a,s:s,b:n}),C.css("backgroundColor",w({h:a,s:100,b:n})),f.find(".minicolors-grid-inner").css("opacity",s/100);break;case"brightness":a=g(parseInt(z.x*(360/y.width()),10),0,360),s=g(100-Math.floor(z.y*(100/y.height())),0,100),n=g(100-Math.floor(F.y*(100/C.height())),0,100),u=w({h:a,s:s,b:n}),C.css("backgroundColor",w({h:a,s:s,b:100})),f.find(".minicolors-grid-inner").css("opacity",1-n/100);break;default:a=g(360-parseInt(F.y*(360/C.height()),10),0,360),s=g(Math.floor(z.x*(100/y.width())),0,100),n=g(100-Math.floor(z.y*(100/y.height())),0,100),u=w({h:a,s:s,b:n}),y.css("backgroundColor",w({h:a,s:100,b:100}))}if(p=v.opacity?parseFloat(1-j.y/M.height()).toFixed(2):1,v.opacity&&i.attr("data-opacity",p),"rgb"==Line truncated
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 67 KiB |
@@ -202,7 +202,6 @@ func DeleteWebhook(ctx *context.Context) {
|
||||
func Labels(ctx *context.Context) {
|
||||
ctx.Data["Title"] = ctx.Tr("repo.labels")
|
||||
ctx.Data["PageIsOrgSettingsLabels"] = true
|
||||
ctx.Data["RequireMinicolors"] = true
|
||||
ctx.Data["RequireTribute"] = true
|
||||
ctx.Data["LabelTemplates"] = models.LabelTemplates
|
||||
ctx.HTML(200, tplSettingsLabels)
|
||||
|
||||
@@ -23,7 +23,6 @@ func Labels(ctx *context.Context) {
|
||||
ctx.Data["Title"] = ctx.Tr("repo.labels")
|
||||
ctx.Data["PageIsIssueList"] = true
|
||||
ctx.Data["PageIsLabels"] = true
|
||||
ctx.Data["RequireMinicolors"] = true
|
||||
ctx.Data["RequireTribute"] = true
|
||||
ctx.Data["LabelTemplates"] = models.LabelTemplates
|
||||
ctx.HTML(200, tplLabels)
|
||||
|
||||
@@ -30,9 +30,6 @@
|
||||
{{end}}
|
||||
{{end}}
|
||||
<script src="{{StaticUrlPrefix}}/js/index.js?v={{MD5 AppVer}}"></script>
|
||||
{{if .RequireMinicolors}}
|
||||
<script src="{{StaticUrlPrefix}}/vendor/plugins/jquery.minicolors/jquery.minicolors.min.js"></script>
|
||||
{{end}}
|
||||
{{template "custom/footer" .}}
|
||||
</body>
|
||||
</html>
|
||||
@@ -66,7 +66,6 @@
|
||||
UseServiceWorker: {{UseServiceWorker}},
|
||||
csrf: '{{.CsrfToken}}',
|
||||
HighlightJS: {{if .RequireHighlightJS}}true{{else}}false{{end}},
|
||||
Minicolors: {{if .RequireMinicolors}}true{{else}}false{{end}},
|
||||
SimpleMDE: {{if .RequireSimpleMDE}}true{{else}}false{{end}},
|
||||
Tribute: {{if .RequireTribute}}true{{else}}false{{end}},
|
||||
U2F: {{if .RequireU2F}}true{{else}}false{{end}},
|
||||
@@ -101,9 +100,6 @@
|
||||
.ui.secondary.menu .dropdown.item > .menu { margin-top: 0; }
|
||||
</style>
|
||||
</noscript>
|
||||
{{if .RequireMinicolors}}
|
||||
<link rel="stylesheet" href="{{StaticUrlPrefix}}/vendor/plugins/jquery.minicolors/jquery.minicolors.css">
|
||||
{{end}}
|
||||
<style class="list-search-style"></style>
|
||||
{{if .PageIsUserProfile}}
|
||||
<meta property="og:title" content="{{.Owner.Name}}" />
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
export default async function createColorPicker($els) {
|
||||
if (!$els || !$els.length) return;
|
||||
|
||||
await Promise.all([
|
||||
import(/* webpackChunkName: "minicolors" */'@claviska/jquery-minicolors'),
|
||||
import(/* webpackChunkName: "minicolors" */'@claviska/jquery-minicolors/jquery.minicolors.css'),
|
||||
]);
|
||||
|
||||
$els.minicolors();
|
||||
}
|
||||
+4
-3
@@ -15,6 +15,7 @@ import initServiceWorker from './features/serviceworker.js';
|
||||
import initMarkdownAnchors from './markdown/anchors.js';
|
||||
import renderMarkdownContent from './markdown/content.js';
|
||||
import attachTribute from './features/tribute.js';
|
||||
import createColorPicker from './features/colorpicker.js';
|
||||
import createDropzone from './features/dropzone.js';
|
||||
import initTableSort from './features/tablesort.js';
|
||||
import ActivityTopAuthors from './components/ActivityTopAuthors.vue';
|
||||
@@ -134,15 +135,15 @@ function initLabelEdit() {
|
||||
$newLabelPanel.hide();
|
||||
});
|
||||
|
||||
$('.color-picker').each(function () {
|
||||
$(this).minicolors();
|
||||
});
|
||||
createColorPicker($('.color-picker'));
|
||||
|
||||
$('.precolors .color').on('click', function () {
|
||||
const color_hex = $(this).data('color-hex');
|
||||
$('.color-picker').val(color_hex);
|
||||
$('.minicolors-swatch-color').css('background-color', color_hex);
|
||||
});
|
||||
$('.edit-label-button').on('click', function () {
|
||||
$('.color-picker').minicolors('value', $(this).data('color'));
|
||||
$('#label-modal-id').val($(this).data('id'));
|
||||
$('.edit-label .new-label-input').val($(this).data('title'));
|
||||
$('.edit-label .new-label-desc-input').val($(this).data('description'));
|
||||
|
||||
+14
-1
@@ -243,7 +243,20 @@ module.exports = {
|
||||
options: {
|
||||
name: '[name].[ext]',
|
||||
outputPath: 'fonts/',
|
||||
publicPath: (url) => `../fonts/${url}`, // seems required for monaco's font
|
||||
publicPath: (url) => `../fonts/${url}`, // required to remove css/ path segment
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
test: /\.png$/i,
|
||||
use: [
|
||||
{
|
||||
loader: 'file-loader',
|
||||
options: {
|
||||
name: '[name].[ext]',
|
||||
outputPath: 'img/webpack/',
|
||||
publicPath: (url) => `../img/webpack/${url}`, // required to remove css/ path segment
|
||||
},
|
||||
},
|
||||
],
|
||||
|
||||
Reference in new issue
Block a user