Merge pull request #594 from SuanmoSuanyangTechnology/fix/v0.2.8_zy

fix(web): app sharing bugfix
This commit is contained in:
yingzhao
2026-03-18 10:53:43 +08:00
committed by GitHub
4 changed files with 8 additions and 6 deletions

View File

@@ -2,7 +2,7 @@
* @Author: ZhaoYing * @Author: ZhaoYing
* @Date: 2026-03-13 17:19:13 * @Date: 2026-03-13 17:19:13
* @Last Modified by: ZhaoYing * @Last Modified by: ZhaoYing
* @Last Modified time: 2026-03-13 17:26:57 * @Last Modified time: 2026-03-18 10:47:17
*/ */
import { forwardRef, useImperativeHandle, useState } from 'react'; import { forwardRef, useImperativeHandle, useState } from 'react';
import { Checkbox, App, Form } from 'antd'; import { Checkbox, App, Form } from 'antd';
@@ -147,6 +147,7 @@ const AppSharingModal = forwardRef<AppSharingModalRef, AppSharingModalProps>(({
<Checkbox <Checkbox
checked={isShared || selectedIds.includes(space.id)} checked={isShared || selectedIds.includes(space.id)}
disabled={isShared} // already-shared workspaces cannot be unselected disabled={isShared} // already-shared workspaces cannot be unselected
onClick={(e) => e.stopPropagation()}
onChange={() => handleToggle(space.id, isShared)} onChange={() => handleToggle(space.id, isShared)}
/> />
<span className="rb:flex-1 rb:text-sm">{space.name}</span> <span className="rb:flex-1 rb:text-sm">{space.name}</span>

View File

@@ -2,7 +2,7 @@
* @Author: ZhaoYing * @Author: ZhaoYing
* @Date: 2026-02-03 16:34:12 * @Date: 2026-02-03 16:34:12
* @Last Modified by: ZhaoYing * @Last Modified by: ZhaoYing
* @Last Modified time: 2026-03-13 17:36:16 * @Last Modified time: 2026-03-18 10:44:32
*/ */
import React, { useState, useEffect, useMemo } from 'react'; import React, { useState, useEffect, useMemo } from 'react';
import { useTranslation } from 'react-i18next'; import { useTranslation } from 'react-i18next';
@@ -107,7 +107,7 @@ const MySharing: React.FC = () => {
{items.map(item => ( {items.map(item => (
<Col key={item.id} span={6} className="rb:bg-[#F6F6F6] rb:rounded-lg rb:py-3! rb:px-4! rb:relative"> <Col key={item.id} span={6} className="rb:bg-[#F6F6F6] rb:rounded-lg rb:py-3! rb:px-4! rb:relative">
<div <div
className="rb:absolute rb:top-3 rb:right-3 rb:cursor-pointer rb:size-4 rb:bg-cover rb:bg-[url('src/assets/images/close.svg')]" className="rb:absolute rb:top-3 rb:right-3 rb:cursor-pointer rb:size-4 rb:bg-cover rb:bg-[url('@/assets/images/close.svg')]"
onClick={() => handleCancelOne(item)} onClick={() => handleCancelOne(item)}
/> />
<Flex gap={8} align="center"> <Flex gap={8} align="center">

View File

@@ -2,7 +2,7 @@
* @Author: ZhaoYing * @Author: ZhaoYing
* @Date: 2026-02-03 16:34:12 * @Date: 2026-02-03 16:34:12
* @Last Modified by: ZhaoYing * @Last Modified by: ZhaoYing
* @Last Modified time: 2026-03-16 09:56:02 * @Last Modified time: 2026-03-18 10:50:33
*/ */
/** /**
* Application Management Page * Application Management Page
@@ -185,7 +185,7 @@ const ApplicationManagement: React.FC = () => {
<PageScrollList<Application, Query> <PageScrollList<Application, Query>
ref={scrollListRef} ref={scrollListRef}
url={getApplicationListUrl} url={getApplicationListUrl}
query={{ ...query, shared_only: activeTab === 'sharing' }} query={{ ...query, shared_only: activeTab === 'sharing', include_shared: activeTab !== 'apps' }}
renderItem={(item) => ( renderItem={(item) => (
<RbCard <RbCard
title={item.name} title={item.name}

View File

@@ -2,7 +2,7 @@
* @Author: ZhaoYing * @Author: ZhaoYing
* @Date: 2026-02-03 16:34:15 * @Date: 2026-02-03 16:34:15
* @Last Modified by: ZhaoYing * @Last Modified by: ZhaoYing
* @Last Modified time: 2026-03-16 09:55:52 * @Last Modified time: 2026-03-18 10:50:27
*/ */
/** /**
* Type definitions for Application Management * Type definitions for Application Management
@@ -16,6 +16,7 @@ export interface Query {
search: string; search: string;
type?: string; type?: string;
shared_only?: boolean; shared_only?: boolean;
include_shared?: boolean;
} }
/** /**