mirror of
https://github.com/ankitects/anki.git
synced 2025-09-18 22:12:21 -04:00
Add remaining icons for toolbar
This commit is contained in:
parent
a0a9619722
commit
fee78d2570
6 changed files with 56 additions and 20 deletions
|
@ -3,7 +3,7 @@ load("//ts/svelte:svelte.bzl", "compile_svelte", "svelte_check")
|
||||||
load("//ts:prettier.bzl", "prettier_test")
|
load("//ts:prettier.bzl", "prettier_test")
|
||||||
load("//ts:eslint.bzl", "eslint_test")
|
load("//ts:eslint.bzl", "eslint_test")
|
||||||
load("//ts:esbuild.bzl", "esbuild")
|
load("//ts:esbuild.bzl", "esbuild")
|
||||||
load("//ts:vendor.bzl", "copy_bootstrap_icons")
|
load("//ts:vendor.bzl", "copy_bootstrap_icons", "copy_mdi_icons")
|
||||||
|
|
||||||
svelte_files = glob(["*.svelte"])
|
svelte_files = glob(["*.svelte"])
|
||||||
|
|
||||||
|
@ -45,6 +45,20 @@ copy_bootstrap_icons(
|
||||||
"type-bold.svg",
|
"type-bold.svg",
|
||||||
"type-italic.svg",
|
"type-italic.svg",
|
||||||
"type-underline.svg",
|
"type-underline.svg",
|
||||||
|
"eraser.svg",
|
||||||
|
"square-fill.svg",
|
||||||
|
"paperclip.svg",
|
||||||
|
"mic.svg",
|
||||||
|
"three-dots.svg",
|
||||||
|
],
|
||||||
|
)
|
||||||
|
|
||||||
|
copy_mdi_icons(
|
||||||
|
name = "mdi-icons",
|
||||||
|
icons = [
|
||||||
|
"format-superscript.svg",
|
||||||
|
"format-subscript.svg",
|
||||||
|
"code-brackets.svg",
|
||||||
],
|
],
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -71,6 +85,7 @@ esbuild(
|
||||||
"//ts/sass:core_css",
|
"//ts/sass:core_css",
|
||||||
"//ts:image_module_support",
|
"//ts:image_module_support",
|
||||||
"bootstrap-icons",
|
"bootstrap-icons",
|
||||||
|
"mdi-icons",
|
||||||
] + svelte_names,
|
] + svelte_names,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -9,6 +9,16 @@
|
||||||
import italicIcon from "./type-italic.svg";
|
import italicIcon from "./type-italic.svg";
|
||||||
import underlineIcon from "./type-underline.svg";
|
import underlineIcon from "./type-underline.svg";
|
||||||
|
|
||||||
|
import superscriptIcon from "./format-superscript.svg";
|
||||||
|
import subscriptIcon from "./format-subscript.svg";
|
||||||
|
import bracketsIcon from "./code-brackets.svg";
|
||||||
|
|
||||||
|
import eraserIcon from "./eraser.svg";
|
||||||
|
import squareFillIcon from "./square-fill.svg";
|
||||||
|
import paperclipIcon from "./paperclip.svg";
|
||||||
|
import micIcon from "./mic.svg";
|
||||||
|
import threeDotsIcon from "./three-dots.svg";
|
||||||
|
|
||||||
export let leftButtons = [
|
export let leftButtons = [
|
||||||
{ component: LabelButton, label: "Fields..." },
|
{ component: LabelButton, label: "Fields..." },
|
||||||
{ component: LabelButton, label: "Cards..." },
|
{ component: LabelButton, label: "Cards..." },
|
||||||
|
@ -18,6 +28,18 @@
|
||||||
{ component: IconButton, icon: boldIcon },
|
{ component: IconButton, icon: boldIcon },
|
||||||
{ component: IconButton, icon: italicIcon },
|
{ component: IconButton, icon: italicIcon },
|
||||||
{ component: IconButton, icon: underlineIcon },
|
{ component: IconButton, icon: underlineIcon },
|
||||||
|
|
||||||
|
{ component: IconButton, icon: superscriptIcon },
|
||||||
|
{ component: IconButton, icon: subscriptIcon },
|
||||||
|
|
||||||
|
{ component: IconButton, icon: eraserIcon },
|
||||||
|
{ component: IconButton, icon: squareFillIcon },
|
||||||
|
{ component: IconButton, icon: squareFillIcon },
|
||||||
|
|
||||||
|
{ component: IconButton, icon: bracketsIcon },
|
||||||
|
{ component: IconButton, icon: paperclipIcon },
|
||||||
|
{ component: IconButton, icon: micIcon },
|
||||||
|
{ component: IconButton, icon: threeDotsIcon },
|
||||||
];
|
];
|
||||||
export let nightMode: boolean;
|
export let nightMode: boolean;
|
||||||
|
|
||||||
|
|
|
@ -7,14 +7,12 @@
|
||||||
"path": "node_modules/@fluent/bundle",
|
"path": "node_modules/@fluent/bundle",
|
||||||
"licenseFile": "node_modules/@fluent/bundle/README.md"
|
"licenseFile": "node_modules/@fluent/bundle/README.md"
|
||||||
},
|
},
|
||||||
"@fortawesome/fontawesome-free@5.15.3": {
|
"@mdi/svg@5.9.55": {
|
||||||
"licenses": "(CC-BY-4.0 AND OFL-1.1 AND MIT)",
|
"licenses": "Apache-2.0",
|
||||||
"repository": "https://github.com/FortAwesome/Font-Awesome",
|
"repository": "https://github.com/Templarian/MaterialDesign-SVG",
|
||||||
"publisher": "Dave Gandy",
|
"publisher": "Austin Andrews",
|
||||||
"email": "dave@fontawesome.com",
|
"path": "node_modules/@mdi/svg",
|
||||||
"url": "http://twitter.com/davegandy",
|
"licenseFile": "node_modules/@mdi/svg/LICENSE"
|
||||||
"path": "node_modules/@fortawesome/fontawesome-free",
|
|
||||||
"licenseFile": "node_modules/@fortawesome/fontawesome-free/LICENSE.txt"
|
|
||||||
},
|
},
|
||||||
"@protobufjs/aspromise@1.1.2": {
|
"@protobufjs/aspromise@1.1.2": {
|
||||||
"licenses": "BSD-3-Clause",
|
"licenses": "BSD-3-Clause",
|
||||||
|
|
|
@ -54,7 +54,7 @@
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@fluent/bundle": "^0.15.1",
|
"@fluent/bundle": "^0.15.1",
|
||||||
"@fortawesome/fontawesome-free": "^5.15.3",
|
"@mdi/svg": "^5.9.55",
|
||||||
"bootstrap": "^5.0.0-beta2",
|
"bootstrap": "^5.0.0-beta2",
|
||||||
"bootstrap-icons": "^1.4.0",
|
"bootstrap-icons": "^1.4.0",
|
||||||
"css-browser-selector": "^0.6.5",
|
"css-browser-selector": "^0.6.5",
|
||||||
|
|
|
@ -131,13 +131,13 @@ def copy_bootstrap_icons(name = "bootstrap-icons", icons = [], visibility = ["//
|
||||||
visibility = visibility,
|
visibility = visibility,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
def copy_mdi_icons(name = "mdi-icons", icons = [], visibility = ["//visibility:public"]):
|
||||||
def copy_fontawesome_icons(name = "fontawesome-icons", icons = [], visibility = ["//visibility:public"]):
|
|
||||||
vendor_js_lib(
|
vendor_js_lib(
|
||||||
name = name,
|
name = name,
|
||||||
pkg = _pkg_from_name("@fortawesome/fontawesome-free"),
|
pkg = _pkg_from_name("@mdi/svg"),
|
||||||
base = _npm_base_from_name("@fortawesome/fontawesome-free"),
|
base = _npm_base_from_name("@mdi/svg"),
|
||||||
include = ["svgs/{}".format(icon) for icon in icons],
|
include = ["svg/{}".format(icon) for icon in icons],
|
||||||
strip_prefix = "svgs/solid/",
|
strip_prefix = "svg/",
|
||||||
visibility = visibility,
|
visibility = visibility,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -502,10 +502,11 @@
|
||||||
"@types/node" "*"
|
"@types/node" "*"
|
||||||
"@types/yargs" "^15.0.0"
|
"@types/yargs" "^15.0.0"
|
||||||
chalk "^4.0.0"
|
chalk "^4.0.0"
|
||||||
"@fortawesome/fontawesome-free@^5.15.3":
|
|
||||||
version "5.15.3"
|
"@mdi/svg@^5.9.55":
|
||||||
resolved "https://registry.yarnpkg.com/@fortawesome/fontawesome-free/-/fontawesome-free-5.15.3.tgz#c36ffa64a2a239bf948541a97b6ae8d729e09a9a"
|
version "5.9.55"
|
||||||
integrity sha512-rFnSUN/QOtnOAgqFRooTA3H57JLDm0QEG/jPdk+tLQNL/eWd+Aok8g3qCI+Q1xuDPWpGW/i9JySpJVsq8Q0s9w==
|
resolved "https://registry.yarnpkg.com/@mdi/svg/-/svg-5.9.55.tgz#7cba058135afd5d8a3da977f51b71ffc6a3a3699"
|
||||||
|
integrity sha512-gO0ZpKIeCn9vFg46QduK9MM+n1fuCNwSdcdlBTtbafnnuvwLveK2uj+byhdLtg/8VJGXDhp+DJ35QUMbeWeULA==
|
||||||
|
|
||||||
"@jest/types@^27.0.0-next.8":
|
"@jest/types@^27.0.0-next.8":
|
||||||
version "27.0.0-next.8"
|
version "27.0.0-next.8"
|
||||||
|
|
Loading…
Reference in a new issue