feat: 完成个人中心网站样式功能
This commit is contained in:
parent
7c2935bb1b
commit
926cd75cf6
|
@ -213,4 +213,9 @@ class UserService : IUser
|
|||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public bool SaveTheme(string userName, string theme)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -160,6 +160,11 @@ class UserService : IUser
|
|||
/// </summary>
|
||||
public bool SaveDisplayName(string userName, string displayName) => Database.Update<User>("set DisplayName = @1 where UserName = @0", userName, displayName) == 1;
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public bool SaveTheme(string userName, string theme) => Database.Update<User>("set Css = @1 where UserName = @0", userName, theme) == 1;
|
||||
|
||||
/// <summary>
|
||||
/// 创建手机用户
|
||||
/// </summary>
|
||||
|
|
|
@ -81,6 +81,14 @@ public interface IUser
|
|||
/// <returns></returns>
|
||||
bool SaveDisplayName(string userName, string displayName);
|
||||
|
||||
/// <summary>
|
||||
/// 保存用户主题方法
|
||||
/// </summary>
|
||||
/// <param name="userName"></param>
|
||||
/// <param name="theme"></param>
|
||||
/// <returns></returns>
|
||||
bool SaveTheme(string userName, string theme);
|
||||
|
||||
/// <summary>
|
||||
/// 获得所有用户
|
||||
/// </summary>
|
||||
|
|
|
@ -92,9 +92,10 @@ public partial class Profiles
|
|||
await ShowToast(ret, "默认应用");
|
||||
}
|
||||
|
||||
private Task OnSaveTheme()
|
||||
private async Task OnSaveTheme()
|
||||
{
|
||||
return Task.CompletedTask;
|
||||
var ret = string.IsNullOrEmpty(CurrentUser.Css) ? false : UserService.SaveTheme(AppContext.UserName, CurrentUser.Css);
|
||||
await ShowToast(ret, "网站样式");
|
||||
}
|
||||
|
||||
private Task OnSaveIcon()
|
||||
|
|
Loading…
Reference in New Issue