Commit Graph
11 Commits
Author SHA1 Message Date
Ilya Kreymer 6ee91ad4d7 Fix s3:// resolving, don't use origin for non-standard URLs, fixes #432 (#434) 2025-06-14 15:06:12 -04:00
Ilya Kreymer af7dc7a6c3 Electron app loading improvements + Windows paths fix (#429)
- Electron no longer allows Windows paths in URLs
(https://www.electronjs.org/docs/latest/breaking-changes#behavior-changed-custom-protocol-url-handling-on-windows),
fixes with help of wabac.js to replace `C:\path\to\file` with
`C//path/to/file`
- Electron app cleanup: replace deprecated protocol handlers with new
protocol.handle() method, update types
- Electron app: ensure just filename is displayed on index page,
consistent with other platforms
- Update to wabac.js 2.23.2
- Update to Electron 36.3.2
- Fixes #427
- bump to 2.3.12
2025-05-30 13:15:54 -07:00
Ilya Kreymerandemma 592ccc5253 Add 'utils' module export (#410)
Export core utils and assets used by RWP in /utils.
Add serviceWorkerActivated() utility promise.

---------

Co-authored-by: emma <hi@emma.cafe>
2025-03-12 21:55:29 -07:00
94cbf5e43d fix: Loading indicator fixes (#398)
Resolves https://github.com/webrecorder/replayweb.page/issues/397

## Changes

- Uses animated logo when loading
- Show non-animated logo for error and other states where user action is required.
- Only shows progress bar if progress is >0
- Fixes WARC progress bar percentage lagging behind displayed "Loaded"
values
- Fixes "Cancel" not redirecting back to initial view
- Removes extra spacing from logo image file

---------

Co-authored-by: Henry Wilkinson <henry@wilkinson.graphics>
Co-authored-by: Ilya Kreymer <ikreymer@gmail.com>
2025-02-11 23:17:01 -08:00
Ilya KreymerandHenry Wilkinson 858f9d61bb Convert URL encoded images to inline SVGs with fa-icon (#303)
Avoid data: URL loading and just inject SVG inline directly for logo, receipt and loader
Additional favicon path fixes

---------
Co-authored-by: Henry Wilkinson <henry@wilkinson.graphics>
2024-04-09 15:00:08 -07:00
Henry WilkinsonandIlya Kreymer cbe98c4fa1 Reasonably Scoped Branding Update (#299)
- Adds TsconfigPathsPlugin
- Custom icons, branding assets, and favicons now all live under
`/src/assets` in organized folders (Mirrors Browsertrix folder
organization and naming)
- Assets can now be referenced with `import: varName from
~assets/assetpath` app wide!
- SVGs continue to use `svg-inline-loader`, favicons are copied to
`/site/favicons` on app build
- Adds favicons to the main `index.html` page for ReplayWeb.page and
`embed.html` example page
- Replace README header with new branding
  - Lives under /assets because it's not app related
- Adds new webmanifest app icons
- Adds new Electron app .icns (macOS ) and .png (Windows & Linux) app
icons
- Replaces globe icon in the embed receipt with ReplayWebpage icon!
  - Adds lockup to the footer section
- Removes logo animation
- Removes logo values from `renderErrorReport()` in swmanager.ts in
favour of additional import statements

---------
Co-authored-by: Ilya Kreymer <ikreymer@gmail.com>
2024-04-08 18:47:17 -07:00
Emma Segal-Grossman 5c7b914e69 Typescript config parity with Browsertrix repo (#289)
Follow-up from #288 

This matches the strictness rules with the Browsertrix repo,
specifically `noImplicitAny`, and then adds `// @ts-expect-error`s to
suppress existing errors this change raises. This'll help us keep code
quality high moving forward.

Going to just directly merge this once it passes CI; as with #288, this
doesn't change any code, just comments.
2024-03-07 21:12:26 -05:00
Emma Segal-Grossman 40d84f3383 ESLint parity with the Browsertrix repo (#288)
This copies the rules from the Browsertrix repo, and uses
[`suppress-eslint-errors`](https://www.npmjs.com/package/suppress-eslint-errors)
to suppose the violations. I'll take a pass at cleaning this up at some
point in the future, and let's do our best to address these in the
future as we come across them :)

This'll help ensure new code being added to this repo is held to the
same standard as code in Browsertrix's frontend.
2024-03-07 20:12:50 -05:00
Emma Segal-Grossman a63390f10c Update NPM packaging, linting, and a bunch of types (#275)
Preparation for
https://github.com/webrecorder/archiveweb.page/issues/198 /
https://github.com/webrecorder/archiveweb.page/pull/199.

## Changes

- Organizes published files more cleanly, using `dist/types` folder as
the target for type declarations and sourcemaps
- Configures type field in `package.json`
- Updates ESLint & its config
  - Sets up type-informed linting rules mirroring browsertrix
- Adds a bunch of other useful eslint and eslint-typescript rules, and
applies auto-fixes to the codebase
- Cleans up a bunch of types throughout the codebase, particularly parts
of the code used by ArchiveWebPage
- Changes `ItemIndex#_deleting` from `private` to `protected` so that a
part of AWP that extends it can do so properly
- Makes a bunch of previously-implied [non-null
assertions](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#non-null-assertion-operator-postfix-)
explicit
- Updates `URLResource` and `ItemType` types (and renames `Item` →
`ItemType` to disambiguate from the `Item` class)
- Removes `node-sass` and replaces it with `sass-embedded` for much
quicker installs and compilation
2024-02-06 18:50:12 -08:00
Emma Segal-Grossman a40471128f Fix missed rename, and improve types (#276)
Fixes a missed rename, in `src/item-index.ts`: I'd renamed `coll` to
`item` but missed updating it in the `update` method's
`changedProperties` map.

This PR fixes that, and adds better typing to all of the instances of
`changedProperties` by using
[`PropertyValues<this>`](https://lit.dev/docs/components/lifecycle/#typescript-types-for-changedproperties),
and implementing class properties for missing Lit properties.
2024-01-05 18:32:22 -08:00
Emma Segal-Grossman ad38694598 Typescript migration part 2 (#261)
Converts everything to typescript, adding `@ts-expect-error`s where
necessary. Also makes some progress converting elements to use
decorators, but we're not fully there yet — I think it'll make sense to
continue to do that in future PRs, rather than doing it all in one go,
just so that we can keep up with the dev branch.
2023-11-29 15:53:48 -05:00