Compare commits
4 Commits
derek/wall
...
copilot/bu
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3912732968 | ||
|
|
f240e39419 | ||
|
|
1df0116514 | ||
|
|
dc9984ab61 |
@@ -111,7 +111,7 @@
|
||||
"@vitest/coverage-v8": "^2.1.9",
|
||||
"@vitest/ui": "^2.1.9",
|
||||
"chalk": "^5.4.1",
|
||||
"chromatic": "^11.26.0",
|
||||
"chromatic": "^15.1.0",
|
||||
"cssnano": "^7.0.6",
|
||||
"cssnano-preset-advanced": "^7.0.6",
|
||||
"dotenv": "^16.4.7",
|
||||
|
||||
34
pnpm-lock.yaml
generated
34
pnpm-lock.yaml
generated
@@ -261,8 +261,8 @@ importers:
|
||||
specifier: ^5.4.1
|
||||
version: 5.4.1
|
||||
chromatic:
|
||||
specifier: ^11.26.0
|
||||
version: 11.26.0
|
||||
specifier: ^15.1.0
|
||||
version: 15.1.0
|
||||
cssnano:
|
||||
specifier: ^7.0.6
|
||||
version: 7.0.6(postcss@8.5.3)
|
||||
@@ -3210,8 +3210,20 @@ packages:
|
||||
resolution: {integrity: sha512-Qgzu8kfBvo+cA4962jnP1KkS6Dop5NS6g7R5LFYJr4b8Ub94PPQXUksCw9PvXoeXPRRddRNC5C1JQUR2SMGtnA==}
|
||||
engines: {node: '>= 14.16.0'}
|
||||
|
||||
chromatic@11.26.0:
|
||||
resolution: {integrity: sha512-3rRiPmdnt5sbYZTlr6Uqd11S/teafQA1Dr6mCddIz/FFKYPv/Yt26nJllixyFd9VUwrILMPTyuracUIgJ77VZA==}
|
||||
chromatic@11.29.0:
|
||||
resolution: {integrity: sha512-yisBlntp9hHVj19lIQdpTlcYIXuU9H/DbFuu6tyWHmj6hWT2EtukCCcxYXL78XdQt1vm2GfIrtgtKpj/Rzmo4A==}
|
||||
hasBin: true
|
||||
peerDependencies:
|
||||
'@chromatic-com/cypress': ^0.*.* || ^1.0.0
|
||||
'@chromatic-com/playwright': ^0.*.* || ^1.0.0
|
||||
peerDependenciesMeta:
|
||||
'@chromatic-com/cypress':
|
||||
optional: true
|
||||
'@chromatic-com/playwright':
|
||||
optional: true
|
||||
|
||||
chromatic@15.1.0:
|
||||
resolution: {integrity: sha512-XODNgiczeX5SpaWsCQLEwGpXrF2QVPb9bka7nHa8NQssyRRTt9EI8jVH8BRDUPcrQKqQqmXmxOy2Cq4IK1ydFQ==}
|
||||
hasBin: true
|
||||
peerDependencies:
|
||||
'@chromatic-com/cypress': ^0.*.* || ^1.0.0
|
||||
@@ -6201,8 +6213,8 @@ packages:
|
||||
resolution: {integrity: sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==}
|
||||
hasBin: true
|
||||
|
||||
react-confetti@6.2.3:
|
||||
resolution: {integrity: sha512-Jt6Fy3jE7FrpKxeDQ3oh36Bz6LoYt4o+vU578ghuF//NxADlcauDYvWr24S8hHKnQ90Uv01XXOngnKVBdZ73zQ==}
|
||||
react-confetti@6.4.0:
|
||||
resolution: {integrity: sha512-5MdGUcqxrTU26I2EU7ltkWPwxvucQTuqMm8dUz72z2YMqTD6s9vMcDUysk7n9jnC+lXuCPeJJ7Knf98VEYE9Rg==}
|
||||
engines: {node: '>=16'}
|
||||
peerDependencies:
|
||||
react: ^16.3.0 || ^17.0.1 || ^18.0.0 || ^19.0.0
|
||||
@@ -7660,10 +7672,10 @@ snapshots:
|
||||
|
||||
'@chromatic-com/storybook@2.0.2(react@18.3.1)':
|
||||
dependencies:
|
||||
chromatic: 11.26.0
|
||||
chromatic: 11.29.0
|
||||
filesize: 10.1.6
|
||||
jsonfile: 6.1.0
|
||||
react-confetti: 6.2.3(react@18.3.1)
|
||||
react-confetti: 6.4.0(react@18.3.1)
|
||||
strip-ansi: 7.1.0
|
||||
transitivePeerDependencies:
|
||||
- '@chromatic-com/cypress'
|
||||
@@ -10593,7 +10605,9 @@ snapshots:
|
||||
dependencies:
|
||||
readdirp: 4.1.2
|
||||
|
||||
chromatic@11.26.0: {}
|
||||
chromatic@11.29.0: {}
|
||||
|
||||
chromatic@15.1.0: {}
|
||||
|
||||
chrome-trace-event@1.0.4: {}
|
||||
|
||||
@@ -14036,7 +14050,7 @@ snapshots:
|
||||
minimist: 1.2.8
|
||||
strip-json-comments: 2.0.1
|
||||
|
||||
react-confetti@6.2.3(react@18.3.1):
|
||||
react-confetti@6.4.0(react@18.3.1):
|
||||
dependencies:
|
||||
react: 18.3.1
|
||||
tween-functions: 1.2.0
|
||||
|
||||
@@ -2,11 +2,6 @@ import type { Serialized } from '@chrome-extension-toolkit';
|
||||
|
||||
import { generateRandomId } from '../util/random';
|
||||
import { Course } from './Course';
|
||||
export interface Wallpaper {
|
||||
type: string;
|
||||
/** Image url will be here */
|
||||
data?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Represents a user's schedule that is stored in the extension
|
||||
@@ -18,8 +13,6 @@ export class UserSchedule {
|
||||
hours: number;
|
||||
/** Unix timestamp of when the schedule was last updated */
|
||||
updatedAt: number;
|
||||
/** Wallpaper for this schedule */
|
||||
wallpaper?: Wallpaper;
|
||||
|
||||
constructor(schedule: Serialized<UserSchedule>) {
|
||||
this.courses = schedule.courses.map(c => new Course(c));
|
||||
|
||||
@@ -28,31 +28,6 @@ import { LargeLogo } from '../common/LogoIcon';
|
||||
import Text from '../common/Text/Text';
|
||||
import CalendarFooter from './CalendarFooter';
|
||||
import DiningAppPromo from './DiningAppPromo';
|
||||
import { Wallpaper } from 'src/shared/types/UserSchedule';
|
||||
|
||||
function getWallpaper(wallpaper?: Wallpaper): React.CSSProperties {
|
||||
if (!wallpaper || !wallpaper.data || wallpaper.type === 'none') {
|
||||
return { backgroundColor: 'white' };
|
||||
}
|
||||
|
||||
let imageUrl: string;
|
||||
// get wallpaper image from storage, or just default to white
|
||||
|
||||
if (wallpaper.type === 'custom' && wallpaper.data) {
|
||||
imageUrl = wallpaper.data;
|
||||
} else {
|
||||
// Fallback to white background
|
||||
return { backgroundColor: 'white' };
|
||||
}
|
||||
|
||||
return {
|
||||
backgroundImage: `url(${imageUrl})`,
|
||||
backgroundSize: 'cover',
|
||||
backgroundPosition: 'center',
|
||||
backgroundRepeat: 'no-repeat',
|
||||
backgroundOrigin: 'border-box',
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Calendar page component
|
||||
@@ -121,7 +96,7 @@ export default function Calendar(): ReactNode {
|
||||
|
||||
return (
|
||||
<CalendarContext.Provider value>
|
||||
<div className='h-full w-full flex flex-col' style={getWallpaper(activeSchedule.wallpaper)}>
|
||||
<div className='h-full w-full flex flex-col'>
|
||||
<div className='screenshot:calendar-target h-screen flex overflow-auto'>
|
||||
<div
|
||||
className={clsx(
|
||||
|
||||
Reference in New Issue
Block a user