This repository has been archived by the owner on Aug 8, 2023. It is now read-only.
forked from RadoslavGatev/Ghost-Azure
-
Notifications
You must be signed in to change notification settings - Fork 220
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
23 changed files
with
183 additions
and
38 deletions.
There are no files selected for viewing
2 changes: 1 addition & 1 deletion
2
...dark-02482592a0da0f7a2b93de775304feec.css → ...dark-70e9a0e5a4c7df7524080ae1ef17b6fd.css
Large diffs are not rendered by default.
Oops, something went wrong.
32 changes: 16 additions & 16 deletions
32
...t.min-270bf551c4b4650fffe44d49ef7e2ed8.js → ...t.min-231fdf5b6b261a6bf2e1569b829a83d9.js
Large diffs are not rendered by default.
Oops, something went wrong.
2 changes: 1 addition & 1 deletion
2
....min-8fa2ddf6038e7c0ed9f7f840f8440501.css → ....min-4053bee034b1d887e768cdc3ed2e9cbb.css
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
core/server/api/canary/utils/serializers/input/utils/slug-filter-order.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
const slugFilterOrder = (table, filter) => { | ||
let orderMatch = filter.match(/slug:\s?\[(.*)\]/); | ||
|
||
if (orderMatch) { | ||
let orderSlugs = orderMatch[1].split(','); | ||
let order = 'CASE '; | ||
|
||
orderSlugs.forEach((slug, index) => { | ||
order += `WHEN \`${table}\`.\`slug\` = '${slug}' THEN ${index} `; | ||
}); | ||
|
||
order += 'END ASC'; | ||
|
||
return order; | ||
} | ||
}; | ||
|
||
module.exports = slugFilterOrder; |
37 changes: 37 additions & 0 deletions
37
core/server/data/migrations/versions/3.24/01-populate-group-for-new-portal-settings.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
const logging = require('../../../../../shared/logging'); | ||
|
||
// new setting keys and group mapping | ||
const groupMapping = [{ | ||
group: 'portal', | ||
keys: [ | ||
'portal_button_style', | ||
'portal_button_icon', | ||
'portal_button_signup_text' | ||
] | ||
}]; | ||
|
||
module.exports = { | ||
config: { | ||
transaction: true | ||
}, | ||
|
||
async up(options) { | ||
// set the correct group value for new settings | ||
await Promise.map(groupMapping, async (groupMap) => { | ||
return await Promise.map(groupMap.keys, async (key) => { | ||
logging.info(`Updating setting ${key} to group ${groupMap.group}`); | ||
|
||
return await options | ||
.transacting('settings') | ||
.where('key', key) | ||
.update({ | ||
group: groupMap.group | ||
}); | ||
}); | ||
}); | ||
}, | ||
|
||
// `up` is only run to update correct group value for each setting instead of default. | ||
// it doesn't make sense to be revert a setting's group to default `core` again | ||
async down() {} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.