mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-09-07 15:33:26 +00:00
Tested all functionality. There is a [pre-existing bug](https://github.com/go-gitea/gitea/issues/29853) when moving a project panels which is not caused by this refactoring. --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com> (cherry picked from commit fa100618c4b644346bf5666f92d33dce0747d0a2)
12 lines
341 B
JavaScript
12 lines
341 B
JavaScript
import $ from 'jquery';
|
|
|
|
export async function createColorPicker(els) {
|
|
if (!els.length) return;
|
|
|
|
await Promise.all([
|
|
import(/* webpackChunkName: "minicolors" */'@claviska/jquery-minicolors'),
|
|
import(/* webpackChunkName: "minicolors" */'@claviska/jquery-minicolors/jquery.minicolors.css'),
|
|
]);
|
|
|
|
return $(els).minicolors();
|
|
}
|