mirror of
https://gitlab.com/PronounsPage/PronounsPage.git
synced 2025-09-24 05:05:20 -04:00
Merge remote-tracking branch 'origin/main'
This commit is contained in:
commit
571815e955
@ -8,6 +8,8 @@
|
||||
|
||||
|
||||
<script>
|
||||
import { Base64 } from 'js-base64';
|
||||
|
||||
export default {
|
||||
props: {
|
||||
pronunciation: { default: null, type: String },
|
||||
@ -15,7 +17,7 @@ export default {
|
||||
},
|
||||
computed: {
|
||||
pronunciationLink() {
|
||||
return `/api/pronounce/${this.voice}/${encodeURIComponent(this.pronunciation)}`;
|
||||
return `/api/pronounce/${this.voice}/${Base64.encodeURI(this.pronunciation)}`;
|
||||
},
|
||||
name() {
|
||||
let voices;
|
||||
|
@ -112,11 +112,9 @@
|
||||
</p>
|
||||
<OpinionListInput v-model="names" :prototype="{ value: '', opinion: 'meh', pronunciation: null }"
|
||||
:customOpinions="opinions" :maxitems="128" :maxlength="config.profile.longNames ? 255 : 32">
|
||||
<!--
|
||||
<template v-slot:additional="s">
|
||||
<PronunciationInput v-model="s.val.pronunciation"/>
|
||||
</template>
|
||||
-->
|
||||
</OpinionListInput>
|
||||
<InlineMarkdownInstructions v-model="markdown"/>
|
||||
<PropagateCheckbox field="names" :before="beforeChanges.names" :after="names" v-if="otherProfiles > 0" @change="propagateChanged"/>
|
||||
|
@ -1,6 +1,7 @@
|
||||
import { Router } from 'express';
|
||||
import sha1 from 'sha1';
|
||||
import { convertPronunciationStringToSsml, handleErrorAsync } from '../../src/helpers.js';
|
||||
import { Base64 } from 'js-base64';
|
||||
|
||||
import awsConfig from '../aws.js';
|
||||
import Polly from 'aws-sdk/clients/polly.js';
|
||||
@ -8,8 +9,8 @@ import S3 from 'aws-sdk/clients/s3.js';
|
||||
|
||||
const router = Router();
|
||||
|
||||
router.get('/pronounce/:voice/*', handleErrorAsync(async (req, res) => {
|
||||
const text = req.params[0];
|
||||
router.get('/pronounce/:voice/:pronunciation', handleErrorAsync(async (req, res) => {
|
||||
const text = Base64.decode(req.params.pronunciation);
|
||||
|
||||
if (!text || text.length > 256) {
|
||||
return res.status(404).json({error: 'Not found'});
|
||||
|
Loading…
x
Reference in New Issue
Block a user