Skip to content

Commit

Permalink
Merge pull request #11381 from kodadot/beta
Browse files Browse the repository at this point in the history
(prod): 83% of January 2025 Ice Apple 🧊🍏
  • Loading branch information
vikiival authored Jan 26, 2025
2 parents 9d0e6b7 + 2e6f964 commit f61fad0
Show file tree
Hide file tree
Showing 131 changed files with 1,977 additions and 2,619 deletions.
2 changes: 1 addition & 1 deletion .github/diagram.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 0 additions & 5 deletions assets/styles/abstracts/_variables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -155,11 +155,6 @@ $placeholder-color: #cccccc;
$search-background-color: #1a1718;
$select-border-color: #7d7d7d;

$frosted-glass-background: rgba(12, 12, 12, 0.7);
$frosted-glass-background-dark: #b0b0b0ad;
$frosted-glass-backdrop-filter: blur(20px);
$frosted-glass-light-backdrop-filter: blur(4px);

$sleek-primary-border: 1px solid $primary;

$table-sticky-header-height: 60vh;
Expand Down
13 changes: 2 additions & 11 deletions assets/styles/global.scss
Original file line number Diff line number Diff line change
Expand Up @@ -175,17 +175,8 @@ hr {
}

// global table css

.table {
@apply bg-background-color text-text-color;

&.is-hoverable tbody tr:not(.is-selected):hover {
@apply bg-background-color;
}

th {
@apply text-text-color bg-background-color;
}
table th {
@apply text-text-color #{!important};
}

.fluid-padding-left {
Expand Down
70 changes: 0 additions & 70 deletions components/MessageNotify.vue

This file was deleted.

2 changes: 1 addition & 1 deletion components/TheFooter.vue
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ const menuKodadot: Menu[] = [
{
name: $i18n.t('press kit'),
url: 'https://github.com/kodadot/kodadot-presskit/tree/main/pre-v4',
url: 'https://github.com/kodadot/kodadot-presskit/tree/main/v4',
external: true,
},
{
Expand Down
4 changes: 2 additions & 2 deletions components/base/BaseTokenForm.vue
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,9 @@
<script setup lang="ts">
import { NeoField } from '@kodadot1/brick'
import { useVModel } from '@vueuse/core'
import { MediaType } from '../rmrk/types'
import { resolveMedia } from '../rmrk/utils'
import type { BaseMintedCollection as MintedCollection } from './types'
import { resolveMedia, MediaType } from '@/utils/gallery/media'
import Auth from '@/components/shared/Auth.vue'
import MetadataUpload from '@/components/shared/DropUpload.vue'
import BasicInput from '@/components/shared/form/BasicInput.vue'
Expand Down
3 changes: 1 addition & 2 deletions components/base/MediaItem.vue
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,7 @@ import {
NeoVideoMedia,
} from '@kodadot1/brick'
import AudioMedia from '@/components/shared/AudioMedia.vue'
import { getMimeType, resolveMedia } from '@/utils/gallery/media'
import { MediaType } from '@/components/rmrk/types'
import { getMimeType, resolveMedia, MediaType } from '@/utils/gallery/media'
const props = withDefaults(
defineProps<{
Expand Down
7 changes: 0 additions & 7 deletions components/bsx/Create/utils.ts

This file was deleted.

48 changes: 0 additions & 48 deletions components/bsx/Offer/types.ts

This file was deleted.

25 changes: 0 additions & 25 deletions components/bsx/format/TokenMoney.vue

This file was deleted.

41 changes: 0 additions & 41 deletions components/bsx/input/TokenBalanceInput.vue

This file was deleted.

8 changes: 2 additions & 6 deletions components/codeChecker/massPreview/Canvas.vue
Original file line number Diff line number Diff line change
Expand Up @@ -66,12 +66,8 @@ const generateMassPreview = () => {
}))
}
useEventListener(window, 'message', async (res) => {
const hash = res.data.payload.hash
if (
res.data?.type === 'kodahash/render/completed'
&& canvasPreviews.value.map(p => p.hash).includes(hash)
) {
onKodahashRenderCompleted(({ payload: { hash } }) => {
if (canvasPreviews.value.map(p => p.hash).includes(hash)) {
canvasPreviews.value = canvasPreviews.value.map(preview =>
preview.hash === hash
? { ...preview, renderedAt: performance.now(), loading: false }
Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
import type { ZipEntry } from 'unzipit'
import { unzip } from 'unzipit'
import { blake2AsHex } from '@polkadot/util-crypto'
import config from './codechecker.config'
import type { AssetMessage } from './types'
import config from '../codechecker.config'
import type { AssetMessage } from '../types'
import { hasFileProcessing, processFile } from './processing'

type FileEntry = { path: string, content: string }

const cleanFileName = (path) => {
const cleanFileName = (path): string => {
const parts = path.split('/')
return parts[parts.length - 1] // Returns only the file name
}

const createBlobUrlForEntry = async (entry, mimeType) => {
const createBlobUrlForEntry = async (entry: ZipEntry, mimeType: string) => {
const blob = await entry.blob()
const typedBlob = new Blob([blob], { type: mimeType })
return URL.createObjectURL(typedBlob)
Expand Down Expand Up @@ -39,8 +40,7 @@ const extractAssetAttributes = (
// process and add a single asset to the assets array
const processAsset = async (element, entries, assets) => {
const attributes = extractAssetAttributes(element)
const assetType
= element.tagName.toLowerCase() === 'script' ? 'script' : 'style'
const assetType = element.tagName.toLowerCase() === 'script' ? 'script' : 'style'

const asset: AssetMessage = {
type: assetType,
Expand All @@ -55,15 +55,28 @@ const processAsset = async (element, entries, assets) => {
}

const cleanName = cleanFileName(attributes.srcOrHref)
const matchingEntryKey = Object.keys(entries).find(key =>
key.endsWith(cleanName),
)
const matchingEntryKey = Object
.keys(entries)
.find(key => key.endsWith(cleanName))

if (matchingEntryKey) {
const blobUrl = await createBlobUrlForEntry(
entries[matchingEntryKey],
attributes.mimeType,
)
if (!matchingEntryKey) {
return
}

const entry = entries[matchingEntryKey] as ZipEntry

if (hasFileProcessing(cleanName)) {
const blobUrl = await processFile({
entry,
entries,
mimeType: attributes.mimeType,
fileName: cleanName,
})
asset.src = blobUrl
assets.push(asset)
}
else {
const blobUrl = await createBlobUrlForEntry(entry, attributes.mimeType)
asset.src = blobUrl
assets.push(asset)
}
Expand Down Expand Up @@ -162,7 +175,7 @@ export const extractAssetsFromZip = async (
export const createSandboxAssets = async (
indexFile: FileEntry,
entries: { [key: string]: ZipEntry },
) => {
): Promise<Array<AssetMessage>> => {
const assets: Array<AssetMessage> = []
const htmlContent = indexFile.content
const parser = new DOMParser()
Expand All @@ -175,6 +188,7 @@ export const createSandboxAssets = async (
for (const element of assetElements) {
await processAsset(element, entries, assets)
}

return assets
}

Expand Down
Loading

0 comments on commit f61fad0

Please sign in to comment.