Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(social-source): removed instagram source #767

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 0 additions & 14 deletions blocks/ExternalSource/types.js
Original file line number Diff line number Diff line change
@@ -1,22 +1,8 @@
// @ts-check

/**
* @typedef {{
* caption?: string | null;
* created: number;
* id: string;
* public_page?: string;
* username: string;
* size?: number;
* name?: string;
* modified?: number;
* }} InstagramInfo
*/

/**
* @typedef {{
* error?: undefined;
* info?: InstagramInfo;
* alternatives?: Record<string, string>;
* is_image?: boolean | null;
* filename?: string;
Expand Down
7 changes: 7 additions & 0 deletions blocks/SourceList/SourceList.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { Block } from '../../abstract/Block.js';
import { stringToArray } from '../../utils/stringToArray.js';
import { UploadSource } from '../utils/UploadSource.js';

export class SourceList extends Block {
initCallback() {
Expand All @@ -8,8 +9,14 @@ export class SourceList extends Block {
let list = stringToArray(val);
let html = '';
list.forEach((srcName) => {
if (!Object.values(UploadSource).includes(srcName)) {
Copy link
Member

@nd0ut nd0ut Dec 16, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This one will break undocumented custom tabs :(
I think we should place all this stuff (including instagram alert message) inside blocks/SourceBtn/SourceBtn.js

console.error(`Source "${srcName}" not found in UploadSource`);
return;
}

html += /* HTML */ `<uc-source-btn type="${srcName}"></uc-source-btn>`;
});

