Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
jobily
SteamTools
提交
57c393e7
S
SteamTools
项目概览
jobily
/
SteamTools
10 个月 前同步成功
通知
2
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
S
SteamTools
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
57c393e7
编写于
8月 21, 2023
作者:
A
Aigio Liu
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
🎨
重启生效设置项提示
上级
b51f4785
变更
8
隐藏空白更改
内联
并排
Showing
8 changed file
with
61 addition
and
3 deletion
+61
-3
build/settings_v4_app.json
build/settings_v4_app.json
+9
-0
src/BD.WTTS.Client.Avalonia/UI/Views/Pages/Settings/Settings_Plugin.axaml
...nt.Avalonia/UI/Views/Pages/Settings/Settings_Plugin.axaml
+1
-1
src/BD.WTTS.Client/Resources/Strings.Designer.cs
src/BD.WTTS.Client/Resources/Strings.Designer.cs
+9
-0
src/BD.WTTS.Client/Resources/Strings.resx
src/BD.WTTS.Client/Resources/Strings.resx
+3
-0
src/BD.WTTS.Client/Settings/Abstractions/IGeneralSettings.cs
src/BD.WTTS.Client/Settings/Abstractions/IGeneralSettings.cs
+10
-1
src/BD.WTTS.Client/Settings/GeneralSettings.cs
src/BD.WTTS.Client/Settings/GeneralSettings.cs
+12
-0
src/BD.WTTS.Client/Startup/Startup.OnStartup.cs
src/BD.WTTS.Client/Startup/Startup.OnStartup.cs
+16
-0
src/BD.WTTS.Client/UI/ViewModels/Pages/AboutPageViewModel.cs
src/BD.WTTS.Client/UI/ViewModels/Pages/AboutPageViewModel.cs
+1
-1
未找到文件。
build/settings_v4_app.json
浏览文件 @
57c393e7
...
...
@@ -327,6 +327,15 @@
"Summary"
:
"禁用插件"
,
"IsRegionOrEndregion"
:
null
,
"IsValueType"
:
null
},
{
"TypeName"
:
"bool"
,
"PropertyName"
:
"PluginSafeMode"
,
"DefaultValue"
:
"true"
,
"DefaultValueIsConst"
:
true
,
"Summary"
:
"插件安全模式"
,
"IsRegionOrEndregion"
:
null
,
"IsValueType"
:
null
}
],
"Usings"
:
""
...
...
src/BD.WTTS.Client.Avalonia/UI/Views/Pages/Settings/Settings_Plugin.axaml
浏览文件 @
57c393e7
...
...
@@ -24,7 +24,7 @@
<ui:FontIconSource FontFamily="Segoe Fluent Icons" Glyph="{StaticResource DefenderApp}" />
</ui:SettingsExpander.IconSource>
<ui:SettingsExpander.Footer>
<ToggleSwitch Classes="LeftContent" />
<ToggleSwitch Classes="LeftContent"
IsChecked="{Binding Source={x:Static ms:GeneralSettings.PluginSafeMode}, Path=Value, Mode=TwoWay}"
/>
</ui:SettingsExpander.Footer>
</ui:SettingsExpander>
...
...
src/BD.WTTS.Client/Resources/Strings.Designer.cs
浏览文件 @
57c393e7
...
...
@@ -6055,6 +6055,15 @@ namespace BD.WTTS.Client.Resources {
}
}
/// <summary>
/// 查找类似 设置已修改,需重启软件后生效 的本地化字符串。
/// </summary>
public
static
string
SettingsModifiedRestartThisSoft
{
get
{
return
ResourceManager
.
GetString
(
"SettingsModifiedRestartThisSoft"
,
resourceCulture
);
}
}
/// <summary>
/// 查找类似 显示/隐藏 的本地化字符串。
/// </summary>
...
...
src/BD.WTTS.Client/Resources/Strings.resx
浏览文件 @
57c393e7
...
...
@@ -2715,4 +2715,7 @@
<data
name=
"Idle_StopAutoNext"
xml:space=
"preserve"
>
<value>
关闭自动切换游戏
</value>
</data>
<data
name=
"SettingsModifiedRestartThisSoft"
xml:space=
"preserve"
>
<value>
设置已修改,需重启软件后生效
</value>
</data>
</root>
\ No newline at end of file
src/BD.WTTS.Client/Settings/Abstractions/IGeneralSettings.cs
浏览文件 @
57c393e7
...
...
@@ -140,5 +140,14 @@ public partial interface IGeneralSettings
/// </summary>
const
HashSet
<
string
>?
DefaultDisablePlugins
=
null
;
}
/// <summary>
/// 插件安全模式
/// </summary>
bool
?
PluginSafeMode
{
get
;
set
;
}
/// <summary>
/// 插件安全模式的默认值
/// </summary>
const
bool
DefaultPluginSafeMode
=
true
;
}
src/BD.WTTS.Client/Settings/GeneralSettings.cs
浏览文件 @
57c393e7
...
...
@@ -115,6 +115,12 @@ public sealed partial class GeneralSettings_ : IGeneralSettings, ISettings, ISet
[
MPKey
(
11
),
MP2Key
(
11
),
JsonPropertyOrder
(
11
)]
public
HashSet
<
string
>?
DisablePlugins
{
get
;
set
;
}
/// <summary>
/// 插件安全模式
/// </summary>
[
MPKey
(
12
),
MP2Key
(
12
),
JsonPropertyOrder
(
12
)]
public
bool
?
PluginSafeMode
{
get
;
set
;
}
}
public
static
partial
class
GeneralSettings
...
...
@@ -191,4 +197,10 @@ public static partial class GeneralSettings
public
static
SettingsProperty
<
string
,
HashSet
<
string
>,
GeneralSettings_
>
DisablePlugins
{
get
;
}
=
new
(
DefaultDisablePlugins
);
/// <summary>
/// 插件安全模式
/// </summary>
public
static
SettingsStructProperty
<
bool
,
GeneralSettings_
>
PluginSafeMode
{
get
;
}
=
new
(
DefaultPluginSafeMode
);
}
src/BD.WTTS.Client/Startup/Startup.OnStartup.cs
浏览文件 @
57c393e7
...
...
@@ -9,12 +9,28 @@ partial class Startup // OnStartup
}
protected
static
void
ShowSettingsModifiedRestartThisSoft
()
{
Toast
.
Show
(
ToastIcon
.
Info
,
Strings
.
SettingsModifiedRestartThisSoft
);
}
public
virtual
void
InitSettingSubscribe
()
{
var
a
=
IApplication
.
Instance
;
UISettings
.
Theme
.
Subscribe
(
x
=>
a
.
Theme
=
x
);
UISettings
.
Language
.
Subscribe
(
ResourceService
.
ChangeLanguage
);
GeneralSettings
.
GPU
.
Subscribe
(
x
=>
{
if
(
x
.
HasValue
)
// null 为默认值时不提示
ShowSettingsModifiedRestartThisSoft
();
});
GeneralSettings
.
PluginSafeMode
.
Subscribe
(
x
=>
{
if
(
x
.
HasValue
)
// null 为默认值时不提示
ShowSettingsModifiedRestartThisSoft
();
});
}
public
virtual
void
OnStartup
()
...
...
src/BD.WTTS.Client/UI/ViewModels/Pages/AboutPageViewModel.cs
浏览文件 @
57c393e7
...
...
@@ -164,7 +164,7 @@ Avalonia is a cross-platform UI framework for dotnet, providing a flexible styli
}
}));
// 账号注销
yield
return
new
HL
(
Strings
.
DelAccount
,
(
ICommand
)
null
!
);
yield
return
new
HL
(
Strings
.
DelAccount
,
Constants
.
Urls
.
OfficialWebsite_Account_Safe
);
// Bug 提交(GitHub) https://github.com/BeyondDimension/SteamTools/issues
yield
return
new
HL
(
$"
{
Strings
.
BugReport
}
(GitHub)"
,
Constants
.
Urls
.
GitHub_Issues
);
// Bug 提交(Gitee) https://gitee.com/rmbgame/SteamTools/issues
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录