refactor(web): drop the settings entry from the space header
This commit is contained in:
1 parent
b847916a5b
commit
18185c5bd9
4 files changed
+8
-19
No files matched your search
@@ -24,13 +24,12 @@ export function SpaceRail({ id, onCreate, onJoin }: RailProps) {
|
||||
</nav>;
|
||||
}
|
||||
|
||||
/** 频道列表顶部:空间名与加密状态,点击打开空间设置 */
|
||||
export function SpaceHeader({ onSettings }: { onSettings: () => void }) {
|
||||
/** 频道列表顶部:空间名与加密状态。空间设置入口在顶栏 */
|
||||
export function SpaceHeader() {
|
||||
const channel = useWorkspace((s) => s.channel);
|
||||
const name = channel?.name || `${channel?.id.slice(0, 8) ?? ''}…`;
|
||||
return <button type="button" className={styles.header} aria-label={`${name} 空间设置`} onClick={onSettings}>
|
||||
return <div className={styles.header}>
|
||||
{channel?.mode === 'raw' ? <span className={styles.raw}>明文</span> : <Icon name="lock" size={14} />}
|
||||
<strong>{name}</strong>
|
||||
<Icon name="settings" size={16} />
|
||||
</button>;
|
||||
</div>;
|
||||
}
|
||||
Reference in new issue
Block a user