@saooti/octopus-sdk 33.0.3 → 33.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -0
- package/package.json +2 -2
- package/public/img/403.webp +0 -0
- package/public/img/ACPM.webp +0 -0
- package/public/img/emptypodcast.webp +0 -0
- package/public/img/logo_education.webp +0 -0
- package/src/components/display/comments/AddCommentModal.vue +28 -23
- package/src/components/display/organisation/OrganisationChooser.vue +1 -1
- package/src/components/misc/Footer.vue +1 -1
- package/src/components/misc/TopBar.vue +1 -1
- package/src/components/misc/player/PlayerCompact.vue +2 -2
- package/src/components/pages/Error403Page.vue +1 -1
- package/src/main.ts +0 -2
- package/src/store/paramStore.ts +5 -5
- package/public/img/403.jpeg +0 -0
- package/public/img/ACPM.png +0 -0
- package/public/img/emptypodcast.png +0 -0
- package/public/img/logo_education.png +0 -0
package/README.md
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@saooti/octopus-sdk",
|
|
3
|
-
"version": "33.0.
|
|
3
|
+
"version": "33.0.5",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Javascript SDK for using octopus",
|
|
6
6
|
"author": "Saooti",
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"vue": "^3.2.37",
|
|
38
38
|
"vue-i18n": "^9.2.0-beta.40",
|
|
39
39
|
"vue-multiselect": "^3.0.0-alpha.2",
|
|
40
|
-
"vue-recaptcha
|
|
40
|
+
"vue-recaptcha": "^2.0.3",
|
|
41
41
|
"vue-router": "^4.1.2",
|
|
42
42
|
"vue3-lazyload": "^0.2.5-beta",
|
|
43
43
|
"vue3-swatches": "^1.0.10",
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -45,11 +45,20 @@
|
|
|
45
45
|
>
|
|
46
46
|
{{ $t('Close') }}
|
|
47
47
|
</button>
|
|
48
|
+
<vue-recaptcha
|
|
49
|
+
ref="invisibleRecaptcha"
|
|
50
|
+
:load-recaptcha-script="true"
|
|
51
|
+
@verify="handleSuccess"
|
|
52
|
+
@expired="handleError"
|
|
53
|
+
size="invisible"
|
|
54
|
+
sitekey="6LfyP_4ZAAAAAPODj8nov2LvosIwcX0GYeBSungh"
|
|
55
|
+
>
|
|
56
|
+
</vue-recaptcha>
|
|
48
57
|
<button
|
|
49
58
|
v-if="!sending"
|
|
50
59
|
class="btn btn-primary m-1"
|
|
51
60
|
:disabled="0 === countName || !validName"
|
|
52
|
-
@click="
|
|
61
|
+
@click="submit"
|
|
53
62
|
>
|
|
54
63
|
{{ $t('Validate') }}
|
|
55
64
|
</button>
|
|
@@ -63,9 +72,13 @@
|
|
|
63
72
|
import Constants from '../../../../public/config';
|
|
64
73
|
import { state } from '../../../store/paramStore';
|
|
65
74
|
import api from '@/api/initialize';
|
|
66
|
-
import {
|
|
75
|
+
import { VueRecaptcha } from 'vue-recaptcha';
|
|
76
|
+
import { defineComponent } from 'vue';
|
|
67
77
|
export default defineComponent({
|
|
68
78
|
name: 'AddCommentModal',
|
|
79
|
+
components:{
|
|
80
|
+
VueRecaptcha
|
|
81
|
+
},
|
|
69
82
|
|
|
70
83
|
props: {},
|
|
71
84
|
emits: ['close','validate'],
|
|
@@ -74,8 +87,8 @@ export default defineComponent({
|
|
|
74
87
|
return {
|
|
75
88
|
name: '' as string,
|
|
76
89
|
sending: false as boolean,
|
|
77
|
-
needVerify: true as boolean,
|
|
78
90
|
sendError: false as boolean,
|
|
91
|
+
isVerify: false as boolean,
|
|
79
92
|
maxName : Constants.MAX_COMMENT_NAME as number
|
|
80
93
|
};
|
|
81
94
|
},
|
|
@@ -97,34 +110,26 @@ export default defineComponent({
|
|
|
97
110
|
},
|
|
98
111
|
},
|
|
99
112
|
|
|
100
|
-
|
|
101
|
-
this.displayCaptcha('block');
|
|
113
|
+
created() {
|
|
102
114
|
this.initAuthenticatedName();
|
|
103
115
|
},
|
|
104
|
-
unmounted() {
|
|
105
|
-
this.displayCaptcha('none');
|
|
106
|
-
},
|
|
107
116
|
methods: {
|
|
108
117
|
initAuthenticatedName():void{
|
|
109
118
|
if (!state.generalParameters.authenticated) { return; }
|
|
110
119
|
this.name = (`${this.$store.state.profile.firstname||''} ${this.$store.state.profile.lastname||''}`).trim();
|
|
111
|
-
this.
|
|
120
|
+
this.isVerify = true;
|
|
121
|
+
},
|
|
122
|
+
async handleSuccess(token: string) {
|
|
123
|
+
this.isVerify = await api.checkToken(token);
|
|
124
|
+
this.sendComment();
|
|
112
125
|
},
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
(captcha as HTMLElement).style.display = displayStyle;
|
|
126
|
+
handleError() {
|
|
127
|
+
this.isVerify = false;
|
|
128
|
+
this.sendError = true;
|
|
117
129
|
},
|
|
118
|
-
async
|
|
119
|
-
if (this.
|
|
120
|
-
|
|
121
|
-
await this.$recaptchaLoaded()
|
|
122
|
-
const token = await this.$recaptcha('login');
|
|
123
|
-
this.sendError = !await api.checkToken(token);
|
|
124
|
-
} catch {
|
|
125
|
-
this.sendError = true;
|
|
126
|
-
}
|
|
127
|
-
if(this.sendError){return;}
|
|
130
|
+
async submit(): Promise<void> {
|
|
131
|
+
if (!this.isVerify && !this.isCaptchaTest) {
|
|
132
|
+
return (this.$refs.invisibleRecaptcha as InstanceType<typeof VueRecaptcha>).execute();
|
|
128
133
|
}
|
|
129
134
|
this.sendComment();
|
|
130
135
|
},
|
|
@@ -119,7 +119,7 @@ import { Organisation } from '@/store/class/general/organisation';
|
|
|
119
119
|
|
|
120
120
|
const ELEMENTS_COUNT = 50;
|
|
121
121
|
const DEFAULT_ORGANISATION_ID = "";
|
|
122
|
-
const DEFAULT_ORGANISATION_IMAGE = '/img/emptypodcast.
|
|
122
|
+
const DEFAULT_ORGANISATION_IMAGE = '/img/emptypodcast.webp';
|
|
123
123
|
|
|
124
124
|
const getDefaultOrganistion = (defaultName: string) => {
|
|
125
125
|
if(''===defaultName){
|
|
@@ -117,7 +117,7 @@ export default defineComponent({
|
|
|
117
117
|
return undefined;
|
|
118
118
|
},
|
|
119
119
|
logoUrl(): string {
|
|
120
|
-
return this.isEducation ?'/img/logo_education.
|
|
120
|
+
return this.isEducation ?'/img/logo_education.webp': '/img/logo_octopus_final.svg';
|
|
121
121
|
},
|
|
122
122
|
isPodcastmaker(): boolean {
|
|
123
123
|
return (state.generalParameters.podcastmaker as boolean);
|
|
@@ -60,12 +60,12 @@
|
|
|
60
60
|
</div>
|
|
61
61
|
<button
|
|
62
62
|
:title="$t('Enlarge')"
|
|
63
|
-
class="btn play-button-box
|
|
63
|
+
class="btn play-button-box saooti-up"
|
|
64
64
|
@click="changePlayerLargeVersion"
|
|
65
65
|
/>
|
|
66
66
|
<button
|
|
67
67
|
:title="$t('Close')"
|
|
68
|
-
class="btn play-button-box
|
|
68
|
+
class="btn play-button-box saooti-remove"
|
|
69
69
|
@click="stopPlayer"
|
|
70
70
|
/>
|
|
71
71
|
<PlayerTimeline
|
package/src/main.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { createApp } from 'vue';
|
|
2
|
-
import { VueReCaptcha } from 'vue-recaptcha-v3';
|
|
3
2
|
import VueLazyLoad from 'vue3-lazyload';
|
|
4
3
|
import App from './App.vue';
|
|
5
4
|
import {setupI18n} from './i18n';
|
|
@@ -57,5 +56,4 @@ createApp(App)
|
|
|
57
56
|
.use(store)
|
|
58
57
|
.use(router)
|
|
59
58
|
.use(VueLazyLoad)
|
|
60
|
-
.use(VueReCaptcha, { siteKey: '6LfyP_4ZAAAAAPODj8nov2LvosIwcX0GYeBSungh' })
|
|
61
59
|
.mount('#app');
|
package/src/store/paramStore.ts
CHANGED
|
@@ -78,15 +78,15 @@ const state:ParamStore = {
|
|
|
78
78
|
contactLink: undefined,
|
|
79
79
|
},
|
|
80
80
|
organisation: {
|
|
81
|
-
imageUrl: '/img/emptypodcast.
|
|
81
|
+
imageUrl: '/img/emptypodcast.webp',
|
|
82
82
|
name: 'Saooti',
|
|
83
83
|
userName: '',
|
|
84
84
|
},
|
|
85
85
|
octopusApi: {
|
|
86
|
-
url: '
|
|
87
|
-
commentsUrl: '
|
|
88
|
-
imageUrl:'
|
|
89
|
-
studioUrl: '
|
|
86
|
+
url: 'https://api.dev2.saooti.org/',
|
|
87
|
+
commentsUrl: 'https://comments.dev2.saooti.org/',
|
|
88
|
+
imageUrl:'https://imageproxy.dev2.saooti.org/',
|
|
89
|
+
studioUrl: 'https://studio.dev2.saooti.org/',
|
|
90
90
|
playerUrl: 'https://playerbeta.dev2.saooti.org/',
|
|
91
91
|
speechToTextUrl:'https://speech2text.dev2.saooti.org/',
|
|
92
92
|
recoUrl: 'https://reco.dev2.saooti.org/',
|
package/public/img/403.jpeg
DELETED
|
Binary file
|
package/public/img/ACPM.png
DELETED
|
Binary file
|
|
Binary file
|
|
Binary file
|