Compare commits

..

9 Commits

Author SHA1 Message Date
github-actions[bot]
04502eb55a chore(master): release 0.38.4 2026-04-10 00:28:09 +03:00
a933d451bd fix: re-apply possibly failed category migrations 2026-04-10 00:15:55 +03:00
dd5f682186 fix: add/update error notifications across the app 2026-04-09 23:25:53 +03:00
github-actions[bot]
40237c5391 chore(master): release 0.38.3 2026-04-09 18:26:38 +03:00
7566679d99 fix: show childless headers on admin category page 2026-04-09 18:23:36 +03:00
Nextcloud bot
658f345d60 fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2026-04-08 02:09:53 +00:00
github-actions[bot]
e04cfb961e chore(master): release 0.38.2 2026-04-08 02:04:18 +03:00
95a9c2ef21 fix: allow closing all dialogs by outside click 2026-04-07 01:33:16 +03:00
5f78d4c9f5 build: replace husky with lefthook 2026-04-07 01:31:33 +03:00
34 changed files with 395 additions and 212 deletions

View File

@@ -1,3 +0,0 @@
#!/usr/bin/env bash
export PHP_CS_FIXER_IGNORE_ENV=1
pnpm lint-staged -- --relative

View File

@@ -1,17 +0,0 @@
module.exports = {
'*.{ts,vue}': ['eslint --fix'],
'*.{scss,vue,ts,md}': ['prettier --write'],
'*.json': (files) => {
const filtered = files.filter(file => !file.includes('openapi.json'))
return filtered.length > 0 ? `prettier --write ${filtered.join(' ')}` : []
},
'*.php': (files) => {
const nonGenFiles = files.filter(file => !file.includes('/gen/'))
const commands = []
if (nonGenFiles.length > 0) {
commands.push('make php-cs-fixer', 'make test')
}
return commands
},
'*Controller.php': [() => 'make openapi', () => 'git add openapi.json openapi-*.json'],
}

View File

@@ -1 +1 @@
{".":"0.38.1"}
{".":"0.38.4"}

View File

