Skip to content

Commit

Permalink
feat: add watermark plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
flingyp committed Oct 24, 2023
1 parent 3b87acc commit 352a4d2
Show file tree
Hide file tree
Showing 8 changed files with 65 additions and 8 deletions.
9 changes: 4 additions & 5 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
{
"typescript.tsdk": "node_modules/typescript/lib",
"prettier.enable": false,
"eslint.enable": true,
"stylelint.enable": true,
"editor.formatOnSave": false,
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true,
"source.fixAll.stylelint": true,
"source.organizeImports": false
"source.fixAll": true
},
"eslint.validate": [
"javascript",
Expand Down Expand Up @@ -36,6 +35,7 @@
"i18n-ally.enabledParsers": ["ts", "json"],
"i18n-ally.sourceLanguage": "en",
"i18n-ally.displayLanguage": "en",
"i18n-ally.keystyle": "nested",
"cSpell.words": [
"colord",
"commitlint",
Expand All @@ -62,6 +62,5 @@
"vueuse",
"wangeditor",
"xgplayer"
],
"i18n-ally.keystyle": "nested"
]
}
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
"@flypeng/tool": "^5.3.2",
"@logicflow/core": "^1.2.15",
"@logicflow/extension": "^1.2.16",
"@pansy/vue-watermark": "^1.2.0",
"@vueuse/core": "^9.13.0",
"@wangeditor/editor": "^5.1.23",
"@wangeditor/editor-for-vue": "^5.1.12",
Expand Down
21 changes: 21 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion src/locales/cn.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@
"commonSuperAdministrator": "超级管理员",
"commonGeneralAdministrator": "普通管理员",
"commonButtonPermissionManagement": "按钮权限管理",
"commonLogicFlow": "流程图"
"commonLogicFlow": "流程图",
"commonWatermark": "水印"
},
"setting": {
"systemSetting": "系统设置",
Expand Down
3 changes: 2 additions & 1 deletion src/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@
"commonSuperAdministrator": "Super Administrator",
"commonGeneralAdministrator": "General Administrator",
"commonButtonPermissionManagement": "Button Permission Management",
"commonLogicFlow": "LogicFlow"
"commonLogicFlow": "LogicFlow",
"commonWatermark": "Watermark"
},
"setting": {
"systemSetting": "System Setting",
Expand Down
3 changes: 2 additions & 1 deletion src/locales/kr.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@
"commonSuperAdministrator": "슈퍼 관리자",
"commonGeneralAdministrator": "일반 관리자",
"commonButtonPermissionManagement": "버튼 권한 관리",
"commonLogicFlow": "논리 흐름"
"commonLogicFlow": "논리 흐름",
"commonWatermark": "워터마크"
},
"setting": {
"systemSetting": "시스템 설정",
Expand Down
9 changes: 9 additions & 0 deletions src/router/modules/constant-routes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,15 @@ export const CONSTANT_ROUTES: VAdmireRoute[] = [
icon: 'carbon:flow',
},
},
{
path: 'watermark',
name: 'Feature_Watermark',
component: '~/views/features/Watermark.vue',
meta: {
text: '$t("route.commonWatermark")',
icon: 'material-symbols:branding-watermark-outline',
},
},
{
path: '',
name: 'GuideIndex',
Expand Down
24 changes: 24 additions & 0 deletions src/views/features/Watermark.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<script setup lang="ts">
import { Watermark } from '@pansy/vue-watermark'
const { contentContainerHeight } = storeToRefs(useVAdmireConfigStore())
const watermarkOptions = ref({
text: 'VAdmire Admin',
})
</script>

<template>
<div>
<Watermark :options="watermarkOptions">
<div
:style="{height: contentContainerHeight}"
class="flex flex-col space-y-4 items-center justify-center"
>
<h2>watermark</h2>
<span>https://github.com/pansyjs/watermark</span>
</div>
</Watermark>
</div>
</template>

0 comments on commit 352a4d2

Please sign in to comment.