Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 597a01885b | |||
| 8a0baf3a61 | |||
| c4c4d5aea3 |
@@ -1,6 +1,14 @@
|
|||||||
<a name="readme-top"></a>
|
<a name="readme-top"></a>
|
||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
|
## [1.4.2](https://github.com/perfect-panel/ppanel-web/compare/v1.4.1...v1.4.2) (2025-09-15)
|
||||||
|
|
||||||
|
|
||||||
|
### 🐛 Bug Fixes
|
||||||
|
|
||||||
|
* Add GitHub template repository link to ProtocolForm header for easier access ([8a0baf3](https://github.com/perfect-panel/ppanel-web/commit/8a0baf3))
|
||||||
|
* Add readOnly prop to MonacoEditor and TemplatePreview components for improved content handling ([c4c4d5a](https://github.com/perfect-panel/ppanel-web/commit/c4c4d5a))
|
||||||
|
|
||||||
## [1.4.1](https://github.com/perfect-panel/ppanel-web/compare/v1.4.0...v1.4.1) (2025-09-15)
|
## [1.4.1](https://github.com/perfect-panel/ppanel-web/compare/v1.4.0...v1.4.1) (2025-09-15)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -313,7 +313,21 @@ export function ProtocolForm() {
|
|||||||
columns={columns}
|
columns={columns}
|
||||||
request={request}
|
request={request}
|
||||||
header={{
|
header={{
|
||||||
title: <h2 className='text-lg font-semibold'>{t('protocol.title')}</h2>,
|
title: (
|
||||||
|
<div className='flex items-center justify-between'>
|
||||||
|
<h2 className='text-lg font-semibold'>{t('protocol.title')}</h2>
|
||||||
|
<a
|
||||||
|
href='https://github.com/perfect-panel/subscription-template'
|
||||||
|
target='_blank'
|
||||||
|
rel='noreferrer'
|
||||||
|
className='text-primary inline-flex items-center gap-2 rounded-md px-3 py-1 text-sm font-medium hover:underline'
|
||||||
|
>
|
||||||
|
<Icon icon='mdi:github' className='h-4 w-4' />
|
||||||
|
<span>Template Repo</span>
|
||||||
|
<Icon icon='mdi:open-in-new' className='text-muted-foreground h-4 w-4' />
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
),
|
||||||
toolbar: <Button onClick={handleAdd}>{t('actions.add')}</Button>,
|
toolbar: <Button onClick={handleAdd}>{t('actions.add')}</Button>,
|
||||||
}}
|
}}
|
||||||
actions={{
|
actions={{
|
||||||
|
|||||||
@@ -93,6 +93,7 @@ export function TemplatePreview({ applicationId, output_format }: TemplatePrevie
|
|||||||
title={t('title')}
|
title={t('title')}
|
||||||
value={getDisplayContent()}
|
value={getDisplayContent()}
|
||||||
language={mapLanguage(output_format)}
|
language={mapLanguage(output_format)}
|
||||||
|
readOnly
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
</SheetContent>
|
</SheetContent>
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "ppanel-web",
|
"name": "ppanel-web",
|
||||||
"version": "1.4.1",
|
"version": "1.4.2",
|
||||||
"private": true,
|
"private": true,
|
||||||
"homepage": "https://github.com/perfect-panel/ppanel-web",
|
"homepage": "https://github.com/perfect-panel/ppanel-web",
|
||||||
"bugs": {
|
"bugs": {
|
||||||
|
|||||||
@@ -21,6 +21,7 @@ export interface MonacoEditorProps {
|
|||||||
language?: string;
|
language?: string;
|
||||||
className?: string;
|
className?: string;
|
||||||
showLineNumbers?: boolean;
|
showLineNumbers?: boolean;
|
||||||
|
readOnly?: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||||
@@ -45,6 +46,7 @@ export function MonacoEditor({
|
|||||||
language = 'markdown',
|
language = 'markdown',
|
||||||
className,
|
className,
|
||||||
showLineNumbers = false,
|
showLineNumbers = false,
|
||||||
|
readOnly = false,
|
||||||
}: MonacoEditorProps) {
|
}: MonacoEditorProps) {
|
||||||
const [internalValue, setInternalValue] = useState<string | undefined>(propValue);
|
const [internalValue, setInternalValue] = useState<string | undefined>(propValue);
|
||||||
const [isFullscreen, setIsFullscreen] = useState(false);
|
const [isFullscreen, setIsFullscreen] = useState(false);
|
||||||
@@ -146,7 +148,7 @@ export function MonacoEditor({
|
|||||||
},
|
},
|
||||||
tabSize: 2,
|
tabSize: 2,
|
||||||
wordWrap: 'off',
|
wordWrap: 'off',
|
||||||
readOnly: !onChange,
|
readOnly,
|
||||||
}}
|
}}
|
||||||
theme='transparentTheme'
|
theme='transparentTheme'
|
||||||
beforeMount={(monaco: Monaco) => {
|
beforeMount={(monaco: Monaco) => {
|
||||||
|
|||||||
Reference in New Issue
Block a user