Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 597a01885b | |||
| 8a0baf3a61 | |||
| c4c4d5aea3 |
@@ -1,6 +1,14 @@
|
||||
<a name="readme-top"></a>
|
||||
# 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)
|
||||
|
||||
|
||||
|
||||
@@ -313,7 +313,21 @@ export function ProtocolForm() {
|
||||
columns={columns}
|
||||
request={request}
|
||||
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>,
|
||||
}}
|
||||
actions={{
|
||||
|
||||
@@ -93,6 +93,7 @@ export function TemplatePreview({ applicationId, output_format }: TemplatePrevie
|
||||
title={t('title')}
|
||||
value={getDisplayContent()}
|
||||
language={mapLanguage(output_format)}
|
||||
readOnly
|
||||
/>
|
||||
)}
|
||||
</SheetContent>
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "ppanel-web",
|
||||
"version": "1.4.1",
|
||||
"version": "1.4.2",
|
||||
"private": true,
|
||||
"homepage": "https://github.com/perfect-panel/ppanel-web",
|
||||
"bugs": {
|
||||
|
||||
@@ -21,6 +21,7 @@ export interface MonacoEditorProps {
|
||||
language?: string;
|
||||
className?: string;
|
||||
showLineNumbers?: boolean;
|
||||
readOnly?: boolean;
|
||||
}
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
@@ -45,6 +46,7 @@ export function MonacoEditor({
|
||||
language = 'markdown',
|
||||
className,
|
||||
showLineNumbers = false,
|
||||
readOnly = false,
|
||||
}: MonacoEditorProps) {
|
||||
const [internalValue, setInternalValue] = useState<string | undefined>(propValue);
|
||||
const [isFullscreen, setIsFullscreen] = useState(false);
|
||||
@@ -146,7 +148,7 @@ export function MonacoEditor({
|
||||
},
|
||||
tabSize: 2,
|
||||
wordWrap: 'off',
|
||||
readOnly: !onChange,
|
||||
readOnly,
|
||||
}}
|
||||
theme='transparentTheme'
|
||||
beforeMount={(monaco: Monaco) => {
|
||||
|
||||
Reference in New Issue
Block a user