mirror of
https://github.com/m1k1o/neko-rooms.git
synced 2026-11-02 22:51:34 -06:00
fix neko images browser policy match . #89
This commit is contained in:
@@ -571,8 +571,14 @@ export default class RoomsCreate extends Vue {
|
||||
get browserPolicyConfig() {
|
||||
const nekoImage = this.data.neko_image
|
||||
if (!nekoImage) return undefined
|
||||
|
||||
return this.$store.state.browserPolicyConfig.find(({ images }: { images: string[] }): boolean => images.includes(nekoImage))
|
||||
|
||||
return this.$store.state.browserPolicyConfig.find(
|
||||
// find browser policy config for this image
|
||||
({ images }: { images: string[] }): boolean => images.some(
|
||||
// if nekoImage includes the image name
|
||||
(image: string): boolean => nekoImage.includes(image)
|
||||
)
|
||||
)
|
||||
}
|
||||
|
||||
get browserPolicyExtensions() {
|
||||
|
||||
+13
-11
@@ -135,41 +135,43 @@ export const state = {
|
||||
//
|
||||
|
||||
browserPolicyConfig: [
|
||||
{
|
||||
type: BrowserPolicyTypeEnum.firefox,
|
||||
path: '/usr/lib/firefox/distribution/policies.json',
|
||||
profile: '/home/neko/.mozilla/firefox/profile.default',
|
||||
images: [ 'm1k1o/neko:latest', 'm1k1o/neko:firefox' ],
|
||||
},
|
||||
// firefox esr
|
||||
{
|
||||
type: BrowserPolicyTypeEnum.firefox,
|
||||
path: '/usr/lib/firefox-esr/distribution/policies.json',
|
||||
profile: '/home/neko/.mozilla/firefox/profile.default',
|
||||
images: [ 'm1k1o/neko:arm-firefox' ],
|
||||
images: [ 'arm-firefox' ],
|
||||
},
|
||||
// firefox (needs to be after firefox-esr, because it matches all remaining firefox images)
|
||||
{
|
||||
type: BrowserPolicyTypeEnum.firefox,
|
||||
path: '/usr/lib/firefox/distribution/policies.json',
|
||||
profile: '/home/neko/.mozilla/firefox/profile.default',
|
||||
images: [ 'm1k1o/neko:latest', 'firefox' ],
|
||||
},
|
||||
{
|
||||
type: BrowserPolicyTypeEnum.chromium,
|
||||
path: '/etc/chromium/policies/managed/policies.json',
|
||||
profile: '/home/neko/.config/chromium',
|
||||
images: [ 'm1k1o/neko:chromium', 'm1k1o/neko:arm-chromium', 'm1k1o/neko:ungoogled-chromium' ],
|
||||
images: [ 'chromium', 'ungoogled-chromium' ],
|
||||
},
|
||||
{
|
||||
type: BrowserPolicyTypeEnum.chromium,
|
||||
path: '/etc/opt/chrome/policies/managed/policies.json',
|
||||
profile: '/home/neko/.config/google-chrome',
|
||||
images: [ 'm1k1o/neko:google-chrome' ],
|
||||
images: [ 'google-chrome' ],
|
||||
},
|
||||
{
|
||||
type: BrowserPolicyTypeEnum.chromium,
|
||||
path: '/etc/brave/policies/managed/policies.json',
|
||||
profile: '/home/neko/.config/brave',
|
||||
images: [ 'm1k1o/neko:brave' ],
|
||||
images: [ 'brave' ],
|
||||
},
|
||||
{
|
||||
type: BrowserPolicyTypeEnum.chromium,
|
||||
path: '/etc/opt/edge/policies/managed/policies.json',
|
||||
profile: '/home/neko/.config/microsoft-edge',
|
||||
images: [ 'm1k1o/neko:microsoft-edge' ],
|
||||
images: [ 'microsoft-edge' ],
|
||||
},
|
||||
] as BrowserPolicyConfig[],
|
||||
browserPolicyExtensions: [
|
||||
|
||||
Reference in New Issue
Block a user