first step

This commit is contained in:
Page Asgardius 2023-01-21 18:54:15 -07:00
parent 95bba1f473
commit 9ee818e47a
7 changed files with 48 additions and 2 deletions

View file

@ -20,6 +20,9 @@
android:supportsRtl="true"
android:theme="@style/Theme.AsgardiusS3Manager"
tools:targetApi="31">
<activity
android:name=".Bucketacl"
android:exported="false" />
<activity
android:name=".CorsConfig"
android:configChanges="orientation|keyboardHidden|screenSize|smallestScreenSize|screenLayout|uiMode|keyboardHidden"
@ -64,9 +67,9 @@
android:exported="false" />
<activity
android:name=".ImageViewer"
android:hardwareAccelerated="false"
android:configChanges="orientation|keyboardHidden|screenSize|smallestScreenSize|screenLayout|uiMode|keyboardHidden"
android:exported="false" />
android:exported="false"
android:hardwareAccelerated="false" />
<activity
android:name=".TextViewer"
android:configChanges="orientation|keyboardHidden|screenSize|smallestScreenSize|screenLayout|uiMode|keyboardHidden"

View file

@ -189,6 +189,8 @@ public class BucketSelect extends AppCompatActivity {
copyName(Name.get(position).toString());
} else if (menuItem.getTitle() == getResources().getString(R.string.cors_config)) {
corsConfig(Name.get(position).toString());
} else if (menuItem.getTitle() == getResources().getString(R.string.acl)) {
aclConfig(Name.get(position).toString());
} else if (menuItem.getTitle() == getResources().getString(R.string.file_del)) {
//Toast.makeText(BucketSelect.this, getResources().getString(R.string.pending_feature), Toast.LENGTH_SHORT).show();
delete(prefix + Name.get(position).toString());
@ -388,6 +390,18 @@ public class BucketSelect extends AppCompatActivity {
startActivity(intent);
}
private void aclConfig(String bucket) {
Intent intent = new Intent(this, Bucketacl.class);
intent.putExtra("endpoint", endpoint);
intent.putExtra("username", username);
intent.putExtra("password", password);
intent.putExtra("bucket", bucket);
intent.putExtra("region", location);
intent.putExtra("style", style);
intent.putExtra("pdfendpoint", pdfendpoint);
startActivity(intent);
}
public void copyName (String name) {
ClipboardManager clipboard = (ClipboardManager) getSystemService(Context.CLIPBOARD_SERVICE);
ClipData clip = ClipData.newPlainText("name", name);

View file

@ -0,0 +1,14 @@
package asgardius.page.s3manager;
import androidx.appcompat.app.AppCompatActivity;
import android.os.Bundle;
public class Bucketacl extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_bucketacl);
}
}

View file

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".Bucketacl">
</androidx.constraintlayout.widget.ConstraintLayout>

View file

@ -33,6 +33,10 @@
android:id="@+id/cors_config"
android:title="@string/cors_config" />
<item
android:id="@+id/acl_config"
android:title="@string/acl" />
<item
android:id="@+id/deletefolder"
android:title="@string/file_del" />

View file

@ -115,4 +115,5 @@
<string name="save_links">Guardar enlaces en archivo</string>
<string name="copy_links">Copiar enlaces al potapapeles</string>
<string name="save_ok">Archivo guardado exitosamente</string>
<string name="acl">Permisos de acceso</string>
</resources>

View file

@ -119,4 +119,5 @@
<string name="save_links">Save links to file</string>
<string name="save_ok">File saved successfully</string>
<string name="copy_links">Copy links to clipboard</string>
<string name="acl">Access permissions</string>
</resources>