-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'cloudforet-io/master' into feature-proj…
…ect-alert-manager Signed-off-by: NaYeong,Kim <[email protected]>
- Loading branch information
Showing
108 changed files
with
1,742 additions
and
807 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,11 @@ | ||
// eslint-disable-next-line @typescript-eslint/no-var-requires | ||
const tailwindConfig = require('../../packages/mirinae/tailwind.config.cjs'); | ||
|
||
module.exports = tailwindConfig; | ||
module.exports = { | ||
content: [ | ||
'../../packages/mirinae/src/**/*.{js,ts,jsx,tsx,vue}', | ||
], | ||
theme: tailwindConfig.theme, | ||
variants: tailwindConfig.variants, | ||
plugins: tailwindConfig.plugins, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file added
BIN
+30.9 KB
apps/web/public/images/opsflow-landing/img_landing_service-desk_hero.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
39 changes: 28 additions & 11 deletions
39
apps/web/src/common/components/editor/TextEditorViewer.vue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
45 changes: 0 additions & 45 deletions
45
apps/web/src/common/components/editor/extensions/image/helper.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,47 +1,2 @@ | ||
import type { Editor } from '@tiptap/vue-2'; | ||
|
||
import type { Attachment } from '@/common/components/editor/extensions/image/type'; | ||
|
||
// such as <p></p> | ||
export const emptyHtmlRegExp = /<[^/>][^>]*><\/[^>]+>/; | ||
|
||
export const getAttachmentIds = (editor: Editor): string[] => { | ||
const contentsEl = editor.contentComponent?.$el; | ||
if (!contentsEl) return []; | ||
const imageElements = contentsEl.getElementsByTagName('img'); | ||
return Array.from(imageElements) | ||
.reduce((results, imageElement) => { | ||
const fileId = imageElement.getAttribute('file-id'); | ||
const src = imageElement.getAttribute('src'); | ||
if (fileId && src) { | ||
results.push(fileId); | ||
} | ||
|
||
return results; | ||
}, [] as string[]); | ||
}; | ||
|
||
export const setAttachmentsToContents = (contents: string, attachments: Attachment[]): string => { | ||
if (attachments.length === 0) return contents; | ||
|
||
const contentsEl = document.createElement('div'); | ||
contentsEl.innerHTML = contents.trim(); | ||
|
||
const attachmentsMap = {}; | ||
attachments.forEach(({ fileId, downloadUrl }) => { | ||
attachmentsMap[fileId] = downloadUrl; | ||
}); | ||
|
||
const imageElements = contentsEl.getElementsByTagName('img'); | ||
Array.from(imageElements) | ||
.forEach((imageElement) => { | ||
const fileId = imageElement.getAttribute('file-id'); | ||
if (fileId && attachmentsMap[fileId]) { | ||
imageElement.setAttribute('src', attachmentsMap[fileId]); | ||
} | ||
}); | ||
|
||
const newContents = contentsEl.innerHTML; | ||
contentsEl.remove(); | ||
return newContents; | ||
}; |
Oops, something went wrong.