mirror of
https://github.com/Sped0n/bridget.git
synced 2026-04-14 10:09:31 -07:00
* refactor: change hires loader function name * feat: add loading transition animation and improve performance * refactor: refactor gallery creation and update functions * feat: update dependencies, configuration, and input file for solidjs - Update dependencies in package.json - Modify the input file in rollup.config.mjs - Update tsconfig.json with new configuration options * feat: update ESLint config for TypeScript and Solid integration - Add `plugin:solid/typescript` to the ESLint config - Add `prettier`, `@typescript-eslint`, and `solid` plugins to the ESLint config - Remove the `overrides` and `plugins` properties from the ESLint config - Modify the `memberSyntaxSortOrder` property in the ESLint config * feat: update build scripts and configuration for Vite * GitButler Integration Commit This is an integration commit for the virtual branches that GitButler is tracking. Due to GitButler managing multiple virtual branches, you cannot switch back and forth between git branches and virtual branches easily. If you switch to another branch, GitButler will need to be reinitialized. If you commit on this branch, GitButler will throw it away. Here are the branches that are currently applied: - solid (refs/gitbutler/solid) branch head:dc6860991c- .eslintrc.json - assets/ts/main.tsx - assets/ts/desktop/stage.tsx - static/bundled/js/main.js - rollup.config.mjs - pnpm-lock.yaml - vite.config.ts - package.json - tsconfig.json - assets/ts/globalState.ts - assets/ts/mobile/collection.ts - assets/ts/container.ts - assets/ts/mobile/init.ts - assets/ts/mobile/gallery.ts - assets/ts/desktop/customCursor.ts - assets/ts/mobile/state.ts - assets/ts/globalUtils.ts - static/bundled/js/zXhbFx.js - static/bundled/js/EY5BO_.js - static/bundled/js/bBHMTk.js - assets/ts/nav.tsx - assets/ts/utils.ts - assets/ts/desktop/stageNav.ts - assets/ts/mobile/utils.ts - assets/ts/main.ts - assets/ts/desktop/state.ts - assets/ts/desktop/init.ts - assets/ts/state.tsx - assets/ts/desktop/utils.ts - assets/ts/nav.ts - assets/ts/resources.ts - assets/ts/desktop/stage.ts - static/bundled/js/GAHquF.js Your previous branch was: refs/heads/solid The sha for that commit was:dc6860991cFor more information about what we're doing here, check out our docs: https://docs.gitbutler.com/features/virtual-branches/integration-branch * refactor: remove .hide class from _base.scss file * feat: migrate to Solid.js * refactor: change i18n loading text with trailing dots * fix: fix broken pnpm lock file * chore: update eslint configuration for better code organization - Update the eslint plugins array by removing newlines and maintaining plugins order - Disable the rule "@typescript-eslint/non-nullable-type-assertion-style" - Change the configuration of "sort-imports" rule * feat: add tiny-invariant and eslint-plugin-solid to deps * refactor: fix multiple eslint warnings --------- Co-authored-by: GitButler <gitbutler@gitbutler.com>
51 lines
1.1 KiB
TypeScript
51 lines
1.1 KiB
TypeScript
import { createSignal, type JSX, type Setter } from 'solid-js'
|
|
|
|
import type { ImageJSON } from '../resources'
|
|
|
|
import { Collection } from './collection'
|
|
import { Gallery } from './gallery'
|
|
|
|
/**
|
|
* interfaces
|
|
*/
|
|
|
|
export interface MobileImage extends HTMLImageElement {
|
|
dataset: {
|
|
src: string
|
|
index: string
|
|
}
|
|
}
|
|
|
|
export default function Mobile(props: {
|
|
children?: JSX.Element
|
|
ijs: ImageJSON[]
|
|
closeText: string
|
|
loadingText: string
|
|
setScrollable: Setter<boolean>
|
|
}): JSX.Element {
|
|
// states
|
|
const [isOpen, setIsOpen] = createSignal(false)
|
|
const [isAnimating, setIsAnimating] = createSignal(false)
|
|
|
|
return (
|
|
<>
|
|
<Collection
|
|
ijs={props.ijs}
|
|
isAnimating={isAnimating}
|
|
isOpen={isOpen}
|
|
setIsOpen={setIsOpen}
|
|
/>
|
|
<Gallery
|
|
ijs={props.ijs}
|
|
closeText={props.closeText}
|
|
loadingText={props.loadingText}
|
|
isAnimating={isAnimating}
|
|
setIsAnimating={setIsAnimating}
|
|
isOpen={isOpen}
|
|
setIsOpen={setIsOpen}
|
|
setScrollable={props.setScrollable}
|
|
/>
|
|
</>
|
|
)
|
|
}
|