feat: add custom style workspace setting

This commit is contained in:
Steven
2023-09-20 23:13:30 +08:00
parent 7f020eade9
commit 0af4903657
11 changed files with 292 additions and 146 deletions

View File

@@ -1,6 +1,5 @@
import axios from "axios";
import { userServiceClient, workspaceSettingServiceClient } from "@/grpcweb";
import { WorkspaceSetting } from "@/types/proto/api/v2/workspace_setting_service";
import { userServiceClient } from "@/grpcweb";
export function getWorkspaceProfile() {
return axios.get<WorkspaceProfile>("/api/v1/workspace/profile");
@@ -77,17 +76,6 @@ export function deleteShortcutById(shortcutId: ShortcutId) {
return axios.delete(`/api/v1/shortcut/${shortcutId}`);
}
export function getWorkspaceSetting() {
return workspaceSettingServiceClient.getWorkspaceSetting({});
}
export function updateWorkspaceSetting(setting: WorkspaceSetting, updateMask: string[]) {
return workspaceSettingServiceClient.updateWorkspaceSetting({
setting,
updateMask,
});
}
export function getUrlFavicon(url: string) {
return axios.get<string>(`/api/v1/url/favicon?url=${url}`);
}