Skip to content

Commit a55ee2c

Browse files
authored
fix(#927): tabler-icons-filledのフォントを参照できない問題を修正 (#929)
1 parent 1d9a54e commit a55ee2c

File tree

4 files changed

+21
-14
lines changed

4 files changed

+21
-14
lines changed

packages/backend/src/server/web/views/base.pug

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ html
3737
link(rel='prefetch' href=notFoundImageUrl)
3838
//- https://github.com/misskey-dev/misskey/issues/9842
3939
link(rel='stylesheet' href=`/assets/tabler-icons.${version}/dist/tabler-icons-outline.min.css`)
40+
link(rel='stylesheet' href=`/assets/tabler-icons.${version}/dist/tabler-icons-filled.min.css`)
4041
link(rel='modulepreload' href=`/vite/${clientEntry.file}`)
4142

4243
if !config.clientManifestExists

packages/frontend/.storybook/preview-head.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
<link rel="preload" href="https://github.com/misskey-dev/misskey/blob/master/packages/frontend/assets/about-icon.png?raw=true" as="image" type="image/png" crossorigin="anonymous">
77
<link rel="preload" href="https://github.com/misskey-dev/misskey/blob/master/packages/frontend/assets/fedi.jpg?raw=true" as="image" type="image/jpeg" crossorigin="anonymous">
8-
<link rel="stylesheet" href="https://unpkg.com/@tabler/icons-webfont@latest/dist/tabler-icons-outline.min.css">
8+
<link rel="stylesheet" href="https://unpkg.com/@tabler/icons-webfont@latest/dist/tabler-icons.min.css">
99
<link rel="stylesheet" href="https://unpkg.com/@fontsource/m-plus-rounded-1c/index.css">
1010
<style>
1111
html {

packages/frontend/src/style.scss

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,6 @@
66
* SPDX-License-Identifier: AGPL-3.0-only
77
*/
88

9-
@use '@tabler/icons-webfont/dist/tabler-icons-filled' with (
10-
$ti-prefix: 'ti-filled'
11-
);
12-
139
:root {
1410
--radius: 12px;
1511
--marginFull: 16px;

scripts/build-assets.mjs

Lines changed: 19 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,16 @@ async function copyFrontendFonts() {
2121

2222
async function copyFrontendTablerIcons() {
2323
await fs.cp('./packages/frontend/node_modules/@tabler/icons-webfont', `./built/_frontend_dist_/tabler-icons.${meta.version}`, { dereference: true, recursive: true });
24+
for (const file of [
25+
`./built/_frontend_dist_/tabler-icons.${meta.version}/dist/tabler-icons-filled.scss`,
26+
`./built/_frontend_dist_/tabler-icons.${meta.version}/dist/tabler-icons-filled.css`,
27+
`./built/_frontend_dist_/tabler-icons.${meta.version}/dist/tabler-icons-filled.min.css`,
28+
]) {
29+
let source = await fs.readFile(file, { encoding: 'utf-8' });
30+
source = source.replaceAll('$ti-prefix: \'ti\'', '$ti-prefix: \'ti-filled\'');
31+
source = source.replaceAll('.ti', '.ti-filled');
32+
await fs.writeFile(file, source);
33+
}
2434
}
2535

2636
async function copyFrontendLocales() {
@@ -91,13 +101,13 @@ async function build() {
91101
await build();
92102

93103
if (process.argv.includes("--watch")) {
94-
const watcher = fs.watch('./locales');
95-
for await (const event of watcher) {
96-
const filename = event.filename?.replaceAll('\\', '/');
97-
if (/^[a-z]+-[A-Z]+\.yml/.test(filename)) {
98-
console.log(`update ${filename} ...`)
99-
locales = buildLocales();
100-
await copyFrontendLocales()
101-
}
102-
}
104+
const watcher = fs.watch('./locales');
105+
for await (const event of watcher) {
106+
const filename = event.filename?.replaceAll('\\', '/');
107+
if (/^[a-z]+-[A-Z]+\.yml/.test(filename)) {
108+
console.log(`update ${filename} ...`)
109+
locales = buildLocales();
110+
await copyFrontendLocales()
111+
}
112+
}
103113
}

0 commit comments

Comments
 (0)