Compare commits
1 Commits
2023.12.0
...
hotfix/mig
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6e1e459833 |
@@ -295,7 +295,6 @@
|
|||||||
"incorrect_email": "Incorrect email",
|
"incorrect_email": "Incorrect email",
|
||||||
"invalid_link": "Invalid link",
|
"invalid_link": "Invalid link",
|
||||||
"invalid_link_description": "The link you clicked is invalid or expired.",
|
"invalid_link_description": "The link you clicked is invalid or expired.",
|
||||||
"invalid_embed_link": "The embed does not exist or is invalid.",
|
|
||||||
"json_parsing_failed": "Invalid JSON",
|
"json_parsing_failed": "Invalid JSON",
|
||||||
"json_prettify_invalid_body": "Couldn't prettify an invalid body, solve json syntax errors and try again",
|
"json_prettify_invalid_body": "Couldn't prettify an invalid body, solve json syntax errors and try again",
|
||||||
"network_error": "There seems to be a network error. Please try again.",
|
"network_error": "There seems to be a network error. Please try again.",
|
||||||
|
|||||||
@@ -1,19 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="flex flex-col justify-center">
|
<div class="flex flex-col flex-1 w-full">
|
||||||
<div
|
|
||||||
v-if="invalidLink"
|
|
||||||
class="flex flex-1 flex-col items-center justify-center p-8"
|
|
||||||
>
|
|
||||||
<icon-lucide-alert-triangle class="svg-icons mb-2 opacity-75" />
|
|
||||||
<h1 class="heading text-center">
|
|
||||||
{{ t("error.invalid_link") }}
|
|
||||||
</h1>
|
|
||||||
<p class="mt-2 text-center">
|
|
||||||
{{ t("error.invalid_embed_link") }}
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
<Embeds
|
<Embeds
|
||||||
v-else-if="!invalidLink && tab"
|
v-if="tab"
|
||||||
v-model:modelTab="tab"
|
v-model:modelTab="tab"
|
||||||
:properties="properties"
|
:properties="properties"
|
||||||
:shared-request-i-d="sharedRequestID"
|
:shared-request-i-d="sharedRequestID"
|
||||||
@@ -40,9 +28,6 @@ import {
|
|||||||
import { HoppTab } from "~/services/tab"
|
import { HoppTab } from "~/services/tab"
|
||||||
import { HoppRESTDocument } from "~/helpers/rest/document"
|
import { HoppRESTDocument } from "~/helpers/rest/document"
|
||||||
import { applySetting } from "~/newstore/settings"
|
import { applySetting } from "~/newstore/settings"
|
||||||
import { useI18n } from "~/composables/i18n"
|
|
||||||
|
|
||||||
const t = useI18n()
|
|
||||||
|
|
||||||
const route = useRoute()
|
const route = useRoute()
|
||||||
|
|
||||||
|
|||||||
@@ -244,13 +244,9 @@ export class PersistenceService extends Service {
|
|||||||
private setupSettingsPersistence() {
|
private setupSettingsPersistence() {
|
||||||
const settingsKey = "settings"
|
const settingsKey = "settings"
|
||||||
let settingsData = JSON.parse(
|
let settingsData = JSON.parse(
|
||||||
window.localStorage.getItem(settingsKey) ?? "null"
|
window.localStorage.getItem(settingsKey) || "{}"
|
||||||
)
|
)
|
||||||
|
|
||||||
if (!settingsData) {
|
|
||||||
settingsData = getDefaultSettings()
|
|
||||||
}
|
|
||||||
|
|
||||||
// Validate data read from localStorage
|
// Validate data read from localStorage
|
||||||
const result = SETTINGS_SCHEMA.safeParse(settingsData)
|
const result = SETTINGS_SCHEMA.safeParse(settingsData)
|
||||||
if (result.success) {
|
if (result.success) {
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ const SettingsDefSchema = z.object({
|
|||||||
httpUser: z.boolean(),
|
httpUser: z.boolean(),
|
||||||
httpPassword: z.boolean(),
|
httpPassword: z.boolean(),
|
||||||
bearerToken: z.boolean(),
|
bearerToken: z.boolean(),
|
||||||
oauth2Token: z.optional(z.boolean()),
|
oauth2Token: z.boolean(),
|
||||||
}),
|
}),
|
||||||
THEME_COLOR: ThemeColorSchema,
|
THEME_COLOR: ThemeColorSchema,
|
||||||
BG_COLOR: BgColorSchema,
|
BG_COLOR: BgColorSchema,
|
||||||
@@ -103,10 +103,13 @@ export const LOCAL_STATE_SCHEMA = z.union([
|
|||||||
.strict(),
|
.strict(),
|
||||||
])
|
])
|
||||||
|
|
||||||
export const SETTINGS_SCHEMA = SettingsDefSchema.extend({
|
export const SETTINGS_SCHEMA = z.union([
|
||||||
EXTENSIONS_ENABLED: z.optional(z.boolean()),
|
z.object({}).strict(),
|
||||||
PROXY_ENABLED: z.optional(z.boolean()),
|
SettingsDefSchema.extend({
|
||||||
})
|
EXTENSIONS_ENABLED: z.optional(z.boolean()),
|
||||||
|
PROXY_ENABLED: z.optional(z.boolean()),
|
||||||
|
}),
|
||||||
|
])
|
||||||
|
|
||||||
export const REST_HISTORY_ENTRY_SCHEMA = z
|
export const REST_HISTORY_ENTRY_SCHEMA = z
|
||||||
.object({
|
.object({
|
||||||
@@ -205,7 +208,7 @@ export const MQTT_REQUEST_SCHEMA = z.nullable(
|
|||||||
z
|
z
|
||||||
.object({
|
.object({
|
||||||
endpoint: z.string(),
|
endpoint: z.string(),
|
||||||
clientID: z.optional(z.string()),
|
clientID: z.string(),
|
||||||
})
|
})
|
||||||
.strict()
|
.strict()
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user