Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion component/api/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<parent>
<artifactId>social-component</artifactId>
<groupId>io.meeds.social</groupId>
<version>7.0.x-SNAPSHOT</version>
<version>7.0.x-whitepaper-SNAPSHOT</version>
</parent>
<artifactId>social-component-api</artifactId>
<name>Meeds:: PLF:: Social API</name>
Expand Down
2 changes: 1 addition & 1 deletion component/common/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<parent>
<artifactId>social-component</artifactId>
<groupId>io.meeds.social</groupId>
<version>7.0.x-SNAPSHOT</version>
<version>7.0.x-whitepaper-SNAPSHOT</version>
</parent>
<groupId>io.meeds.social</groupId>
<artifactId>social-component-common</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion component/core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<parent>
<artifactId>social-component</artifactId>
<groupId>io.meeds.social</groupId>
<version>7.0.x-SNAPSHOT</version>
<version>7.0.x-whitepaper-SNAPSHOT</version>
</parent>
<artifactId>social-component-core</artifactId>
<name>Meeds:: PLF:: Social Core Component</name>
Expand Down
2 changes: 1 addition & 1 deletion component/notification/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<parent>
<artifactId>social-component</artifactId>
<groupId>io.meeds.social</groupId>
<version>7.0.x-SNAPSHOT</version>
<version>7.0.x-whitepaper-SNAPSHOT</version>
</parent>
<artifactId>social-component-notification</artifactId>
<name>Meeds:: PLF:: Social Notification Component</name>
Expand Down
2 changes: 1 addition & 1 deletion component/oauth-auth/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<parent>
<artifactId>social-component</artifactId>
<groupId>io.meeds.social</groupId>
<version>7.0.x-SNAPSHOT</version>
<version>7.0.x-whitepaper-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
2 changes: 1 addition & 1 deletion component/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<parent>
<artifactId>social</artifactId>
<groupId>io.meeds.social</groupId>
<version>7.0.x-SNAPSHOT</version>
<version>7.0.x-whitepaper-SNAPSHOT</version>
</parent>
<artifactId>social-component</artifactId>
<packaging>pom</packaging>
Expand Down
2 changes: 1 addition & 1 deletion component/service/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<parent>
<artifactId>social-component</artifactId>
<groupId>io.meeds.social</groupId>
<version>7.0.x-SNAPSHOT</version>
<version>7.0.x-whitepaper-SNAPSHOT</version>
</parent>
<artifactId>social-component-service</artifactId>
<name>Meeds:: PLF:: Social Service Component</name>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
/**
* This file is part of the Meeds project (https://meeds.io/).
*
* Copyright (C) 2020 - 2025 Meeds Association contact@meeds.io
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3 of the License, or (at your option) any later version.
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
package io.meeds.social.resource.rest;

import java.io.IOException;

import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.server.ResponseStatusException;

import org.exoplatform.portal.resource.SkinConfig;
import org.exoplatform.portal.resource.SkinService;
import org.exoplatform.services.resources.Orientation;

import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.responses.ApiResponse;
import io.swagger.v3.oas.annotations.responses.ApiResponses;
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.servlet.http.HttpServletResponse;

@RestController
@RequestMapping("/skins")
@Tag(name = "/skins", description = "Retrieve Skin Resources")
public class SkinRest {

@Autowired
private SkinService skinService;

@GetMapping("{skinType}/{skinId}")
@Operation(summary = "Redirects to a skin URL which is identified by its id/name", method = "GET")
@ApiResponses(value = {
@ApiResponse(responseCode = "404", description = "Not Found"),
@ApiResponse(responseCode = "302", description = "Found with redirection"),
})
public void getSkin(
HttpServletResponse response,
@Parameter(description = "Skin type: portlet or portal", required = true)
@PathVariable("skinType")
String skinType,
@Parameter(description = "Skin identifier: portal skin name or portlet skin name", required = true)
@PathVariable("skinId")
String skinId,
@Parameter(description = "Skin Name (optional): skin name", required = false)
@RequestParam(name = "skinName", required = false)
String skinName,
@Parameter(description = "Orientation: LT or RT", required = false)
@RequestParam(name = "orientation", defaultValue = "LT", required = false)
Orientation orientation) throws IOException {
SkinConfig skin = getSkinConfig(skinType, skinId, skinName);
if (skin == null) {
throw new ResponseStatusException(HttpStatus.NOT_FOUND,
String.format("Skin with name %s/%s wasn't found", skinType, skinId));
}
String url = skin.createURL().toString(orientation);
response.sendRedirect(url);
}

private SkinConfig getSkinConfig(String skinType, String skinId, String skinName) {
if (StringUtils.equals(skinType, "portal")) {
return skinService.getPortalSkin(skinId, skinName);
} else {
return skinService.getSkin(String.format("%s/%s", skinType, skinId), skinName);
}
}

}
2 changes: 1 addition & 1 deletion component/web/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<parent>
<artifactId>social-component</artifactId>
<groupId>io.meeds.social</groupId>
<version>7.0.x-SNAPSHOT</version>
<version>7.0.x-whitepaper-SNAPSHOT</version>
</parent>
<groupId>io.meeds.social</groupId>
<artifactId>social-component-web</artifactId>
Expand Down
6 changes: 3 additions & 3 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
</parent>
<groupId>io.meeds.social</groupId>
<artifactId>social</artifactId>
<version>7.0.x-SNAPSHOT</version>
<version>7.0.x-whitepaper-SNAPSHOT</version>
<packaging>pom</packaging>
<name>Meeds:: PLF:: Social</name>
<description>Meeds Social - Enterprise Social Networking</description>
Expand All @@ -45,8 +45,8 @@
<!-- **************************************** -->
<!-- Project Dependencies -->
<!-- **************************************** -->
<io.meeds.commons.version>7.0.x-SNAPSHOT</io.meeds.commons.version>
<io.meeds.platform-ui.version>7.0.x-SNAPSHOT</io.meeds.platform-ui.version>
<io.meeds.commons.version>7.0.x-whitepaper-SNAPSHOT</io.meeds.commons.version>
<io.meeds.platform-ui.version>7.0.x-whitepaper-SNAPSHOT</io.meeds.platform-ui.version>

<!-- Sonar properties -->
<sonar.organization>meeds-io</sonar.organization>
Expand Down
23 changes: 0 additions & 23 deletions webapp/.eslintrc.json

This file was deleted.

169 changes: 169 additions & 0 deletions webapp/eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,169 @@
import globals from "globals";
import pluginJs from "@eslint/js";
import pluginVue from "eslint-plugin-vue";
import vuetify from "eslint-config-vuetify";
import pluginVueA11y from "eslint-plugin-vuejs-accessibility";
import { globalIgnores } from "eslint/config";

const a11yConfig = pluginVueA11y.configs["flat/recommended"];
a11yConfig.forEach((x) => {
delete x.languageOptions.globals;
});

export default [
pluginJs.configs.recommended,
...pluginVue.configs["flat/recommended"],
...vuetify,
...a11yConfig,
globalIgnores(["**/*.json"]),
{files: ["**/*.{js,mjs,cjs,vue}"]},
{languageOptions: { globals: globals.browser }},
{
"rules": {
"vue/multi-word-component-names": "off",
"vuejs-accessibility/no-autofocus": "off",
"no-prototype-builtins": ["warn"],
"vue/no-mutating-props": ["warn"],
"no-irregular-whitespace": "error",
"no-unexpected-multiline": "error",
"complexity": ["warn", 32],
"comma-dangle": "warn",
"no-tabs": "error",
"key-spacing": "error",
"keyword-spacing": "error",
"block-scoped-var": ["error"],
"curly": ["error", "all"],
"eqeqeq": ["error", "always", { "null": "ignore" }],
"new-cap": ["error"],
"new-parens": ["error"],
"no-alert": ["error"],
"no-caller": ["error"],
"no-confusing-arrow": ["error"],
"no-console": ["warn", {"allow": ["error"]}],
"no-empty-function": ["error"],
"no-eval": ["error"],
"no-extra-label": ["error"],
"no-extend-native": ["error"],
"no-floating-decimal": ["error"],
"no-implied-eval": ["error"],
"no-iterator": ["error"],
"no-labels": ["error"],
"no-label-var": ["error"],
"no-lone-blocks": ["error"],
"no-loop-func": ["error"],
"no-new-require": ["error"],
"no-path-concat": ["error"],
"no-process-env": ["error"],
"no-process-exit": ["error"],
"no-proto": ["error"],
"no-restricted-imports": ["error", "axios"],
"no-self-compare": ["error"],
"no-sequences": ["error"],
"no-shadow-restricted-names": ["error"],
"no-sync": ["error"],
"no-template-curly-in-string": ["error"],
"no-throw-literal": ["error"],
"no-undefined": ["error"],
"no-unmodified-loop-condition": ["error"],
"no-unused-expressions": ["error"],
"no-useless-computed-key": ["error"],
"no-useless-concat": ["error"],
"no-var": ["error"],
"no-with": ["error"],
"prefer-const": ["error"],
"prefer-promise-reject-errors": ["error"],
"prefer-rest-params": ["error"],
"prefer-spread": ["error"],
"prefer-template": ["error"],
"quotes": ["error", "single"],
"vue/require-explicit-emits": ["warn", {
"allowProps": false
}],
"no-unused-vars": ["error", {
"vars": "all",
"args": "after-used",
"caughtErrors": "none",
"ignoreRestSiblings": false,
"reportUsedIgnorePattern": false
}],
"vue/custom-event-name-casing": ["warn", "kebab-case", {
"ignores": []
}],
"require-await": ["error"],
"semi": ["error", "always"],
"space-before-function-paren": "off",
"yoda": ["error", "never", { "exceptRange": true }],
"vue/max-attributes-per-line": ["warn", {
"singleline": {
"max": 2
},
"multiline": {
"max": 1
}
}],
"vue/singleline-html-element-content-newline": ["off"],
"vue/html-self-closing": ["warn", {
"html": {
"void": "never",
"normal": "never",
"component": "always"
},
"svg": "never",
"math": "never"
}],
"vue/html-closing-bracket-newline": ["warn", {
"singleline": "never",
"multiline": "never"
}],
"vue/component-name-in-template-casing": ["error", "kebab-case"],
"vuejs-accessibility/alt-text": "warn",
"vuejs-accessibility/anchor-has-content": "warn",
"vuejs-accessibility/aria-props": "warn",
"vuejs-accessibility/aria-role": "warn",
"vuejs-accessibility/aria-unsupported-elements": "warn",
"vuejs-accessibility/click-events-have-key-events": "warn",
"vuejs-accessibility/form-control-has-label": "warn",
"vuejs-accessibility/heading-has-content": "warn",
"vuejs-accessibility/iframe-has-title": "warn",
"vuejs-accessibility/interactive-supports-focus": "warn",
"vuejs-accessibility/label-has-for": "warn",
"vuejs-accessibility/media-has-caption": "warn",
"vuejs-accessibility/mouse-events-have-key-events": "warn",
"vuejs-accessibility/no-access-key": "warn",
"vuejs-accessibility/no-autofocus": "warn",
"vuejs-accessibility/no-distracting-elements": "warn",
"vuejs-accessibility/no-onchange": "warn",
"vuejs-accessibility/no-redundant-roles": "warn",
"vuejs-accessibility/no-static-element-interactions": "warn",
"vuejs-accessibility/role-has-required-aria-props": "warn",
"vuejs-accessibility/tabindex-no-positive": "warn"
},
"languageOptions": {
"ecmaVersion": 2022,
"sourceType": "module",
"globals": {
"Vue": true,
"VueI18n": true,
"VueEllipsis": true,
"Vuetify": true,
"eXo": true,
"$": true,
"global": true,
"exoi18n": true,
"extensionRegistry": true,
"CKEDITOR": true,
"cCometd": true,
"activityComposer": true,
"socialUIProfile": true,
"QRCode": true,
"DOMPurify": true,
"ExtendedDomPurify": true,
"Cropper": true,
"Autolinker": true,
"cCometd": true,
"jspdf": true,
"html2canvas": true
}
}
}
];
Loading