if (this.cfg.sourceListWrap) {
this.innerHTML = html;
} else {
Expand Down
3 changes: 0 additions & 3 deletions blocks/themes/uc-basic/icons/instagram.svg

This file was deleted.

2 changes: 1 addition & 1 deletion blocks/themes/uc-basic/svg-sprite.js

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion blocks/utils/UploadSource.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ export const ExternalUploadSource = Object.freeze({
DROPBOX: 'dropbox',
GDRIVE: 'gdrive',
GPHOTOS: 'gphotos',
INSTAGRAM: 'instagram',
FLICKR: 'flickr',
VK: 'vk',
EVERNOTE: 'evernote',
Expand Down
1 change: 0 additions & 1 deletion locales/file-uploader/ar.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ export default {
'src-type-dropbox': 'Dropbox',
'src-type-gdrive': 'Google Drive',
'src-type-gphotos': 'Google Photos',
'src-type-instagram': 'Instagram',
'src-type-flickr': 'Flickr',
'src-type-vk': 'VK',
'src-type-evernote': 'Evernote',
Expand Down
1 change: 0 additions & 1 deletion locales/file-uploader/az.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ export default {
'src-type-dropbox': 'Dropbox',
'src-type-gdrive': 'Google Drive',
'src-type-gphotos': 'Google Photos',
'src-type-instagram': 'Instagram',
'src-type-flickr': 'Flickr',
'src-type-vk': 'VK',
'src-type-evernote': 'Evernote',
Expand Down
1 change: 0 additions & 1 deletion locales/file-uploader/ca.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ export default {
'src-type-dropbox': 'Dropbox',
'src-type-gdrive': 'Google Drive',
'src-type-gphotos': 'Google Photos',
'src-type-instagram': 'Instagram',
'src-type-flickr': 'Flickr',
'src-type-vk': 'VK',
'src-type-evernote': 'Evernote',
Expand Down
1 change: 0 additions & 1 deletion locales/file-uploader/cs.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ export default {
'src-type-dropbox': 'Dropbox',
'src-type-gdrive': 'Google Drive',
'src-type-gphotos': 'Google Photos',
'src-type-instagram': 'Instagram',
'src-type-flickr': 'Flickr',
'src-type-vk': 'VK',
'src-type-evernote': 'Evernote',
Expand Down
1 change: 0 additions & 1 deletion locales/file-uploader/da.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ export default {
'src-type-dropbox': 'Dropbox',
'src-type-gdrive': 'Google Drive',
'src-type-gphotos': 'Google Photos',
'src-type-instagram': 'Instagram',
'src-type-flickr': 'Flickr',
'src-type-vk': 'VK',
'src-type-evernote': 'Evernote',
Expand Down
1 change: 0 additions & 1 deletion locales/file-uploader/de.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ export default {
'src-type-dropbox': 'Dropbox',
'src-type-gdrive': 'Google Drive',
'src-type-gphotos': 'Google Photos',
'src-type-instagram': 'Instagram',
'src-type-flickr': 'Flickr',
'src-type-vk': 'VK',
'src-type-evernote': 'Evernote',
Expand Down
1 change: 0 additions & 1 deletion locales/file-uploader/el.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ export default {
'src-type-dropbox': 'Dropbox',
'src-type-gdrive': 'Google Drive',
'src-type-gphotos': 'Google Photos',
'src-type-instagram': 'Instagram',
'src-type-flickr': 'Flickr',
'src-type-vk': 'VK',
'src-type-evernote': 'Evernote',
Expand Down
1 change: 0 additions & 1 deletion locales/file-uploader/en.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ export default {
'src-type-dropbox': 'Dropbox',
'src-type-gdrive': 'Google Drive',
'src-type-gphotos': 'Google Photos',
'src-type-instagram': 'Instagram',
'src-type-flickr': 'Flickr',
'src-type-vk': 'VK',
'src-type-evernote': 'Evernote',
Expand Down
1 change: 0 additions & 1 deletion locales/file-uploader/es.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ export default {
'src-type-dropbox': 'Dropbox',
'src-type-gdrive': 'Google Drive',
'src-type-gphotos': 'Google Photos',
'src-type-instagram': 'Instagram',
'src-type-flickr': 'Flickr',
'src-type-vk': 'VK',
'src-type-evernote': 'Evernote',
Expand Down
1 change: 0 additions & 1 deletion locales/file-uploader/et.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ export default {
'src-type-dropbox': 'Dropbox',
'src-type-gdrive': 'Google Drive',
'src-type-gphotos': 'Google Photos',
'src-type-instagram': 'Instagram',
'src-type-flickr': 'Flickr',
'src-type-vk': 'VK',
'src-type-evernote': 'Evernote',
Expand Down
1 change: 0 additions & 1 deletion locales/file-uploader/fi.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ export default {
'src-type-dropbox': 'Dropbox',
'src-type-gdrive': 'Google Drive',
'src-type-gphotos': 'Google Kuvat',
'src-type-instagram': 'Instagram',
'src-type-flickr': 'Flickr',
'src-type-vk': 'VK',
'src-type-evernote': 'Evernote',
Expand Down
1 change: 0 additions & 1 deletion locales/file-uploader/fr.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ export default {
'src-type-dropbox': 'Dropbox',
'src-type-gdrive': 'Google Drive',
'src-type-gphotos': 'Google Photos',
'src-type-instagram': 'Instagram',
'src-type-flickr': 'Flickr',
'src-type-vk': 'VK',
'src-type-evernote': 'Evernote',
Expand Down
1 change: 0 additions & 1 deletion locales/file-uploader/he.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ export default {
'src-type-dropbox': 'Dropbox',
'src-type-gdrive': 'Google Drive',
'src-type-gphotos': 'Google Photos',
'src-type-instagram': 'Instagram',
'src-type-flickr': 'Flickr',
'src-type-vk': 'VK',
'src-type-evernote': 'Evernote',
Expand Down
1 change: 0 additions & 1 deletion locales/file-uploader/hy.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ export default {
'src-type-dropbox': 'Dropbox',
'src-type-gdrive': 'Google Drive',
'src-type-gphotos': 'Google Photos',
'src-type-instagram': 'Instagram',
'src-type-flickr': 'Flickr',
'src-type-vk': 'VK',
'src-type-evernote': 'Evernote',
Expand Down
1 change: 0 additions & 1 deletion locales/file-uploader/is.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ export default {
'src-type-dropbox': 'Dropbox',
'src-type-gdrive': 'Google Drive',
'src-type-gphotos': 'Google Photos',
'src-type-instagram': 'Instagram',
'src-type-flickr': 'Flickr',
'src-type-vk': 'VK',
'src-type-evernote': 'Evernote',
Expand Down
1 change: 0 additions & 1 deletion locales/file-uploader/it.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ export default {
'src-type-dropbox': 'Dropbox',
'src-type-gdrive': 'Google Drive',
'src-type-gphotos': 'Google Photos',
'src-type-instagram': 'Instagram',
'src-type-flickr': 'Flickr',
'src-type-vk': 'VK',
'src-type-evernote': 'Evernote',
Expand Down
1 change: 0 additions & 1 deletion locales/file-uploader/ja.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ export default {
'src-type-dropbox': 'Dropbox',
'src-type-gdrive': 'Google Drive',
'src-type-gphotos': 'Google Photos',
'src-type-instagram': 'Instagram',
'src-type-flickr': 'Flickr',
'src-type-vk': 'VK',
'src-type-evernote': 'Evernote',
Expand Down
1 change: 0 additions & 1 deletion locales/file-uploader/ka.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ export default {
'src-type-dropbox': 'Dropbox',
'src-type-gdrive': 'Google Drive',
'src-type-gphotos': 'Google Photos',
'src-type-instagram': 'Instagram',
'src-type-flickr': 'Flickr',
'src-type-vk': 'VK',
'src-type-evernote': 'Evernote',
Expand Down
1 change: 0 additions & 1 deletion locales/file-uploader/kk.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ export default {
'src-type-dropbox': 'Dropbox',
'src-type-gdrive': 'Google Drive',
'src-type-gphotos': 'Google Photos',
'src-type-instagram': 'Instagram',
'src-type-flickr': 'Flickr',
'src-type-vk': 'VK',
'src-type-evernote': 'Evernote',
Expand Down
1 change: 0 additions & 1 deletion locales/file-uploader/ko.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ export default {
'src-type-dropbox': 'Dropbox',
'src-type-gdrive': 'Google Drive',
'src-type-gphotos': 'Google Photos',
'src-type-instagram': 'Instagram',
'src-type-flickr': 'Flickr',
'src-type-vk': 'VK',
'src-type-evernote': 'Evernote',
Expand Down
1 change: 0 additions & 1 deletion locales/file-uploader/lv.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ export default {
'src-type-dropbox': 'Dropbox',
'src-type-gdrive': 'Google Drive',
'src-type-gphotos': 'Google Photos',
'src-type-instagram': 'Instagram',
'src-type-flickr': 'Flickr',
'src-type-vk': 'VK',
'src-type-evernote': 'Evernote',
Expand Down
1 change: 0 additions & 1 deletion locales/file-uploader/nb.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ export default {
'src-type-dropbox': 'Dropbox',
'src-type-gdrive': 'Google Drive',
'src-type-gphotos': 'Google Photos',
'src-type-instagram': 'Instagram',
'src-type-flickr': 'Flickr',
'src-type-vk': 'VK',
'src-type-evernote': 'Evernote',
Expand Down
1 change: 0 additions & 1 deletion locales/file-uploader/nl.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ export default {
'src-type-dropbox': 'Dropbox',
'src-type-gdrive': 'Google Drive',
'src-type-gphotos': 'Google Photos',
'src-type-instagram': 'Instagram',
'src-type-flickr': 'Flickr',
'src-type-vk': 'VK',
'src-type-evernote': 'Evernote',
Expand Down
1 change: 0 additions & 1 deletion locales/file-uploader/pl.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ export default {
'src-type-dropbox': 'Dropbox',
'src-type-gdrive': 'Google Drive',
'src-type-gphotos': 'Google Photos',
'src-type-instagram': 'Instagram',
'src-type-flickr': 'Flickr',
'src-type-vk': 'VK',
'src-type-evernote': 'Evernote',
Expand Down
1 change: 0 additions & 1 deletion locales/file-uploader/pt.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ export default {
'src-type-dropbox': 'Dropbox',
'src-type-gdrive': 'Google Drive',
'src-type-gphotos': 'Google Photos',
'src-type-instagram': 'Instagram',
'src-type-flickr': 'Flickr',
'src-type-vk': 'VK',
'src-type-evernote': 'Evernote',
Expand Down
1 change: 0 additions & 1 deletion locales/file-uploader/ro.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ export default {
'src-type-dropbox': 'Dropbox',
'src-type-gdrive': 'Google Drive',
'src-type-gphotos': 'Google Photos',
'src-type-instagram': 'Instagram',
'src-type-flickr': 'Flickr',
'src-type-vk': 'VK',
'src-type-evernote': 'Evernote',
Expand Down
1 change: 0 additions & 1 deletion locales/file-uploader/ru.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ export default {
'src-type-dropbox': 'Dropbox',
'src-type-gdrive': 'Google Drive',
'src-type-gphotos': 'Google Photos',
'src-type-instagram': 'Instagram',
'src-type-flickr': 'Flickr',
'src-type-vk': 'ВКонтакте',
'src-type-evernote': 'Evernote',
Expand Down
1 change: 0 additions & 1 deletion locales/file-uploader/sk.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ export default {
'src-type-dropbox': 'Dropbox',
'src-type-gdrive': 'Google Drive',
'src-type-gphotos': 'Google Photos',
'src-type-instagram': 'Instagram',
'src-type-flickr': 'Flickr',
'src-type-vk': 'VK',
'src-type-evernote': 'Evernote',
Expand Down
1 change: 0 additions & 1 deletion locales/file-uploader/sr.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ export default {
'src-type-dropbox': 'Dropbox',
'src-type-gdrive': 'Google Drive',
'src-type-gphotos': 'Google Photos',
'src-type-instagram': 'Instagram',
'src-type-flickr': 'Flickr',
'src-type-vk': 'VK',
'src-type-evernote': 'Evernote',
Expand Down
1 change: 0 additions & 1 deletion locales/file-uploader/sv.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ export default {
'src-type-dropbox': 'Dropbox',
'src-type-gdrive': 'Google Drive',
'src-type-gphotos': 'Google Photos',
'src-type-instagram': 'Instagram',
'src-type-flickr': 'Flickr',
'src-type-vk': 'VK',
'src-type-evernote': 'Evernote',
Expand Down
1 change: 0 additions & 1 deletion locales/file-uploader/tr.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ export default {
'src-type-dropbox': 'Dropbox',
'src-type-gdrive': 'Google Drive',
'src-type-gphotos': 'Google Photos',
'src-type-instagram': 'Instagram',
'src-type-flickr': 'Flickr',
'src-type-vk': 'VK',
'src-type-evernote': 'Evernote',
Expand Down
1 change: 0 additions & 1 deletion locales/file-uploader/uk.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ export default {
'src-type-dropbox': 'Dropbox',
'src-type-gdrive': 'Google Drive',
'src-type-gphotos': 'Google Photos',
'src-type-instagram': 'Instagram',
'src-type-flickr': 'Flickr',
'src-type-vk': 'VK',
'src-type-evernote': 'Evernote',
Expand Down
1 change: 0 additions & 1 deletion locales/file-uploader/vi.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ export default {
'src-type-dropbox': 'Dropbox',
'src-type-gdrive': 'Google Drive',
'src-type-gphotos': 'Google Photos',
'src-type-instagram': 'Instagram',
'src-type-flickr': 'Flickr',
'src-type-vk': 'VK',
'src-type-evernote': 'Evernote',
Expand Down
1 change: 0 additions & 1 deletion locales/file-uploader/zh-TW.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ export default {
'src-type-dropbox': 'Dropbox',
'src-type-gdrive': 'Google Drive',
'src-type-gphotos': 'Google Photos',
'src-type-instagram': 'Instagram',
'src-type-flickr': 'Flickr',
'src-type-vk': 'VK',
'src-type-evernote': 'Evernote',
Expand Down
1 change: 0 additions & 1 deletion locales/file-uploader/zh.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ export default {
'src-type-dropbox': 'Dropbox',
'src-type-gdrive': 'Google Drive',
'src-type-gphotos': 'Google Photos',
'src-type-instagram': 'Instagram',
'src-type-flickr': 'Flickr',
'src-type-vk': 'VK',
'src-type-evernote': 'Evernote',
Expand Down
Loading