Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: support layout mode #55

Merged
merged 2 commits into from
May 17, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions lang/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,11 @@
"config_images_size": "Size of generated images:",
"config_language": "Language:",
"config_password": "Password:",
"config_general": "General",
"config_layout": "Layout:",
"layout_full": "Full",
"layout_loose": "Loose",
"layout_default": "Default",
"status_loading": "AI is thinking...",
"status_empty": "New Conversation",
"status_image_expired": "Image has expired",
Expand Down
5 changes: 5 additions & 0 deletions lang/zh.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,11 @@
"config_images_size": "图片尺寸:",
"config_language": "语言:",
"config_password": "访问密码:",
"config_general": "通用",
"config_layout": "布局:",
"layout_full": "全屏",
"layout_loose": "宽松",
"layout_default": "默认",
"status_loading": "AI 正在思考...",
"status_empty": "新的对话",
"status_image_expired": "图片已过期",
Expand Down
7 changes: 7 additions & 0 deletions src/configs/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,12 @@ export const supportedLanguages = [
},
];

export const layoutConfig = ['full', 'loose', 'default'] as const;

export type LayoutConfig = (typeof layoutConfig)[number];

export const defaultLayoutConfig: LayoutConfig = 'default';

export const defaultGloablConfig: GlobalConfig = {
password: '',
openAIApiKey: '',
Expand All @@ -58,6 +64,7 @@ export const defaultGloablConfig: GlobalConfig = {
discordChannelId: '',
discordServerId: '',
discordToken: '',
layout: defaultLayoutConfig,
};

export const defaultConversation: Conversation = {
Expand Down
2 changes: 2 additions & 0 deletions src/interfaces/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import {
LayoutConfig,
SupportedImageModels,
SupportedImgSize,
SupportedModel,
Expand Down Expand Up @@ -42,6 +43,7 @@ export interface GlobalConfig {
discordServerId: string;
discordChannelId: string;
discordToken: string;
layout: LayoutConfig;
}

export interface Prompt {
Expand Down
Loading