@@ -1,5 +1,28 @@
# Changelog
## [0.38.4](https://github.com/chenasraf/nextcloud-forum/compare/v0.38.3...v0.38.4) (2026-04-09)
### Bug Fixes
* add/update error notifications across the app ([dd5f682](https://github.com/chenasraf/nextcloud-forum/commit/dd5f682186cae047c94aa452dbf1aaa95fc6bf42))
* re-apply possibly failed category migrations ([a933d45](https://github.com/chenasraf/nextcloud-forum/commit/a933d451bdda818f6203934fc6b4852e3ddf3bf8))
## [0.38.3](https://github.com/chenasraf/nextcloud-forum/compare/v0.38.2...v0.38.3) (2026-04-09)
### Bug Fixes
* **l10n:** Update translations from Transifex ([658f345](https://github.com/chenasraf/nextcloud-forum/commit/658f345d60727ecd301e48e331f39c749c380668))
* show childless headers on admin category page ([7566679](https://github.com/chenasraf/nextcloud-forum/commit/7566679d99348c04be7a6366481bd900f1bcc0ce))
## [0.38.2](https://github.com/chenasraf/nextcloud-forum/compare/v0.38.1...v0.38.2) (2026-04-06)
### Bug Fixes
* allow closing all dialogs by outside click ([95a9c2e](https://github.com/chenasraf/nextcloud-forum/commit/95a9c2ef21d0af3bede08951980ad40a4a00e778))
## [0.38.1](https://github.com/chenasraf/nextcloud-forum/compare/v0.38.0...v0.38.1) (2026-04-06)

View File

@@ -309,6 +309,21 @@ test-docker:
test-frontend:
$(pnpm_cmd) vitest run
info_xsd_url=https://apps.nextcloud.com/schema/apps/info.xsd
info_xsd=$(build_tools_directory)/info.xsd
$(info_xsd):
@mkdir -p $(build_tools_directory)
curl -sS -o $(info_xsd) $(info_xsd_url)
# lint-appinfo:
# - Validate appinfo/info.xml against the Nextcloud App Store XSD schema
.PHONY: lint-appinfo
lint-appinfo: $(info_xsd)
@echo "\x1b[33mValidating appinfo/info.xml against Nextcloud schema...\x1b[0m"
@xmllint --noout --schema $(info_xsd) appinfo/info.xml
@echo "\x1b[32mappinfo/info.xml is valid.\x1b[0m"
# lint:
# - Lint JS via pnpm and PHP via composer script "lint"
.PHONY: lint

View File

@@ -43,7 +43,7 @@ Create discussions, share ideas, and collaborate with your community directly in
The forum integrates seamlessly with your Nextcloud instance, using your existing accounts and teams for authentication and access control.
]]></description>
<version>0.38.1</version>
<version>0.38.4</version>
<licence>agpl</licence>
<author mail="contact@casraf.dev" homepage="https://casraf.dev">Chen Asraf</author>
<namespace>Forum</namespace>

View File

@@ -54,6 +54,7 @@ OC.L10N.register(
"Saving draft …" : "Saving draft …",
"Draft saved" : "Draft saved",
"Refresh" : "Refresh",
"Back to {name}" : "{name}-ზე დაბრუნება",
"Error" : "Error",
"Created" : "Created",
"Searching …" : "Searching …",
@@ -66,6 +67,7 @@ OC.L10N.register(
"Edit title" : "Edit title",
"Move thread" : "Move thread",
"Notifications" : "შეტყობინებები",
"Files" : "ფაილები",
"Signature" : "Signature",
"Privacy" : "Privacy",
"Enable" : "Enable",

View File

@@ -52,6 +52,7 @@
"Saving draft …" : "Saving draft …",
"Draft saved" : "Draft saved",
"Refresh" : "Refresh",
"Back to {name}" : "{name}-ზე დაბრუნება",
"Error" : "Error",
"Created" : "Created",
"Searching …" : "Searching …",
@@ -64,6 +65,7 @@
"Edit title" : "Edit title",
"Move thread" : "Move thread",
"Notifications" : "შეტყობინებები",
"Files" : "ფაილები",
"Signature" : "Signature",
"Privacy" : "Privacy",
"Enable" : "Enable",

View File

@@ -64,7 +64,10 @@ OC.L10N.register(
"Repair Database Initial Data" : "修復資料庫初始資料",
"Rebuild Statistics" : "重建統計資料",
"Recalculate all forum statistics including account post counts, thread counts, and category counters. Use this if statistics appear incorrect or out of sync." : "重新計算所有論壇統計資料,包括帳號發文數、討論串數及分類計數器。若統計資料顯示不正確或未同步,請使用此功能。",
"Account Roles" : "帳號角色",
"Assign forum roles to accounts. This allows you to grant administrative or moderator privileges to specific accounts." : "為帳號指派論壇角色。此功能可讓您授予特定帳號管理員或版主權限。",
"Account ID" : "帳號 ID",
"Enter account ID" : "輸入帳號 ID",
"Role" : "角色",
"Select a role" : "選取角色",
"Assign Role" : "指派角色",
@@ -234,6 +237,7 @@ OC.L10N.register(
"Submit reply" : "遞交回覆",
"Are you sure you want to discard your reply?" : "您確定您想要放棄回覆?",
"Thread unavailable" : "無法取得討論串",
"Deleted account" : "已刪除的帳號",
"Pinned thread" : "已釘選討論串",
"Locked thread" : "已鎖定討論串",
"Uncategorized" : "未分類",
@@ -282,6 +286,8 @@ OC.L10N.register(
"Error loading category" : "載入分類時發生錯誤",
"No threads yet" : "尚無討論串",
"Be the first to start a discussion in this category." : "成為第一個在此分類開始討論的人。",
"Subcategories" : "子分類",
"Back to {name}" : "回到 {name}",
"No category ID or slug provided" : "未提供分類 ID 或別名",
"Failed to load threads" : "載入討論串失敗",
"Create New Thread" : "建立新討論串",
@@ -296,7 +302,10 @@ OC.L10N.register(
"Threads ({count})" : "討論串 ({count})",
"Replies ({count})" : "回覆 ({count})",
"No threads" : "無討論串",
"This account has not created any threads yet" : "此帳號尚未建立任何討論串",
"No replies" : "無回覆",
"This account has not written any replies yet" : "此帳號尚未發表任何回覆",
"Failed to load profile" : "載入個人資料失敗",
"Enter search query …" : "輸入搜尋關鍵字……",
"Search in threads" : "在討論串中搜尋",
"Search in replies" : "在回覆中搜尋",
@@ -424,6 +433,8 @@ OC.L10N.register(
"Edit category" : "編輯分類",
"Configure category details" : "設定分類詳細資訊",
"Basic information" : "基礎資訊",
"Parent" : "上層",
"-- Select a parent --" : "-- 選取上層 --",
"Enter category name" : "輸入分類名稱",
"Slug" : "別名",
"URL-friendly identifier (e.g., \"{slug}\")" : "適合作為 URL 的識別字串(例如「{slug}」)",
@@ -443,6 +454,8 @@ OC.L10N.register(
"Dark text" : "深色文字",
"Light text" : "淺色文字",
"Preview" : "預覽",
"Hide subcategories on category card" : "在分類卡片上隱藏子分類",
"When enabled, child categories will not appear as links on this category's card on the home page" : "啟用後,子分類將不會在首頁的此分類卡片上以連結形式顯示",
"Manage forum categories and organization" : "管理論壇分類與組織",
"Error loading categories" : "載入分類時發生錯誤",
"No categories in this header" : "此標題中無分類",
@@ -475,6 +488,7 @@ OC.L10N.register(
"Error loading dashboard" : "載入儀表板時發生錯誤",
"Total statistics" : "總統計資料",
"Recent activity (last 7 days)" : "最近活動(過去 7 天)",
"New accounts" : "新帳號",
"New threads" : "新討論串",
"New replies" : "新回覆",
"Top contributors" : "主要貢獻者",
@@ -486,6 +500,7 @@ OC.L10N.register(
"Loading settings …" : "正在載入設定……",
"Error loading settings" : "載入設定時發生錯誤",
"Appearance" : "外觀",
"Customize how your forum looks to people" : "自訂論壇的顯示方式",
"Forum title" : "論壇標題",
"Displayed at the top of the forum home page" : "顯示在論壇首頁頂部",
"Forum subtitle" : "論壇副標題",
@@ -571,13 +586,17 @@ OC.L10N.register(
"Error loading team" : "載入團隊時發生錯誤",
"Editing category permissions for this team. Team membership is managed via Nextcloud Teams." : "編輯此團隊的分類權限。團隊成員資格透過 Nextcloud Teams 進行管理。",
"Set which categories this team can access" : "設定此團隊可存取的分類",
"Manage forum accounts, roles and permissions" : "管理論壇帳號、角色與權限",
"Loading accounts …" : "少女祈禱中...",
"Error loading accounts" : "載入帳號時發生錯誤",
"There are no forum accounts yet" : "目前尚無論壇帳號",
"Roles" : "角色",
"Joined" : "已加入",
"Status" : "狀態",
"Active" : "作用中",
"No roles" : "沒有角色",
"Select roles" : "選取角色",
"Edit roles" : "編輯角色"
"Edit roles" : "編輯角色",
"Edit account roles" : "編輯帳號角色"
},
"nplurals=1; plural=0;");

View File

@@ -62,7 +62,10 @@
"Repair Database Initial Data" : "修復資料庫初始資料",
"Rebuild Statistics" : "重建統計資料",
"Recalculate all forum statistics including account post counts, thread counts, and category counters. Use this if statistics appear incorrect or out of sync." : "重新計算所有論壇統計資料,包括帳號發文數、討論串數及分類計數器。若統計資料顯示不正確或未同步,請使用此功能。",
"Account Roles" : "帳號角色",
"Assign forum roles to accounts. This allows you to grant administrative or moderator privileges to specific accounts." : "為帳號指派論壇角色。此功能可讓您授予特定帳號管理員或版主權限。",
"Account ID" : "帳號 ID",
"Enter account ID" : "輸入帳號 ID",
"Role" : "角色",
"Select a role" : "選取角色",
"Assign Role" : "指派角色",
@@ -232,6 +235,7 @@
"Submit reply" : "遞交回覆",
"Are you sure you want to discard your reply?" : "您確定您想要放棄回覆?",
"Thread unavailable" : "無法取得討論串",
"Deleted account" : "已刪除的帳號",
"Pinned thread" : "已釘選討論串",
"Locked thread" : "已鎖定討論串",
"Uncategorized" : "未分類",
@@ -280,6 +284,8 @@
"Error loading category" : "載入分類時發生錯誤",
"No threads yet" : "尚無討論串",
"Be the first to start a discussion in this category." : "成為第一個在此分類開始討論的人。",
"Subcategories" : "子分類",
"Back to {name}" : "回到 {name}",
"No category ID or slug provided" : "未提供分類 ID 或別名",
"Failed to load threads" : "載入討論串失敗",
"Create New Thread" : "建立新討論串",
@@ -294,7 +300,10 @@
"Threads ({count})" : "討論串 ({count})",
"Replies ({count})" : "回覆 ({count})",
"No threads" : "無討論串",
"This account has not created any threads yet" : "此帳號尚未建立任何討論串",
"No replies" : "無回覆",
"This account has not written any replies yet" : "此帳號尚未發表任何回覆",
"Failed to load profile" : "載入個人資料失敗",
"Enter search query …" : "輸入搜尋關鍵字……",
"Search in threads" : "在討論串中搜尋",
"Search in replies" : "在回覆中搜尋",
@@ -422,6 +431,8 @@
"Edit category" : "編輯分類",
"Configure category details" : "設定分類詳細資訊",
"Basic information" : "基礎資訊",
"Parent" : "上層",
"-- Select a parent --" : "-- 選取上層 --",
"Enter category name" : "輸入分類名稱",
"Slug" : "別名",
"URL-friendly identifier (e.g., \"{slug}\")" : "適合作為 URL 的識別字串(例如「{slug}」)",
@@ -441,6 +452,8 @@
"Dark text" : "深色文字",
"Light text" : "淺色文字",
"Preview" : "預覽",
"Hide subcategories on category card" : "在分類卡片上隱藏子分類",
"When enabled, child categories will not appear as links on this category's card on the home page" : "啟用後,子分類將不會在首頁的此分類卡片上以連結形式顯示",
"Manage forum categories and organization" : "管理論壇分類與組織",
"Error loading categories" : "載入分類時發生錯誤",
"No categories in this header" : "此標題中無分類",
@@ -473,6 +486,7 @@
"Error loading dashboard" : "載入儀表板時發生錯誤",
"Total statistics" : "總統計資料",
"Recent activity (last 7 days)" : "最近活動(過去 7 天)",
"New accounts" : "新帳號",
"New threads" : "新討論串",
"New replies" : "新回覆",
"Top contributors" : "主要貢獻者",
@@ -484,6 +498,7 @@
"Loading settings …" : "正在載入設定……",
"Error loading settings" : "載入設定時發生錯誤",
"Appearance" : "外觀",
"Customize how your forum looks to people" : "自訂論壇的顯示方式",
"Forum title" : "論壇標題",
"Displayed at the top of the forum home page" : "顯示在論壇首頁頂部",
"Forum subtitle" : "論壇副標題",
@@ -569,13 +584,17 @@
"Error loading team" : "載入團隊時發生錯誤",
"Editing category permissions for this team. Team membership is managed via Nextcloud Teams." : "編輯此團隊的分類權限。團隊成員資格透過 Nextcloud Teams 進行管理。",
"Set which categories this team can access" : "設定此團隊可存取的分類",
"Manage forum accounts, roles and permissions" : "管理論壇帳號、角色與權限",
"Loading accounts …" : "少女祈禱中...",
"Error loading accounts" : "載入帳號時發生錯誤",
"There are no forum accounts yet" : "目前尚無論壇帳號",
"Roles" : "角色",
"Joined" : "已加入",
"Status" : "狀態",
"Active" : "作用中",
"No roles" : "沒有角色",
"Select roles" : "選取角色",
"Edit roles" : "編輯角色"
"Edit roles" : "編輯角色",
"Edit account roles" : "編輯帳號角色"
},"pluralForm" :"nplurals=1; plural=0;"
}

25
lefthook.yml Normal file
View File

@@ -0,0 +1,25 @@
pre-commit:
parallel: true
commands:
eslint:
glob: "*.{ts,vue}"
run: pnpm eslint --fix {staged_files} && git add {staged_files}
prettier:
glob: "*.{scss,vue,ts,md}"
run: pnpm prettier --write {staged_files} && git add {staged_files}
prettier-json:
glob: "*.json"
exclude: "openapi.json"
run: pnpm prettier --write {staged_files} && git add {staged_files}
php-cs-fixer:
glob: "*.php"
exclude: "/gen/"
env:
PHP_CS_FIXER_IGNORE_ENV: "1"
run: make php-cs-fixer && make test
openapi:
glob: "*Controller.php"
run: make openapi && git add openapi.json
lint-appinfo:
glob: "appinfo/info.xml"
run: make lint-appinfo

View File

@@ -106,13 +106,10 @@ class CategoryController extends OCSController {
$categoriesByHeader[$headerId][] = $categoryData;
}
// Build result with nested categories (only include headers that have accessible categories)
// Build result with nested categories
$result = [];
foreach ($headers as $header) {
$categories = $categoriesByHeader[$header->getId()] ?? [];
if (empty($categories)) {
continue;
}
$headerData = $header->jsonSerialize();
$headerData['categories'] = $categories;
$result[] = $headerData;

View File

@@ -0,0 +1,88 @@
<?php
declare(strict_types=1);
// SPDX-FileCopyrightText: Chen Asraf <contact@casraf.dev>
// SPDX-License-Identifier: AGPL-3.0-or-later
namespace OCA\Forum\Migration;
use Closure;
use OCP\DB\ISchemaWrapper;
use OCP\IDBConnection;
use OCP\Migration\IOutput;
use OCP\Migration\SimpleMigrationStep;
use Psr\Log\LoggerInterface;
/**
* Version 30 Migration:
* Repair migration to ensure Version 29 columns exist.
* On some PostgreSQL instances, Version 29 may have failed silently,
* leaving parent_id and hide_children_on_card columns missing.
*
* The header_id nullable change is handled separately in postSchemaChange
* via raw SQL so that a failure there cannot block the new column additions.
*/
class Version30Date20260410000000 extends SimpleMigrationStep {
public function __construct(
private IDBConnection $db,
private LoggerInterface $logger,
) {
}
public function changeSchema(IOutput $output, Closure $schemaClosure, array $options): ?ISchemaWrapper {
/** @var ISchemaWrapper $schema */
$schema = $schemaClosure();
$changed = false;
if ($schema->hasTable('forum_categories')) {
$table = $schema->getTable('forum_categories');
if (!$table->hasColumn('parent_id')) {
$table->addColumn('parent_id', 'integer', [
'notnull' => false,
'unsigned' => true,
'default' => null,
]);
$table->addIndex(['parent_id'], 'forum_cat_parent_id_idx');
$changed = true;
}
if (!$table->hasColumn('hide_children_on_card')) {
$table->addColumn('hide_children_on_card', 'boolean', [
'notnull' => false,
'default' => false,
]);
$changed = true;
}
}
return $changed ? $schema : null;
}
public function postSchemaChange(IOutput $output, Closure $schemaClosure, array $options): void {
// Make header_id nullable via raw SQL so a failure here
// does not roll back the column additions above.
try {
$platform = $this->db->getDatabasePlatform();
$tableName = '*PREFIX*forum_categories';
if ($platform instanceof \Doctrine\DBAL\Platforms\PostgreSQLPlatform) {
$this->db->executeStatement(
'ALTER TABLE "' . $tableName . '" ALTER COLUMN "header_id" DROP NOT NULL'
);
} else {
// MySQL / MariaDB / SQLite
$this->db->executeStatement(
'ALTER TABLE `' . $tableName . '` MODIFY `header_id` INT DEFAULT NULL'
);
}
} catch (\Exception $e) {
// Non-fatal: header_id may already be nullable, or the ALTER may not be
// supported in this exact form. Category nesting (parentId) still works
// for new categories as long as the column additions succeeded.
$this->logger->warning('Version30: Could not make header_id nullable (may already be nullable): ' . $e->getMessage());
}
}
}

View File

@@ -14,7 +14,7 @@
"lint": "eslint src",
"lint:fix": "eslint --fix src",
"format": "prettier --write {vite.config.ts,src/,README.md,nextcloud-forum.wiki/**/*.md}",
"prepare": "husky",
"prepare": "lefthook install",
"gen": "simple-scaffold -c . -k",
"test": "vitest",
"test:run": "vitest run"
@@ -46,8 +46,7 @@
"@vue/tsconfig": "^0.9.1",
"eslint": "^10.2.0",
"happy-dom": "^20.8.9",
"husky": "^9.1.7",
"lint-staged": "^16.4.0",
"lefthook": "^1.12.5",
"prettier": "^3.8.1",
"prettier-plugin-vue": "^1.1.6",
"rollup-plugin-visualizer": "^7.0.1",
@@ -59,5 +58,10 @@
"vite-plugin-checker": "^0.12.0",
"vitest": "^4.1.2",
"vue-tsc": "^3.2.6"
},
"pnpm": {
"onlyBuiltDependencies": [
"lefthook"
]
}
}

248
pnpm-lock.yaml generated
View File

@@ -72,12 +72,9 @@ importers:
happy-dom:
specifier: ^20.8.9
version: 20.8.9
husky:
specifier: ^9.1.7
version: 9.1.7
lint-staged:
specifier: ^16.4.0
version: 16.4.0
lefthook:
specifier: ^1.12.5
version: 1.13.6
prettier:
specifier: ^3.8.1
version: 3.8.1
@@ -1496,10 +1493,6 @@ packages:
alien-signals@3.1.2:
resolution: {integrity: sha512-d9dYqZTS90WLiU0I5c6DHj/HcKkF8ZyGN3G5x8wSbslulz70KOxaqCT0hQCo9KOyhVqzqGojvNdJXoTumZOtcw==}
ansi-escapes@7.3.0:
resolution: {integrity: sha512-BvU8nYgGQBxcmMuEeUEmNTvrMVjJNSH7RgW24vXexN4Ven6qCvy4TntnvlnwnMLTVlcRQQdbRY8NKnaIoeWDNg==}
engines: {node: '>=18'}
ansi-regex@5.0.1:
resolution: {integrity: sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==}
engines: {node: '>=8'}
@@ -1768,14 +1761,6 @@ packages:
resolution: {integrity: sha512-Mz9QMT5fJe7bKI7MH31UilT5cEK5EHHRCccw/YRFsRY47AuNgaV6HY3rscp0/I4Q+tTW/5zoqpSeRRI54TkDWA==}
engines: {node: '>= 0.10'}
cli-cursor@5.0.0:
resolution: {integrity: sha512-aCj4O5wKyszjMmDT4tZj93kxyydN/K5zPWSCe6/0AV/AA1pqe5ZBIw0a2ZfPQV7lL5/yb5HsUreJ6UFAF1tEQw==}
engines: {node: '>=18'}
cli-truncate@5.2.0:
resolution: {integrity: sha512-xRwvIOMGrfOAnM1JYtqQImuaNtDEv9v6oIYAs4LIHwTiKee8uwvIi363igssOC0O5U04i4AlENs79LQLu9tEMw==}
engines: {node: '>=20'}
cliui@9.0.1:
resolution: {integrity: sha512-k7ndgKhwoQveBL+/1tqGJYNz097I7WOvwbmmU2AR5+magtbjPWQTS1C5vzGkBC8Ym8UWRzfKUzUUqFLypY4Q+w==}
engines: {node: '>=20'}
@@ -1794,9 +1779,6 @@ packages:
colord@2.9.3:
resolution: {integrity: sha512-jeC1axXpnb0/2nn/Y1LPuLdgXBLH7aDcHu4KEKfqw3CUhX7ZpfBSlPKyqXE6btIgEzfWtrX3/tyBCaCvXvMkOw==}
colorette@2.0.20:
resolution: {integrity: sha512-IfEDxwoWIjkeXL1eXcDiow4UbKjhLdq6/EuSVR9GMN7KVH3r9gQ83e73hsz1Nd1T3ijd5xv1wcWRYO+D6kCI2w==}
colorjs.io@0.5.2:
resolution: {integrity: sha512-twmVoizEW7ylZSN32OgKdXRmo1qg+wT5/6C3xu5b9QsWzSFAhHLn2xd8ro0diCsKfCj1RdaTP/nrcW+vAoQPIw==}
@@ -1811,10 +1793,6 @@ packages:
resolution: {integrity: sha512-y4Mg2tXshplEbSGzx7amzPwKKOCGuoSRP/CjEdwwk0FOGlUbq6lKuoyDZTNZkmxHdJtp54hdfY/JUrdL7Xfdug==}
engines: {node: '>=14'}
commander@14.0.3:
resolution: {integrity: sha512-H+y0Jo/T1RZ9qPP4Eh1pkcQcLRglraJaSLoyOtHxu6AapkjWVCy2Sit1QQ4x3Dng8qDlSsZEet7g5Pq06MvTgw==}
engines: {node: '>=20'}
comment-parser@1.4.1:
resolution: {integrity: sha512-buhp5kePrmda3vhc5B9t7pUQXAb2Tnd0qgpkIhPhkHXxJpiPJ11H0ZEU0oBpJ2QztSbzG/ZxMj/CHsYJqRHmyg==}
engines: {node: '>= 12.0.0'}
@@ -2077,10 +2055,6 @@ packages:
resolution: {integrity: sha512-+h1lkLKhZMTYjog1VEpJNG7NZJWcuc2DDk/qsqSTRRCOXiLjeQ1d1/udrUGhqMxUgAlwKNZ0cf2uqan5GLuS2A==}
engines: {node: '>=6'}
environment@1.1.0:
resolution: {integrity: sha512-xUtoPkMggbz0MPyPiIWr1Kp4aeWJjDZ6SMvURhimjdZgsRuDplF5/s9hcgGhyXMhs+6vpnuoiZ2kFiu3FMnS8Q==}
engines: {node: '>=18'}
error-ex@1.3.4:
resolution: {integrity: sha512-sqQamAnR14VgCr1A618A3sGrygcpK+HEbenA/HiEAkkUwcZIIB/tgWqHFxWgOyDh4nB4JCRimh79dR5Ywc9MDQ==}
@@ -2636,11 +2610,6 @@ packages:
https-browserify@1.0.0:
resolution: {integrity: sha512-J+FkSdyD+0mA0N+81tMotaRMfSL9SGi+xpD3T6YApKsc3bGSXJlfXri3VyFOeYkfLRQisDk1W+jIFFKBeUBbBg==}
husky@9.1.7:
resolution: {integrity: sha512-5gs5ytaNjBrh5Ow3zrvdUUY+0VxIuWVL4i9irt6friV+BqdCfmV11CQTWMiBYWHbXhco+J1kHfTOUkePhCDvMA==}
engines: {node: '>=18'}
hasBin: true
ieee754@1.2.1:
resolution: {integrity: sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==}
@@ -2762,10 +2731,6 @@ packages:
resolution: {integrity: sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==}
engines: {node: '>=8'}
is-fullwidth-code-point@5.1.0:
resolution: {integrity: sha512-5XHYaSyiqADb4RnZ1Bdad6cPp8Toise4TzEjcOYDHZkTCbKgiUl7WTUCpNWHuxmDt91wnsZBc9xinNzopv3JMQ==}
engines: {node: '>=18'}
is-generator-function@1.1.2:
resolution: {integrity: sha512-upqt1SkGkODW9tsGNG5mtXTXtECizwtS2kA161M+gJPc1xdb/Ax629af6YrTwcOeQHbewrPNlE5Dx7kzvXTizA==}
engines: {node: '>= 0.4'}
@@ -2958,6 +2923,60 @@ packages:
layerr@3.0.0:
resolution: {integrity: sha512-tv754Ki2dXpPVApOrjTyRo4/QegVb9eVFq4mjqp4+NM5NaX7syQvN5BBNfV/ZpAHCEHV24XdUVrBAoka4jt3pA==}
lefthook-darwin-arm64@1.13.6:
resolution: {integrity: sha512-m6Lb77VGc84/Qo21Lhq576pEvcgFCnvloEiP02HbAHcIXD0RTLy9u2yAInrixqZeaz13HYtdDaI7OBYAAdVt8A==}
cpu: [arm64]
os: [darwin]
lefthook-darwin-x64@1.13.6:
resolution: {integrity: sha512-CoRpdzanu9RK3oXR1vbEJA5LN7iB+c7hP+sONeQJzoOXuq4PNKVtEaN84Gl1BrVtCNLHWFAvCQaZPPiiXSy8qg==}
cpu: [x64]
os: [darwin]
lefthook-freebsd-arm64@1.13.6:
resolution: {integrity: sha512-X4A7yfvAJ68CoHTqP+XvQzdKbyd935sYy0bQT6Ajz7FL1g7hFiro8dqHSdPdkwei9hs8hXeV7feyTXbYmfjKQQ==}
cpu: [arm64]
os: [freebsd]
lefthook-freebsd-x64@1.13.6:
resolution: {integrity: sha512-ai2m+Sj2kGdY46USfBrCqLKe9GYhzeq01nuyDYCrdGISePeZ6udOlD1k3lQKJGQCHb0bRz4St0r5nKDSh1x/2A==}
cpu: [x64]
os: [freebsd]
lefthook-linux-arm64@1.13.6:
resolution: {integrity: sha512-cbo4Wtdq81GTABvikLORJsAWPKAJXE8Q5RXsICFUVznh5PHigS9dFW/4NXywo0+jfFPCT6SYds2zz4tCx6DA0Q==}
cpu: [arm64]
os: [linux]
lefthook-linux-x64@1.13.6:
resolution: {integrity: sha512-uJl9vjCIIBTBvMZkemxCE+3zrZHlRO7Oc+nZJ+o9Oea3fu+W82jwX7a7clw8jqNfaeBS+8+ZEQgiMHWCloTsGw==}
cpu: [x64]
os: [linux]
lefthook-openbsd-arm64@1.13.6:
resolution: {integrity: sha512-7r153dxrNRQ9ytRs2PmGKKkYdvZYFPre7My7XToSTiRu5jNCq++++eAKVkoyWPduk97dGIA+YWiEr5Noe0TK2A==}
cpu: [arm64]
os: [openbsd]
lefthook-openbsd-x64@1.13.6:
resolution: {integrity: sha512-Z+UhLlcg1xrXOidK3aLLpgH7KrwNyWYE3yb7ITYnzJSEV8qXnePtVu8lvMBHs/myzemjBzeIr/U/+ipjclR06g==}
cpu: [x64]
os: [openbsd]
lefthook-windows-arm64@1.13.6:
resolution: {integrity: sha512-Uxef6qoDxCmUNQwk8eBvddYJKSBFglfwAY9Y9+NnnmiHpWTjjYiObE9gT2mvGVpEgZRJVAatBXc+Ha5oDD/OgQ==}
cpu: [arm64]
os: [win32]
lefthook-windows-x64@1.13.6:
resolution: {integrity: sha512-mOZoM3FQh3o08M8PQ/b3IYuL5oo36D9ehczIw1dAgp1Ly+Tr4fJ96A+4SEJrQuYeRD4mex9bR7Ps56I73sBSZA==}
cpu: [x64]
os: [win32]
lefthook@1.13.6:
resolution: {integrity: sha512-ojj4/4IJ29Xn4drd5emqVgilegAPN3Kf0FQM2p/9+lwSTpU+SZ1v4Ig++NF+9MOa99UKY8bElmVrLhnUUNFh5g==}
hasBin: true
levn@0.4.1:
resolution: {integrity: sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==}
engines: {node: '>= 0.8.0'}
@@ -2968,15 +2987,6 @@ packages:
linkifyjs@4.3.2:
resolution: {integrity: sha512-NT1CJtq3hHIreOianA8aSXn6Cw0JzYOuDQbOrSPe7gqFnCpKP++MQe3ODgO3oh2GJFORkAAdqredOa60z63GbA==}
lint-staged@16.4.0:
resolution: {integrity: sha512-lBWt8hujh/Cjysw5GYVmZpFHXDCgZzhrOm8vbcUdobADZNOK/bRshr2kM3DfgrrtR1DQhfupW9gnIXOfiFi+bw==}
engines: {node: '>=20.17'}
hasBin: true
listr2@9.0.5:
resolution: {integrity: sha512-ME4Fb83LgEgwNw96RKNvKV4VTLuXfoKudAmm2lP8Kk87KaMK0/Xrx/aAkMWmT8mDb+3MlFDspfbCs7adjRxA2g==}
engines: {node: '>=20.0.0'}
local-pkg@1.1.2:
resolution: {integrity: sha512-arhlxbFRmoQHl33a0Zkle/YWlmNwoyt6QNZEIJcqNbdrsix5Lvc4HyyI3EnwxTYlZYc32EbYrQ8SzEZ7dqgg9A==}
engines: {node: '>=14'}
@@ -2991,10 +3001,6 @@ packages:
lodash@4.18.1:
resolution: {integrity: sha512-dMInicTPVE8d1e5otfwmmjlxkZoUpiVLwyeTdUsi/Caj/gfzzblBcCE5sRHV/AsjuCmxWrte2TNGSYuCeCq+0Q==}
log-update@6.1.0:
resolution: {integrity: sha512-9ie8ItPR6tjY5uYJh8K/Zrv/RMZ5VOlOWvtZdEHYSTFKZfIBPQa9tOAEeAWhd+AnIneLJ22w5fjOYtoutpWq5w==}
engines: {node: '>=18'}
longest-streak@3.1.0:
resolution: {integrity: sha512-9Ri+o0JYgehTaVBBDoMqIl8GXtbWg711O3srftcHhZ0dqnETqLaoIK0x17fUw9rFSlK/0NlsKe0Ahhyl5pXE2g==}
@@ -3161,10 +3167,6 @@ packages:
resolution: {integrity: sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==}
engines: {node: '>= 0.6'}
mimic-function@5.0.1:
resolution: {integrity: sha512-VP79XUPxV2CigYP3jWwAUFSku2aKqBH7uTAapFWCBqutsbmDo96KY5o8uh6U+/YSIn5OxJnXp73beVkpqMIGhA==}
engines: {node: '>=18'}
minimalistic-assert@1.0.1:
resolution: {integrity: sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==}
@@ -3290,10 +3292,6 @@ packages:
obug@2.1.1:
resolution: {integrity: sha512-uTqF9MuPraAQ+IsnPf366RG4cP9RtUi7MLO1N3KEc+wb0a6yKpeL0lmk2IB1jY5KHPAlTc6T/JRdC/YqxHNwkQ==}
onetime@7.0.0:
resolution: {integrity: sha512-VXJjc87FScF88uafS3JllDgvAm+c/Slfz06lorj2uAY34rlUu0Nt+v8wreiImcrgAjjIHp1rXpTDlLOGw29WwQ==}
engines: {node: '>=18'}
open@11.0.0:
resolution: {integrity: sha512-smsWv2LzFjP03xmvFoJ331ss6h+jixfA4UUV/Bsiyuu4YJPfN+FIQGOIiv4w9/+MoHkfkJ22UIaQWRVFRfH6Vw==}
engines: {node: '>=20'}
@@ -3615,17 +3613,10 @@ packages:
engines: {node: '>= 0.4'}
hasBin: true
restore-cursor@5.1.0:
resolution: {integrity: sha512-oMA2dcrw6u0YfxJQXm342bFKX/E4sG9rbTzO9ptUcR/e8A33cHuvStiYOwH7fszkZlZ1z/ta9AAoPk2F4qIOHA==}
engines: {node: '>=18'}
reusify@1.1.0:
resolution: {integrity: sha512-g6QUff04oZpHs0eG5p83rFLhHeV00ug/Yf9nZM6fLeUrPguBTkTQOdpAWWspMh55TZfVQDPaN3NQJfbVRAxdIw==}
engines: {iojs: '>=1.0.0', node: '>=0.10.0'}
rfdc@1.4.1:
resolution: {integrity: sha512-q1b3N5QkRUWUl7iyylaaj3kOpIT0N2i9MqIEQXP73GVsN9cw3fdx8X63cEmWhJGi2PPCF23Ijp7ktmd39rawIA==}
ripemd160@2.0.3:
resolution: {integrity: sha512-5Di9UC0+8h1L6ZD2d7awM7E/T4uA1fJRlx6zk/NvdCCVEoAnFqvHmCuNeIKoCeIixBX/q8uM+6ycDvF8woqosA==}
engines: {node: '>= 0.8'}
@@ -3898,14 +3889,6 @@ packages:
resolution: {integrity: sha512-qMCMfhY040cVHT43K9BFygqYbUPFZKHOg7K73mtTWJRb8pyP3fzf4Ixd5SzdEJQ6MRUg/WBnOLxghZtKKurENQ==}
engines: {node: '>=10'}
slice-ansi@7.1.2:
resolution: {integrity: sha512-iOBWFgUX7caIZiuutICxVgX1SdxwAVFFKwt1EvMYYec/NWO5meOJ6K5uQxhrYBdQJne4KxiqZc+KptFOWFSI9w==}
engines: {node: '>=18'}
slice-ansi@8.0.0:
resolution: {integrity: sha512-stxByr12oeeOyY2BlviTNQlYV5xOj47GirPr4yA1hE9JCtxfQN0+tVbkxwCtYDQWhEKWFHsEK48ORg5jrouCAg==}
engines: {node: '>=20'}
source-map-js@1.2.1:
resolution: {integrity: sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==}
engines: {node: '>=0.10.0'}
@@ -6052,10 +6035,6 @@ snapshots:
alien-signals@3.1.2: {}
ansi-escapes@7.3.0:
dependencies:
environment: 1.1.0
ansi-regex@5.0.1: {}
ansi-regex@6.2.2: {}
@@ -6357,15 +6336,6 @@ snapshots:
safe-buffer: 5.2.1
to-buffer: 1.2.2
cli-cursor@5.0.0:
dependencies:
restore-cursor: 5.1.0
cli-truncate@5.2.0:
dependencies:
slice-ansi: 8.0.0
string-width: 8.2.0
cliui@9.0.1:
dependencies:
string-width: 7.2.0
@@ -6382,8 +6352,6 @@ snapshots:
colord@2.9.3: {}
colorette@2.0.20: {}
colorjs.io@0.5.2: {}
combined-stream@1.0.8:
@@ -6394,8 +6362,6 @@ snapshots:
commander@10.0.1: {}
commander@14.0.3: {}
comment-parser@1.4.1: {}
commenting@1.1.0: {}
@@ -6663,8 +6629,6 @@ snapshots:
env-paths@2.2.1: {}
environment@1.1.0: {}
error-ex@1.3.4:
dependencies:
is-arrayish: 0.2.1
@@ -7420,8 +7384,6 @@ snapshots:
https-browserify@1.0.0: {}
husky@9.1.7: {}
ieee754@1.2.1: {}
ignore@5.3.2: {}
@@ -7531,10 +7493,6 @@ snapshots:
is-fullwidth-code-point@3.0.0: {}
is-fullwidth-code-point@5.1.0:
dependencies:
get-east-asian-width: 1.5.0
is-generator-function@1.1.2:
dependencies:
call-bound: 1.0.4
@@ -7702,6 +7660,49 @@ snapshots:
layerr@3.0.0: {}
lefthook-darwin-arm64@1.13.6:
optional: true
lefthook-darwin-x64@1.13.6:
optional: true
lefthook-freebsd-arm64@1.13.6:
optional: true
lefthook-freebsd-x64@1.13.6:
optional: true
lefthook-linux-arm64@1.13.6:
optional: true
lefthook-linux-x64@1.13.6:
optional: true
lefthook-openbsd-arm64@1.13.6:
optional: true
lefthook-openbsd-x64@1.13.6:
optional: true
lefthook-windows-arm64@1.13.6:
optional: true
lefthook-windows-x64@1.13.6:
optional: true
lefthook@1.13.6:
optionalDependencies:
lefthook-darwin-arm64: 1.13.6
lefthook-darwin-x64: 1.13.6
lefthook-freebsd-arm64: 1.13.6
lefthook-freebsd-x64: 1.13.6
lefthook-linux-arm64: 1.13.6
lefthook-linux-x64: 1.13.6
lefthook-openbsd-arm64: 1.13.6
lefthook-openbsd-x64: 1.13.6
lefthook-windows-arm64: 1.13.6
lefthook-windows-x64: 1.13.6
levn@0.4.1:
dependencies:
prelude-ls: 1.2.1
@@ -7711,24 +7712,6 @@ snapshots:
linkifyjs@4.3.2: {}
lint-staged@16.4.0:
dependencies:
commander: 14.0.3
listr2: 9.0.5
picomatch: 4.0.4
string-argv: 0.3.2
tinyexec: 1.0.4
yaml: 2.8.3
listr2@9.0.5:
dependencies:
cli-truncate: 5.2.0
colorette: 2.0.20
eventemitter3: 5.0.4
log-update: 6.1.0
rfdc: 1.4.1
wrap-ansi: 9.0.2
local-pkg@1.1.2:
dependencies:
mlly: 1.8.2
@@ -7743,14 +7726,6 @@ snapshots:
lodash@4.18.1: {}
log-update@6.1.0:
dependencies:
ansi-escapes: 7.3.0
cli-cursor: 5.0.0
slice-ansi: 7.1.2
strip-ansi: 7.2.0
wrap-ansi: 9.0.2
longest-streak@3.1.0: {}
lowlight@3.3.0:
@@ -8058,8 +8033,6 @@ snapshots:
dependencies:
mime-db: 1.52.0
mimic-function@5.0.1: {}
minimalistic-assert@1.0.1: {}
minimalistic-crypto-utils@1.0.1: {}
@@ -8215,10 +8188,6 @@ snapshots:
obug@2.1.1: {}
onetime@7.0.0:
dependencies:
mimic-function: 5.0.1
open@11.0.0:
dependencies:
default-browser: 5.5.0
@@ -8581,15 +8550,8 @@ snapshots:
path-parse: 1.0.7
supports-preserve-symlinks-flag: 1.0.0
restore-cursor@5.1.0:
dependencies:
onetime: 7.0.0
signal-exit: 4.1.0
reusify@1.1.0: {}
rfdc@1.4.1: {}
ripemd160@2.0.3:
dependencies:
hash-base: 3.1.2
@@ -8885,16 +8847,6 @@ snapshots:
astral-regex: 2.0.0
is-fullwidth-code-point: 3.0.0
slice-ansi@7.1.2:
dependencies:
ansi-styles: 6.2.3
is-fullwidth-code-point: 5.1.0
slice-ansi@8.0.0:
dependencies:
ansi-styles: 6.2.3
is-fullwidth-code-point: 5.1.0
source-map-js@1.2.1: {}
source-map@0.6.1: {}

View File

@@ -1,5 +1,11 @@
<template>
<NcDialog :name="strings.title" size="large" :open="open" @update:open="handleClose">
<NcDialog
:name="strings.title"
size="large"
:open="open"
close-on-click-outside
@update:open="handleClose"
>
<div class="bbcode-help">
<!-- Built-in BBCodes Section -->
<section class="bbcode-section">

View File

@@ -107,6 +107,7 @@
:open="uploadDialog"
:name="uploadError ? strings.uploadError : strings.uploadingFile"
:can-close="!!uploadError"
close-on-click-outside
@update:open="uploadDialog = $event"
size="small"
>

View File

@@ -1,5 +1,11 @@
<template>
<NcDialog :name="strings.title" :open="open" size="normal" @update:open="handleClose">
<NcDialog
:name="strings.title"
:open="open"
size="normal"
close-on-click-outside
@update:open="handleClose"
>
<div class="guest-reassign-dialog">
<p class="description">
{{ strings.description }}

View File

@@ -2,6 +2,7 @@
<NcDialog
:name="isEditing ? strings.editTitle : strings.createTitle"
:open="open"
close-on-click-outside
@update:open="handleClose"
size="small"
>
@@ -58,6 +59,7 @@ import NcLoadingIcon from '@nextcloud/vue/components/NcLoadingIcon'
import NcTextField from '@nextcloud/vue/components/NcTextField'
import NcTextArea from '@nextcloud/vue/components/NcTextArea'
import { t } from '@nextcloud/l10n'
import { showError } from '@nextcloud/dialogs'
import { ocs } from '@/axios'
import type { CatHeader } from '@/types'
@@ -176,9 +178,10 @@ export default defineComponent({
this.$emit('saved', savedHeader)
this.$emit('update:open', false)
} catch (e) {
} catch (e: any) {
console.error('Failed to save header', e)
// TODO: Show error notification
const message = e?.response?.data?.error || e?.response?.data?.message || e?.message || ''
showError(t('forum', 'Failed to save header') + (message ? `: ${message}` : ''))
} finally {
this.submitting = false
}

View File

@@ -3,6 +3,7 @@
:name="strings.title"
:open="open"
size="large"
close-on-click-outside
@update:open="$emit('update:open', $event)"
>
<!-- Loading -->

View File

@@ -1,5 +1,11 @@
<template>
<NcDialog :name="title" :open="open" size="large" @update:open="$emit('update:open', $event)">
<NcDialog
:name="title"
:open="open"
size="large"
close-on-click-outside
@update:open="$emit('update:open', $event)"
>
<!-- Loading -->
<div v-if="loading" class="center mt-16 mb-16">
<NcLoadingIcon :size="32" />

View File

@@ -1,5 +1,11 @@
<template>
<NcDialog :name="strings.title" :open="open" @update:open="handleClose" size="small">
<NcDialog
:name="strings.title"
:open="open"
close-on-click-outside
@update:open="handleClose"
size="small"
>
<div class="move-category-dialog">
<p class="dialog-description">{{ strings.description }}</p>

View File

@@ -1,5 +1,11 @@
<template>
<NcDialog :name="strings.title" :open="open" @update:open="handleClose" size="large">
<NcDialog
:name="strings.title"
:open="open"
close-on-click-outside
@update:open="handleClose"
size="large"
>
<div class="post-history-dialog">
<!-- Loading state -->
<div v-if="loading" class="loading-state" aria-live="polite" aria-busy="true">

View File

@@ -9,6 +9,7 @@
"
size="normal"
:open="open"
close-on-click-outside
@update:open="handleClose"
>
<!-- List View -->
@@ -159,6 +160,7 @@ import TextBoxIcon from '@icons/TextBox.vue'
import ArrowDownIcon from '@icons/ArrowDown.vue'
import Pagination from '@/components/Pagination'
import { t } from '@nextcloud/l10n'
import { showError } from '@nextcloud/dialogs'
import { ocs } from '@/axios'
import type { Template } from '@/types'
@@ -353,8 +355,9 @@ export default defineComponent({
this.currentView = 'list'
this.editingTemplate = null
await this.fetchTemplates()
} catch (e) {
} catch (e: any) {
console.error('Failed to save template:', e)
showError(t('forum', 'Failed to save template'))
} finally {
this.saving = false
}
@@ -372,8 +375,9 @@ export default defineComponent({
if (this.currentPage > this.totalPages) {
this.currentPage = this.totalPages
}
} catch (e) {
} catch (e: any) {
console.error('Failed to delete template:', e)
showError(t('forum', 'Failed to delete template'))
}
},

View File

@@ -988,7 +988,7 @@ export default defineComponent({
if (replyForm && typeof replyForm.setSubmitting === 'function') {
replyForm.setSubmitting(false)
}
// TODO: Show error notification
showError(t('forum', 'Failed to submit reply'))
}
},

View File

@@ -45,7 +45,6 @@ vi.mock('@/components/SearchPostResult', () =>
import SearchView from '../SearchView.vue'
import { ocs } from '@/axios'
import { showError } from '@nextcloud/dialogs'
const mockOcsGet = vi.mocked(ocs.get)

View File

@@ -153,6 +153,7 @@
<NcDialog
v-if="deleteDialog.show"
:name="strings.deleteDialogTitle"
close-on-click-outside
@close="deleteDialog.show = false"
>
<div class="delete-dialog-content">
@@ -174,6 +175,7 @@
<NcDialog
v-if="editDialog.show"
:name="editDialog.isEditing ? strings.editBBCodeTitle : strings.createBBCodeTitle"
close-on-click-outside
@close="editDialog.show = false"
>
<div class="bbcode-dialog-content">
@@ -275,6 +277,7 @@ import PageHeader from '@/components/PageHeader'
import AppToolbar from '@/components/AppToolbar'
import { ocs } from '@/axios'
import { t } from '@nextcloud/l10n'
import { showError } from '@nextcloud/dialogs'
interface BBCode {
id: number
@@ -469,9 +472,9 @@ export default defineComponent({
this.editDialog.show = false
this.refresh()
} catch (e) {
} catch (e: any) {
console.error('Failed to save BBCode', e)
// TODO: Show error notification
showError(t('forum', 'Failed to save BBCode'))
} finally {
this.editDialog.submitting = false
}
@@ -483,9 +486,9 @@ export default defineComponent({
enabled: !bbcode.enabled,
})
this.refresh()
} catch (e) {
} catch (e: any) {
console.error('Failed to toggle BBCode', e)
// TODO: Show error notification
showError(t('forum', 'Failed to toggle BBCode'))
}
},
@@ -501,9 +504,9 @@ export default defineComponent({
await ocs.delete(`/bbcodes/${this.deleteDialog.bbcode.id}`)
this.deleteDialog.show = false
this.refresh()
} catch (e) {
} catch (e: any) {
console.error('Failed to delete BBCode', e)
// TODO: Show error notification
showError(t('forum', 'Failed to delete BBCode'))
}
},
},

View File

@@ -239,6 +239,7 @@ import NcTextArea from '@nextcloud/vue/components/NcTextArea'
import ArrowLeftIcon from '@icons/ArrowLeft.vue'
import { ocs } from '@/axios'
import { t } from '@nextcloud/l10n'
import { showError } from '@nextcloud/dialogs'
import { isAdminRole, isModeratorRole, isDefaultRole, isGuestRole } from '@/constants'
import { useCategories } from '@/composables/useCategories'
import type { Category, CategoryPerm, CatHeader, Role, Team } from '@/types'
@@ -796,9 +797,10 @@ export default defineComponent({
// Navigate back to category list
this.$router.push('/admin/categories')
} catch (e) {
} catch (e: any) {
console.error('Failed to save category', e)
// TODO: Show error notification
const message = e?.response?.data?.error || e?.response?.data?.message || e?.message || ''
showError(t('forum', 'Failed to save category') + (message ? `: ${message}` : ''))
} finally {
this.submitting = false
}

View File

@@ -175,6 +175,7 @@
<NcDialog
v-if="deleteDialog.show"
:name="strings.deleteDialogTitle"
close-on-click-outside
@close="deleteDialog.show = false"
>
<div class="delete-dialog-content">
@@ -257,6 +258,7 @@
<NcDialog
v-if="deleteHeaderDialog.show"
:name="strings.deleteHeaderTitle"
close-on-click-outside
@close="deleteHeaderDialog.show = false"
>
<div class="delete-dialog-content">
@@ -349,6 +351,7 @@ import DeleteIcon from '@icons/Delete.vue'
import InformationIcon from '@icons/Information.vue'
import { ocs } from '@/axios'
import { t, n } from '@nextcloud/l10n'
import { showError } from '@nextcloud/dialogs'
import { useCategories } from '@/composables/useCategories'
import type { CategoryHeader, Category, CatHeader } from '@/types'
@@ -557,9 +560,9 @@ export default defineComponent({
this.deleteDialog.show = false
this.refresh()
} catch (e) {
} catch (e: any) {
console.error('Failed to delete category', e)
// TODO: Show error notification
showError(t('forum', 'Failed to delete category'))
}
},
@@ -617,9 +620,9 @@ export default defineComponent({
this.deleteHeaderDialog.show = false
this.refresh()
} catch (e) {
} catch (e: any) {
console.error('Failed to delete header', e)
// TODO: Show error notification
showError(t('forum', 'Failed to delete header'))
}
},

View File

@@ -80,6 +80,7 @@ import SortCalendarDescendingIcon from '@icons/SortCalendarDescending.vue'
import SortCalendarAscendingIcon from '@icons/SortCalendarAscending.vue'
import { ocs } from '@/axios'
import { t } from '@nextcloud/l10n'
import { showError } from '@nextcloud/dialogs'
let debounceTimer: ReturnType<typeof setTimeout> | null = null
@@ -211,8 +212,9 @@ export default defineComponent({
this.restoring = id
await ocs.post(`/moderation/threads/${id}/restore`)
await this.loadData()
} catch (e) {
} catch (e: any) {
console.error('Failed to restore thread', e)
showError(t('forum', 'Failed to restore thread'))
} finally {
this.restoring = null
}
@@ -223,8 +225,9 @@ export default defineComponent({
this.restoring = id
await ocs.post(`/moderation/replies/${id}/restore`)
await this.loadData()
} catch (e) {
} catch (e: any) {
console.error('Failed to restore reply', e)
showError(t('forum', 'Failed to restore reply'))
} finally {
this.restoring = null
}

View File

@@ -229,6 +229,7 @@ import CategoryPermissionsTable, {
} from '@/components/CategoryPermissionsTable'
import { ocs } from '@/axios'
import { t } from '@nextcloud/l10n'
import { showError } from '@nextcloud/dialogs'
import { isAdminRole, isGuestRole, isDefaultRole, systemRoleFallbackColors } from '@/constants'
import { usePublicSettings } from '@/composables/usePublicSettings'
import type { Role, CategoryHeader } from '@/types'
@@ -607,9 +608,9 @@ export default defineComponent({
// Navigate back to role list
this.$router.push('/admin/roles')
} catch (e) {
} catch (e: any) {
console.error('Failed to save role', e)
// TODO: Show error notification
showError(t('forum', 'Failed to save role'))
} finally {
this.submitting = false
}

View File

@@ -186,6 +186,7 @@ import PageHeader from '@/components/PageHeader'
import AppToolbar from '@/components/AppToolbar'
import { ocs } from '@/axios'
import { t } from '@nextcloud/l10n'
import { showError } from '@nextcloud/dialogs'
import type { Role, Team } from '@/types'
export default defineComponent({
@@ -342,9 +343,9 @@ export default defineComponent({
try {
await ocs.delete(`/roles/${roleId}`)
await this.refresh()
} catch (e) {
} catch (e: any) {
console.error('Failed to delete role', e)
// TODO: Show error notification
showError(t('forum', 'Failed to delete role'))
}
},
},

View File

@@ -104,7 +104,12 @@
/>
<!-- Edit Roles Dialog -->
<NcDialog v-if="editingUserId !== null" :name="strings.editRolesTitle" @close="cancelEdit">
<NcDialog
v-if="editingUserId !== null"
:name="strings.editRolesTitle"
close-on-click-outside
@close="cancelEdit"
>
<div class="edit-roles-dialog">
<NcSelect
v-model="editingRoles"
@@ -148,6 +153,7 @@ import PageWrapper from '@/components/PageWrapper'
import PageHeader from '@/components/PageHeader'
import { ocs } from '@/axios'
import { t } from '@nextcloud/l10n'
import { showError } from '@nextcloud/dialogs'
import { isGuestRole } from '@/constants'
import type { Role } from '@/types'
@@ -325,9 +331,9 @@ export default defineComponent({
}
this.cancelEdit()
} catch (e) {
} catch (e: any) {
console.error('Failed to save roles', e)
// TODO: Show error notification
showError(t('forum', 'Failed to save roles'))
}
},
},

View File

@@ -1 +1 @@
0.38.1
0.38.4