diff --git a/assets/tr.json b/assets/tr.json index 29c81ec..bfb0232 100644 --- a/assets/tr.json +++ b/assets/tr.json @@ -180,7 +180,9 @@ "Check for updates": "检查更新", "Check for updates on startup": "启动时检查更新", "I understand pixes is a free unofficial application.": "我了解Pixes是一个免费的非官方应用程序", - "Related Artworks": "相关作品" + "Related Artworks": "相关作品", + "Emphasize artworks from following artists": "强调关注画师的作品", + "The border of the artworks will be darker": "作品的边框将被加深" }, "zh_TW": { "Search": "搜索", @@ -363,6 +365,8 @@ "Check for updates": "檢查更新", "Check for updates on startup": "啟動時檢查更新", "I understand pixes is a free unofficial application.": "我了解Pixes是一個免費的非官方應用程序", - "Related Artworks": "相關作品" + "Related Artworks": "相關作品", + "Emphasize artworks from following artists": "強調關注畫師的作品", + "The border of the artworks will be darker": "作品的邊框將被加深" } } \ No newline at end of file diff --git a/lib/appdata.dart b/lib/appdata.dart index b7cc2fd..7369731 100644 --- a/lib/appdata.dart +++ b/lib/appdata.dart @@ -37,6 +37,7 @@ class _Appdata { ], "showOriginalImage": false, "checkUpdate": true, + "emphasizeArtworksFromFollowingArtists": true, }; bool lock = false; diff --git a/lib/components/illust_widget.dart b/lib/components/illust_widget.dart index 08401e1..fc0ba45 100644 --- a/lib/components/illust_widget.dart +++ b/lib/components/illust_widget.dart @@ -1,4 +1,5 @@ import 'package:fluent_ui/fluent_ui.dart'; +import 'package:pixes/appdata.dart'; import 'package:pixes/components/animated_image.dart'; import 'package:pixes/foundation/app.dart'; import 'package:pixes/foundation/history.dart'; @@ -70,6 +71,15 @@ class _IllustWidgetState extends State { child: Card( padding: EdgeInsets.zero, margin: EdgeInsets.zero, + borderColor: () { + return widget.illust.author.isFollowed && + appdata.settings[ + 'emphasizeArtworksFromFollowingArtists'] + ? ColorScheme.of(context).primary + : ColorScheme.of(context) + .outlineVariant + .withOpacity(0.64); + }(), child: GestureDetector( onTap: widget.onTap ?? () { diff --git a/lib/pages/settings_page.dart b/lib/pages/settings_page.dart index 7358775..165005c 100644 --- a/lib/pages/settings_page.dart +++ b/lib/pages/settings_page.dart @@ -273,6 +273,19 @@ class _SettingsPageState extends State { }); appdata.writeData(); })), + buildItem( + title: "Emphasize artworks from following artists".tl, + subtitle: "The border of the artworks will be darker".tl, + action: ToggleSwitch( + checked: + appdata.settings['emphasizeArtworksFromFollowingArtists'], + onChanged: (value) { + setState(() { + appdata.settings[ + 'emphasizeArtworksFromFollowingArtists'] = value; + }); + appdata.writeData(); + })), ], ), );