limit description characters to 100

This commit is contained in:
2024-04-27 20:40:01 +02:00
parent 33932ee255
commit db15c21617
3 changed files with 17 additions and 6 deletions

18
.idea/workspace.xml generated
View File

@@ -4,7 +4,7 @@
<option name="autoReloadType" value="SELECTIVE" />
</component>
<component name="ChangeListManager">
<list default="true" id="53dd69d3-e01a-4656-b414-c727f5aa549a" name="Changes" comment="wow such feature" />
<list default="true" id="53dd69d3-e01a-4656-b414-c727f5aa549a" name="Changes" comment="copilot leak" />
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
@@ -142,7 +142,7 @@
<workItem from="1673974979200" duration="2385000" />
<workItem from="1674757791435" duration="925000" />
<workItem from="1713448008567" duration="8323000" />
<workItem from="1714235989637" duration="1577000" />
<workItem from="1714235989637" duration="2319000" />
</task>
<task id="LOCAL-00001" summary="feat: remove old index.html in static/">
<created>1660418841831</created>
@@ -341,7 +341,15 @@
<option name="project" value="LOCAL" />
<updated>1713463473768</updated>
</task>
<option name="localTasksCounter" value="29" />
<task id="LOCAL-00029" summary="copilot leak">
<option name="closed" value="true" />
<created>1714242192383</created>
<option name="number" value="00029" />
<option name="presentableId" value="LOCAL-00029" />
<option name="project" value="LOCAL" />
<updated>1714242192383</updated>
</task>
<option name="localTasksCounter" value="30" />
<servers />
</component>
<component name="TypeScriptGeneratedFilesManager">
@@ -359,7 +367,6 @@
</option>
</component>
<component name="VcsManagerConfiguration">
<MESSAGE value="feat: delete needless assets/dir" />
<MESSAGE value="feat: action changes and edit link" />
<MESSAGE value="feat: add favicon" />
<MESSAGE value="fix: broken link" />
@@ -384,7 +391,8 @@
<MESSAGE value="docs: add new plugins docs" />
<MESSAGE value="initial built from the ground up page done" />
<MESSAGE value="wow such feature" />
<option name="LAST_COMMIT_MESSAGE" value="wow such feature" />
<MESSAGE value="copilot leak" />
<option name="LAST_COMMIT_MESSAGE" value="copilot leak" />
</component>
<component name="XSLT-Support.FileAssociations.UIState">
<expand />

View File

@@ -8,7 +8,7 @@ export default function PluginCard({ plugin }) {
<h3>{plugin.name}</h3>
</div>
<div className={styles.cardBody}>
<p>{plugin.description}</p>
<p>{plugin.trimmedDescription}</p>
</div>
<div className={styles.cardFooter}>
<PluginModal plugin={plugin} />

View File

@@ -10,6 +10,9 @@ export default function Plugins() {
const asyncFetch = async () => {
const response = await fetch('https://raw.githubusercontent.com/sern-handler/awesome-plugins/main/pluginlist.json')
const data = await response.json()
data.forEach(pl => {
pl.trimmedDescription = pl.description.length > 100 ? pl.description.slice(0, 100) + "..." : pl.description
})
setPluginList(data)
}
asyncFetch()