diff --git a/assets/icons/json.svg b/assets/icons/json.svg new file mode 100644 index 0000000000..93725021ac --- /dev/null +++ b/assets/icons/json.svg @@ -0,0 +1,6 @@ + diff --git a/assets/src/js/v3/shared/icons/types.ts b/assets/src/js/v3/shared/icons/types.ts index a81f07f584..becf69f9c9 100644 --- a/assets/src/js/v3/shared/icons/types.ts +++ b/assets/src/js/v3/shared/icons/types.ts @@ -191,6 +191,7 @@ export const icons = [ 'iso', 'javascript', 'jpg', + 'json', 'jsonFile', 'key', 'landscape', diff --git a/assets/src/js/v3/shared/utils/endpoints.ts b/assets/src/js/v3/shared/utils/endpoints.ts index 2833200408..26c89ae195 100644 --- a/assets/src/js/v3/shared/utils/endpoints.ts +++ b/assets/src/js/v3/shared/utils/endpoints.ts @@ -68,6 +68,8 @@ const endpoints = { GET_GOOGLE_MEET_DETAILS: 'tutor_google_meet_meeting_details', SAVE_GOOGLE_MEET: 'tutor_google_meet_new_meeting', DELETE_GOOGLE_MEET: 'tutor_google_meet_delete', + UPLOAD_GOOGLE_MEET_CREDENTIALS: 'tutor_pro_google_meet_credential_upload', + RESET_GOOGLE_MEET_CREDENTIALS: 'tutor_google_meet_reset_cred', // TOPIC GET_COURSE_CONTENTS: 'tutor_course_contents', diff --git a/classes/Icon.php b/classes/Icon.php index 7d5378d3ae..ff7526e9ba 100644 --- a/classes/Icon.php +++ b/classes/Icon.php @@ -207,6 +207,7 @@ final class Icon { const ISO = 'iso'; const JAVASCRIPT = 'javascript'; const JPG = 'jpg'; + const JSON = 'json'; const JSON_FILE = 'json-file'; const KEY = 'key'; const LANDSCAPE = 'landscape'; diff --git a/components/FileUploader.php b/components/FileUploader.php index c93620f231..3078260372 100644 --- a/components/FileUploader.php +++ b/components/FileUploader.php @@ -226,6 +226,24 @@ class FileUploader extends BaseComponent { */ protected $value = ''; + /** + * Upload icon size. + * + * @since 4.0.0 + * + * @var integer + */ + protected $upload_icon_size = 24; + + /** + * Whether to show subtitle. + * + * @since 4.0.0 + * + * @var boolean + */ + protected $show_subtitle = true; + /** * Set uploader accept attribute. * @@ -277,6 +295,33 @@ public function uploader_icon( $icon ) { return $this; } + /** + * Set whether to show subtitle. + * + * @param boolean $show_subtitle show subtitle or not. + * + * @return self + */ + public function show_subtitle( $show_subtitle = true ) { + $this->show_subtitle = $show_subtitle; + return $this; + } + + /** + * Set uploader icon size. + * + * @since 4.0.0 + * + * @param int $size Icon size. + * + * @return $this + */ + public function uploader_icon_size( $size ) { + $this->upload_icon_size = $size; + + return $this; + } + /** * Set uploader title. * @@ -562,7 +607,7 @@ class="tutor-file-uploader-wrapper"