-
-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- 노트를 QR 코드로 공유 (1673beta#45) - 사용자를 QR 코드로 공유 (1673beta#46), (1673beta#49) - 갤러리를 QR 코드로 공유 (1673beta#51) - 페이지를 QR 코드로 공유 (1673beta#53)
- Loading branch information
Showing
14 changed files
with
175 additions
and
2 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
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
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
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 |
---|---|---|
@@ -0,0 +1,88 @@ | ||
<template> | ||
<MkModal ref="modal" :zPriority="'middle'" @closed="$emit('closed')"> | ||
<div :class="$style.root"> | ||
<div :class="$style.title"> | ||
<QRCodeVue3 | ||
:value="qrCode" | ||
:qrOptions="{ errorCorrectionLevel: 'Q' }" | ||
:cornersSquareOptions="{ type: 'square' }" | ||
:cornersDotOptions="{ type: 'square' }" | ||
:dotsOptions="{ | ||
type: 'square', | ||
}" | ||
/> | ||
</div> | ||
<div class="_flexList" style="gap: 0.6rem"> | ||
<MkButton :class="$style.gotIt" primary full @click="gotIt()">{{ i18n.ts.gotIt }}</MkButton> | ||
<MkButton :class="$style.copyLink" full @click="copyLink()">{{ i18n.ts.copyLink }}</MkButton> | ||
</div> | ||
</div> | ||
</MkModal> | ||
</template> | ||
|
||
<script lang="ts" setup> | ||
import { shallowRef } from 'vue'; | ||
import QRCodeVue3 from 'qrcode-vue3'; | ||
import MkModal from '@/components/MkModal.vue'; | ||
import MkButton from '@/components/MkButton.vue'; | ||
import { i18n } from '@/i18n.js'; | ||
import * as os from '@/os.js'; | ||
import { copyToClipboard } from '@/scripts/copy-to-clipboard.js'; | ||
const props = defineProps<{ | ||
qrCode: string; | ||
}>(); | ||
const modal = shallowRef<InstanceType<typeof MkModal>>(); | ||
const gotIt = () => { | ||
modal.value?.close(); | ||
}; | ||
const copyLink = () => { | ||
copyToClipboard(props.qrCode); | ||
os.toast(i18n.ts.copiedContent, 'copied'); | ||
}; | ||
</script> | ||
|
||
<style lang="scss" module> | ||
.root { | ||
margin: auto; | ||
position: relative; | ||
padding: 32px; | ||
min-width: 320px; | ||
max-width: 480px; | ||
box-sizing: border-box; | ||
text-align: center; | ||
background: var(--panel); | ||
border-radius: var(--radius); | ||
} | ||
.title { | ||
font-weight: bold; | ||
> div { | ||
> div { | ||
> img { | ||
max-width: 60%; | ||
} | ||
} | ||
} | ||
> p { | ||
margin: 0; | ||
} | ||
} | ||
.time { | ||
font-size: 0.8rem; | ||
} | ||
.gotIt { | ||
margin: 8px 0 0 0; | ||
} | ||
.copyLink { | ||
margin: 8px 0 0 0; | ||
} | ||
</style> |
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
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
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.