akkoma-frontends/admin-fe: init at unstable-2022-09-10

This commit is contained in:
Mikael Voss 2022-09-25 16:01:48 +02:00
parent 6658dfbefb
commit 628b61f33f
No known key found for this signature in database
GPG key ID: D991B1833C467B03
4 changed files with 12624 additions and 0 deletions

View file

@ -0,0 +1,84 @@
{ lib
, stdenv
, fetchFromGitea, fetchYarnDeps
, fixup_yarn_lock, yarn, nodejs
, python3, pkg-config, libsass
}:
stdenv.mkDerivation rec {
pname = "admin-fe";
version = "unstable-2022-09-10";
src = fetchFromGitea {
domain = "akkoma.dev";
owner = "AkkomaGang";
repo = "admin-fe";
rev = "e094e12c3ecb540df839fdf20c5a03d10454fcad";
hash = "sha256-dqkW8p4x+5z1Hd8gp8V4+DsLm8EspVwPXDxtvlp1AIk=";
};
patches = [ ./deps.patch ];
offlineCache = fetchYarnDeps {
yarnLock = ./yarn.lock;
hash = "sha256-h+QUBT2VwPWu2l05Zkcp+0vHN/x40uXxw2KYjq7l/Xk=";
};
nativeBuildInputs = [
fixup_yarn_lock
yarn
nodejs
pkg-config
python3
libsass
];
postPatch = ''
cp ${./yarn.lock} yarn.lock
'';
configurePhase = ''
runHook preConfigure
export HOME="$(mktemp -d)"
yarn config --offline set yarn-offline-mirror ${lib.escapeShellArg offlineCache}
fixup_yarn_lock yarn.lock
yarn install --offline --frozen-lockfile --ignore-platform --ignore-scripts --no-progress --non-interactive
patchShebangs node_modules/cross-env
mkdir -p "$HOME/.node-gyp/${nodejs.version}"
echo 9 >"$HOME/.node-gyp/${nodejs.version}/installVersion"
ln -sfv "${nodejs}/include" "$HOME/.node-gyp/${nodejs.version}"
export npm_config_nodedir=${nodejs}
runHook postConfigure
'';
buildPhase = ''
runHook preBuild
pushd node_modules/node-sass
LIBSASS_EXT=auto yarn run build --offline
popd
export NODE_OPTIONS="--openssl-legacy-provider"
yarn run build:prod --offline
runHook postBuild
'';
installPhase = ''
runHook preInstall
cp -R -v dist $out
runHook postInstall
'';
meta = with lib; {
description = "Admin interface for Akkoma";
homepage = "https://akkoma.dev/AkkomaGang/akkoma-fe/";
license = licenses.agpl3;
maintainers = with maintainers; [ mvs ];
};
}

View file

@ -0,0 +1,46 @@
diff --git a/package.json b/package.json
index f267be19..fb806527 100644
--- a/package.json
+++ b/package.json
@@ -31,14 +31,12 @@
"type": "git",
"url": "git+https://akkoma.dev/AkkomaGang/admin-fe.git"
},
- "resolutions": {
- "prosemirror-model": "1.9.1"
- },
"bugs": {
"url": "https://akkoma.dev/AkkomaGang/admin-fe/-/issues"
},
"dependencies": {
"@babel/runtime": "^7.3.4",
+ "@toast-ui/editor": "^3.2.0",
"axios": "0.18.0",
"clipboard": "1.7.1",
"codemirror": "5.39.2",
@@ -65,7 +63,6 @@
"sortablejs": "1.7.0",
"tiptap": "^1.29.6",
"tiptap-extensions": "^1.32.7",
- "tui-editor": "1.2.7",
"vue": "^2.6.8",
"vue-count-to": "1.0.13",
"vue-i18n": "^8.9.0",
diff --git a/src/components/element-ui/MarkdownEditor/index.vue b/src/components/element-ui/MarkdownEditor/index.vue
index 7ae9fd40..18114701 100644
--- a/src/components/element-ui/MarkdownEditor/index.vue
+++ b/src/components/element-ui/MarkdownEditor/index.vue
@@ -5,10 +5,10 @@
<script>
// deps for editor
import 'codemirror/lib/codemirror.css' // codemirror
-import 'tui-editor/dist/tui-editor.css' // editor ui
-import 'tui-editor/dist/tui-editor-contents.css' // editor content
+import '@toast-ui/editor/dist/tui-editor.css' // editor ui
+import '@toast-ui/editor/dist/tui-editor-contents.css' // editor content
-import Editor from 'tui-editor'
+import Editor from '@toast-ui/editor'
import defaultOptions from './defaultOptions'
export default {

File diff suppressed because it is too large Load diff

View file

@ -1197,6 +1197,7 @@ with pkgs;
akkoma = callPackage ../servers/akkoma { };
akkoma-frontends = recurseIntoAttrs {
pleroma-fe = callPackage ../servers/akkoma/pleroma-fe { };
admin-fe = callPackage ../servers/akkoma/admin-fe { };
};
advancecomp = callPackage ../tools/compression/advancecomp {};