From 91b77934e181f5b82d0ec92cbe69d190f85ec804 Mon Sep 17 00:00:00 2001 From: "ug.rp" Date: Sun, 21 Apr 2024 20:33:47 +0200 Subject: [PATCH] add config.hrefMigrate and config.hrefv1 --- public/themes/classic.css | 7 ++++--- src/components/r4-app.js | 4 +++- src/pages/base-channel.js | 2 +- src/pages/r4-page-home.js | 11 +++-------- src/pages/r4-page-new.js | 9 ++++++--- src/pages/r4-page-settings.js | 2 +- src/pages/r4-page-sign.js | 6 ++---- 7 files changed, 20 insertions(+), 21 deletions(-) diff --git a/public/themes/classic.css b/public/themes/classic.css index c0ff013f..6504d077 100644 --- a/public/themes/classic.css +++ b/public/themes/classic.css @@ -50,11 +50,11 @@ r4-app { } r4-app[color-scheme='os'] { -} -r4-app[color-scheme='light'] { --c-bg: hsl(40, 6%, 90%); --c-bg2: color-mix(in oklch, var(--c-bg) 100%, white 50%); } +r4-app[color-scheme='light'] { +} r4-app[color-scheme='dark'] { --c-fg: var(--c-light); @@ -204,7 +204,8 @@ r4-track-description a { } /* search query */ -r4-query { } +r4-query { +} r4-query menu, r4-query details { padding: calc(var(--s) / 3); diff --git a/src/components/r4-app.js b/src/components/r4-app.js index afd0466e..a334d5da 100644 --- a/src/components/r4-app.js +++ b/src/components/r4-app.js @@ -68,6 +68,8 @@ export default class R4App extends LitElement { const client = this.href?.split('://')[1] return { href: this.href, + hrefV1: 'https://v1.radio4000.com', + hrefMigrate: 'https://migrate.radio4000.com', client, version: this.version, singleChannel: this.singleChannel, @@ -112,7 +114,7 @@ export default class R4App extends LitElement { const sameUser = (this.user && this.user.id) === (detail.user && detail.user.id) if ( detail.eventType === 'INITIAL_SESSION' || - detail.eventType === 'SIGNED_IN' && !sameUser || + (detail.eventType === 'SIGNED_IN' && !sameUser) || detail.eventType === 'SIGNED_OUT' ) { this.user = detail.user diff --git a/src/pages/base-channel.js b/src/pages/base-channel.js index 12670a53..7de2712a 100644 --- a/src/pages/base-channel.js +++ b/src/pages/base-channel.js @@ -102,7 +102,7 @@ export default class BaseChannel extends R4Page {

This Radio4000 channel is from version 1. If you are the channel operator, consider importing it to - version 2. + version 2.

diff --git a/src/pages/r4-page-home.js b/src/pages/r4-page-home.js index afb79430..ef3f7190 100644 --- a/src/pages/r4-page-home.js +++ b/src/pages/r4-page-home.js @@ -16,12 +16,7 @@ export default class R4PageHome extends R4Page { ${this.store.following?.length ? this.renderFollowingChannels() : null} ` } - renderIn() { - return html` -

Home

-

- ` - } + renderIn() {} renderOut() { return this.renderBetaNote() } @@ -62,11 +57,11 @@ export default class R4PageHome extends R4Page {

Welcome to the new , version 2 (v2).

All previous radio channels are still available on the - v1 website. + v1 website.

To import a radio channel from v1 to v2, see - migration. + migration.

diff --git a/src/pages/r4-page-new.js b/src/pages/r4-page-new.js index ed3cd49e..fad626bc 100644 --- a/src/pages/r4-page-new.js +++ b/src/pages/r4-page-new.js @@ -19,13 +19,16 @@ export default class R4PageNew extends R4Page { } renderHeader() { - return html` ` + return html`` } renderMain() { return html`

Do you already have a radio from the old site?

-

1. Create a new account below.
- 2. Follow the steps on migrate.radio4000 ← it'll only take a minute (about).

+

+ 1. Create a new account below.
+ 2. Follow the steps on migrate.radio4000 ← it'll + only take a minute (about). +

If you are new here, nevermind that notice and welcome!

Create radio channel

diff --git a/src/pages/r4-page-settings.js b/src/pages/r4-page-settings.js index 6717ef81..4eae3d0a 100644 --- a/src/pages/r4-page-settings.js +++ b/src/pages/r4-page-settings.js @@ -81,7 +81,7 @@ export default class R4PageSettings extends R4Page { ` diff --git a/src/pages/r4-page-sign.js b/src/pages/r4-page-sign.js index 0f72ccbb..a5d9417a 100644 --- a/src/pages/r4-page-sign.js +++ b/src/pages/r4-page-sign.js @@ -14,8 +14,6 @@ export default class R4PageSign extends R4Page { showConfirmEmail: {type: Boolean, state: true}, } - migrateUrl = 'https://migrate.radio4000.com' - get showConfirm() { return this.showConfirmEmail && this.params.method === 'up' } @@ -107,8 +105,8 @@ export default class R4PageSign extends R4Page { if you already have an existing account.
  • - Sign up first, to import/migrate an existing radio (from the previous - site). + Sign up first, to import/migrate an existing radio (from the + previous site).