fix api folder names
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
import { onMount } from 'svelte';
|
||||
import { _ } from 'svelte-i18n';
|
||||
import { get } from 'svelte/store';
|
||||
import type { Channel } from './Api/model';
|
||||
import type { Channel } from './api/model';
|
||||
import { cleanNumber, getBestThumbnail, proxyGoogleImage, truncate } from './misc';
|
||||
import { interfaceLowBandwidthMode } from './store';
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<script lang="ts">
|
||||
import { _ } from 'svelte-i18n';
|
||||
import { getComments } from './Api';
|
||||
import { type Comment, type Comments } from './Api/model';
|
||||
import { getComments } from './api';
|
||||
import { type Comment, type Comments } from './api/model';
|
||||
import { getBestThumbnail, numberWithCommas, proxyGoogleImage } from './misc';
|
||||
import { interfaceLowBandwidthMode } from './store';
|
||||
|
||||
|
||||
@@ -13,8 +13,8 @@
|
||||
import { get } from 'svelte/store';
|
||||
import type { FullscreenChangeEvent, MediaTimeUpdateEvent, PlayerSrc } from 'vidstack';
|
||||
import type { MediaPlayerElement } from 'vidstack/elements';
|
||||
import { deleteVideoProgress, getVideoProgress, saveVideoProgress } from './Api';
|
||||
import type { VideoPlay } from './Api/model';
|
||||
import { deleteVideoProgress, getVideoProgress, saveVideoProgress } from './api';
|
||||
import type { VideoPlay } from './api/model';
|
||||
import {
|
||||
getBestThumbnail,
|
||||
proxyVideoUrl,
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
import { onMount } from 'svelte';
|
||||
import { _ } from 'svelte-i18n';
|
||||
import { get } from 'svelte/store';
|
||||
import type { Playlist } from './Api/model';
|
||||
import type { Playlist } from './api/model';
|
||||
import { getBestThumbnail, letterCase, truncate } from './misc';
|
||||
import { interfaceLowBandwidthMode } from './store';
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
import Mousetrap from 'mousetrap';
|
||||
import { createEventDispatcher, onMount } from 'svelte';
|
||||
import { _ } from 'svelte-i18n';
|
||||
import { getSearchSuggestions } from './Api';
|
||||
import { getSearchSuggestions } from './api';
|
||||
import { interfaceSearchSuggestionsStore } from './store';
|
||||
|
||||
const dispatch = createEventDispatcher();
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
import { Clipboard } from '@capacitor/clipboard';
|
||||
import { Capacitor } from '@capacitor/core';
|
||||
import { _ } from 'svelte-i18n';
|
||||
import type { Notification, PlaylistPageVideo, Video, VideoBase } from './Api/model';
|
||||
import type { Notification, PlaylistPageVideo, Video, VideoBase } from './api/model';
|
||||
|
||||
export let video: VideoBase | Video | Notification | PlaylistPageVideo;
|
||||
</script>
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
import { createEventDispatcher, onDestroy, onMount } from 'svelte';
|
||||
import { _ } from 'svelte-i18n';
|
||||
import { get } from 'svelte/store';
|
||||
import { getChannel, getDeArrow, getThumbnail, getVideo, getVideoProgress } from './Api';
|
||||
import type { Notification, PlaylistPageVideo, Video, VideoBase, VideoPlay } from './Api/model';
|
||||
import { getChannel, getDeArrow, getThumbnail, getVideo, getVideoProgress } from './api';
|
||||
import type { Notification, PlaylistPageVideo, Video, VideoBase, VideoPlay } from './api/model';
|
||||
import {
|
||||
cleanNumber,
|
||||
getBestThumbnail,
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
import { get } from 'svelte/store';
|
||||
import type { MediaTimeUpdateEvent } from 'vidstack';
|
||||
import type { MediaPlayerElement } from 'vidstack/elements';
|
||||
import type { VideoPlay } from './Api/model';
|
||||
import type { VideoPlay } from './api/model';
|
||||
import { decodeHtmlCharCodes, videoLength } from './misc';
|
||||
import { instanceStore } from './store';
|
||||
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
<script lang="ts">
|
||||
import { _ } from 'svelte-i18n';
|
||||
import { get } from 'svelte/store';
|
||||
import { removePlaylistVideo } from './Api';
|
||||
import type { Notification, PlaylistPageVideo, Video, VideoBase } from './Api/model';
|
||||
import { removePlaylistVideo } from './api';
|
||||
import type { Notification, PlaylistPageVideo, Video, VideoBase } from './api/model';
|
||||
import ContentColumn from './ContentColumn.svelte';
|
||||
import Thumbnail from './Thumbnail.svelte';
|
||||
import { authStore } from './store';
|
||||
import Thumbnail from './Thumbnail.svelte';
|
||||
|
||||
export let videos: VideoBase[] | Video[] | Notification[] | PlaylistPageVideo[] = [];
|
||||
export let playlistId: string = '';
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
import { registerPlugin } from "@capacitor/core";
|
||||
|
||||
export interface ColorTheme {
|
||||
getColorPalette: () => Promise<{
|
||||
primary: number;
|
||||
onPrimary: number;
|
||||
secondary: number;
|
||||
accent: number;
|
||||
}>;
|
||||
}
|
||||
|
||||
export function convertToHexColorCode(color: number) {
|
||||
// Convert the negative number to a positive unsigned integer
|
||||
const unsignedColor = color < 0 ? color + 0x100000000 : color;
|
||||
|
||||
// Extract the RGB components
|
||||
const r = (unsignedColor >> 16) & 0xff;
|
||||
const g = (unsignedColor >> 8) & 0xff;
|
||||
const b = unsignedColor & 0xff;
|
||||
|
||||
// Convert to hex format and pad with zeros if necessary
|
||||
return `#${((1 << 24) + (r << 16) + (g << 8) + b).toString(16).slice(1).toUpperCase()}`;
|
||||
}
|
||||
|
||||
|
||||
const colorTheme = registerPlugin<ColorTheme>('ColorTheme');
|
||||
|
||||
export default colorTheme;
|
||||
@@ -3,8 +3,8 @@
|
||||
import { navigating } from '$app/stores';
|
||||
import '$lib/android/http/androidRequests';
|
||||
import colorTheme, { convertToHexColorCode } from '$lib/android/plugins/ColorTheme';
|
||||
import { getFeed } from '$lib/Api/index';
|
||||
import type { Notification } from '$lib/Api/model';
|
||||
import { getFeed } from '$lib/api/index';
|
||||
import type { Notification } from '$lib/api/model';
|
||||
import { bookmarkletLoadFromUrl, loadSettingsFromEnv } from '$lib/externalSettings';
|
||||
import Logo from '$lib/Logo.svelte';
|
||||
import MiniPlayer from '$lib/MiniPlayer.svelte';
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { getPopular } from '$lib/api/index.js';
|
||||
import { getPopular } from '$lib/api/index';
|
||||
import { error } from '@sveltejs/kit';
|
||||
|
||||
export async function load() {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<script lang="ts">
|
||||
import { amSubscribed, deleteUnsubscribe, getChannelContent, postSubscribe } from '$lib/Api';
|
||||
import type { ChannelContentPlaylists, ChannelContentVideos } from '$lib/Api/model';
|
||||
import { amSubscribed, deleteUnsubscribe, getChannelContent, postSubscribe } from '$lib/api';
|
||||
import type { ChannelContentPlaylists, ChannelContentVideos } from '$lib/api/model';
|
||||
import ContentColumn from '$lib/ContentColumn.svelte';
|
||||
import PageLoading from '$lib/PageLoading.svelte';
|
||||
import PlaylistThumbnail from '$lib/PlaylistThumbnail.svelte';
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { getChannel } from '$lib/api/index.js';
|
||||
import { getChannel } from '$lib/api/index';
|
||||
import { error } from '@sveltejs/kit';
|
||||
|
||||
export async function load({ params }) {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<script lang="ts">
|
||||
import { deleteAllVideoProgress, deleteHistory, getHistory, getVideo } from '$lib/Api';
|
||||
import type { VideoPlay } from '$lib/Api/model';
|
||||
import { deleteAllVideoProgress, deleteHistory, getHistory, getVideo } from '$lib/api';
|
||||
import type { VideoPlay } from '$lib/api/model';
|
||||
import PageLoading from '$lib/PageLoading.svelte';
|
||||
import VideoList from '$lib/VideoList.svelte';
|
||||
import { activePageStore, synciousStore } from '$lib/store';
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
<script lang="ts">
|
||||
import { getPlaylist } from '$lib/Api/index';
|
||||
import type { PlaylistPageVideo } from '$lib/Api/model.js';
|
||||
import VideoList from '$lib/VideoList.svelte';
|
||||
import { getPlaylist } from '$lib/api/index';
|
||||
import type { PlaylistPageVideo } from '$lib/api/model.js';
|
||||
import { cleanNumber, unsafeRandomItem } from '$lib/misc.js';
|
||||
import { activePageStore, playlistSettingsStore } from '$lib/store';
|
||||
import VideoList from '$lib/VideoList.svelte';
|
||||
import { Clipboard } from '@capacitor/clipboard';
|
||||
import { Capacitor } from '@capacitor/core';
|
||||
import { onMount } from 'svelte';
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { getPlaylist } from '$lib/api/index.js';
|
||||
import { getPlaylist } from '$lib/api/index';
|
||||
import { error } from '@sveltejs/kit';
|
||||
|
||||
export async function load({ params }) {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<script lang="ts">
|
||||
import { getFeed } from '$lib/Api/index.js';
|
||||
import VideoList from '$lib/VideoList.svelte';
|
||||
import { getFeed } from '$lib/api/index';
|
||||
import { activePageStore } from '$lib/store';
|
||||
import VideoList from '$lib/VideoList.svelte';
|
||||
import { _ } from 'svelte-i18n';
|
||||
import InfiniteLoading, { type InfiniteEvent } from 'svelte-infinite-loading';
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { getFeed } from '$lib/api/index.js';
|
||||
import { getFeed } from '$lib/api/index';
|
||||
import { error } from '@sveltejs/kit';
|
||||
|
||||
export async function load({ params }) {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { getTrending } from '$lib/api/index.js';
|
||||
import { getTrending } from '$lib/api/index.';
|
||||
import type { Video } from '$lib/api/model';
|
||||
import { error } from '@sveltejs/kit';
|
||||
|
||||
|
||||
@@ -8,8 +8,8 @@
|
||||
getPlaylist,
|
||||
postSubscribe,
|
||||
removePlaylistVideo
|
||||
} from '$lib/Api/index.js';
|
||||
import type { Comments, PlaylistPage, PlaylistPageVideo } from '$lib/Api/model.js';
|
||||
} from '$lib/api/index';
|
||||
import type { Comments, PlaylistPage, PlaylistPageVideo } from '$lib/api/model.js';
|
||||
import Comment from '$lib/Comment.svelte';
|
||||
import {
|
||||
cleanNumber,
|
||||
|
||||
@@ -5,7 +5,7 @@ import {
|
||||
getPersonalPlaylists,
|
||||
getVideo,
|
||||
postHistory
|
||||
} from '$lib/api/index.js';
|
||||
} from '$lib/api/index';
|
||||
import { phaseDescription } from '$lib/misc';
|
||||
import {
|
||||
authStore,
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { getVideo } from '$lib/api/index.js';
|
||||
import { getVideo } from '$lib/api/index';
|
||||
import { error } from '@sveltejs/kit';
|
||||
import { get } from 'svelte/store';
|
||||
import type { PhasedDescription } from '../../../../lib/misc.js';
|
||||
|
||||
Reference in New Issue
Block a user