mirror of
https://github.com/TandoorRecipes/recipes.git
synced 2026-01-11 09:07:12 -05:00
various fixes and improvements
This commit is contained in:
@@ -30,6 +30,7 @@ export enum PreparedMessage {
|
||||
MERGE_SUCCESS = 'MERGE_SUCCESS',
|
||||
MOVE_SUCCESS = 'MOVE_SUCCESS',
|
||||
NOT_FOUND = 'NOT_FOUND',
|
||||
RATE_LIMIT = 'RATE_LIMIT',
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -155,6 +156,14 @@ export const useMessageStore = defineStore('message_store', () => {
|
||||
if (preparedMessage == PreparedMessage.NOT_FOUND) {
|
||||
addMessage(MessageType.WARNING, {title: t('NotFound'), text: t('NotFoundHelp')} as StructuredMessage, 6000, data)
|
||||
}
|
||||
|
||||
if (preparedMessage == PreparedMessage.RATE_LIMIT) {
|
||||
data.response.json().then(responseJson => {
|
||||
addMessage(MessageType.WARNING, {title: t(''), text: t('RateLimitHelp') + '\n' + responseJson.detail} as StructuredMessage, 6000, data)
|
||||
}).catch(() => {
|
||||
addMessage(MessageType.WARNING, {title: t(''), text: t('RateLimitHelp')} as StructuredMessage, 6000, data)
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user